Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigPaths ¶
func ConfigPaths() []string
ConfigPaths returns the paths to the configuration files.
func InitConfig ¶
InitConfig initializes the configuration for gencmd on a new system.
Types ¶
type Config ¶
type Config struct {
LLM LLMConfig `yaml:"llm"`
// contains filtered or unexported fields
}
Config represents the configuration structure for the application.
func Default ¶
func Default() Config
Default returns a default configuration with sensible defaults.
func DefaultFromEnv ¶
func DefaultFromEnv() Config
DefaultFromEnv returns a default configuration based on environment variables.
func Load ¶
Load reads the configuration from the default path "config.yaml" in the user's XDG data directory.
type LLMConfig ¶
type LLMConfig struct {
// Provider is the name of the LLM provider.
Provider string `yaml:"provider,omitempty"`
// ModelName is the name of the model to use, without prefixes (e.g. gemini-2.0-flash-lite).
ModelName string `yaml:"modelName,omitempty"`
// PromptTemplate is the template for the prompt to send to the LLM. The user input will be inserted into the {{.UserInput}} placeholder.
PromptTemplate string `yaml:"promptTemplate,omitempty"`
// OpenAI represents the configuration for OpenAI LLMs.
OpenAI *OpenAIConfig `yaml:"openai,omitempty"`
}
LLMConfig represents the configuration for the Language Model.
type OpenAIConfig ¶ added in v0.3.0
type OpenAIConfig struct {
BaseURL string `yaml:"baseUrl,omitempty"`
}
OpenAIConfig represents the configuration for OpenAI LLMs.
type ProviderDoc ¶
type ProviderDoc struct {
ID string
Name string
URL string
Options []ProviderOption
// Fixed environment variables for the provider
FixedEnv map[string]string
}
func ProvidersInitOptions ¶
func ProvidersInitOptions() []ProviderDoc
ProvidersInitOptions returns the initialization options for each provider.
type ProviderOption ¶
Click to show internal directories.
Click to hide internal directories.