Skip to content

Commit

Permalink
fix: clean up code
Browse files Browse the repository at this point in the history
  • Loading branch information
gaozixiang committed Nov 11, 2024
1 parent f49f1a0 commit cfff8ee
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lmdeploy/serve/async_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,8 @@ def parse_tool_response(self, text, tools, **kwargs):
else:
text, action = action
action = json.loads(action)
name, parameters = action['name'], json.dumps(action.get('parameters', action.get('arguments', {})))
name, parameters = action['name'], json.dumps(
action.get('parameters', action.get('arguments', {})))
else:
raise RuntimeError(f'Unexpected model response: {text}')
action_id = [tool.function.name for tool in tools].index(name)
Expand Down

0 comments on commit cfff8ee

Please sign in to comment.