Documentation
¶
Overview ¶
Package dsc provides deepseek client
Index ¶
- type BalanceResponse
- type ChatRequest
- type ChatResponse
- type Choice
- type Client
- type Deepseek
- func (c *Deepseek) Balance() (*BalanceResponse, error)
- func (c *Deepseek) Chat(ctx context.Context, messages []toolcall.Message, tools []toolcall.Tool) (*ChatResponse, error)
- func (c *Deepseek) FIM(ctx context.Context, prompt, suffix string, maxTokens int, temperature float64) (*FIMResponse, error)
- func (c *Deepseek) Models() (*ModelsResponse, error)
- type FIMChoice
- type FIMRequest
- type FIMResponse
- type Model
- type ModelsResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BalanceResponse ¶
type ChatRequest ¶
type ChatRequest struct {
Model string `json:"model"`
Messages []toolcall.Message `json:"messages"`
Tools []toolcall.Tool `json:"tools,omitempty"`
Stream bool `json:"stream"`
MaxTokens int `json:"max_tokens,omitempty"`
}
ChatRequest 扩展,支持 tools
type ChatResponse ¶
ChatResponse 响应
type Choice ¶
type Client ¶
type Client interface {
Models() (*ModelsResponse, error)
Balance() (*BalanceResponse, error)
FIM(ctx context.Context, prompt, suffix string, maxTokens int, temperature float64) (*FIMResponse, error)
Chat(ctx context.Context, messages []toolcall.Message, tools []toolcall.Tool) (*ChatResponse, error)
}
type Deepseek ¶
type Deepseek struct {
// contains filtered or unexported fields
}
func (*Deepseek) Chat ¶
func (c *Deepseek) Chat(ctx context.Context, messages []toolcall.Message, tools []toolcall.Tool) (*ChatResponse, error)
Chat 发送聊天请求
type FIMRequest ¶
type FIMResponse ¶
type Model ¶
Source Files
¶
- client.go
- dsc.go
- dsc_chat.go
- dsc_chat_stream.go
Click to show internal directories.
Click to hide internal directories.