From 942fd384de21ff552f5d6732205709f8ef6c0127 Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Wed, 8 Jan 2025 13:18:14 -0800 Subject: [PATCH] refac: chroma --- backend/open_webui/retrieval/vector/dbs/chroma.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/open_webui/retrieval/vector/dbs/chroma.py b/backend/open_webui/retrieval/vector/dbs/chroma.py index 00d73a889..c40618fcc 100644 --- a/backend/open_webui/retrieval/vector/dbs/chroma.py +++ b/backend/open_webui/retrieval/vector/dbs/chroma.py @@ -51,8 +51,8 @@ class ChromaClient: def has_collection(self, collection_name: str) -> bool: # Check if the collection exists based on the collection name. - collections = self.client.list_collections() - return collection_name in [collection.name for collection in collections] + collection_names = self.client.list_collections() + return collection_name in collection_names def delete_collection(self, collection_name: str): # Delete the collection based on the collection name.