Documentation ¶
Index ¶
- Constants
- func NewOAIProviderConfig(apiKey, model string) oaiProviderConfig
- func NewTextToJSONProvider(config oaiProviderConfig) (baseprovider.TextToJSONProvider, error)
- func NewTextToSpeechProvider(config oaiProviderConfig) (baseprovider.TextToSpeechProvider, error)
- func NewTextToTextProvider(config oaiProviderConfig) (baseprovider.TextToTextProvider, error)
- func NewTextToTextReasoningProvider(config oaiProviderConfig) (baseprovider.TextToTextReasoningProvider, error)
- type TextToEmbeddingProvider
- type TextToJSONProvider
- type TextToSpeechProvider
- type TextToTextProvider
- type TextToTextReasoningProvider
Constants ¶
View Source
const ( OpenAITextToEmbeddingDefaultModel = openai.LargeEmbedding3 OpenAITextToEmbeddingFastModel = openai.SmallEmbedding3 )
View Source
const ( OpenAITextToJSONDefaultModel = openai.GPT4o OpenAITextToJSONDefaultModelFast = openai.GPT4o )
View Source
const ( OpenAITextToTextReasoningDefaultModel = openai.O1Preview OpenAITextToTextReasoningDefaultModelFast = openai.O1Mini )
View Source
const ( OpenAITextToTextDefaultModel = openai.GPT4o OpenAITextToTextDefaultModelFast = openai.GPT4o )
View Source
const (
OpenAITextToSpeechDefaultModel = openai.TTSModel1
)
Variables ¶
This section is empty.
Functions ¶
func NewOAIProviderConfig ¶
func NewOAIProviderConfig(apiKey, model string) oaiProviderConfig
func NewTextToJSONProvider ¶ added in v0.2.0
func NewTextToJSONProvider( config oaiProviderConfig, ) (baseprovider.TextToJSONProvider, error)
func NewTextToSpeechProvider ¶ added in v0.2.3
func NewTextToSpeechProvider( config oaiProviderConfig, ) (baseprovider.TextToSpeechProvider, error)
func NewTextToTextProvider ¶
func NewTextToTextProvider( config oaiProviderConfig, ) (baseprovider.TextToTextProvider, error)
func NewTextToTextReasoningProvider ¶
func NewTextToTextReasoningProvider( config oaiProviderConfig, ) (baseprovider.TextToTextReasoningProvider, error)
Types ¶
type TextToEmbeddingProvider ¶ added in v0.3.2
type TextToEmbeddingProvider struct {
// contains filtered or unexported fields
}
func NewTextToEmbeddingProvider ¶ added in v0.3.2
func NewTextToEmbeddingProvider( config oaiProviderConfig, ) (TextToEmbeddingProvider, error)
func (TextToEmbeddingProvider) Close ¶ added in v0.3.2
func (p TextToEmbeddingProvider) Close() error
func (TextToEmbeddingProvider) GenerateEmbedding ¶ added in v0.3.2
func (TextToEmbeddingProvider) GetModel ¶ added in v0.3.2
func (p TextToEmbeddingProvider) GetModel() string
For now, we are always using the default model
type TextToJSONProvider ¶ added in v0.2.0
type TextToJSONProvider struct {
// contains filtered or unexported fields
}
func (TextToJSONProvider) Close ¶ added in v0.2.0
func (p TextToJSONProvider) Close() error
func (TextToJSONProvider) GenerateCompletion ¶ added in v0.2.0
func (p TextToJSONProvider) GenerateCompletion( ctx context.Context, messages []chat.Message, completionCh chan<- completion.Completion, ) error
func (TextToJSONProvider) GetModel ¶ added in v0.2.0
func (p TextToJSONProvider) GetModel() string
type TextToSpeechProvider ¶ added in v0.2.3
type TextToSpeechProvider struct {
// contains filtered or unexported fields
}
func (TextToSpeechProvider) Close ¶ added in v0.2.3
func (p TextToSpeechProvider) Close() error
func (TextToSpeechProvider) GenerateSpeech ¶ added in v0.2.3
func (TextToSpeechProvider) GetModel ¶ added in v0.2.3
func (p TextToSpeechProvider) GetModel() string
For now, we are always using the default model
type TextToTextProvider ¶
type TextToTextProvider struct {
// contains filtered or unexported fields
}
func (TextToTextProvider) Close ¶
func (p TextToTextProvider) Close() error
func (TextToTextProvider) GenerateCompletion ¶
func (p TextToTextProvider) GenerateCompletion( ctx context.Context, messages []chat.Message, completionCh chan<- completion.Completion, ) error
func (TextToTextProvider) GetModel ¶
func (p TextToTextProvider) GetModel() string
type TextToTextReasoningProvider ¶
type TextToTextReasoningProvider struct {
// contains filtered or unexported fields
}
func (*TextToTextReasoningProvider) Close ¶
func (p *TextToTextReasoningProvider) Close() error
func (*TextToTextReasoningProvider) GenerateCompletion ¶
func (p *TextToTextReasoningProvider) GenerateCompletion( ctx context.Context, messages []chat.Message, completionCh chan<- completion.Completion, ) error
func (*TextToTextReasoningProvider) GetModel ¶
func (p *TextToTextReasoningProvider) GetModel() string
Click to show internal directories.
Click to hide internal directories.