Documentation
¶
Overview ¶
Package config loads agent settings from an optional YAML file layered over defaults.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultPath ¶
DefaultPath returns the per-user config file, tinyagent/config.yaml under os.UserConfigDir, whether or not it exists.
Types ¶
type AgentConfig ¶
type AgentConfig struct {
SystemPrompt string `yaml:"system_prompt"`
StepLimit int `yaml:"step_limit"`
CostLimit float64 `yaml:"cost_limit"`
WallTimeSec int `yaml:"wall_time_seconds"`
BashTimeoutSec int `yaml:"bash_timeout_seconds"`
MaxOutputChars int `yaml:"max_output_chars"`
// Optional price override in USD per million tokens, for models
// missing from the built-in price table.
InputPricePerMTok float64 `yaml:"input_price_per_mtok"`
OutputPricePerMTok float64 `yaml:"output_price_per_mtok"`
}
func Default ¶
func Default() AgentConfig
func Load ¶
func Load(path string) (AgentConfig, error)
Load returns the defaults overlaid with the YAML file at path. An empty path returns the defaults. Unknown keys are an error, so a typo can't silently drop a setting.
Click to show internal directories.
Click to hide internal directories.