Update factory.py
This commit is contained in:
@@ -1,6 +1,10 @@
|
|||||||
from open_webui.retrieval.vector.main import VectorDBBase
|
from open_webui.retrieval.vector.main import VectorDBBase
|
||||||
from open_webui.retrieval.vector.type import VectorType
|
from open_webui.retrieval.vector.type import VectorType
|
||||||
from open_webui.config import VECTOR_DB, ENABLE_QDRANT_MULTITENANCY_MODE
|
from open_webui.config import (
|
||||||
|
VECTOR_DB,
|
||||||
|
ENABLE_QDRANT_MULTITENANCY_MODE,
|
||||||
|
ENABLE_MILVUS_MULTITENANCY_MODE,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class Vector:
|
class Vector:
|
||||||
@@ -12,9 +16,16 @@ class Vector:
|
|||||||
"""
|
"""
|
||||||
match vector_type:
|
match vector_type:
|
||||||
case VectorType.MILVUS:
|
case VectorType.MILVUS:
|
||||||
from open_webui.retrieval.vector.dbs.milvus import MilvusClient
|
if ENABLE_MILVUS_MULTITENANCY_MODE:
|
||||||
|
from open_webui.retrieval.vector.dbs.milvus_multitenancy import (
|
||||||
|
MilvusClient,
|
||||||
|
)
|
||||||
|
|
||||||
return MilvusClient()
|
return MilvusClient()
|
||||||
|
else:
|
||||||
|
from open_webui.retrieval.vector.dbs.milvus import MilvusClient
|
||||||
|
|
||||||
|
return MilvusClient()
|
||||||
case VectorType.QDRANT:
|
case VectorType.QDRANT:
|
||||||
if ENABLE_QDRANT_MULTITENANCY_MODE:
|
if ENABLE_QDRANT_MULTITENANCY_MODE:
|
||||||
from open_webui.retrieval.vector.dbs.qdrant_multitenancy import (
|
from open_webui.retrieval.vector.dbs.qdrant_multitenancy import (
|
||||||
|
|||||||
Reference in New Issue
Block a user