Versions in this module Expand all Collapse all v0 v0.0.1 Apr 26, 2026 Changes in this version + type AIService struct + func NewAIService(provider, baseURL, model, apiKey string, apiClient *client.Client, ...) *AIService + func (s *AIService) Ask(ctx context.Context, question string, history []ChatMessage) (*AskResponse, error) + func (s *AIService) AskStream(ctx context.Context, question string, history []ChatMessage, cb StreamCallback) error + type Agent struct + func NewAgent(llmClient *openai.Client, apiClient *client.Client, model string, ...) *Agent + func (a *Agent) Ask(ctx context.Context, question string, history []ChatMessage) (*AskResponse, error) + func (a *Agent) AskStream(ctx context.Context, question string, history []ChatMessage, cb StreamCallback) error + type AskResponse struct + Answer string + CompletionTokens int + Model string + PromptTokens int + type ChatMessage struct + Content string + Role string + type StreamCallback func(StreamEvent) + type StreamEvent struct + CompletionTokens int + Content string + PromptTokens int + Tool string + Type string