[Misc] Clean up unnecessary checks in chromadb vector store integration (#2284)
This commit is contained in:
@@ -104,12 +104,6 @@ class ChromaDB(VectorStoreBase):
|
|||||||
Returns:
|
Returns:
|
||||||
chromadb.Collection: The created or retrieved collection.
|
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(
|
collection = self.client.get_or_create_collection(
|
||||||
name=name,
|
name=name,
|
||||||
embedding_function=embedding_fn,
|
embedding_function=embedding_fn,
|
||||||
|
|||||||
Reference in New Issue
Block a user