mirror of
https://github.com/hiyouga/LLaMA-Factory.git
synced 2025-08-01 11:12:50 +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: dd6b7d203eedbf09458c64654e8d97fec85f08d7
This commit is contained in:
parent
85f22d01bf
commit
8504bde893
@ -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