Versions in this module Expand all Collapse all v0 v0.1.0 Jun 25, 2026 Changes in this version + const RoleAssistant + const RoleSystem + const RoleTool + const RoleUser + func Drivers() []string + func Handler(k *togo.Kernel) http.Handler + func RegisterDriver(name string, f DriverFactory) + type ChatRequest struct + MaxTokens int + Messages []Message + Model string + Temperature float64 + Tools []Tool + type ChatResponse struct + Content string + Model string + ToolCalls []ToolCall + Usage Usage + type Chunk struct + Delta string + Done bool + type DriverFactory func(k *togo.Kernel) (Provider, error) + type EmbedRequest struct + Inputs []string + Model string + type EmbedResponse struct + Usage Usage + Vectors [][]float32 + type Message struct + Content string + Name string + Role string + type Provider interface + Chat func(ctx context.Context, req ChatRequest) (ChatResponse, error) + Embed func(ctx context.Context, req EmbedRequest) (EmbedResponse, error) + type Service struct + func FromKernel(k *togo.Kernel) (*Service, bool) + func (s *Service) Chat(ctx context.Context, req ChatRequest) (ChatResponse, error) + func (s *Service) ChatStream(ctx context.Context, req ChatRequest, onChunk func(Chunk) error) error + func (s *Service) Driver() string + func (s *Service) Embed(ctx context.Context, req EmbedRequest) (EmbedResponse, error) + type Streamer interface + ChatStream func(ctx context.Context, req ChatRequest, onChunk func(Chunk) error) error + type Tool struct + Description string + Name string + Parameters map[string]any + type ToolCall struct + Args string + Name string + type Usage struct + CompletionTokens int + PromptTokens int + TotalTokens int