Kav-K/GPTDiscord

[BUG] ImportError: cannot import name 'QuestionAnswerPrompt' from 'llama_index' (/home/m1nd3xpand3r/Workspace/M1NDB0T-GPTDiscord/venv/lib/python3.9/site-packages/llama_index/__init__.py)

Closed this issue · 1 comments

Successfully installed aiostream-0.5.2 dataclasses-json-0.5.14 deprecated-1.2.14 fsspec-2023.10.0 llama-index-0.9.4 nest-asyncio-1.5.8 pandas-2.1.3 pytz-2023.3.post1 tzdata-2023.3 urllib3-1.26.18 wrapt-1.16.0
(venv) m1nd3xpand3r@M1NDB0T:/Workspace/M1NDB0T-GPTDiscord$ python3 gpt3discord.py
Loading environment from .env
Loading environment from /home/m1nd3xpand3r/Workspace/M1NDB0T-GPTDiscord/etc/environment
Loading environment from None
Attempting to retrieve the settings DB
Retrieved the settings DB
Traceback (most recent call last):
File "/home/m1nd3xpand3r/Workspace/M1NDB0T-GPTDiscord/gpt3discord.py", line 15, in
from cogs.search_service_cog import SearchService
File "/home/m1nd3xpand3r/Workspace/M1NDB0T-GPTDiscord/cogs/search_service_cog.py", line 49, in
from models.search_model import Search
File "/home/m1nd3xpand3r/Workspace/M1NDB0T-GPTDiscord/models/search_model.py", line 15, in
from llama_index import (
ImportError: cannot import name 'QuestionAnswerPrompt' from 'llama_index' (/home/m1nd3xpand3r/Workspace/M1NDB0T-GPTDiscord/venv/lib/python3.9/site-packages/llama_index/init.py)
(venv) m1nd3xpand3r@M1NDB0T:
/Workspace/M1NDB0T-GPTDiscord$

Not sure what I am missing installing everything needed

You somehow installed a too-high version of llama-index, did you install using the requirements.txt? Do python3.9 -m pip install -r requirements.txt in the directory of the project.
The latest llama-index version we support is llama-index==0.8.69.post1, you have installed 0.9.4