Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChatProviderFactory ¶ added in v1.7.4
func ChatProviderFactory(config *AIProviderConfig, tokenManagement contracts2.ITokenManagement) (contracts.IChatAIProvider, error)
ChatProviderFactory creates a Provider based on the given provider config.
func EmbeddingsProviderFactory ¶ added in v1.7.4
func EmbeddingsProviderFactory(config *AIProviderConfig, tokenManagement contracts2.ITokenManagement) (contracts.IEmbeddingAIProvider, error)
EmbeddingsProviderFactory creates a Provider based on the given provider config.
Types ¶
type AIProviderConfig ¶
type AIProviderConfig struct {
ChatProviderName string `mapstructure:"chat_provider_name"`
EmbeddingsProviderName string `mapstructure:"embeddings_provider_name"`
ChatBaseURL string `mapstructure:"chat_base_url"`
EmbeddingsBaseURL string `mapstructure:"embeddings_base_url"`
EmbeddingsModel string `mapstructure:"embeddings_model"`
ChatModel string `mapstructure:"chat_model"`
Stream bool `mapstructure:"stream"`
Temperature float32 `mapstructure:"temperature"`
EncodingFormat string `mapstructure:"encoding_format"`
MaxTokens int `mapstructure:"max_tokens"`
Threshold float64 `mapstructure:"threshold"`
ChatApiKey string `mapstructure:"chat_api_key"`
EmbeddingsApiKey string `mapstructure:"embeddings_api_key"`
ChatApiVersion string `mapstructure:"chat_api_version"`
EmbeddingsApiVersion string `mapstructure:"embeddings_api_version"`
}
Click to show internal directories.
Click to hide internal directories.