Documentation
¶
Index ¶
Constants ¶
View Source
const ( ProviderExa = "exa" DefaultSearchCount = 5 MaxSearchCount = 10 DefaultTimeoutSecs = 30 )
Variables ¶
View Source
var DefaultFallbackOrder = []string{ ProviderExa, }
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Provider string `yaml:"provider"`
Fallbacks []string `yaml:"fallbacks"`
Exa ExaConfig `yaml:"exa"`
}
Config controls search provider selection and credentials.
func ApplyEnvDefaults ¶
ApplyEnvDefaults fills empty config fields from environment variables.
func ConfigFromEnv ¶
func ConfigFromEnv() *Config
ConfigFromEnv builds a search config using environment variables.
func (*Config) WithDefaults ¶
type ExaConfig ¶
type ExaConfig struct {
Enabled *bool `yaml:"enabled"`
BaseURL string `yaml:"base_url"`
APIKey string `yaml:"api_key"`
Type string `yaml:"type"`
Category string `yaml:"category"`
NumResults int `yaml:"num_results"`
IncludeText bool `yaml:"include_text"`
TextMaxCharacters int `yaml:"text_max_chars"`
Highlights bool `yaml:"highlights"`
}
type Request ¶
type Request struct {
Query string
Count int
Country string
SearchLang string
UILang string
Freshness string
}
Request represents a normalized web search request.
Click to show internal directories.
Click to hide internal directories.