Skip to content

armgit / mem0

Public Imported from GitHub
0

The Memory Layer for AI Agents - Drop-in memory infrastructure for AI agents and apps. Context that persists. Built for production.

fix(mongodb): reset() passes wrong argument to create_col() (#5532)

Hrushikesh Yadavbb4a239cb1cc
diff --git a/mem0/vector_stores/mongodb.py b/mem0/vector_stores/mongodb.py
index aafee9cd2..5d959c29f 100644
--- a/mem0/vector_stores/mongodb.py
+++ b/mem0/vector_stores/mongodb.py
@@ -391,7 +391,7 @@ class MongoDB(VectorStoreBase):
"""Reset the index by deleting and recreating it."""
logger.warning(f"Resetting index {self.collection_name}...")
self.delete_col()
- self.collection = self.create_col(self.collection_name)
+ self.collection = self.create_col()
def __del__(self) -> None:
"""Close the database connection when the object is deleted."""