Documentation
¶
Index ¶
- type ChatChoice
- type ChatMessage
- type ChatMessages
- type ChatPrompt
- type ChatPromptTokensDetails
- type ChatResponse
- type ChatUsage
- type Config
- type DoubaoChat
- type DoubaoVision
- type Gpt
- type VisionChoice
- type VisionContent
- type VisionImageUrl
- type VisionMessage
- type VisionMessages
- type VisionPrompt
- type VisionResponse
- type VisionUsage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChatChoice ¶ added in v0.12.0
type ChatChoice struct {
Index int `json:"index"`
Message ChatMessage `json:"message"`
LogProbs bool `json:"log_probs"`
FinishReason string `json:"finish_reason"`
}
type ChatMessage ¶ added in v0.12.0
type ChatMessages ¶ added in v0.12.0
type ChatPrompt ¶ added in v0.12.0
type ChatPrompt struct {
Messages []ChatMessages `json:"messages"`
}
type ChatPromptTokensDetails ¶ added in v0.12.0
type ChatPromptTokensDetails struct {
CachedTokens int `json:"cached_tokens"`
}
type ChatResponse ¶ added in v0.12.0
type ChatUsage ¶ added in v0.12.0
type ChatUsage struct {
PromptTokens int `json:"prompt_tokens"`
CompletionTokens int `json:"completion_tokens"`
TotalTokens int `json:"total_tokens"`
PromptTokensDetails ChatPromptTokensDetails `json:"prompt_tokens_details"`
}
type Config ¶
func DefaultConfig ¶
func DefaultConfig() *Config
type DoubaoChat ¶ added in v0.12.0
type DoubaoVision ¶ added in v0.12.0
type Gpt ¶
type VisionChoice ¶ added in v0.12.0
type VisionChoice struct {
Index int `json:"index"`
Message VisionMessage `json:"message"`
LogProbs bool `json:"log_probs"`
FinishReason string `json:"finish_reason"`
}
type VisionContent ¶ added in v0.12.0
type VisionContent struct {
Type string `json:"type"`
Text string `json:"text"`
ImageUrl VisionImageUrl `json:"image_url"`
}
type VisionImageUrl ¶ added in v0.12.0
type VisionImageUrl struct {
Url string `json:"url"`
}
type VisionMessage ¶ added in v0.12.0
type VisionMessages ¶ added in v0.12.0
type VisionMessages struct {
Role string `json:"role"`
Content []VisionContent `json:"content"`
}
type VisionPrompt ¶ added in v0.12.0
type VisionPrompt struct {
Messages []VisionMessages `json:"messages"`
}
type VisionResponse ¶ added in v0.12.0
type VisionResponse struct {
Id string `json:"id"`
Object string `json:"object"`
Created int64 `json:"created"`
Model string `json:"model"`
Choices []VisionChoice `json:"choices"`
Usage VisionUsage `json:"usage"`
}
type VisionUsage ¶ added in v0.12.0
Click to show internal directories.
Click to hide internal directories.