Versions in this module Expand all Collapse all v1 v1.6.0 Sep 21, 2026 Changes in this version + type ChatRequest struct + ConversationID string + DocsGPT *DocsGPTRequest + Messages []Message + Model string + Stream bool + Tools []Tool + type ChatResponse struct + Choices []Choice + DocsGPT DocsGPTMeta + Usage *Usage + type Choice struct + Delta Delta + FinishReason string + Message Delta + type Client struct + APIKey string + BaseURL string + HTTPClient *http.Client + func NewClient(baseURL, apiKey string) *Client + func (c *Client) RunWithTools(ctx context.Context, messages []Message, tools []Tool, stream bool, ...) ([]Message, error) + func (c *Client) Send(ctx context.Context, req ChatRequest) (*ChatResponse, error) + func (c *Client) SendStream(ctx context.Context, req ChatRequest, onDelta func(Delta, string)) (*ChatResponse, error) + type Delta struct + Content string + ReasoningContent string + Role string + ToolCalls []ToolCall + type DocsGPTMeta struct + ConversationID string + Sources json.RawMessage + ToolCalls json.RawMessage + type DocsGPTRequest struct + Attachments []string + type FunctionCall struct + Arguments string + Name string + type Message struct + Content string + Role string + ToolCallID string + ToolCalls []ToolCall + type Tool struct + Function ToolFunction + Type string + type ToolCall struct + Function FunctionCall + ID string + Index int + Type string + type ToolCallHandler func(tc ToolCall) string + type ToolFunction struct + Description string + Name string + Parameters json.RawMessage + type Usage struct + CompletionTokens int + PromptTokens int + TotalTokens int