Versions in this module Expand all Collapse all v0 v0.2.0 Jul 27, 2026 Changes in this version + type LLMService struct + func NewLLMService(timeout time.Duration) *LLMService + func (s *LLMService) Chat(req *ChatRequest) (*ChatResponse, error) + func (s *LLMService) ChatStream(req *ChatRequest, onContent func(string), onReasoning func(string), ...) + func (s *LLMService) ListModels(baseURL, apiKey string) ([]ModelInfo, error) v0.1.0 Jul 25, 2026 Changes in this version + func BuildAnthropicRequest(req *ChatRequest) map[string]any + func BuildGeminiRequest(req *ChatRequest) map[string]any + func BuildOpenAIRequest(req *ChatRequest) (map[string]any, error) + func BuildOpenAIStreamRequest(req *ChatRequest, tools []OpenAIToolDefinition) (map[string]any, error) + type AnthropicMessage struct + Content string + Role string + type ChatMessage struct + Content string + ReasoningContent string + Role string + ToolCallID string + ToolCalls []ToolCallInfo + type ChatRequest struct + ContextWindow int + Messages []ChatMessage + Model string + ProviderID string + Stream bool + Temperature float64 + Thinking string + Tools bool + type ChatResponse struct + Content string + Model string + ReasoningContent string + Usage *Usage + func ParseAnthropicResponse(body []byte) (*ChatResponse, error) + func ParseGeminiResponse(body []byte) (*ChatResponse, error) + func ParseOpenAIResponse(body []byte) (*ChatResponse, error) + type GeminiContent struct + Parts []struct{ ... } + Role string + type ModelInfo struct + CreatedAt int64 + ID string + OwnedBy string + type OpenAIChatMessage struct + Content string + ReasoningContent string + Role string + ToolCallID string + ToolCalls []ToolCallInfo + type OpenAIChatRequest struct + Messages []OpenAIChatMessage + Model string + Stream bool + StreamOptions *OpenAIStreamOptions + Temperature float64 + Tools []OpenAIToolDefinition + type OpenAIChatResponse struct + Choices []struct{ ... } + Created int64 + ID string + Model string + Object string + Usage *Usage + type OpenAIFunctionDef struct + Description string + Name string + Parameters any + type OpenAIStreamOptions struct + IncludeUsage bool + type OpenAIToolCallDelta struct + Function ... + ID string + Index int + Type string + type OpenAIToolDefinition struct + Function OpenAIFunctionDef + Type string + type StreamEvent string + const StreamEventContent + const StreamEventDone + const StreamEventError + const StreamEventReasoning + const StreamEventToolCall + type ToolCall struct + Arguments string + Name string + type ToolCallInfo struct + Function struct{ ... } + ID string + Type string + type Usage struct + CompletionTokens int + PromptTokens int + TotalTokens int