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]: ModuleNotFoundError: No module named 'llama_index.storage' #12364

Closed
rudrakhsha-c opened this issue Mar 28, 2024 · 4 comments
Closed

[Bug]: ModuleNotFoundError: No module named 'llama_index.storage' #12364

rudrakhsha-c opened this issue Mar 28, 2024 · 4 comments
Labels
bug Something isn't working triage Issue needs to be triaged/prioritized

Comments

@rudrakhsha-c
Copy link

Bug Description

I am unable to use the chat store object provided by the llama index storage class.

from llama_index.storage.chat_store.redis import RedisChatStore

ModuleNotFoundError: No module named 'llama_index.storage'

Getting the above error
How do I solve this issue?
Is there any other dependency we have to install to access chatstores?

Version

0.10.25

Steps to Reproduce

!pip install llama-index
from llama_index.storage.chat_store.redis import RedisChatStore

Run the above code and you will get the error.

Relevant Logs/Tracbacks

No response

@rudrakhsha-c rudrakhsha-c added bug Something isn't working triage Issue needs to be triaged/prioritized labels Mar 28, 2024
Copy link

dosubot bot commented Mar 28, 2024

Hey @rudrakhsha-c! Great to see you diving into the depths of LlamaIndex again. Hope this puzzle turns out to be more fun than frustrating! 🎩

Based on the information you've provided and the context from the LlamaIndex repository, it seems like you're encountering a ModuleNotFoundError when trying to import the RedisChatStore from the llama_index.storage module.

This error typically occurs when the module you're trying to import doesn't exist or the import path is incorrect. In your case, it seems like the import path you're using doesn't match the actual module path in the LlamaIndex codebase.

The correct import path for the RedisChatStore in the LlamaIndex codebase should be:

from llama_index.core.storage.chat_store.redis_chat_store import RedisChatStore

You can find this in the llama-index-integrations/storage/chat_store/llama-index-storage-chat-store-redis/llama_index/storage/chat_store/redis/base.py file in the LlamaIndex repository.

Additionally, to use the RedisChatStore, there are some additional dependencies that you need to install. According to the pyproject.toml file for the llama-index-storage-chat-store-redis project, you need to have the following dependencies installed:

  • llama-index-core version ^0.10.11.post1
  • redis version >=4.1.0

You can install these dependencies using pip:

pip install llama-index-core redis

You can find more information about these dependencies in the llama-index-integrations/storage/chat_store/llama-index-storage-chat-store-redis/pyproject.toml file in the LlamaIndex repository.

Please try updating your import statement and installing the necessary dependencies, and let me know if you continue to encounter any issues.

Sources

About Dosu

This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

If you want to continue the conversation, start your reply with @dosu-bot.

@rudrakhsha-c
Copy link
Author

@dosubot even after modifying my requirements according to your given changes, the error still persists.

ModuleNotFoundError                       Traceback (most recent call last)
[<ipython-input-21-454faf11dd3e>](https://localhost:8080/#) in <cell line: 1>()
----> 1 from llama_index.core.storage.chat_store.redis_chat_store import RedisChatStore

ModuleNotFoundError: No module named 'llama_index.core.storage.chat_store.redis_chat_store'

Using the version mentioned in your comment. Can you please help?

@rudrakhsha-c
Copy link
Author

It seems like there is no module named RedisChatStore in the folder
image
This documentation needs to be updated: https://docs.llamaindex.ai/en/stable/module_guides/storing/chat_stores/#redischatstore

@logan-markewich
Copy link
Collaborator

logan-markewich commented Mar 28, 2024

@rudrakhsha-c its a package, the same as every integration

pip install llama-index-storage-chat-store-redis

Its under llama-index-integrations/storage/chat_store/llama-index-storage-chat-store-redis/ in the repo

I welcome a PR to update that docs page, otherwise I'll get to it at some point

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage Issue needs to be triaged/prioritized
Projects
None yet
Development

No branches or pull requests

2 participants