diff --git a/lmdeploy/model.py b/lmdeploy/model.py index 99797abb68..e66daa438b 100644 --- a/lmdeploy/model.py +++ b/lmdeploy/model.py @@ -975,7 +975,7 @@ def messages2prompt(self, messages, sequence_start=True, ret += f'\n\n{{"name": "{toolCall["name"]}, "arguments": {json.dumps(tools["arguments"])}"\n}}' if message['role'] == 'tool': if index == 0 or messages[index - 1]['role'] != 'tool': - ret += f"{box_map[message['role']]}" + ret += f"{self.user}" ret += f"\n\n{message['content']}\n" if index == len(messages) - 1 or messages[index + 1]['role'] != 'tool': ret += f"{self.eoh}"