tools修改

This commit is contained in:
UnCLAS-Prommer
2025-07-25 14:35:59 +08:00
parent 37bf904c45
commit 3a4f343d84
5 changed files with 11 additions and 15 deletions

View File

@@ -39,11 +39,7 @@ class CompareNumbersTool(BaseTool):
else:
result = f"{num1} 等于 {num2}"
return {"type": "comparison_result", "id": f"{num1}_vs_{num2}", "content": result}
return {"name": self.name, "content": result}
except Exception as e:
logger.error(f"比较数字失败: {str(e)}")
return {"type": "info", "id": f"{num1}_vs_{num2}", "content": f"比较数字失败,炸了: {str(e)}"}
# 注册工具
# register_tool(CompareNumbersTool)
return {"name": self.name, "content": f"比较数字失败,炸了: {str(e)}"}