[Feature] qwen3 coder与qwen3的工具调用逻辑有差异,需要额外适配
Motivation
qwen3工具调用是json格式,qwen3 code的工具调用切换到xml格式
Related resources
qwen3 工具调用:
{%- for tool in tools %} -- {{- "\n" }} {{- tool \| tojson }} {%- endfor %}工具回复:
<tool_call>\n{"name":
qwen3 code 工具调用:
{%- for param_name, param_fields in tool.parameters.properties\|items %} -- {{- '\n工具回复: <tool_call>\n<function=example_function_name>\n<parameter=example_parameter_1>\nvalue_1\n\n<parameter=example_parameter_2>\nThis is the value for the second parameter\nthat can span\nmultiple lines\n\n\n</tool_call>
Additional context
No response
我也有相同的需求,期待早日能支持qwen3_coder tools解析。通过jijna template 是否能实现coder的工具调用,是否有人试过?
We will appreciate it if you guys could PR us.
@RunningLeon
我在尝试适配 qwen3 coder 的 tools parser 时, 会报告这个一样的错误 : https://github.com/InternLM/lmdeploy/issues/3967
有任何分析的思路吗? 应该从哪些部分(思路)入手来分析呢?
我在尝试适配 qwen3 coder 的 tools parser 时, 会报告这个一样的错误 : #3967
有任何分析的思路吗? 应该从哪些部分(思路)入手来分析呢?
@KevinLiuMY sorry for the late reply, pls check https://github.com/InternLM/lmdeploy/issues/3967#issuecomment-3294904450