Documentation
¶
Index ¶
- func ConfigDir() string
- func ConfigPath() string
- func Save(cfg *Config) error
- type AgentDefaults
- type AgentsConfig
- type ChannelsConfig
- type Config
- type ExecToolConfig
- type GatewayConfig
- type ProviderConfig
- type ProvidersConfig
- type TelegramConfig
- type ToolsConfig
- type WebSearchConfig
- type WebToolsConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AgentDefaults ¶
type AgentDefaults struct {
Workspace string `mapstructure:"workspace"`
WorkspaceMode string `mapstructure:"workspace_mode"`
Model string `mapstructure:"model"`
MaxTokens int `mapstructure:"max_tokens"`
Temperature float64 `mapstructure:"temperature"`
MaxToolIterations int `mapstructure:"max_tool_iterations"`
}
AgentDefaults default agent parameters
type AgentsConfig ¶
type AgentsConfig struct {
Defaults AgentDefaults `mapstructure:"defaults"`
}
AgentsConfig agent settings
type ChannelsConfig ¶
type ChannelsConfig struct {
Telegram TelegramConfig `mapstructure:"telegram"`
}
ChannelsConfig channel settings
type Config ¶
type Config struct {
Agents AgentsConfig `mapstructure:"agents"`
Channels ChannelsConfig `mapstructure:"channels"`
Providers ProvidersConfig `mapstructure:"providers"`
Gateway GatewayConfig `mapstructure:"gateway"`
Tools ToolsConfig `mapstructure:"tools"`
}
Config root configuration
func DefaultConfig ¶
func DefaultConfig() *Config
DefaultConfig returns config with sensible defaults
func (*Config) Validate ¶ added in v0.1.4
Validate checks that the configuration values are within acceptable ranges.
func (*Config) WorkspacePath ¶
WorkspacePath returns the expanded workspace path
func (*Config) WorkspacePathChecked ¶
WorkspacePathChecked returns the expanded workspace path or an error if invalid.
type ExecToolConfig ¶
type ExecToolConfig struct {
Timeout int `mapstructure:"timeout"`
RestrictToWorkspace bool `mapstructure:"restrict_to_workspace"`
}
ExecToolConfig shell exec settings
type GatewayConfig ¶
type GatewayConfig struct {
Host string `mapstructure:"host"`
Port int `mapstructure:"port"`
Token string `mapstructure:"token"`
}
GatewayConfig server settings
type ProviderConfig ¶
type ProviderConfig struct {
APIKey string `mapstructure:"api_key"`
SecretKey string `mapstructure:"secret_key"`
BaseURL string `mapstructure:"base_url"`
}
ProviderConfig single provider settings
type ProvidersConfig ¶
type ProvidersConfig struct {
OpenRouter ProviderConfig `mapstructure:"openrouter"`
Claude ProviderConfig `mapstructure:"claude"`
OpenAI ProviderConfig `mapstructure:"openai"`
DeepSeek ProviderConfig `mapstructure:"deepseek"`
Gemini ProviderConfig `mapstructure:"gemini"`
Ark ProviderConfig `mapstructure:"ark"`
Qianfan ProviderConfig `mapstructure:"qianfan"`
Qwen ProviderConfig `mapstructure:"qwen"`
Ollama ProviderConfig `mapstructure:"ollama"`
}
ProvidersConfig LLM provider settings
type TelegramConfig ¶
type TelegramConfig struct {
Enabled bool `mapstructure:"enabled"`
Token string `mapstructure:"token"`
AllowFrom []string `mapstructure:"allow_from"`
}
TelegramConfig telegram bot settings
type ToolsConfig ¶
type ToolsConfig struct {
Web WebToolsConfig `mapstructure:"web"`
Exec ExecToolConfig `mapstructure:"exec"`
}
ToolsConfig tool settings
type WebSearchConfig ¶
type WebSearchConfig struct {
APIKey string `mapstructure:"api_key"`
MaxResults int `mapstructure:"max_results"`
}
WebSearchConfig brave search settings
type WebToolsConfig ¶
type WebToolsConfig struct {
Search WebSearchConfig `mapstructure:"search"`
}
WebToolsConfig web tool settings