From afca48028f242ff58f3c4cb25e566a17f52ca8d0 Mon Sep 17 00:00:00 2001 From: David Tippett Date: Mon, 4 Nov 2024 15:10:14 -0500 Subject: [PATCH] Moving new config to under retreval --- backend/open_webui/apps/rag/vector/connector.py | 12 ------------ .../open_webui/apps/retrieval/vector/connector.py | 4 ++++ 2 files changed, 4 insertions(+), 12 deletions(-) delete mode 100644 backend/open_webui/apps/rag/vector/connector.py diff --git a/backend/open_webui/apps/rag/vector/connector.py b/backend/open_webui/apps/rag/vector/connector.py deleted file mode 100644 index 9b9b6089e..000000000 --- a/backend/open_webui/apps/rag/vector/connector.py +++ /dev/null @@ -1,12 +0,0 @@ -from open_webui.apps.rag.vector.dbs.chroma import ChromaClient -from open_webui.apps.rag.vector.dbs.milvus import MilvusClient - - -from open_webui.config import VECTOR_DB - -if VECTOR_DB == "milvus": - VECTOR_DB_CLIENT = MilvusClient() -elif VECTOR_DB == "opensearch": - VECTOR_DB_CLIENT = OpenSearchClient() -else: - VECTOR_DB_CLIENT = ChromaClient() diff --git a/backend/open_webui/apps/retrieval/vector/connector.py b/backend/open_webui/apps/retrieval/vector/connector.py index c7f00f5fd..b95b55783 100644 --- a/backend/open_webui/apps/retrieval/vector/connector.py +++ b/backend/open_webui/apps/retrieval/vector/connector.py @@ -8,6 +8,10 @@ elif VECTOR_DB == "qdrant": from open_webui.apps.retrieval.vector.dbs.qdrant import QdrantClient VECTOR_DB_CLIENT = QdrantClient() +elif VECTOR_DB == "opensearch": + from open_webui.apps.retrieval.vector.dbs.opensearch import OpenSearchClient + + VECTOR_DB_CLIENT = OpenSearchClient() else: from open_webui.apps.retrieval.vector.dbs.chroma import ChromaClient