From 755a36614b6f51b100faa31b335ae0fba435487b Mon Sep 17 00:00:00 2001 From: Shi Shuai <126407087+shuaills@users.noreply.github.com> Date: Tue, 27 May 2025 10:25:45 +0800 Subject: [PATCH] fix: added "\n" to qwen25 tool parser structural tags (#6631) --- python/sglang/srt/function_call/qwen25_detector.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/sglang/srt/function_call/qwen25_detector.py b/python/sglang/srt/function_call/qwen25_detector.py index c43ea384f..1e2254bb8 100644 --- a/python/sglang/srt/function_call/qwen25_detector.py +++ b/python/sglang/srt/function_call/qwen25_detector.py @@ -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='{"name":"' + name + '", "arguments":', - end="}", + begin='\n{"name":"' + name + '", "arguments":', + end="}\n", trigger="", )