Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewChatHistory ¶ added in v1.3.0
func NewChatHistory() contracts.IChatHistory
func NewTokenManager ¶ added in v1.3.0
func NewTokenManager() contracts.ITokenManagement
NewTokenManager creates a new token manager
func ProviderFactory ¶
func ProviderFactory(config *AIProviderConfig, tokenManagement contracts.ITokenManagement) (contracts.IAIProvider, error)
ProviderFactory creates a Provider based on the given provider config.
Types ¶
type AIProviderConfig ¶
type AIProviderConfig struct {
ProviderName string `mapstructure:"provider_name"`
EmbeddingURL string `mapstructure:"embedding_url"`
ChatCompletionURL string `mapstructure:"chat_completion_url"`
EmbeddingModel string `mapstructure:"embedding_model"`
ChatCompletionModel string `mapstructure:"chat_completion_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"`
}
Click to show internal directories.
Click to hide internal directories.