Hi, I’m coming to ask an issue about chat_input and sidebar. My Python version is 3.11.7, and my streamlit version is 1.30.0. I’m running my app locally, and I want to put the chat input in the sidebar. However, when I run the app, the following error has occurred
StreamlitAPIException: st.chat_input()
can’t be used inside an st.expander
, st.form
, st.tabs
, st.columns
, or st.sidebar
.
Traceback:
File "D:\AI\Langchain-Chatchat-master\webui.py", line 250, in <module>
pages[selected_page]["func"](api=api, is_lite=is_lite)File "D:\AI\Langchain-Chatchat-master\webui_pages\dialogue\dialogue.py", line 456, in dialogue_page
prompt1 = st.chat_input("Say something")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
From the error message, it seems that the chat input cannot be put into the sidebar. Therefore, I’m wondering whether there is a solution to it. Is this because of the version of the streamlit? Or if not the case, is there another solution to this issue?
Thank you very much for all the help!