open-webui/backend/open_webui/apps/rag/vector/connector.py

13 lines
351 B
Python
Raw Normal View History

2024-10-30 00:28:37 +00:00
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()