langchain/memory/chat_message_histories/cassandra.py/CassandraChatMessageHistory/messages
class CassandraChatMessageHistory:    def messages(self) -> List[BaseMessage]:  # type: ignore
        """Retrieve the messages from Cassandra"""
        from cassandra import ReadFailure, ReadTimeout, Unavailable

        try:
            rows = self.session.execute(
                f"""SELECT * FROM {self.table_name}
                WHERE session_id = '{self.session_id}' ;"""
            )
        except (Unavailable, ReadTimeout, ReadFailure) as error:
            logger.error("Unable to Retreive chat history messages from cassadra")
            raise error

        if rows:
            items = [json.loads(row.history) for row in rows]
        else:
            items = []

        messages = messages_from_dict(items)

        return messages