内置工具接入独立配置:enabled 开关与 prompt 提示词覆盖描述

This commit is contained in:
2026-08-14 17:35:54 +08:00
parent 965ec275de
commit 21be6e63af
7 changed files with 191 additions and 29 deletions
+1 -1
View File
@@ -41,7 +41,7 @@ func New(cfg *config.Config) (*Bot, error) {
clients: make(map[string]*openai.Client),
cfg: cfg,
systemPrompt: cfg.SystemPrompt,
toolRegistry: tools.NewRegistry(builtin.TimeTool{}, builtin.CalculatorTool{}, builtin.RandomTool{}),
toolRegistry: tools.NewRegistry(builtin.NewTimeTool(), builtin.NewCalculatorTool(), builtin.NewRandomTool()),
}
b.provider = config.FindProvider(cfg.DefaultProvider)
b.model = cfg.DefaultModel