I am using the streamlit chat component to make an interactive game. In ChatGPT, we aren’t allowed to submit a response until the assistant has finished generating a response. Is there a similar way to implement this functionality using streamlit?
Hi @Derek_Hu
I would recommend to explore the disabled
parameter of chat_input()
that will render the chat input box to be inactive while a certain condition is met or not met.
More info on the Docs page:
Example of this in-action is at https://github.com/dataprofessor/llama2/blob/master/streamlit_app.py
where the chat input box is disabled when no API key is provided.