Documentation
¶
Index ¶
Constants ¶
View Source
const (
BASE_URL = "https://api.deepseek.com"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChatClient ¶
func NewChatClient ¶
func NewChatClient(opts ...ClientOption) *ChatClient
func (*ChatClient) AddAssistantMessage ¶
func (c *ChatClient) AddAssistantMessage(content, reasoningContent string)
func (*ChatClient) AddMessage ¶
func (c *ChatClient) AddMessage(m Message)
func (*ChatClient) AddSystemMessage ¶
func (c *ChatClient) AddSystemMessage(content string)
func (*ChatClient) AddUserMessage ¶
func (c *ChatClient) AddUserMessage(content string)
func (*ChatClient) GetNextChatCompletion ¶
func (c *ChatClient) GetNextChatCompletion() (*Response, error)
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func Initiate ¶
func Initiate(opts ...ClientOption) *Client
type ClientOption ¶
type ClientOption func(*ClientOptions)
type ClientOptions ¶
type Response ¶
type Response struct {
ID string `json:"id"`
Object string `json:"object"`
Created int `json:"created"`
Model string `json:"model"`
Choices []Choice `json:"choices"`
Usage struct {
PromptTokens int `json:"prompt_tokens"`
CompletionTokens int `json:"completion_tokens"`
TotalTokens int `json:"total_tokens"`
PromptTokensDetails struct {
CachedTokens int `json:"cached_tokens"`
} `json:"prompt_tokens_details"`
CompletionTokensDetails struct {
ReasoningTokens int `json:"reasoning_tokens"`
} `json:"completion_tokens_details"`
PromptCacheHitTokens int `json:"prompt_cache_hit_tokens"`
PromptCacheMissTokens int `json:"prompt_cache_miss_tokens"`
} `json:"usage"`
SystemFingerprint string `json:"system_fingerprint"`
}
Click to show internal directories.
Click to hide internal directories.