mirror of
https://github.com/open-webui/open-webui
synced 2025-06-26 18:26:48 +00:00
refac: chroma
This commit is contained in:
parent
bd9bc4d7eb
commit
942fd384de
@ -51,8 +51,8 @@ class ChromaClient:
|
|||||||
|
|
||||||
def has_collection(self, collection_name: str) -> bool:
|
def has_collection(self, collection_name: str) -> bool:
|
||||||
# Check if the collection exists based on the collection name.
|
# Check if the collection exists based on the collection name.
|
||||||
collections = self.client.list_collections()
|
collection_names = self.client.list_collections()
|
||||||
return collection_name in [collection.name for collection in collections]
|
return collection_name in collection_names
|
||||||
|
|
||||||
def delete_collection(self, collection_name: str):
|
def delete_collection(self, collection_name: str):
|
||||||
# Delete the collection based on the collection name.
|
# Delete the collection based on the collection name.
|
||||||
|
Loading…
Reference in New Issue
Block a user