From a1a235d2b4fd6f701685273660acd28f78ce6df5 Mon Sep 17 00:00:00 2001 From: "lilong.129" Date: Thu, 3 Jul 2025 23:07:39 +0800 Subject: [PATCH] change: disable register tools for models with function calling --- uixt/ai/planner.go | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/uixt/ai/planner.go b/uixt/ai/planner.go index 6fae9ac6..09505d86 100644 --- a/uixt/ai/planner.go +++ b/uixt/ai/planner.go @@ -72,21 +72,21 @@ func (p *Planner) RegisterTools(tools []*schema.ToolInfo) error { return nil } - // register tools for models with function calling - toolCallingModel, err := p.model.WithTools(tools) - if err != nil { - return errors.Wrap(err, "failed to register tools") - } + // TODO: register tools for models with function calling + // toolCallingModel, err := p.model.WithTools(tools) + // if err != nil { + // return errors.Wrap(err, "failed to register tools") + // } - var toolNames []string - for _, tool := range tools { - toolNames = append(toolNames, tool.Name) - } - log.Debug().Strs("tools", toolNames). - Str("model", string(p.modelConfig.ModelType)). - Msg("registered tools to model") + // var toolNames []string + // for _, tool := range tools { + // toolNames = append(toolNames, tool.Name) + // } + // log.Debug().Strs("tools", toolNames). + // Str("model", string(p.modelConfig.ModelType)). + // Msg("registered tools to model") - p.model = toolCallingModel + // p.model = toolCallingModel return nil }