Versions in this module Expand all Collapse all v1 v1.1.3 May 23, 2025 v1.1.2 Apr 26, 2025 v1.1.1 Apr 11, 2025 v1.1.0 Feb 13, 2025 Changes in this version + const IMAGE_DETAIL_AUTO + const IMAGE_DETAIL_HIGH + const IMAGE_DETAIL_LOW + const VISION_MESSAGE_IMAGE_URL + const VISION_MESSAGE_TEXT + func GenerateImageUrlBase64(file []byte) string type Client + func (client Client) ChatVisionStream(model string, messages []VisionMessage, during func(string)) error + type VisionChatRequest struct + FrequencyPenalty int + MaxTokens int + Messages []VisionMessage + Model string + PresencePenalty int + ResponseFormat struct{ ... } + Stop []string + Stream bool + Temperature float32 + TopP int + type VisionContent struct + ImageUrl *VisionContentImageUrl + Text string + Type string + type VisionContentImageUrl struct + Detail string + Url string + type VisionMessage struct + Content []VisionContent + Role string v1.0.3 Feb 9, 2025 Changes in this version + type ChatToolFuctionDetail struct + Description string + Name string + Parameters ChatToolParameters + type ChatToolFuctionPropertie struct + Description string + Type string + type ChatToolFunction struct + Function ChatToolFuctionDetail + Type string + type ChatToolParameters struct + Properties map[string]ChatToolFuctionPropertie + Required []string + Type string + type ChatToolRequest struct + FrequencyPenalty int + MaxTokens int + Messages []ToolMessage + Model string + PresencePenalty int + ResponseFormat struct{ ... } + Stop []string + Stream bool + Temperature float32 + Tools []ChatToolFunction + TopP int type Client + func (client *Client) ChatWithTools(model string, messages []ToolMessage, toolInfo []ChatToolFunction, ...) error + type ToolMessage struct + Content string + Role string + ToolCallID string + ToolCalls []realToolCalls v1.0.2 Feb 9, 2025 v1.0.1 Feb 7, 2025 Changes in this version type Client + func (client Client) ChatReasonStream(model string, messages []Message, think func(string), during func(string)) error v1.0.0 Jan 27, 2025 Changes in this version + type ChatRequest struct + FrequencyPenalty int + MaxTokens int + Messages []Message + Model string + PresencePenalty int + ResponseFormat struct{ ... } + Stop []string + Stream bool + Temperature float32 + TopP int + type Client struct + Config *ClientConfig + func NewClient(config *ClientConfig) *Client + func (client *Client) Models() ([]Model, error) + func (client Client) Chat(model string, messages []Message) (*Message, error) + func (client Client) ChatStream(model string, messages []Message, during func(string)) error + func (client Client) ChatStreamWithConfig(config ChatRequest, during func(string)) error + func (client Client) ChatWithConfig(config ChatRequest) (*Message, error) + func (client Client) EasyChat(model string, prompt string, message string) (string, error) + type ClientConfig struct + ApiKey string + BaseUrl string + type Message struct + Content string + Role string + type Model struct + ID string + Object string + OwnedBy string