def persist(self, embeddings):
        """
        Saves an embeddings index if the PERSIST parameter is set.

        Args:
            embeddings: embeddings to save
        """

        persist = os.environ.get("PERSIST")
        if persist:
            logger.debug(f"SAVE INDEX: {persist}")
            embeddings.save(persist)

        Saves an embeddings index if the PERSIST parameter is set.

        Args:
            embeddings: embeddings to save
        
txtairag/rag.py