Skip to content

Commit

Permalink
bugfix: add toolName in tool_response
Browse files Browse the repository at this point in the history
  • Loading branch information
gaozixiang committed Nov 14, 2024
1 parent ba5cdc2 commit 5deb75a
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 @@ -1022,7 +1022,7 @@ def messages2prompt(self,
if message['role'] == 'tool':
if index == 0 or messages[index - 1]['role'] != 'tool':
ret += f'{self.user}'
ret += f"\n<tool_response>\n{message['name']}{message['content']}\n</tool_response>"
ret += f"\n<tool_response>\n{message['name']}:{message['content']}\n</tool_response>"
if index == len(messages) - 1 or messages[index +
1]['role'] != 'tool':
ret += f'{self.eoh}'
Expand Down

0 comments on commit 5deb75a

Please sign in to comment.