providers

package
v1.8.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 1, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

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"`
	ReasoningEffort        *string  `mapstructure:"reasoning_effort"`
	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"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL