def handle(self, event: BaseEvent, **kwargs) -> None:
                """Flushes the Literal cache when receiving the QueryEnd event."""
                try:
                    if isinstance(event, QueryEndEvent):
                        literalai_client.flush()
                except Exception as e:
                    logging.error(
                        "Error in Literal AI global handler : %s",
                        str(e),
                        exc_info=True,
                    )
Flushes the Literal cache when receiving the QueryEnd event.
llama-index-integrations/callbacks/llama-index-callbacks-literalai/llama_index/callbacks/literalai/base.py