Skip to content

Commit

Permalink
community: Add support of "http" URI for Milvus (langchain-ai#12710) (l…
Browse files Browse the repository at this point in the history
…angchain-ai#15683)

- **Description:** Add support of HTTP URI for Milvus
  - **Issue:** langchain-ai#12710 
  - **Dependencies:** N/A,
  • Loading branch information
ohbeep authored Jan 12, 2024
1 parent e26e1f8 commit 9b3962f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion libs/community/langchain_community/vectorstores/milvus.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,13 @@ def _create_connection_alias(self, connection_args: dict) -> str:
if host is not None and port is not None:
given_address = str(host) + ":" + str(port)
elif uri is not None:
given_address = uri.split("https://")[1]
if uri.startswith("https://"):
given_address = uri.split("https://")[1]
elif uri.startswith("http://"):
given_address = uri.split("http://")[1]
else:
logger.error("Invalid Milvus URI: %s", uri)
raise ValueError("Invalid Milvus URI: %s", uri)
elif address is not None:
given_address = address
else:
Expand Down

0 comments on commit 9b3962f

Please sign in to comment.