refac: vector db clients

This commit is contained in:
Timothy J. Baek
2024-09-12 02:00:31 -04:00
parent 4775fe43d8
commit 8be6e16513
3 changed files with 9 additions and 11 deletions

View File

@@ -997,7 +997,7 @@ def store_docs_in_vector_db(
try:
if overwrite:
if collection_name in VECTOR_DB_CLIENT.list_collections():
if VECTOR_DB_CLIENT.has_collection(collection_name=collection_name):
log.info(f"deleting existing collection {collection_name}")
VECTOR_DB_CLIENT.delete_collection(collection_name=collection_name)