fix: added "\n" to qwen25 tool parser structural tags (#6631)

This commit is contained in:
Shi Shuai
2025-05-27 10:25:45 +08:00
committed by GitHub
parent 79a39ac0cc
commit 755a36614b

View File

@@ -106,8 +106,8 @@ class Qwen25Detector(BaseFormatDetector):
def structure_info(self) -> _GetInfoFunc:
# TODO: Update the begin and end tokens with '\n' if necessary
return lambda name: StructureInfo(
begin='<tool_call>{"name":"' + name + '", "arguments":',
end="}</tool_call>",
begin='<tool_call>\n{"name":"' + name + '", "arguments":',
end="}\n</tool_call>",
trigger="<tool_call>",
)