Skip to content
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

Update milvus.py #41

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Update milvus.py #41

wants to merge 1 commit into from

Conversation

bleuzetim
Copy link

Allows to use connection_args as followed

vectordb = Milvus(
collection_name="my_milvus_collection",
connection_args={"host": host_name, "port": port_name}
)

Allows to use connection_args as followed 

vectordb = Milvus(
                collection_name="my_milvus_collection",
                connection_args={"host": host_name, "port": port_name}
            )
Copy link
Collaborator

@codingjaguar codingjaguar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit, the code didn't check the existence of port from input params. The checking probably can be more robust.

Discussion: in Milvus we are recommending using URI and TOKEN universally. Is that feasible to construct uri on the caller side?

@bleuzetim
Copy link
Author

bleuzetim commented Jan 24, 2025

It does check the existence, if a port parameter is given it will use itm otherwise it will default it to 19530. I do agree that i might need to check the port better. (In code he checks wether the host is given, because i suppose people wont only send a port with the connection_args but always send a host with the port)

I think both the option for URI and host/port are nice to have.

Note: Co-Pilot, ChatGPT will often use the host/port way and not the URI way. Implementing this will help people who often use GPT to have less errors. (Usefull but need to make it more robustly coded)

Copy link
Collaborator

@codingjaguar codingjaguar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the context! That makes sense to me. I think we can keep supporting both URI and host:port to be consistent with current Milvus implementation.

/lgtm

@zc277584121 PTAL.

@zc277584121
Copy link
Collaborator

@bleuzetim @codingjaguar I don't think this is a good way, because the milvus client does not support host + port manner. We should be consistent with milvus client SDK. As for the ChatGPT's answer, I think it 's caused by the hallucinations or old depracated knowledge in the Internet. For reduce the depracated usage demo, we should not accept this manner.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants