Skip to content

Commit

Permalink
fix milvus database name parameter missed (langgenius#3229)
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnJyong authored Apr 9, 2024
1 parent 944539f commit 323308b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions api/core/rag/datasource/vdb/milvus/milvus_vector.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,8 @@ def delete(self) -> None:
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):
Expand All @@ -142,7 +143,8 @@ def text_exists(self, id: str) -> bool:
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):
Expand Down

0 comments on commit 323308b

Please sign in to comment.