run-llama/create_llama_projects

Error when building Multi-Document Agents via create-llama

jbbae opened this issue · 0 comments

Hi, so I'm running into issues with getting the backend to work for Multi-Document Agents. Developing this from a Windows (11 Home).

All I did was:

  1. Initialize the project using "yarn run llama"
  2. Selected multi-document-agents
  3. Followed the instructions on the backend README (poetry install, poetry shell, and added OPEN_AI_API key in a ".env" file).
  4. Ran "python main.py

And I get this error:

(base) (app-py3.11) PS C:\Users\USER\OneDrive\Documents\GitHub\PROJECT\backend> python main.py
Traceback (most recent call last):
  File "C:\Users\USER\OneDrive\Documents\GitHub\PROJECT\backend\main.py", line 4, in <module>
    from app.api.routers.chat import chat_router
  File "C:\Users\USER\OneDrive\Documents\GitHub\PROJECT\backend\app\api\routers\chat.py", line 9, in <module>
    from llama_index.llms.base import MessageRole, ChatMessage
ImportError: cannot import name 'MessageRole' from 'llama_index.llms.base' (C:\Users\USER\AppData\Local\pypoetry\Cache\virtualenvs\app-xadExt60-py3.11\Lib\site-packages\llama_index\llms\base.py)

Any idea what could be wrong here...?