-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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]: No module named 'llama_index.core.llms.llama_utils' #10730
Comments
🤖 Hey @msamwelmollel, nice to see you back in the labyrinth of code! 🌀 The error "ModuleNotFoundError: No module named 'llama_index.core.llms.llama_utils'" is occurring because with the introduction of LlamaIndex v0.10.0, many imports have changed. If you want to import specific functions from 'llama_index.core.llms.llama_utils', you have two options:
from llama_index.core.llms.llama_utils import (
messages_to_prompt,
completion_to_prompt,
) to: from llama_index.legacy.core.llms.llama_utils import (
messages_to_prompt,
completion_to_prompt,
)
llamaindex-cli upgrade-file <file_path>
# OR
llamaindex-cli upgrade <folder_path> This will update the import statements in your For more details, you can refer to the migration guide for v0.10.0. Sources
|
|
Bug Description
In v0.10.3 whenever I call
from llama_index.core.llms.llama_utils import (
messages_to_prompt,
completion_to_prompt,
)
I got the erro that module doesn't exist
Version
0.10.3
Steps to Reproduce
from llama_index.core import SimpleDirectoryReader, VectorStoreIndex
from llama_index.llms.llama_cpp import LlamaCPP
from llama_index.core.llms.llama_utils import (
messages_to_prompt,
completion_to_prompt,
)
Relevant Logs/Tracbacks
from llama_index.core.llms.llama_utils import ( ModuleNotFoundError: No module named 'llama_index.core.llms.llama_utils'
The text was updated successfully, but these errors were encountered: