Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var OPENAI_GPT41_Mini = Model{
Name: "gpt-4.1-mini",
ContextSize: 1000000,
}
View Source
var OPENAI_GPT4o = Model{
Name: "gpt-4o",
ContextSize: 128000,
}
Functions ¶
func GenerateSchema ¶
func GenerateSchema[T any]() interface{}
Types ¶
type AzureConfig ¶
type OpenAIProvider ¶
type OpenAIProvider struct {
// contains filtered or unexported fields
}
func NewAzureOpenAIProvider ¶
func NewAzureOpenAIProvider(cfg AzureConfig, systemPrompt string, model Model) (*OpenAIProvider, error)
func NewNativeOpenAIProvider ¶
func NewNativeOpenAIProvider(c OpenAIProviderConfig) *OpenAIProvider
func NewOpenAIProvider ¶
func NewOpenAIProvider(conf OpenAIProviderConfig) *OpenAIProvider
func (*OpenAIProvider) RequestCompletion ¶
func (p *OpenAIProvider) RequestCompletion(prompt string) (string, error)
func (*OpenAIProvider) RequestCompletionWithJSONSchema ¶
func (p *OpenAIProvider) RequestCompletionWithJSONSchema(prompt string, schema any) (string, error)
type OpenAIProviderConfig ¶
type OpenAIProviderConfig struct {
APIKey string
SystemPrompt string
Model Model
BaseUrl string
AzureConfig *AzureConfig // Optional, for Azure OpenAI
}
Click to show internal directories.
Click to hide internal directories.