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

23 lines
741 B
Python
Raw Normal View History

2024-09-10 01:27:50 +00:00
from open_webui.config import VECTOR_DB
2024-09-10 03:37:06 +00:00
if VECTOR_DB == "milvus":
from open_webui.apps.retrieval.vector.dbs.milvus import MilvusClient
2024-09-10 03:37:06 +00:00
VECTOR_DB_CLIENT = MilvusClient()
2024-10-09 10:51:43 +00:00
elif VECTOR_DB == "qdrant":
from open_webui.apps.retrieval.vector.dbs.qdrant import QdrantClient
VECTOR_DB_CLIENT = QdrantClient()
2024-11-04 20:10:14 +00:00
elif VECTOR_DB == "opensearch":
from open_webui.apps.retrieval.vector.dbs.opensearch import OpenSearchClient
VECTOR_DB_CLIENT = OpenSearchClient()
2024-11-04 20:33:58 +00:00
elif VECTOR_DB == "pgvector":
from open_webui.apps.retrieval.vector.dbs.pgvector import PgvectorClient
VECTOR_DB_CLIENT = PgvectorClient()
2024-09-10 03:37:06 +00:00
else:
from open_webui.apps.retrieval.vector.dbs.chroma import ChromaClient
2024-09-10 03:37:06 +00:00
VECTOR_DB_CLIENT = ChromaClient()