[Misc] Clean up unnecessary checks in chromadb vector store integration (#2284)

This commit is contained in:
Deshraj Yadav
2025-03-04 14:21:27 -08:00
committed by GitHub
parent aa7ab9736d
commit 20c03eaa92

View File

@@ -104,12 +104,6 @@ class ChromaDB(VectorStoreBase):
Returns:
chromadb.Collection: The created or retrieved collection.
"""
# Skip creating collection if already exists
collection_info = self.client.get_collection(name=name)
if collection_info:
logging.debug(f"Collection {name} already exists. Skipping creation.")
return collection_info
collection = self.client.get_or_create_collection(
name=name,
embedding_function=embedding_fn,