Skip to content

Commit

Permalink
fix: Add ensure_ascii=False
Browse files Browse the repository at this point in the history
  • Loading branch information
gaozixiang committed Nov 14, 2024
1 parent 0f05739 commit 5dd35f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lmdeploy/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -1018,7 +1018,7 @@ def messages2prompt(self,
for tool_call in tools_call:
if tool_call.get('function') is not None:
tool_call = tool_call['function']
ret += f'\n<tool_call>\n{{"name": "{tool_call["name"]}, "arguments": {json.dumps(tools["arguments"])}"\n</toolcall>}}'
ret += f'\n<tool_call>\n{{"name": "{tool_call["name"]}, "arguments": {json.dumps(tools["arguments"], ensure_ascii=False)}"\n</toolcall>}}'
if message['role'] == 'tool':
if index == 0 or messages[index - 1]['role'] != 'tool':
ret += f'{self.user}'
Expand Down

0 comments on commit 5dd35f4

Please sign in to comment.