From 8af3e86332f43e3d0acd4f5f9138c878345ed047 Mon Sep 17 00:00:00 2001 From: Matt B Date: Fri, 13 Dec 2024 00:29:35 +0800 Subject: [PATCH] revert rag_storage.py changes --- src/crewai/memory/storage/rag_storage.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/crewai/memory/storage/rag_storage.py b/src/crewai/memory/storage/rag_storage.py index f652788e7..ac894f80f 100644 --- a/src/crewai/memory/storage/rag_storage.py +++ b/src/crewai/memory/storage/rag_storage.py @@ -150,14 +150,10 @@ class RAGStorage(BaseRAGStorage): def reset(self) -> None: try: - # First reset ChromaDB's internal state + shutil.rmtree(f"{db_storage_path()}/{self.type}") if self.app: self.app.reset() - - # Then remove the directory - storage_path = f"{db_storage_path()}/{self.type}" - if os.path.exists(storage_path): - shutil.rmtree(storage_path) + except Exception as e: if "attempt to write a readonly database" in str(e): # Ignore this specific error