Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var TranslationProviders = []string{"auto", "google", "llm", "none"}
Functions ¶
Types ¶
type Config ¶
type Config struct {
Language string `mapstructure:"language" yaml:"language"`
ShowOriginal bool `mapstructure:"show_original" yaml:"show_original"`
TranslationProvider string `mapstructure:"translation_provider" yaml:"translation_provider"`
ActiveProvider string `mapstructure:"active_provider" yaml:"active_provider"`
Providers []Provider `mapstructure:"providers" yaml:"providers"`
Releases []string `mapstructure:"releases" yaml:"releases"`
ExtraFeeds []Feed `mapstructure:"extra_feeds" yaml:"extra_feeds"`
DisabledCategories []string `mapstructure:"disabled_categories" yaml:"disabled_categories"`
Location Location `mapstructure:"location" yaml:"location"`
TempUnit string `mapstructure:"temp_unit" yaml:"temp_unit"`
RefreshSec int `mapstructure:"refresh_seconds" yaml:"refresh_seconds"`
DigestCacheMins int `mapstructure:"digest_cache_minutes" yaml:"digest_cache_minutes"`
CacheMaxEntries int `mapstructure:"cache_max_entries" yaml:"cache_max_entries"`
}
func (*Config) CategoryEnabled ¶
func (*Config) NextProvider ¶
func (c *Config) NextProvider()
NextProvider cycles: none -> each usable provider -> none.
type Provider ¶
type Provider struct {
Name string `mapstructure:"name" yaml:"name"`
Type string `mapstructure:"type" yaml:"type"`
BaseURL string `mapstructure:"base_url" yaml:"base_url"`
Model string `mapstructure:"model" yaml:"model"`
APIKey string `mapstructure:"api_key" yaml:"api_key,omitempty"`
APIKeyEnv string `mapstructure:"api_key_env" yaml:"api_key_env,omitempty"`
}
Provider is an LLM endpoint. Type is "openai" (any compatible API, incl. Groq and Ollama) or "gemini".
Click to show internal directories.
Click to hide internal directories.