Versions in this module Expand all Collapse all v0 v0.38.2 Mar 13, 2026 v0.38.1 Mar 11, 2026 v0.38.0 Mar 10, 2026 Changes in this version + type CallOption func(*CallOptions) + func WithMaxTokens(n int) CallOption + func WithStopWords(words []string) CallOption + func WithTemperature(t float64) CallOption + func WithTools(tools []Tool) CallOption + func WithTopK(k int) CallOption + func WithTopP(p float64) CallOption + type CallOptions struct + MaxTokens int + StopWords []string + Temperature float64 + Tools []Tool + TopK int + TopP float64 + type Choice struct + Content string + GenerationInfo map[string]any + StopReason string + Thinking []ThinkingPart + ToolCalls []ToolCallPart + type FunctionDef struct + Description string + Name string + Parameters any + type Message struct + Parts []Part + Role Role + func TextMessage(role Role, text string) Message + type Part interface + type Provider interface + GenerateContent func(ctx context.Context, messages []Message, options ...CallOption) (*Response, error) + type Response struct + Choices []*Choice + Usage Usage + type Role string + const RoleAI + const RoleHuman + const RoleSystem + const RoleTool + type TextPart struct + Text string + type ThinkingPart struct + Encrypted string + Signature string + Text string + type Tool struct + Function *FunctionDef + Type string + type ToolCallPart struct + Arguments string + ID string + Name string + Thought bool + ThoughtSignature string + type ToolResultPart struct + Content string + Name string + ToolCallID string + type Usage struct + InputTokens int + OutputTokens int + TotalTokens int