feat: Implement Qdrant multi-tenancy support with collection management and tenant isolation

This commit is contained in:
LoiTra
2025-05-15 11:28:06 +07:00
parent 0a8cecfbfa
commit 184d8dfd7e
3 changed files with 721 additions and 3 deletions
@@ -1,6 +1,6 @@
from open_webui.retrieval.vector.main import VectorDBBase
from open_webui.retrieval.vector.type import VectorType
from open_webui.config import VECTOR_DB
from open_webui.config import VECTOR_DB, QDRANT_MULTI_TENANCY
class Vector:
@@ -16,9 +16,14 @@ class Vector:
return MilvusClient()
case VectorType.QDRANT:
from open_webui.retrieval.vector.dbs.qdrant import QdrantClient
if QDRANT_MULTI_TENANCY:
from open_webui.retrieval.vector.dbs.qdrant_multitenancy import QdrantClient
return QdrantClient()
return QdrantClient()
else:
from open_webui.retrieval.vector.dbs.qdrant import QdrantClient
return QdrantClient()
case VectorType.PINECONE:
from open_webui.retrieval.vector.dbs.pinecone import PineconeClient