tools.0: Input tag 'function' found using 'type' does not match any of the expec...

2025年12月09日 22:23 状态: processing

🚨 错误信息

tools.0: Input tag 'function' found using 'type' does not match any of the expected tags: 'bash_20250124', 'custom', 'text_editor_20250124', 'text_editor_20250429', 'text_editor_20250728', 'web_search_20250305' (request id: 20251209222110690025336gCKtUzQi)

🤖 AI解决方案

错误翻译

原文:Input tag 'function' found using 'type' does not match any of the expected tags
译文:使用'type'找到的输入标签'function'与任何预期标签都不匹配

原因分析

  • 根本原因:API调用时使用了无效的type参数值'function',而系统只支持特定的标签类型

  • 错误位置:在工具调用请求的type参数配置中,传入了不被支持的标签值
  • 解决方案

    {
      "type": "text_editor_20250124",
      // 或其他支持的标签类型:
      // "bash_20250124", "custom", "text_editor_20250429", 
      // "text_editor_20250728", "web_search_20250305"
    }

    预防措施

  • 参数验证:在调用API前,始终检查type参数值是否在官方文档列出的支持范围内

  • 枚举使用:将支持的标签类型定义为常量枚举,避免硬编码字符串错误

---
请检查您的代码中type参数的赋值,确保使用上述支持的标签类型之一。