Documentation
¶
Overview ¶
Package config provides configuration types and loading for omniagent.
Index ¶
- func ExpandEnvVars(s string) string
- type AgentConfig
- type BrowserToolConfig
- type ChannelsConfig
- type Config
- type DiscordConfig
- type GatewayConfig
- type ObservabilityConfig
- type STTConfig
- type ShellToolConfig
- type SkillsConfig
- type TTSConfig
- type TelegramConfig
- type ToolsConfig
- type VoiceConfig
- type WhatsAppConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExpandEnvVars ¶
ExpandEnvVars expands environment variables in string values. Supports ${VAR} and $VAR syntax.
Types ¶
type AgentConfig ¶
type AgentConfig struct {
Provider string `json:"provider" yaml:"provider"`
Model string `json:"model" yaml:"model"`
APIKey string `json:"api_key" yaml:"api_key"` //nolint:gosec // G117: APIKey loaded from config file
BaseURL string `json:"base_url" yaml:"base_url"`
Temperature float64 `json:"temperature" yaml:"temperature"`
MaxTokens int `json:"max_tokens" yaml:"max_tokens"`
SystemPrompt string `json:"system_prompt" yaml:"system_prompt"`
}
AgentConfig configures the AI agent.
type BrowserToolConfig ¶
type BrowserToolConfig struct {
Enabled bool `json:"enabled" yaml:"enabled"`
Headless bool `json:"headless" yaml:"headless"`
UserData string `json:"user_data" yaml:"user_data"`
}
BrowserToolConfig configures the browser automation tool.
type ChannelsConfig ¶
type ChannelsConfig struct {
Telegram TelegramConfig `json:"telegram" yaml:"telegram"`
Discord DiscordConfig `json:"discord" yaml:"discord"`
WhatsApp WhatsAppConfig `json:"whatsapp" yaml:"whatsapp"`
}
ChannelsConfig configures messaging channels.
type Config ¶
type Config struct {
Gateway GatewayConfig `json:"gateway" yaml:"gateway"`
Agent AgentConfig `json:"agent" yaml:"agent"`
Channels ChannelsConfig `json:"channels" yaml:"channels"`
Tools ToolsConfig `json:"tools" yaml:"tools"`
Skills SkillsConfig `json:"skills" yaml:"skills"`
Voice VoiceConfig `json:"voice" yaml:"voice"`
Observability ObservabilityConfig `json:"observability" yaml:"observability"`
}
Config is the root configuration for omniagent.
type DiscordConfig ¶
type DiscordConfig struct {
Enabled bool `json:"enabled" yaml:"enabled"`
Token string `json:"token" yaml:"token"`
GuildID string `json:"guild_id" yaml:"guild_id"`
}
DiscordConfig configures the Discord channel.
type GatewayConfig ¶
type GatewayConfig struct {
Address string `json:"address" yaml:"address"`
ReadTimeout time.Duration `json:"read_timeout" yaml:"read_timeout"`
WriteTimeout time.Duration `json:"write_timeout" yaml:"write_timeout"`
PingInterval time.Duration `json:"ping_interval" yaml:"ping_interval"`
}
GatewayConfig configures the WebSocket gateway.
type ObservabilityConfig ¶
type ObservabilityConfig struct {
Enabled bool `json:"enabled" yaml:"enabled"`
Provider string `json:"provider" yaml:"provider"`
Endpoint string `json:"endpoint" yaml:"endpoint"`
APIKey string `json:"api_key" yaml:"api_key"` //nolint:gosec // G117: APIKey loaded from config file
}
ObservabilityConfig configures observability features.
type STTConfig ¶
type STTConfig struct {
Provider string `json:"provider" yaml:"provider"`
APIKey string `json:"api_key" yaml:"api_key"` //nolint:gosec // G117: APIKey loaded from config file
Model string `json:"model" yaml:"model"`
Language string `json:"language" yaml:"language"`
}
STTConfig configures speech-to-text.
type ShellToolConfig ¶
type ShellToolConfig struct {
Enabled bool `json:"enabled" yaml:"enabled"`
WorkingDir string `json:"working_dir" yaml:"working_dir"`
Allowlist []string `json:"allowlist" yaml:"allowlist"`
}
ShellToolConfig configures the shell execution tool.
type SkillsConfig ¶
type SkillsConfig struct {
Enabled bool `json:"enabled" yaml:"enabled"`
Paths []string `json:"paths" yaml:"paths"`
Disabled []string `json:"disabled" yaml:"disabled"`
MaxInjected int `json:"max_injected" yaml:"max_injected"`
}
SkillsConfig configures skill loading.
type TTSConfig ¶
type TTSConfig struct {
Provider string `json:"provider" yaml:"provider"`
APIKey string `json:"api_key" yaml:"api_key"` //nolint:gosec // G117: APIKey loaded from config file
Model string `json:"model" yaml:"model"`
VoiceID string `json:"voice_id" yaml:"voice_id"`
}
TTSConfig configures text-to-speech.
type TelegramConfig ¶
type TelegramConfig struct {
Enabled bool `json:"enabled" yaml:"enabled"`
Token string `json:"token" yaml:"token"`
}
TelegramConfig configures the Telegram channel.
type ToolsConfig ¶
type ToolsConfig struct {
Browser BrowserToolConfig `json:"browser" yaml:"browser"`
Shell ShellToolConfig `json:"shell" yaml:"shell"`
}
ToolsConfig configures available tools.
type VoiceConfig ¶
type VoiceConfig struct {
Enabled bool `json:"enabled" yaml:"enabled"`
ResponseMode string `json:"response_mode" yaml:"response_mode"`
STT STTConfig `json:"stt" yaml:"stt"`
TTS TTSConfig `json:"tts" yaml:"tts"`
}
VoiceConfig configures voice processing.
type WhatsAppConfig ¶
type WhatsAppConfig struct {
Enabled bool `json:"enabled" yaml:"enabled"`
DBPath string `json:"db_path" yaml:"db_path"`
}
WhatsAppConfig configures the WhatsApp channel.