[data] fix qwen tool template (#6796)
* Update tool_utils.py * fix unittest --------- Co-authored-by: hoshi-hiyouga <hiyouga@buaa.edu.cn> Former-commit-id: 02bb78a792112f5151b3a96ddde2528823855288
This commit is contained in:
@@ -56,7 +56,7 @@ QWEN_TOOL_PROMPT = (
|
|||||||
"You are provided with function signatures within <tools></tools> XML tags:\n<tools>{tool_text}"
|
"You are provided with function signatures within <tools></tools> XML tags:\n<tools>{tool_text}"
|
||||||
"\n</tools>\n\nFor each function call, return a json object with function name and arguments within "
|
"\n</tools>\n\nFor each function call, return a json object with function name and arguments within "
|
||||||
"""<tool_call></tool_call> XML tags:\n<tool_call>\n{{"name": <function-name>, """
|
"""<tool_call></tool_call> XML tags:\n<tool_call>\n{{"name": <function-name>, """
|
||||||
""""arguments": <args-json-object>}}\n</tool_call><|im_end|>\n"""
|
""""arguments": <args-json-object>}}\n</tool_call>"""
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -224,7 +224,7 @@ def test_qwen_tool_formatter():
|
|||||||
f"\n{json.dumps(wrapped_tool, ensure_ascii=False)}"
|
f"\n{json.dumps(wrapped_tool, ensure_ascii=False)}"
|
||||||
"\n</tools>\n\nFor each function call, return a json object with function name and arguments within "
|
"\n</tools>\n\nFor each function call, return a json object with function name and arguments within "
|
||||||
"""<tool_call></tool_call> XML tags:\n<tool_call>\n{"name": <function-name>, """
|
"""<tool_call></tool_call> XML tags:\n<tool_call>\n{"name": <function-name>, """
|
||||||
""""arguments": <args-json-object>}\n</tool_call><|im_end|>\n"""
|
""""arguments": <args-json-object>}\n</tool_call>"""
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user