Documentation
¶
Index ¶
- type CompleteOptions
- type Completer
- type Completion
- type CompletionFormat
- type CompletionReason
- type Embedder
- type Embedding
- type File
- type Image
- type ImageStyle
- type Message
- type MessageRole
- type Model
- type Provider
- type Ranking
- type ReasoningEffort
- type RenderOptions
- type Renderer
- type RerankOptions
- type Reranker
- type Schema
- type StreamHandler
- type Synthesis
- type SynthesizeOptions
- type Synthesizer
- type Tool
- type ToolCall
- type TranscribeOptions
- type Transcriber
- type Transcription
- type Usage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CompleteOptions ¶
type CompleteOptions struct { Stream StreamHandler Effort ReasoningEffort Stop []string Tools []Tool MaxTokens *int Temperature *float32 Format CompletionFormat Schema *Schema }
type Completer ¶
type Completer interface {
Complete(ctx context.Context, messages []Message, options *CompleteOptions) (*Completion, error)
}
type Completion ¶
type Completion struct { ID string Reason CompletionReason Message Message Usage *Usage }
type CompletionFormat ¶
type CompletionFormat string
const (
CompletionFormatJSON CompletionFormat = "json"
)
type CompletionReason ¶
type CompletionReason string
const ( CompletionReasonStop CompletionReason = "stop" CompletionReasonLength CompletionReason = "length" CompletionReasonTool CompletionReason = "tool" CompletionReasonFilter CompletionReason = "filter" )
type ImageStyle ¶
type ImageStyle string
const ( ImageStyleNatural ImageStyle = "natural" ImageStyleVivid ImageStyle = "vivid" )
type Message ¶
type Message struct { Role MessageRole Content string Files []File Tool string ToolCalls []ToolCall }
type MessageRole ¶
type MessageRole string
const ( MessageRoleSystem MessageRole = "system" MessageRoleUser MessageRole = "user" MessageRoleAssistant MessageRole = "assistant" MessageRoleTool MessageRole = "tool" )
type ReasoningEffort ¶
type ReasoningEffort string
const ( ReasoningEffortLow ReasoningEffort = "low" ReasoningEffortMedium ReasoningEffort = "medium" ReasoningEffortHigh ReasoningEffort = "high" )
type RenderOptions ¶
type RenderOptions struct {
Style ImageStyle
}
type RerankOptions ¶
type RerankOptions struct {
Limit *int
}
type StreamHandler ¶
type StreamHandler = func(ctx context.Context, completion Completion) error
type SynthesizeOptions ¶
type SynthesizeOptions struct {
Voice string
}
type Synthesizer ¶
type TranscribeOptions ¶
type Transcriber ¶
type Transcriber interface {
Transcribe(ctx context.Context, input File, options *TranscribeOptions) (*Transcription, error)
}
type Transcription ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.