mirror of
https://github.com/yangjian102621/geekai.git
synced 2025-09-17 16:56:38 +08:00
26 lines
575 B
Go
26 lines
575 B
Go
package types
|
|
|
|
// ApiRequest API 请求实体
|
|
type ApiRequest struct {
|
|
Model string `json:"model"`
|
|
Temperature float32 `json:"temperature"`
|
|
MaxTokens int `json:"max_tokens"`
|
|
Stream bool `json:"stream"`
|
|
Messages []Message `json:"messages"`
|
|
}
|
|
|
|
type Message struct {
|
|
Role string `json:"role"`
|
|
Content string `json:"content"`
|
|
}
|
|
|
|
type ApiResponse struct {
|
|
Choices []ChoiceItem `json:"choices"`
|
|
}
|
|
|
|
// ChoiceItem API 响应实体
|
|
type ChoiceItem struct {
|
|
Delta Message `json:"delta"`
|
|
FinishReason string `json:"finish_reason"`
|
|
}
|