内置工具迁移到 internal/tools/builtin 子包,测试移至父包

This commit is contained in:
2026-08-14 17:21:23 +08:00
parent 29ec088356
commit f38d4e7ad5
6 changed files with 111 additions and 71 deletions
+2 -1
View File
@@ -14,6 +14,7 @@ import (
"github.com/tidwall/gjson"
"myaibot/internal/config"
"myaibot/internal/tools"
"myaibot/internal/tools/builtin"
)
const (
@@ -21,7 +22,7 @@ const (
maxToolRounds = 5
)
var toolRegistry = tools.NewRegistry(tools.TimeTool{}, tools.CalculatorTool{}, tools.RandomTool{})
var toolRegistry = tools.NewRegistry(builtin.TimeTool{}, builtin.CalculatorTool{}, builtin.RandomTool{})
type Bot struct {
clients map[string]*openai.Client