Closed worm128 closed 5 months ago
根据官方的代码
https://github.com/labring/FastGPT/blob/adfad8ff7f299bb9780c209c6f26b96d24eb9386/packages/service/core/workflow/dispatch/agent/extract.ts#L237
这个问题的核心在于所使用的模型是否能够返回期望的 tool_call 结构,如response?.choices?.[0]?.message?.tool_calls?.[0]?.function
,而不是JSON序列化的方式
如果是本地部署的qwen,最好是加上支持tool_call 的功能,实际上也就是你自己把提取和转化模型回复的内容为结构化数据,有效返回tool_call 格式
配置修改成:
"toolChoice": false,
"functionCall": false,
可能可以帮助你
fastgpt 4.6.8 模型config "toolChoice": false, "functionCall": true,
工作流使用qwen,文心一言,chatglm3的function_call都正常
升级到4.7后报这个错
toolChoice 和 functionCall 能力目前只有chatgpt有,其他模型不确定有这两个功能,可以吧这两个参数禁止,fastgpt会使用提示词的方式实现工具调用或分类等模块功能。
"toolChoice": false,
"functionCall": false,
千问支持toolChoice,实测没错,版本4.7.1 "toolChoice": true, "functionCall": false,
千问支持toolChoice,实测没错,版本4.7.1 "toolChoice": true, "functionCall": false,
请问您使用的是哪个千问?是本地部署的千问吗? @worm128
你的版本
问题描述 在插件“文本内容提取”不能使用chatgpt以外的模型提取内容,我使用qwen1.5-14b模型会报错“Your model may not support toll_call SyntaxError: Unexpected end of JSON input”,这个json的序列化能不能不要在大语言模型里面进行序列化,使用一个json工具来做json的序列化。这样所有大模型都能通用,而不是局限chatgpt这些能json序列化的大模型。
相关截图