package tools_bot import ( "ai_scheduler/internal/config" "ai_scheduler/internal/data/constants" errors "ai_scheduler/internal/data/error" "ai_scheduler/internal/entitys" "ai_scheduler/internal/pkg/utils_ollama" "context" "github.com/gofiber/fiber/v2/log" ) type BotTool struct { config *config.Config llm *utils_ollama.Client } // NewBotTool 创建直连天下订单详情工具 func NewBotTool(config *config.Config, llm *utils_ollama.Client) *BotTool { return &BotTool{config: config, llm: llm} } // Execute 执行直连天下订单详情查询 func (w *BotTool) Execute(ctx context.Context, toolName string, requireData *entitys.RequireData) (err error) { switch toolName { case constants.BotToolsBugOptimizationSubmit: err = w.BugOptimizationSubmit(ctx, requireData) default: log.Errorf("未知的工具类型:%s", toolName) err = errors.ParamErr("未知的工具类型:%s", toolName) } return } func (w *BotTool) BugOptimizationSubmit(ctx context.Context, requireData *entitys.RequireData) (err error) { return }