Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ChatMessage ¶
type LLMService ¶
type LLMService struct {
Name string
Protocol string
Hostname string
APIPath string
Headers map[string]string
AuthKey string
}
LLM服务配置
type OllamaRequest ¶
type OpenAIRequest ¶
type OpenAIRequest struct {
Model string `json:"model"`
Messages []ChatMessage `json:"messages"`
Temperature float64 `json:"temperature"`
TopP float64 `json:"top-p"`
MaxTokens int `json:"max-tokens"`
Stream bool `json:"stream"`
}
LLM API请求结构
type OpenAIResponse ¶
type OpenAIResponse struct {
Choices []struct {
Delta struct {
Content string `json:"content"`
} `json:"delta"`
} `json:"choices"`
}
OpenAI响应结构
Click to show internal directories.
Click to hide internal directories.