Documentation
¶
Index ¶
Constants ¶
View Source
const ( // ProviderOpenAI is the OpenAI provider. ProviderOpenAI = "openai" // ProviderAnthropic is the Anthropic provider. ProviderAnthropic = "anthropic" )
Variables ¶
View Source
var ( // ProvidersLLM provides the LLM provider for Wire dependency injection. ProvidersLLM = wire.NewSet( ProvideLLMProvider, ) )
Functions ¶
func ProvideLLMProvider ¶
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.
func (*Config) ProvideLLMProvider ¶
ProvideLLMProvider provides an LLM provider based on config.
Click to show internal directories.
Click to hide internal directories.