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: