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

Bug in langchain-milvus import package #26

Open
saikumar0605 opened this issue Nov 29, 2024 · 7 comments
Open

Bug in langchain-milvus import package #26

saikumar0605 opened this issue Nov 29, 2024 · 7 comments

Comments

@saikumar0605
Copy link

Hi team,
I found a bug in your latest Milvus package. The old version was running well, but the latest package had a bug, which took me almost three days to figure out. the new package has a hardcode saying localhost. even if we give server configurations yet its localhost. please check the document below for details and solve it. happy to use the updated package.
Thank you, team.

langchain-milvus.pdf

@zc277584121
Copy link
Collaborator

@saikumar0605 Thank you very much.
Maybe there is something wrong with the import code,
it should be

from langchain_milvus import Milvus

, not

from langchain_milvus import milvus

To ensure correct, please ensure that you have updated to the latest version

pip install -U langchain_milvus

@saikumar0605
Copy link
Author

no @zc277584121 it's the same issue I have checked the below image.
image

the exact problem is I guess in the package somewhere there is localhost hardcoded. for server IP address.

here I get this log as well = Connecting to Milvus at 100.205.208.00:19530
I have added dummy IP address but it shows this. and error is attached below. its package problem only.

{
"error": "Failed to connect to Milvus: <MilvusException: (code=2, message=Fail connecting to server on localhost:19530, illegal connection params or server unavailable)>"
}

please check the error why it will show localhost:19530. it should show my IP address for error right??

@zc277584121
Copy link
Collaborator

This error seems strange. Under normal circumstances, it shouldn't occur. Can you show your langchain_milvus package version? It will be appreciated if there are more error stack information which can be helpful to locate the original issue.

@zc277584121
Copy link
Collaborator

BTW, can you try this code to see whether this issue would occur again

from pymilvus import (
    Collection,
    CollectionSchema,
    DataType,
    FieldSchema,
    MilvusClient,
    MilvusException,
    RRFRanker,
    WeightedRanker,
    utility,
)
from pymilvus.client.types import LoadState 
from pymilvus.orm.types import infer_dtype_bydata 

@saikumar0605

@saikumar0605
Copy link
Author

the problem is mainly with server's localhost URL. I guess mostly its Hardcoded somewhere.

this is package version:

Name: milvus
Version: 2.2.16
Summary: Embeded Milvus
Home-page: https://github.com/milvus-io/milvus-lite
Author: Milvus Team
Author-email: [email protected]
License: Apache-2.0
Location: c:\users\123sa\desktop\genai-proj\bot\venv\lib\site-packages
Requires:
Required-by:

@saikumar0605
Copy link
Author

langchain_milvus version

Name: langchain-milvus
Version: 0.1.7
Summary: An integration package connecting Milvus and LangChain
Home-page: https://github.com/langchain-ai/langchain-milvus
Author:
Author-email:
License: MIT
Location: c:\users\123sa\desktop\genai-proj\bot\venv\lib\site-packages
Requires: langchain-core, pymilvus
Required-by:

@zc277584121
Copy link
Collaborator

the problem is mainly with server's localhost URL. I guess mostly its Hardcoded somewhere.

this is package version:

Name: milvus Version: 2.2.16 Summary: Embeded Milvus Home-page: https://github.com/milvus-io/milvus-lite Author: Milvus Team Author-email: [email protected] License: Apache-2.0 Location: c:\users\123sa\desktop\genai-proj\bot\venv\lib\site-packages Requires: Required-by:

This pypi package is depracated, maybe the issue is caused from it. https://pypi.org/project/milvus/
image

Maybe you can uninstall milvus, then start a milvus service by milvus-lite/docker/zilliz, and then try your code again.

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

No branches or pull requests

2 participants