-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
[Question]: #14602
Comments
Hey there, @medhsv! 👋 I'm here to help you out with your coding conundrum. I'm a bot designed to assist with bug fixes, answer questions, and even guide you on becoming a contributor. Let's squash this bug together! You should import from llama_index.llms.huggingface_api import HuggingFaceInferenceAPI This should resolve the |
You should import from llama_index.legacy.service_context import ServiceContext
from llama_index import set_global_service_context This should resolve the |
For
For this fix issued [nltk_data] Downloading package stopwords to
|
To resolve the from llama_index.legacy.service_context import ServiceContext, set_global_service_context This should fix the import error you are encountering [1]. |
@medhsv you are using several old imports from v0.9.x, which no longer work. In v0.10 So far from what I read, you need
Note that service context is deprecated, but still works (again, do checkout the docs at https://docs.llamaindex.ai) |
Question Validation
Question
Does anyone have fix to the following issue:
ImportError Traceback (most recent call last)
in <cell line: 16>()
14 #from llama_index.prompts import SimpleInputPrompt
15 # Import the llama index HF Wrapper
---> 16 from llama_index.llms import HuggingFaceLLM
17 # Bring in embeddings wrapper
18 from llama_index.embeddings import LangchainEmbedding
ImportError: cannot import name 'HuggingFaceLLM' from 'llama_index.llms' (unknown location)
I need it fixed urgently
searched everywhere no fix found
The text was updated successfully, but these errors were encountered: