Versions in this module Expand all Collapse all v0 v0.1.0 Feb 15, 2026 Changes in this version + const Anthropic + const DefaultMaxIterations + const EmbeddingTaskTypeDefault + const EventAssistant + const EventError + const EventResult + const EventThinking + const EventTool + const EventUsage + const Gemini + const Mistral + const ResultOK + const RoleAssistant + const RoleSystem + const RoleThinking + const RoleTool + const RoleUser + func WithAttachment(r io.Reader) opt.Opt + func WithAttachmentURL(u string, mimetype string) opt.Opt + type AskRequest struct + Attachments []Attachment + Text string + func (r AskRequest) String() string + type AskResponse struct + Usage *Usage + func (r AskResponse) String() string + type Attachment struct + Data []byte + Type string + URL *url.URL + func (a Attachment) IsText() bool + func (a Attachment) TextContent() string + type ChatRequest struct + Attachments []Attachment + MaxIterations uint + Session string + SystemPrompt string + Text string + Tools []string + func (r ChatRequest) String() string + type ChatResponse struct + Session string + Usage *Usage + func (r ChatResponse) String() string + type CompletionResponse struct + Content []ContentBlock + Result ResultType + Role string + func (r CompletionResponse) String() string + type ContentBlock struct + Attachment *Attachment + Text *string + Thinking *string + ToolCall *ToolCall + ToolResult *ToolResult + func NewToolError(id, name string, err error) ContentBlock + func NewToolResult(id, name string, v any) ContentBlock + type Conversation []*Message + func (s *Conversation) Append(message Message) + func (s *Conversation) AppendWithOuput(message Message, input, output uint) + func (s Conversation) String() string + func (s Conversation) Tokens() uint + type EmbeddingRequest struct + Input []string + Model string + OutputDimensionality uint + Provider string + TaskType string + Title string + func (r EmbeddingRequest) String() string + type EmbeddingResponse struct + Output [][]float64 + func (r EmbeddingResponse) String() string + type GeneratorMeta struct + Format json.RawMessage + Model string + Provider string + SystemPrompt string + Thinking *bool + ThinkingBudget uint + func (r GeneratorMeta) String() string + type GetModelRequest struct + Name string + Provider string + func (r GetModelRequest) String() string + type ListModelsRequest struct + Limit *uint + Offset uint + Provider string + func (r ListModelsRequest) String() string + type ListModelsResponse struct + Body []Model + Count uint + Limit *uint + Offset uint + Provider []string + func (r ListModelsResponse) String() string + type ListSessionRequest struct + Label []string + Limit *uint + Offset uint + func (r ListSessionRequest) String() string + type ListSessionResponse struct + Body []*Session + Count uint + Limit *uint + Offset uint + func (r ListSessionResponse) String() string + type ListToolRequest struct + Limit *uint + Offset uint + func (r ListToolRequest) String() string + type ListToolResponse struct + Body []ToolMeta + Count uint + Limit *uint + Offset uint + func (r ListToolResponse) String() string + type Message struct + Content []ContentBlock + Meta map[string]any + Result ResultType + Role string + Tokens uint + func NewMessage(role string, text string, opts ...opt.Opt) (*Message, error) + func (m Message) EstimateTokens() uint + func (m Message) String() string + func (m Message) Text() string + func (m Message) ToolCalls() []ToolCall + type Model struct + Aliases []string + Created time.Time + Description string + Meta map[string]interface{} + Name string + OwnedBy string + func (m Model) String() string + type MultipartAskRequest struct + File gomultipart.File + func (r *MultipartAskRequest) FileAttachment() (*Attachment, error) + type MultipartChatRequest struct + File gomultipart.File + func (r *MultipartChatRequest) FileAttachment() (*Attachment, error) + type ResultType uint + const ResultBlocked + const ResultError + const ResultMaxIterations + const ResultMaxTokens + const ResultOther + const ResultStop + const ResultToolCall + func (r *ResultType) UnmarshalJSON(data []byte) error + func (r ResultType) MarshalJSON() ([]byte, error) + func (r ResultType) String() string + type Session struct + Created time.Time + ID string + Messages Conversation + Modified time.Time + Overhead uint + func (s *Session) Append(message Message) + func (s *Session) Conversation() *Conversation + func (s *Session) String() string + func (s *Session) Tokens() uint + func (s *Session) Validate() error + type SessionMeta struct + Labels map[string]string + Name string + func (r SessionMeta) String() string + type Store interface + Create func(ctx context.Context, meta SessionMeta) (*Session, error) + Delete func(ctx context.Context, id string) error + Get func(ctx context.Context, id string) (*Session, error) + List func(ctx context.Context, req ListSessionRequest) (*ListSessionResponse, error) + Update func(ctx context.Context, id string, meta SessionMeta) (*Session, error) + Write func(s *Session) error + type StreamDelta struct + Role string + Text string + type StreamError struct + Error string + type ToolCall struct + ID string + Input json.RawMessage + Name string + type ToolMeta struct + Description string + Name string + Schema json.RawMessage + func (r ToolMeta) String() string + type ToolResult struct + Content json.RawMessage + ID string + IsError bool + Name string + type Usage struct + InputTokens uint + OutputTokens uint