diff --git a/src/llamafactory/data/tool_utils.py b/src/llamafactory/data/tool_utils.py index a92701ed..44cf86cc 100644 --- a/src/llamafactory/data/tool_utils.py +++ b/src/llamafactory/data/tool_utils.py @@ -56,7 +56,7 @@ QWEN_TOOL_PROMPT = ( "You are provided with function signatures within XML tags:\n{tool_text}" "\n\n\nFor each function call, return a json object with function name and arguments within " """ XML tags:\n\n{{"name": , """ - """"arguments": }}\n<|im_end|>\n""" + """"arguments": }}\n""" ) diff --git a/tests/data/test_formatter.py b/tests/data/test_formatter.py index a76e68a6..4eb2072b 100644 --- a/tests/data/test_formatter.py +++ b/tests/data/test_formatter.py @@ -224,7 +224,7 @@ def test_qwen_tool_formatter(): f"\n{json.dumps(wrapped_tool, ensure_ascii=False)}" "\n\n\nFor each function call, return a json object with function name and arguments within " """ XML tags:\n\n{"name": , """ - """"arguments": }\n<|im_end|>\n""" + """"arguments": }\n""" ]