Documentation
¶
Index ¶
- func WithApiKey(apiKey string) opFunc
- func WithHttpClient(httpClient *http_client.Client) opFunc
- type DeepSeekApi
- func (d *DeepSeekApi) ChatCompletions(req types.ChatRequest) (*http.Response, error)
- func (d *DeepSeekApi) ChatNoStream(req types.ChatRequest) (*types.ChatResponse, error)
- func (d *DeepSeekApi) ChatStream(req types.ChatRequest) (chan types.ChatResponse, error)
- func (d *DeepSeekApi) ListModels() (*types.ModelListResponse, error)
- func (d *DeepSeekApi) UserBalance() (*types.UserBalanceResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithApiKey ¶
func WithApiKey(apiKey string) opFunc
func WithHttpClient ¶
func WithHttpClient(httpClient *http_client.Client) opFunc
Types ¶
type DeepSeekApi ¶
type DeepSeekApi struct {
ApiKey string
// contains filtered or unexported fields
}
func NewDeepSeekApi ¶
func NewDeepSeekApi(opFuncs ...opFunc) *DeepSeekApi
func (*DeepSeekApi) ChatCompletions ¶
func (d *DeepSeekApi) ChatCompletions(req types.ChatRequest) (*http.Response, error)
ChatCompletions chat completions api not stream
func (*DeepSeekApi) ChatNoStream ¶
func (d *DeepSeekApi) ChatNoStream(req types.ChatRequest) (*types.ChatResponse, error)
ChatNoStream chat completions api not stream
func (*DeepSeekApi) ChatStream ¶
func (d *DeepSeekApi) ChatStream(req types.ChatRequest) (chan types.ChatResponse, error)
ChatStream chat completions api stream
func (*DeepSeekApi) ListModels ¶
func (d *DeepSeekApi) ListModels() (*types.ModelListResponse, error)
ListModels list models ,doc link : https://api.deepseek.com/models
func (*DeepSeekApi) UserBalance ¶
func (d *DeepSeekApi) UserBalance() (*types.UserBalanceResponse, error)
UserBalance gets user balance ,doc link: https://api-docs.deepseek.com/zh-cn/api/get-user-balance
Click to show internal directories.
Click to hide internal directories.