Open yukio-takagi opened 1 year ago
ダウングレードしたときのエラーは下記
[08:18:40] 🔄 Updated app!
2023-04-21 08:18:41.529 Uncaught app exception
Traceback (most recent call last):
File "/home/appuser/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 565, in _run_script
exec(code, module.__dict__)
File "/app/openai_esg-bot_004/ESG-app.py", line 4, in <module>
from llama_index import GPTSimpleVectorIndex, SimpleDirectoryReader, ServiceContext, PromptHelper
ImportError: cannot import name 'ServiceContext' from 'llama_index' (/home/appuser/venv/lib/python3.9/site-packages/llama_index/__init__.py)
2023-04-21 08:18:41.529 Uncaught app exception
Traceback (most recent call last):
File "/home/appuser/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 565, in _run_script
exec(code, module.__dict__)
File "/app/openai_esg-bot_004/ESG-app.py", line 4, in <module>
from llama_index import GPTSimpleVectorIndex, SimpleDirectoryReader, ServiceContext, PromptHelper
ImportError: cannot import name 'ServiceContext' from 'llama_index' (/home/appuser/venv/lib/python3.9/site-packages/llama_index/__init__.py)
llama_index のバージョンにより、streamlit で稼働できない。 原因は ESG-index.json 内の Key Error
下記をみると、llama_index0.4.36 にダウングレードする対処があるようだが、そうすると、Service_context が使えなくなる
https://github.com/jerryjliu/llama_index/issues/964