Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChatData ¶
type ChatData struct {
Messages []*Message `json:"history"`
ServerAddr string `json:"uri"`
Model string `json:"model"`
ID string `json:"id"`
ApiKey string `json:"api_key"`
Timeout int64 `json:"timeout"`
LastUpdate int64 `json:"last_update"`
MaxContext int `json:"max_context"`
ChatType ChatType `json:"chat_type"`
}
type ChatRequest ¶
type ChatRequest struct {
Messages []*Message `json:"messages"`
Model string `json:"model"`
Stream bool `json:"stream"` // 设置为 false 获取非流式响应
}
func (*ChatRequest) Marshal ¶
func (cr *ChatRequest) Marshal() []byte
Click to show internal directories.
Click to hide internal directories.