Skip to content

milvus: add_db_milvus_connection #25627

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Aug 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions libs/partners/milvus/langchain_milvus/vectorstores/milvus.py
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,7 @@ def _create_connection_alias(self, connection_args: dict) -> str:
address: str = connection_args.get("address", None)
uri: str = connection_args.get("uri", None)
user = connection_args.get("user", None)
db_name = connection_args.get("db_name", "default")

# Order of use is host/port, uri, address
if host is not None and port is not None:
Expand Down Expand Up @@ -384,6 +385,7 @@ def _create_connection_alias(self, connection_args: dict) -> str:
and (addr["address"] == given_address)
and ("user" in addr)
and (addr["user"] == tmp_user)
and (addr["db_name"] == db_name)
):
logger.debug("Using previous connection: %s", con[0])
return con[0]
Expand Down
Loading