Versions in this module Expand all Collapse all v0 v0.8.8 Jul 5, 2026 v0.8.7 Jun 13, 2026 v0.8.6 Jun 11, 2026 v0.8.5 Jun 7, 2026 v0.8.4 Jun 5, 2026 Changes in this version + var DefaultMaxTokens = config.GetInt("max-tokens", 8192 * 48) + var V4Enabled = config.GetBool("deepseek-v4", true) + type BalanceResponse struct + BalanceInfos []map[string]string + IsAvailable bool + type ChatRequest struct + MaxTokens int + Messages []prompt.Message + Model string + ReasoningEffort string + Stream bool + Thinking Thinking + Tools []toolcall.Tool + UserID string + type ChatResponse struct + Choices []Choice + ID string + Usage *price.Usage + type Choice struct + FinishReason string + Message prompt.Message + type Client interface + Balance func() (*BalanceResponse, error) + Chat func(ctx context.Context, messages []prompt.Message, tools []toolcall.Tool) (*ChatResponse, error) + FIM func(ctx context.Context, req FIMRequest) (*FIMResponse, error) + Models func() (*ModelsResponse, error) + func NewClient(apiKey, baseURL string) Client + type Deepseek struct + func (c *Deepseek) Balance() (*BalanceResponse, error) + func (c *Deepseek) Chat(ctx context.Context, messages []prompt.Message, tools []toolcall.Tool) (*ChatResponse, error) + func (c *Deepseek) FIM(ctx context.Context, req FIMRequest) (*FIMResponse, error) + func (c *Deepseek) Models() (*ModelsResponse, error) + type FIMChoice struct + FinishReason string + Index int + Text string + type FIMRequest struct + Echo bool + MaxTokens int + Model string + Prompt string + Stop any + Stream bool + Suffix string + Temperature float64 + TopP float64 + type FIMResponse struct + Choices []FIMChoice + ID string + Usage FIMUsage + type FIMStreamChunk struct + Choices []FIMChoice + Created int64 + ID string + Model string + Object string + Usage *FIMUsage + type FIMUsage struct + CompletionTokens int + PromptTokens int + TotalTokens int + type Model struct + ID string + Object string + OwnedBy string + type ModelsResponse struct + Data []Model + Object string + type Thinking struct + Type string