Documentation
¶
Index ¶
Constants ¶
View Source
const ( // ProviderOpenAI is the OpenAI provider. ProviderOpenAI = "openai" // ProviderAnthropic is the Anthropic provider. ProviderAnthropic = "anthropic" )
Variables ¶
This section is empty.
Functions ¶
func ProvideLLMProvider ¶
func ProvideLLMProvider(c *Config, logger logging.Logger, tracerProvider tracing.TracerProvider, metricsProvider metrics.Provider) (llm.Provider, error)
ProvideLLMProvider provides an LLM provider from config.
func RegisterLLMProvider ¶
RegisterLLMProvider registers an llm.Provider with the injector.
Types ¶
type Config ¶
type Config struct {
OpenAI *openai.Config `env:"init" envPrefix:"OPENAI_" json:"openai"`
Anthropic *anthropic.Config `env:"init" envPrefix:"ANTHROPIC_" json:"anthropic"`
Provider string `env:"PROVIDER" json:"provider"`
}
Config is the configuration for the LLM provider.
Click to show internal directories.
Click to hide internal directories.