Hi, I am building a Streamlit set of tools on different pages of a main app. The main app and pages all have a sidebar. On the page that I intend to use as a Chat Bot, I receive an error message when trying to use the Chat Input Widget when I try to run the app locally.
I am using the latest Streamlit and Python versions. As I mentioned, there is a sidebar, but I am placing the st.chat_input box in the main page area. I removed all columns from that area, but still am receiving this error.
Is the st.chat_input not allowed in the main body area if there is a sidebar present on the page? I didn’t see any on this, but I’m hoping someone here can help me understand what I can do to maintain the sidebar while still taking advantage of this nice chat feature.
There is no problem using the following code in the main body:
with st.chat_message(“user”):
st.write(“Hello ”)
st.line_chart(np.random.randn(30, 1))
Just when I try to use:
st.chat_input(“…”)
The error message I receive is:
line 308, in chat_input raise StreamlitAPIException(DISALLOWED_CONTAINERS_ERROR_TEXT)
streamlit.errors.StreamlitAPIException:st.chat_input()
can’t be used inside anst.expander
,st.form
,st.tabs
,st.columns
, orst.sidebar
.