-
Notifications
You must be signed in to change notification settings - Fork 15.4k
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
HuggingFaceEndpoint: Correct Example for ImportError #1176
Conversation
When I try to import the Class HuggingFaceEndpoint I get an Import Error: cannot import name 'HuggingFaceEndpoint' from 'langchain'. (langchain version 0.0.88) These two imports work fine: from langchain import HuggingFacePipeline and from langchain import HuggingFaceHub. So I corrected the import statement in the example. There is probably a better solution to this, but this fixes the Error for me.
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.
ah perfect - will update this so it can just be from langchain.llms import HuggingFaceEndpoint
, but thank you for flagging!
That is also not working in my case unfortunately... But again, this works: from langchain.llms import HuggingFaceHub
|
yup will need to update the init file as well |
To make the import of HuggingFaceEndpoint work.
Changed the init file. Is there something else to be done to make it work? |
If necessary also update the general init.py Such that "from langchain import HuggingFaceEndpoint" is possible.
Also changed the general init file to make "from langchain import HuggingFaceEndpoint" possible |
im gonna remove this once its merged in actually - i actually dont want this to be possible, trying to enforce things are loaded from their modules |
When I try to import the Class HuggingFaceEndpoint I get an Import Error: cannot import name 'HuggingFaceEndpoint' from 'langchain'. (langchain version 0.0.88) These two imports work fine: from langchain import HuggingFacePipeline and from langchain import HuggingFaceHub. So I corrected the import statement in the example. There is probably a better solution to this, but this fixes the Error for me.
When I try to import the Class HuggingFaceEndpoint I get an Import Error: cannot import name 'HuggingFaceEndpoint' from 'langchain'. (langchain version 0.0.88)
These two imports work fine: from langchain import HuggingFacePipeline and from langchain import HuggingFaceHub.
So I corrected the import statement in the example. There is probably a better solution to this, but this fixes the Error for me.