mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-29 01:58:14 +00:00
fix: Use custom path for memory reset
Co-Authored-By: Joe Moura <joao@crewai.com>
This commit is contained in:
@@ -154,7 +154,10 @@ class RAGStorage(BaseRAGStorage):
|
|||||||
try:
|
try:
|
||||||
if self.app:
|
if self.app:
|
||||||
self.app.reset()
|
self.app.reset()
|
||||||
shutil.rmtree(f"{db_storage_path()}/{self.type}")
|
storage_path = self.path if self.path else db_storage_path()
|
||||||
|
db_dir = os.path.join(storage_path, self.type)
|
||||||
|
if os.path.exists(db_dir):
|
||||||
|
shutil.rmtree(db_dir)
|
||||||
self.app = None
|
self.app = None
|
||||||
self.collection = None
|
self.collection = None
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|||||||
Reference in New Issue
Block a user