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

input key issue #4

Open
jackft2 opened this issue Mar 3, 2024 · 1 comment
Open

input key issue #4

jackft2 opened this issue Mar 3, 2024 · 1 comment

Comments

@jackft2
Copy link

jackft2 commented Mar 3, 2024

截圖 2024-03-03 下午4 11 28

File "/home/adminuser/venv/lib/python3.11/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 552, in _run_script
exec(code, module.dict)
File "/mount/src/retrieval-augmented-generation-engine-with-langchain-and-streamlit/rag_engine.py", line 137, in
boot()
File "/mount/src/retrieval-augmented-generation-engine-with-langchain-and-streamlit/rag_engine.py", line 132, in boot
response = query_llm(st.session_state.retriever, query)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/adminuser/venv/lib/python3.11/site-packages/streamlit/runtime/state/session_state_proxy.py", line 121, in getattr
raise AttributeError(_missing_attr_error_message(key))

@twocoins-ca
Copy link

AttributeError: st.session_state has no attribute "retriever". Did you forget to initialize it? More info: https://docs.streamlit.io/library/advanced-features/session-state#initialization
Traceback:
File "/home/devsecops/projects/Retrieval-Augmented-Generation-Engine-with-LangChain-and-Streamlit/.venv/lib/python3.10/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 552, in _run_script
exec(code, module.dict)
File "/home/devsecops/projects/Retrieval-Augmented-Generation-Engine-with-LangChain-and-Streamlit/rag_engine.py", line 137, in
boot()
File "/home/devsecops/projects/Retrieval-Augmented-Generation-Engine-with-LangChain-and-Streamlit/rag_engine.py", line 132, in boot
response = query_llm(st.session_state.retriever, query)
File "/home/devsecops/projects/Retrieval-Augmented-Generation-Engine-with-LangChain-and-Streamlit/.venv/lib/python3.10/site-packages/streamlit/runtime/state/session_state_proxy.py", line 121, in getattr
raise AttributeError(_missing_attr_error_message(key))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants