Add files via upload

This commit is contained in:
公明
2025-11-09 13:30:08 +08:00
committed by GitHub
parent ffd417fe93
commit 1f51c64084
10 changed files with 214 additions and 46 deletions
+8
View File
@@ -14,6 +14,7 @@ type Config struct {
Log LogConfig `yaml:"log"`
MCP MCPConfig `yaml:"mcp"`
OpenAI OpenAIConfig `yaml:"openai"`
Agent AgentConfig `yaml:"agent"`
Security SecurityConfig `yaml:"security"`
Database DatabaseConfig `yaml:"database"`
}
@@ -49,6 +50,10 @@ type DatabaseConfig struct {
Path string `yaml:"path"`
}
type AgentConfig struct {
MaxIterations int `yaml:"max_iterations"`
}
type ToolConfig struct {
Name string `yaml:"name"`
Command string `yaml:"command"`
@@ -200,6 +205,9 @@ func Default() *Config {
BaseURL: "https://api.openai.com/v1",
Model: "gpt-4",
},
Agent: AgentConfig{
MaxIterations: 30, // 默认最大迭代次数
},
Security: SecurityConfig{
Tools: []ToolConfig{}, // 工具配置应该从 config.yaml 或 tools/ 目录加载
ToolsDir: "tools", // 默认工具目录