diff --git a/api/core/rag/datasource/vdb/milvus/milvus_vector.py b/api/core/rag/datasource/vdb/milvus/milvus_vector.py index cff490176c..29bb467acf 100644 --- a/api/core/rag/datasource/vdb/milvus/milvus_vector.py +++ b/api/core/rag/datasource/vdb/milvus/milvus_vector.py @@ -130,7 +130,8 @@ class MilvusVector(BaseVector): uri = "https://" + str(self._client_config.host) + ":" + str(self._client_config.port) else: uri = "http://" + str(self._client_config.host) + ":" + str(self._client_config.port) - connections.connect(alias=alias, uri=uri, user=self._client_config.user, password=self._client_config.password) + connections.connect(alias=alias, uri=uri, user=self._client_config.user, password=self._client_config.password, + db_name=self._client_config.database) from pymilvus import utility if utility.has_collection(self._collection_name, using=alias): @@ -142,7 +143,8 @@ class MilvusVector(BaseVector): uri = "https://" + str(self._client_config.host) + ":" + str(self._client_config.port) else: uri = "http://" + str(self._client_config.host) + ":" + str(self._client_config.port) - connections.connect(alias=alias, uri=uri, user=self._client_config.user, password=self._client_config.password) + connections.connect(alias=alias, uri=uri, user=self._client_config.user, password=self._client_config.password, + db_name=self._client_config.database) from pymilvus import utility if not utility.has_collection(self._collection_name, using=alias):