Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AutocorrectConfig ¶
AutocorrectConfig controls autocorrect behaviour.
type Config ¶
type Config struct {
ActiveProvider string `toml:"active_provider"`
TriggerPrefix string `toml:"trigger_prefix"`
Providers map[string]ProviderConfig `toml:"providers"`
Autocorrect AutocorrectConfig `toml:"autocorrect"`
// Path is the file this config was loaded from (not persisted).
Path string `toml:"-"`
}
Config is the top-level config struct.
func DefaultConfig ¶
func DefaultConfig() Config
DefaultConfig returns a Config pre-populated with sensible defaults.
func Load ¶
Load reads the config file at the given path (or the default location). If the file does not exist, it returns the default config.
func (Config) ProviderCfg ¶
func (c Config) ProviderCfg(name string) ProviderConfig
ProviderCfg returns the ProviderConfig for the named provider, or an empty one if not set.
type ProviderConfig ¶
ProviderConfig holds per-provider credentials and model selection.
Click to show internal directories.
Click to hide internal directories.