Documentation
¶
Index ¶
- type AIChatHistory
- type AIChatResponse
- type AIEmbeddingResponse
- type AIImageResponse
- type AIMessage
- type AIRoles
- type Email
- type EmailBody
- type ErrorMessage
- type GoogleCallbackData
- type GoogleConfig
- type OpenAIFunctionDefinition
- type OpenAIToolCall
- type SingleEmailRequest
- type StreamedResponse
- type ToolCall
- type ToolCallFunction
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AIChatHistory ¶ added in v1.5.38
type AIChatResponse ¶ added in v1.5.38
type AIEmbeddingResponse ¶ added in v1.16.40
type AIEmbeddingResponse struct {
Embeddings []float64 `json:"embeddings"`
Usage struct {
PromptTokens int `json:"prompt_tokens"`
TotalTokens int `json:"total_tokens"`
} `json:"usage"`
}
func (*AIEmbeddingResponse) GetEmbeddingsFloat32 ¶ added in v1.16.40
func (e *AIEmbeddingResponse) GetEmbeddingsFloat32() []float32
GetEmbeddingsFloat32 converts the embeddings to float32
type AIImageResponse ¶ added in v1.15.15
type AIMessage ¶ added in v1.5.38
type AIMessage struct {
Images []string `json:"images"` //Image URLs or Base64 image data URLs
Files []string `json:"files"` //File URLs or Base64 file data URLs
ToolCalls []OpenAIToolCall `json:"tools,omitempty"` // Tool calls based on OpenAI standards
ToolCallId string `json:"tool_call_id,omitempty"`
Message string `json:"message"`
Metadata map[string]any `json:"metadata"` //Store metadata related to the message, you can also store stringified JSON data
Role AIRoles `json:"role"`
Timestamp time.Time `json:"timestamp"`
UniqueId string `json:"unique_id"`
}
type ErrorMessage ¶ added in v1.3.26
type GoogleCallbackData ¶
type GoogleConfig ¶ added in v1.6.57
type OpenAIFunctionDefinition ¶ added in v1.16.38
type OpenAIToolCall ¶ added in v1.16.38
type SingleEmailRequest ¶ added in v1.4.37
type StreamedResponse ¶ added in v1.13.0
type ToolCall ¶ added in v1.16.35
type ToolCall struct {
Index *int `json:"index,omitempty"`
ID string `json:"id,omitempty"`
Type string `json:"type,omitempty"`
Function ToolCallFunction `json:"function"`
}
type ToolCallFunction ¶ added in v1.16.35
Click to show internal directories.
Click to hide internal directories.