async def aget_messages(self, key: str) -> list[ChatMessage]:
        """Async version of Get messages for a key."""
        async with self._async_session() as session:
            result = await session.execute(
                select(self._table_class)
                .where(self._table_class.key == key)
                .order_by(self._table_class.id)
            )
            result = result.scalars().all()
            if result:
                return [ChatMessage.model_validate(row.value) for row in result]
            return []
Async version of Get messages for a key.
llama-index-integrations/storage/chat_store/llama-index-storage-chat-store-sqlite/llama_index/storage/chat_store/sqlite/base.py