The Memory Layer for AI Agents - Drop-in memory infrastructure for AI agents and apps. Context that persists. Built for production.
Python agentic-memoryagentic-memory-systemagentsaiai-agentschatgptgenaillmlong-term-memorymemorymemory-managementpythonragstate-management
[Bug Fix] Fix issue with chromadb not working with 0.6.0 and onwards (#2279)
Deshraj Yadav32ebdaef2f67
diff --git a/mem0/vector_stores/chroma.py b/mem0/vector_stores/chroma.pyindex efb9fddb9..96cc7440f 100644--- a/mem0/vector_stores/chroma.py+++ b/mem0/vector_stores/chroma.py@@ -105,10 +105,10 @@ class ChromaDB(VectorStoreBase):chromadb.Collection: The created or retrieved collection."""# Skip creating collection if already exists- collections = self.list_cols()- for collection in collections:- if collection.name == name:- logging.debug(f"Collection {name} already exists. Skipping creation.")+ collection_info = self.client.get_collection(name=name)+ if collection_info:+ logging.debug(f"Collection {name} already exists. Skipping creation.")+ return collection_infocollection = self.client.get_or_create_collection(name=name,