diff --git a/aidial_adapter_vertexai/chat/gemini/prompt/gemini_1_0_pro.py b/aidial_adapter_vertexai/chat/gemini/prompt/gemini_1_0_pro.py index 5137cd3..3ec0f67 100644 --- a/aidial_adapter_vertexai/chat/gemini/prompt/gemini_1_0_pro.py +++ b/aidial_adapter_vertexai/chat/gemini/prompt/gemini_1_0_pro.py @@ -65,5 +65,7 @@ def accommodate_first_system_message(messages: List[Message]) -> List[Message]: if first_message.content is None or second_message.content is None: return messages - content = first_message.content + "\n" + second_message.content - return [Message(role=Role.USER, content=content)] + messages[2:] + new_message = second_message.copy() + new_message.content = first_message.content + "\n" + second_message.content + + return [new_message] + messages[2:]