-
Notifications
You must be signed in to change notification settings - Fork 17
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
base: main
Are you sure you want to change the base?
Update milvus.py #41
Conversation
Allows to use connection_args as followed vectordb = Milvus( collection_name="my_milvus_collection", connection_args={"host": host_name, "port": port_name} )
There was a problem hiding this 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?
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) |
There was a problem hiding this 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.
@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. |
Allows to use connection_args as followed
vectordb = Milvus(
collection_name="my_milvus_collection",
connection_args={"host": host_name, "port": port_name}
)