We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
例行检查
你的版本
问题描述, 日志截图,配置文件等 豆包模型具备Tool Call能力,但是在工具调用里却用不了Tool Call。通过curl看了下豆包模型和其他正常的模型的区别是豆包在触发tool_calls时,messages.content中会有选择工具的原因,而其他模型的content都是空字符串。例如
{ "index": 0, "message": { "role": "assistant", "content": "当前提供了1个工具,分别是[\"b9NctXLecxTp\"],需求为查天气,需要先查询当前时间的天齐,此处应调用b9NctXLecxTp。", "tool_calls": [ { "index": 0, "id": "b9NctXLecxTp:0", "type": "function", "function": { "name": "b9NctXLecxTp", "arguments": "{\n \"now_time\": \"2024-02-29 23:59:59 Wednesday\"\n}" } } ] }, "finish_reason": "tool_calls" }
而在代码packages\service\core\workflow\dispatch\agent\runTool\toolChoice.ts的572行,if判断中的条件是responseChoice?.content,而非responseChoice?.tool_calls或part.choices?.[0]?.finish_reason==="tool_calls",导致豆包返回tool_calls但工具按照正常assistant回复处理。
虽然原因找到了,但是写不来ts,只好厚颜无耻当个伸手党了
The text was updated successfully, but these errors were encountered:
好的,我们去试试。
Sorry, something went wrong.
#3493 已处理,把 else if 去掉,改成并列 if 即可。 不过实测,豆包工具调用不是很好用。就和你发送的例子一样,会回复很多无关内容,并且有些没有参数的工具,经常不触发。
Successfully merging a pull request may close this issue.
例行检查
你的版本
问题描述, 日志截图,配置文件等
豆包模型具备Tool Call能力,但是在工具调用里却用不了Tool Call。通过curl看了下豆包模型和其他正常的模型的区别是豆包在触发tool_calls时,messages.content中会有选择工具的原因,而其他模型的content都是空字符串。例如
而在代码packages\service\core\workflow\dispatch\agent\runTool\toolChoice.ts的572行,if判断中的条件是responseChoice?.content,而非responseChoice?.tool_calls或part.choices?.[0]?.finish_reason==="tool_calls",导致豆包返回tool_calls但工具按照正常assistant回复处理。
虽然原因找到了,但是写不来ts,只好厚颜无耻当个伸手党了
The text was updated successfully, but these errors were encountered: