Using button to generate user_input in streamlit-chat interface

I have a similar need. I wanted an openai chat or Whatsapp style UI. Iโ€™ll be inserting dataframes into the conversation but not buttons. Seems programmatically similar to me. My buttons are on the sidebar. The example demonstrates how to programmatically append user input prompts into the conversation. ChatGPT Style Example SOTA.