mirror of
https://github.com/hiyouga/LLaMA-Factory.git
synced 2025-10-14 15:52:49 +08:00
[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:
parent
cfb926fb84
commit
0817c24c04
@ -56,7 +56,7 @@ QWEN_TOOL_PROMPT = (
|
||||
"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 "
|
||||
"""<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)}"
|
||||
"\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>, """
|
||||
""""arguments": <args-json-object>}\n</tool_call><|im_end|>\n"""
|
||||
""""arguments": <args-json-object>}\n</tool_call>"""
|
||||
]
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user