Documentation ¶
Index ¶
Constants ¶
View Source
const EmbeddingModelProviderOpenAIName string = "openai"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AzureOpenAIConfig ¶
type AzureOpenAIConfig struct {
Deployment string `` /* 139-byte string literal not displayed */
}
type EmbeddingModelProviderOpenAI ¶
type EmbeddingModelProviderOpenAI struct { BaseURL string `usage:"OpenAI API base" default:"https://api.openai.com/v1" env:"OPENAI_BASE_URL" koanf:"baseURL"` APIKey string `` /* 153-byte string literal not displayed */ Model string `usage:"OpenAI model" default:"gpt-4" env:"OPENAI_MODEL" koanf:"openai-model"` EmbeddingModel string `` /* 133-byte string literal not displayed */ EmbeddingEndpoint string `usage:"OpenAI Embedding endpoint" default:"/embeddings" env:"OPENAI_EMBEDDING_ENDPOINT" koanf:"embeddingEndpoint"` APIVersion string `usage:"OpenAI API version (for Azure)" default:"2024-02-01" env:"OPENAI_API_VERSION" koanf:"apiVersion"` APIType string `usage:"OpenAI API type (OPEN_AI, AZURE, AZURE_AD, ...)" default:"OPEN_AI" env:"OPENAI_API_TYPE" koanf:"apiType"` AzureOpenAIConfig AzureOpenAIConfig `koanf:"azure"` }
func (*EmbeddingModelProviderOpenAI) Config ¶
func (p *EmbeddingModelProviderOpenAI) Config() any
func (*EmbeddingModelProviderOpenAI) Configure ¶ added in v0.3.0
func (p *EmbeddingModelProviderOpenAI) Configure() error
func (*EmbeddingModelProviderOpenAI) EmbeddingFunc ¶
func (p *EmbeddingModelProviderOpenAI) EmbeddingFunc() (cg.EmbeddingFunc, error)
func (*EmbeddingModelProviderOpenAI) Name ¶
func (p *EmbeddingModelProviderOpenAI) Name() string
type OpenAIConfig ¶
type OpenAIConfig struct { BaseURL string `usage:"OpenAI API base" default:"https://api.openai.com/v1" env:"OPENAI_BASE_URL" koanf:"baseURL"` APIKey string `` /* 153-byte string literal not displayed */ Model string `usage:"OpenAI model" default:"gpt-4" env:"OPENAI_MODEL" koanf:"openai-model"` EmbeddingModel string `` /* 133-byte string literal not displayed */ EmbeddingEndpoint string `usage:"OpenAI Embedding endpoint" default:"/embeddings" env:"OPENAI_EMBEDDING_ENDPOINT" koanf:"embeddingEndpoint"` APIVersion string `usage:"OpenAI API version (for Azure)" default:"2024-02-01" env:"OPENAI_API_VERSION" koanf:"apiVersion"` APIType string `usage:"OpenAI API type (OPEN_AI, AZURE, AZURE_AD, ...)" default:"OPEN_AI" env:"OPENAI_API_TYPE" koanf:"apiType"` AzureOpenAIConfig AzureOpenAIConfig `koanf:"azure"` }
func (OpenAIConfig) Name ¶ added in v0.3.0
func (o OpenAIConfig) Name() string
Click to show internal directories.
Click to hide internal directories.