Versions in this module Expand all Collapse all v0 v0.4.5 Jun 23, 2026 Changes in this version + type ListModelsRequest struct + type ListModelsResponse struct + Body []*Model + Count uint + func (m ListModelsResponse) String() string v0.4.4 Jun 11, 2026 Changes in this version + const Anthropic + const BuiltinNamespace + const ConnectorListMax + const DefaultAuthSchema + const DefaultMaxIterations + const DefaultNotifyChannel + const DefaultSchema + const Eliza + const EmbeddingTaskTypeDefault + const EventAssistant + const EventError + const EventProgress + const EventResult + const EventThinking + const EventTool + const EventUsage + const Gemini + const MessageListMax + const Mistral + const Ollama + const OpenAI + const ProviderListMax + const ResultOK + const RoleAssistant + const RoleSystem + const RoleThinking + const RoleTool + const RoleUser + const SessionListMax + var ConnectorURLSchemes = []string + var Objects string + var Queries string + func ApplyGeneratorMeta(values url.Values, meta GeneratorMeta) url.Values + func CanonicalNamespace(ns string) string + func CanonicalURL(rawURL string) (string, error) + func HTTPErr(err error) error + func MetaForKey(meta []MetaValue, key string) any + func MetaMap(meta []MetaValue) map[string]any + func WithAttachment(r io.Reader) opt.Opt + func WithAttachmentURL(u string, mimetype string) opt.Opt + type Agent struct + Created time.Time + ID string + Version uint + func (a Agent) String() string + type AgentList struct + Body []*AgentMeta + Count uint + func (r AgentList) String() string + type AgentListRequest struct + Name []string + Namespace string + func (r AgentListRequest) Query() url.Values + func (r AgentListRequest) String() string + type AgentMeta struct + Description string + Input JSONSchema + Name string + Template string + Title string + Tools []string + func (AgentMeta) Header() []string + func (AgentMeta) Width(i int) int + func (a AgentMeta) Cell(i int) string + func (a AgentMeta) String() string + type AgentStore interface + CreateAgent func(ctx context.Context, meta AgentMeta) (*Agent, error) + DeleteAgent func(ctx context.Context, id string) error + GetAgent func(ctx context.Context, id string) (*Agent, error) + ListAgents func(ctx context.Context, req ListAgentRequest) (*ListAgentResponse, error) + UpdateAgent func(ctx context.Context, id string, meta AgentMeta) (*Agent, error) + type AskRequest struct + Attachments []Attachment + func (r AskRequest) String() string + type AskRequestCore struct + Text string + func (r AskRequestCore) String() string + type AskResponse struct + Usage *UsageMeta + func (r AskResponse) String() string + type Attachment struct + ContentType string + Data []byte + URL *url.URL + func (a *Attachment) UnmarshalJSON(data []byte) error + func (a Attachment) Description() string + func (a Attachment) IsText() bool + func (a Attachment) MarshalJSON() ([]byte, error) + func (a Attachment) Name() string + func (a Attachment) Read(ctx context.Context) ([]byte, error) + func (a Attachment) TextContent() string + func (a Attachment) Type() string + func (a Attachment) URI() string + type CallAgentRequest struct + Attachments []interface{ ... } + func (r CallAgentRequest) String() string + type CallToolRequest struct + Input json.RawMessage + func (r CallToolRequest) String() string + type CallToolResponse struct + Result json.RawMessage + Tool string + func (r CallToolResponse) String() string + type ChatRequest struct + MaxIterations uint + Session uuid.UUID + SystemPrompt string + Text string + Tools []string + func (r ChatRequest) String() string + type ChatResponse struct + ID uint64 + Session uuid.UUID + Usage *UsageMeta + func (r ChatResponse) String() string + type CompletionResponse struct + Content []ContentBlock + Result ResultType + Role string + func (r CompletionResponse) String() string + type Connector struct + CreatedAt time.Time + ModifiedAt *time.Time + func (Connector) Header() []string + func (Connector) Width(i int) int + func (c *Connector) Scan(row pg.Row) error + func (c Connector) Cell(i int) string + func (c Connector) String() string + type ConnectorCapability string + const CapabilityCompletions + const CapabilityLogging + const CapabilityPrompts + const CapabilityResources + const CapabilityTools + type ConnectorGroupList []string + func (list *ConnectorGroupList) Scan(row pg.Row) error + type ConnectorGroupRef struct + Connector string + Group string + func (c ConnectorGroupRef) Insert(bind *pg.Bind) (string, error) + func (c ConnectorGroupRef) Update(_ *pg.Bind) error + type ConnectorGroupSelector struct + Connector string + Group *string + func (c ConnectorGroupSelector) Select(bind *pg.Bind, op pg.Op) (string, error) + type ConnectorInsert struct + URL string + func (c ConnectorInsert) Insert(bind *pg.Bind) (string, error) + func (c ConnectorInsert) String() string + func (c ConnectorInsert) Update(_ *pg.Bind) error + type ConnectorList struct + Body []*Connector + Count uint + func (list *ConnectorList) Scan(row pg.Row) error + func (list *ConnectorList) ScanCount(row pg.Row) error + func (r ConnectorList) String() string + type ConnectorListRequest struct + Enabled *bool + Namespace string + func (r ConnectorListRequest) String() string + func (req ConnectorListRequest) Query() url.Values + func (req ConnectorListRequest) Select(bind *pg.Bind, op pg.Op) (string, error) + type ConnectorMeta struct + Enabled *bool + Groups []string + Meta ProviderMetaMap + Namespace *string + func (c ConnectorMeta) HasTableUpdates() bool + func (c ConnectorMeta) Insert(_ *pg.Bind) (string, error) + func (c ConnectorMeta) String() string + func (c ConnectorMeta) Update(bind *pg.Bind) error + type ConnectorState struct + Capabilities []ConnectorCapability + ConnectedAt *time.Time + Description *string + Name *string + Title *string + Version *string + func (c ConnectorState) HasTableUpdates() bool + func (c ConnectorState) Insert(_ *pg.Bind) (string, error) + func (c ConnectorState) String() string + func (c ConnectorState) Update(bind *pg.Bind) error + type ConnectorStateSelector string + func (c ConnectorStateSelector) Select(bind *pg.Bind, op pg.Op) (string, error) + type ConnectorURLSelector string + func (c ConnectorURLSelector) Select(bind *pg.Bind, op pg.Op) (string, error) + 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 (c Conversation) Last(n int) *Message + func (c Conversation) Len() int + func (c Conversation) String() string + func (s *Conversation) Append(message Message) + func (s *Conversation) AppendWithOuput(message Message, input, output uint) + func (s Conversation) Tokens() uint + type CreateAgentSessionRequest struct + Input json.RawMessage + Parent string + func (r CreateAgentSessionRequest) String() string + type CreateAgentSessionResponse struct + Session string + Text string + Tools []string + func (r CreateAgentSessionResponse) String() string + type CreateConnectorUnauthorizedResponse struct + CodeFlow *oidc.BaseConfiguration + Scopes []string + func (c CreateConnectorUnauthorizedResponse) String() string + type Credential struct + CreatedAt time.Time + func (c *Credential) Scan(row pg.Row) error + func (c Credential) String() string + type CredentialInsert struct + Credentials []byte + func (c CredentialInsert) Insert(bind *pg.Bind) (string, error) + func (c CredentialInsert) RedactedString() string + func (c CredentialInsert) String() string + func (c CredentialInsert) Update(_ *pg.Bind) error + type CredentialKey struct + URL string + User *uuid.UUID + type DeleteModelRequest struct + Name string + Provider string + func (r DeleteModelRequest) String() string + type DownloadModelRequest struct + Name string + Provider string + func (r DownloadModelRequest) String() string + 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 + Usage *UsageMeta + func (r EmbeddingResponse) String() string + type Err int + const ErrBadParameter + const ErrConflict + const ErrInternalServerError + const ErrMaxTokens + const ErrNotFound + const ErrNotImplemented + const ErrPauseTurn + const ErrRefusal + const ErrServiceUnavailable + const ErrSuccess + func (e Err) Error() string + func (e Err) HTTP() httpresponse.Err + func (e Err) With(args ...any) error + func (e Err) Withf(format string, args ...any) error + type GeneratorMeta struct + Format JSONSchema + MaxTokens *uint + Model *string + Provider *string + SystemPrompt *string + Thinking *bool + ThinkingBudget *uint + func GeneratorMetaFromValues(values url.Values) GeneratorMeta + func MergeGeneratorMeta(primary, fallback GeneratorMeta) GeneratorMeta + func (g GeneratorMeta) IsZero() bool + func (g GeneratorMeta) MergeFrom(override GeneratorMeta) GeneratorMeta + func (g GeneratorMeta) String() string + func (g GeneratorMeta) Values() url.Values + type GetModelRequest struct + Name string + Provider string + func (r GetModelRequest) String() string + type JSONSchema json.RawMessage + func NewJSONSchema(data json.RawMessage) JSONSchema + func (s *JSONSchema) UnmarshalJSON(data []byte) error + func (s *JSONSchema) UnmarshalYAML(node *yaml.Node) error + func (s JSONSchema) Bytes() []byte + func (s JSONSchema) MarshalJSON() ([]byte, error) + type ListAgentRequest struct + Limit *uint + Name string + Offset uint + Version *uint + func (r ListAgentRequest) String() string + type ListAgentResponse struct + Body []*Agent + Count uint + Limit *uint + Offset uint + func (r ListAgentResponse) String() string + type Message struct + Content []ContentBlock + ID uint64 + Meta map[string]any + Result ResultType + Role string + Session uuid.UUID + Tokens uint + func NewMessage(role string, text string, opts ...opt.Opt) (*Message, error) + func (Message) Header() []string + func (Message) Width(i int) int + func (m *Message) Scan(row pg.Row) error + func (m Message) Cell(i int) string + func (m Message) EstimateTokens() uint + func (m Message) String() string + func (m Message) Text() string + func (m Message) ToolCalls() []ToolCall + type MessageInsert struct + Session uuid.UUID + func (m *MessageInsert) Scan(row pg.Row) error + func (m MessageInsert) Insert(bind *pg.Bind) (string, error) + func (m MessageInsert) Update(_ *pg.Bind) error + type MessageList struct + Body []*Message + Count uint + func (list *MessageList) Scan(row pg.Row) error + func (list *MessageList) ScanCount(row pg.Row) error + func (r MessageList) String() string + type MessageListRequest struct + Last uint64 + Role string + Sessions []uuid.UUID + Text string + Until uint64 + func (r MessageListRequest) String() string + func (req MessageListRequest) Query() url.Values + func (req MessageListRequest) Select(bind *pg.Bind, op pg.Op) (string, error) + type MetaValue struct + Key string + Value any + func Meta(key string, value any) MetaValue + type Model struct + Aliases []string + Cap ModelCap + Created time.Time + Description string + InputTokenLimit *uint + Meta map[string]any + Name string + OutputTokenLimit *uint + OwnedBy string + func (Model) Header() []string + func (Model) Width(i int) int + func (m Model) Cell(i int) string + func (m Model) String() string + type ModelCap uint32 + const ModelCapCompletion + const ModelCapEmbeddings + const ModelCapThinking + const ModelCapTools + const ModelCapTranscription + const ModelCapTranslation + const ModelCapVision + func (c ModelCap) String() string + type ModelList struct + Body []Model + Count uint + Provider []string + func (r ModelList) String() string + type ModelListRequest struct + Provider string + func (r ModelListRequest) Query() url.Values + func (r ModelListRequest) String() string + type ModelNameSelector struct + Name string + type ModelProviderSelector struct + Name string + Provider string + type MultipartAskRequest struct + File types.File + func (r *MultipartAskRequest) FileAttachment() (*Attachment, error) + type OAuthCredentials struct + ClientID string + ClientSecret string + Endpoint string + TokenURL string + type ProgressEvent struct + Percent float64 + Status string + type Provider struct + CreatedAt time.Time + ModifiedAt *time.Time + Name string + Provider string + func (p *Provider) Scan(row pg.Row) error + func (p Provider) String() string + func (t Provider) Cell(i int) string + func (t Provider) Header() []string + func (t Provider) Width(i int) int + type ProviderCredentials struct + APIKey string + func (p ProviderCredentials) String() string + type ProviderGroupList []string + func (list *ProviderGroupList) Scan(row pg.Row) error + type ProviderGroupRef struct + Group string + Provider string + func (p ProviderGroupRef) Insert(bind *pg.Bind) (string, error) + func (p ProviderGroupRef) Update(_ *pg.Bind) error + type ProviderGroupSelector struct + Group *string + Provider string + func (p ProviderGroupSelector) Select(bind *pg.Bind, op pg.Op) (string, error) + type ProviderInsert struct + Name string + Provider string + func (p ProviderInsert) Insert(bind *pg.Bind) (string, error) + func (p ProviderInsert) String() string + func (p ProviderInsert) Update(_ *pg.Bind) error + type ProviderList struct + Body []*Provider + Count uint64 + func (list *ProviderList) Scan(row pg.Row) error + func (list *ProviderList) ScanCount(row pg.Row) error + func (p ProviderList) String() string + type ProviderListRequest struct + Enabled *bool + Groups []string + Name string + Provider string + func (p ProviderListRequest) String() string + func (req ProviderListRequest) Query() url.Values + func (req ProviderListRequest) Select(bind *pg.Bind, op pg.Op) (string, error) + type ProviderMeta struct + Enabled *bool + Exclude []string + Groups []string + Include []string + Meta ProviderMetaMap + URL *string + func (p ProviderMeta) HasTableUpdates() bool + func (p ProviderMeta) Insert(_ *pg.Bind) (string, error) + func (p ProviderMeta) String() string + func (p ProviderMeta) Update(bind *pg.Bind) error + type ProviderMetaMap map[string]any + func (m *ProviderMetaMap) UnmarshalJSON(data []byte) error + func (m *ProviderMetaMap) UnmarshalText(text []byte) error + type ProviderNameSelector string + func (p ProviderNameSelector) Select(bind *pg.Bind, op pg.Op) (string, 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 + CreatedAt time.Time + ID uuid.UUID + Input uint + ModifiedAt *time.Time + Output uint + Overhead uint + User uuid.UUID + func (Session) Header() []string + func (Session) Width(i int) int + func (s *Session) Scan(row pg.Row) error + func (s *Session) Validate() error + func (s Session) Cell(i int) string + func (s Session) Generator() GeneratorMeta + func (s Session) MarshalJSON() ([]byte, error) + func (s Session) String() string + type SessionChannelRequest struct + MaxIterations uint + SystemPrompt string + Text string + Tools []string + func (r SessionChannelRequest) String() string + type SessionIDSelector uuid.UUID + func (s SessionIDSelector) Select(bind *pg.Bind, op pg.Op) (string, error) + type SessionInsert struct + Parent uuid.UUID + func (s SessionInsert) Insert(bind *pg.Bind) (string, error) + func (s SessionInsert) String() string + func (s SessionInsert) Update(_ *pg.Bind) error + type SessionList struct + Body []*Session + Count uint + func (list *SessionList) Scan(row pg.Row) error + func (list *SessionList) ScanCount(row pg.Row) error + func (s SessionList) String() string + type SessionListRequest struct + Parent *uuid.UUID + Tags []string + Title *string + User *uuid.UUID + func (req SessionListRequest) Query() url.Values + func (req SessionListRequest) Select(bind *pg.Bind, op pg.Op) (string, error) + func (s SessionListRequest) String() string + type SessionMeta struct + Tags []string + Title *string + func (s SessionMeta) Generator() GeneratorMeta + func (s SessionMeta) Insert(_ *pg.Bind) (string, error) + func (s SessionMeta) String() string + func (s SessionMeta) Update(bind *pg.Bind) error + type SessionOverheadSelector uuid.UUID + func (s SessionOverheadSelector) Select(bind *pg.Bind, op pg.Op) (string, error) + type SessionOverheadUpdate struct + Increment uint + func (s SessionOverheadUpdate) Insert(_ *pg.Bind) (string, error) + func (s SessionOverheadUpdate) Update(bind *pg.Bind) error + type StreamDelta struct + Role string + Text string + type StreamError struct + Error string + type ToolCall struct + ID string + Input json.RawMessage + Meta map[string]any + Name string + type ToolList struct + Body []*ToolMeta + Count uint + func (r ToolList) String() string + type ToolListRequest struct + Name []string + Namespace string + func (r ToolListRequest) Query() url.Values + func (r ToolListRequest) String() string + type ToolMeta struct + Description string + Hints []string + Input JSONSchema + Name string + Output JSONSchema + Title string + func (ToolMeta) Header() []string + func (ToolMeta) Width(i int) int + func (r ToolMeta) String() string + func (t ToolMeta) Cell(i int) string + type ToolResult struct + Content json.RawMessage + ID string + IsError bool + Name string + type Usage struct + CreatedAt time.Time + ID uint64 + func (u *Usage) Scan(row pg.Row) error + type UsageInsert struct + Batch *string + Model string + Provider *string + Session uuid.UUID + Type UsageType + User uuid.UUID + func (u UsageInsert) Insert(bind *pg.Bind) (string, error) + func (u UsageInsert) Update(_ *pg.Bind) error + type UsageMeta struct + CacheReadTokens uint + CacheWriteTokens uint + InputTokens uint + Meta ProviderMetaMap + OutputTokens uint + ReasoningTokens uint + type UsageType string + const UsageTypeAsk + const UsageTypeChat + const UsageTypeEmbedding