def is_required_message()

in aidial_adapter_vertexai/chat/gemini/prompt/base.py [0:0]


    def is_required_message(self, index: int) -> bool:
        # Keep the system message...
        if self.has_system_instruction and index == 0:
            return True

        # ...and the last user message
        if index == len(self) - 1:
            return True

        return False