From 4db0e4bfb95964e7aeb954b9ca48ccf13cd28f41 Mon Sep 17 00:00:00 2001 From: gaozixiang Date: Mon, 11 Nov 2024 18:16:52 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20content=E4=BF=A1=E6=81=AF=E8=BF=94?= =?UTF-8?q?=E5=9B=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lmdeploy/serve/async_engine.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lmdeploy/serve/async_engine.py b/lmdeploy/serve/async_engine.py index 5fd544678f..2bfaa2f21c 100644 --- a/lmdeploy/serve/async_engine.py +++ b/lmdeploy/serve/async_engine.py @@ -653,8 +653,8 @@ def parse_tool_response(self, text, tools, **kwargs): parameters = action[action.find('{'):] name = action.split('{')[0] elif '' in text: #qwen2.5 - action,text = text.split('') - action = action.split('')[1] + action = text.split('')[0] + text, action = action.split('') action = json.loads(action) name, parameters = action['name'], json.dumps(action.get('parameters', action.get('arguments', {}))) else: