Versions in this module Expand all Collapse all v0 v0.1.5-rc.9 Jul 8, 2026 v0.1.5-rc.8 Jul 6, 2026 v0.1.5-rc.7 Jul 3, 2026 v0.1.5-rc.6 Jul 2, 2026 v0.1.5-rc.4 Jun 29, 2026 v0.1.5-rc.3 Jun 24, 2026 v0.1.5-rc.2 Jun 23, 2026 v0.1.5-rc.1 Jun 14, 2026 v0.1.4 Jun 13, 2026 Changes in this version + const Version + var NewToolResultDenied = message.NewToolResultDenied + var NewToolResultJSON = message.NewToolResultJSON + var NewToolResultText = message.NewToolResultText + var ToolOutcome = message.ToolOutcome + var ToolOutputIsError = message.ToolOutputIsError + var ToolOutputText = message.ToolOutputText + var ToolOutputWire = message.ToolOutputWire + type ContentOutput = message.ContentOutput + type ErrorJSONOutput = message.ErrorJSONOutput + type ErrorTextOutput = message.ErrorTextOutput + type ExecutionDeniedOutput = message.ExecutionDeniedOutput + type JSONOutput = message.JSONOutput + type TextOutput = message.TextOutput + type ToolContentItem = message.ToolContentItem + type ToolResultOutput = message.ToolResultOutput + type ToolResultPart = message.ToolResultPart v0.1.2 May 6, 2026 Changes in this version type GenerateTextResult + Sources []stream.SourceEvent + type SourceContentPart struct type StepResult + func (s *StepResult) Sources() []stream.SourceEvent v0.1.1 Apr 29, 2026 Changes in this version + var NewAssistantMessage = message.NewAssistantMessage + var NewAssistantMessageWithParts = message.NewAssistantMessageWithParts + var NewSystemMessage = message.NewSystemMessage + var NewToolMessage = message.NewToolMessage + var NewUserMessage = message.NewUserMessage + func CosineSimilarity(a, b []float64) float64 + func DotProduct(a, b []float64) float64 + func EuclideanDistance(a, b []float64) float64 + func IsStopConditionMet(stopConditions []StopCondition, steps []StepResult) bool + func StreamText(ctx context.Context, input stream.Input) (*stream.Result, error) + func Tool(name, description string, schema json.RawMessage, execute tool.ExecuteFunc) tool.Tool + type ContentPart interface + type EmbedInput struct + AbortSignal context.Context + Dimensions *int + Headers map[string]string + Model model.EmbeddingModel + ProviderOptions map[string]any + Value string + Values []string + type EmbedResult struct + Embedding []float64 + Embeddings []Embedding + Response EmbeddingResponseMeta + Usage EmbeddingUsage + func Embed(ctx context.Context, input EmbedInput) (*EmbedResult, error) + func EmbedMany(ctx context.Context, input EmbedInput) (*EmbedResult, error) + type Embedding struct + Index int + Values []float64 + type EmbeddingResponseMeta struct + Headers map[string]string + ID string + Model string + type EmbeddingUsage struct + Tokens int + type EventType = stream.EventType + type GenerateTextResponseMeta struct + ID string + Messages []message.Message + Model string + type GenerateTextResult struct + FinishReason stream.FinishReason + Output any + Response GenerateTextResponseMeta + Steps []StepResult + Text string + ToolCalls []stream.ToolCall + ToolResults []stream.ToolResultEvent + Usage stream.Usage + func GenerateText(ctx context.Context, input stream.Input) (*GenerateTextResult, error) + type GeneratedImage struct + Base64 string + MimeType string + RevisedPrompt string + Seed *int64 + URL string + type ImageInput struct + AbortSignal context.Context + AspectRatio string + Headers map[string]string + Model model.ImageModel + N int + Prompt string + ProviderOptions map[string]any + Seed *int64 + Size string + type ImageResponseMeta struct + Headers map[string]string + ID string + Model string + Timestamp int64 + type ImageResult struct + Images []GeneratedImage + Response ImageResponseMeta + Usage *ImageUsage + Warnings []stream.Warning + func GenerateImage(ctx context.Context, input ImageInput) (*ImageResult, error) + type ImageUsage struct + Steps int + TotalTokens int + type Message = message.Message + type Part = message.Part + type RankedDocument struct + Document string + Index int + Score float64 + type ReasoningContentPart struct + ID string + ProviderOptions map[string]any + Text string + type ReasoningPart = message.ReasoningPart + type RerankInput struct + AbortSignal context.Context + Documents []string + Headers map[string]string + Model model.RerankingModel + ProviderOptions map[string]any + Query string + ReturnDocuments bool + TopN int + type RerankResponseMeta struct + Headers map[string]string + ID string + Model string + type RerankResult struct + Response RerankResponseMeta + Results []RankedDocument + Usage RerankUsage + func Rerank(ctx context.Context, input RerankInput) (*RerankResult, error) + type RerankUsage struct + SearchUnits int + Tokens int + type SpeechInput struct + AbortSignal context.Context + Headers map[string]string + Model model.SpeechModel + OutputFormat string + ProviderOptions map[string]any + Speed *float64 + Text string + Voice string + type SpeechResponseMeta struct + Headers map[string]string + ID string + Model string + type SpeechResult struct + Audio []byte + AudioReader io.Reader + Duration *float64 + MimeType string + Response SpeechResponseMeta + Usage *SpeechUsage + Warnings []stream.Warning + func GenerateSpeech(ctx context.Context, input SpeechInput) (*SpeechResult, error) + type SpeechUsage struct + Characters int + Seconds float64 + type StepResponseMeta struct + Messages []message.Message + type StepResult struct + Content []ContentPart + FinishReason stream.FinishReason + Response StepResponseMeta + Usage stream.Usage + func (s *StepResult) DynamicToolCalls() []stream.ToolCall + func (s *StepResult) DynamicToolResults() []stream.ToolResultEvent + func (s *StepResult) GetFinishReason() stream.FinishReason + func (s *StepResult) GetUsage() stream.Usage + func (s *StepResult) Reasoning() []ReasoningContentPart + func (s *StepResult) ReasoningText() string + func (s *StepResult) StaticToolCalls() []stream.ToolCall + func (s *StepResult) StaticToolResults() []stream.ToolResultEvent + func (s *StepResult) Text() string + func (s *StepResult) ToolCalls() []stream.ToolCall + func (s *StepResult) ToolResults() []stream.ToolResultEvent + type StopCondition func(steps []StepResult) bool + func HasToolCall(toolName string) StopCondition + func StepCountIs(stepCount int) StopCondition + type StreamEvent = stream.Event + type StreamResult = stream.Result + type TextContentPart struct + Text string + type TextPart = message.TextPart + type ToolCallContentPart struct + Dynamic bool + type ToolCallPart = message.ToolCallPart + type ToolResultContentPart struct + Dynamic bool + type ToolSet = tool.Set + type TranscribeInput struct + AbortSignal context.Context + Audio []byte + AudioReader io.Reader + Filename string + Headers map[string]string + Language string + MimeType string + Model model.TranscriptionModel + Prompt string + ProviderOptions map[string]any + type TranscriptionResponseMeta struct + Headers map[string]string + ID string + Model string + type TranscriptionResult struct + Duration *float64 + Language string + Response TranscriptionResponseMeta + Segments []TranscriptionSegment + Text string + Usage *TranscriptionUsage + Warnings []stream.Warning + func Transcribe(ctx context.Context, input TranscribeInput) (*TranscriptionResult, error) + type TranscriptionSegment struct + Confidence float64 + End float64 + ID int + Start float64 + Text string + Words []TranscriptionWord + type TranscriptionUsage struct + DurationSeconds float64 + type TranscriptionWord struct + Confidence float64 + End float64 + Start float64 + Word string v0.1.0 Apr 24, 2026