Menu

#1570 星火工具调用失败(响应阶段)

open
nobody
bug (44)
2024-06-27
2024-06-27
Anonymous
No

Originally created by: c121914yu

例行检查

  • 我已确认目前没有类似 issue
  • 我已确认我已升级到最新版本
  • 我已完整查看过项目 README,尤其是常见问题部分
  • 我理解并愿意跟进此 issue,协助测试和提供反馈
  • 我理解并认可上述内容,并理解项目维护者精力有限,不遵循规则的 issue 可能会被无视或直接关闭

问题描述
星火使用 tool 调用时候失败,可以返回参数,但是利用工具响应发起请求时,会报错。
image

测试请求体: model

{
  "model": "SparkDesk-v3.5,
  "temperature": 0,
  "stream": false,
  "messages": [
    {
      "role": "user",
      "content": "几点了"
    },
    {
      "role": "assistant",
      "tool_calls": [
        {
          "id": "call_23f1a7ad8104455db939b812611fa560",
          "type": "function",
          "function": {
            "name": "nYGo9W",
            "arguments": ""
          }
        }
      ]
    },
    {
      "tool_call_id": "call_23f1a7ad8104455db939b812611fa560",
      "role": "tool",
      "name": "nYGo9W",
      "content": "{\n  \"time\": \"2024-06-27 11:20:45 Thursday\"\n}"
    }
  ],
  "tools": [
    {
      "type": "function",
      "function": {
        "name": "nYGo9W",
        "description": "获取用户当前时区的时间。",
        "parameters": {
          "type": "object",
          "properties": {},
          "required": []
        }
      }
    }
  ],
  "tool_choice": "auto"
}

Discussion


Log in to post a comment.

MongoDB Logo MongoDB