change: disable register tools for models with function calling

This commit is contained in:
lilong.129
2025-07-03 23:07:39 +08:00
parent 2168ee0e69
commit a1a235d2b4

View File

@@ -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
}