Documentation ¶
Index ¶
- type CompleteOptions
- type Completer
- type Completion
- type CompletionFormat
- type CompletionReason
- type Embedder
- type Embeddings
- type File
- type Function
- type FunctionCall
- type Image
- type Message
- type MessageRole
- type Model
- type RenderOptions
- type Renderer
- type Synthesis
- type SynthesizeOptions
- type Synthesizer
- type TranscribeOptions
- type Transcriber
- type Transcription
- type TranslateOptions
- type Translation
- type Translator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CompleteOptions ¶
type CompleteOptions struct { Stream chan<- Completion Stop []string Functions []Function MaxTokens *int Temperature *float32 Format CompletionFormat }
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 }
type CompletionFormat ¶
type CompletionFormat string
const (
CompletionFormatJSON CompletionFormat = "json"
)
type CompletionReason ¶
type CompletionReason string
const ( CompletionReasonStop CompletionReason = "stop" CompletionReasonLength CompletionReason = "length" CompletionReasonFunction CompletionReason = "function" )
type Embedder ¶
type Embedder interface {
Embed(ctx context.Context, content string) (Embeddings, error)
}
type Embeddings ¶
type Embeddings []float32
type Function ¶
type Function struct { Name string Description string Parameters jsonschema.Definition }
type FunctionCall ¶
type Message ¶
type Message struct { Role MessageRole Content string Files []File Function string FunctionCalls []FunctionCall }
type MessageRole ¶
type MessageRole string
const ( MessageRoleSystem MessageRole = "system" MessageRoleUser MessageRole = "user" MessageRoleAssistant MessageRole = "assistant" MessageRoleFunction MessageRole = "function" )
type RenderOptions ¶
type RenderOptions struct { }
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 ¶
type TranslateOptions ¶
type TranslateOptions struct {
Language string
}
type Translation ¶
type Translator ¶
type Translator interface {
Translate(ctx context.Context, content string, options *TranslateOptions) (*Translation, error)
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.