fix: AsyncMemory.reset() does not reset entity store (#5535)
This commit is contained in:
@@ -3475,6 +3475,13 @@ class AsyncMemory(MemoryBase):
|
|||||||
self.config.vector_store.provider, self.config.vector_store.config
|
self.config.vector_store.provider, self.config.vector_store.config
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if self._entity_store is not None:
|
||||||
|
try:
|
||||||
|
await asyncio.to_thread(self._entity_store.reset)
|
||||||
|
except Exception as e:
|
||||||
|
logger.warning(f"Failed to reset entity store: {e}")
|
||||||
|
self._entity_store = None
|
||||||
|
|
||||||
capture_event("mem0.reset", self, {"sync_type": "async"})
|
capture_event("mem0.reset", self, {"sync_type": "async"})
|
||||||
await display_first_run_notice_async(self, "async", "reset")
|
await display_first_run_notice_async(self, "async", "reset")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user