What problem does it solve?
Streamlit chat primitives are simple but assembling a responsive, stateful conversational UI with streaming responses, file and audio inputs, feedback, and clear message history can be error-prone and repetitive; this Skill provides practical patterns and examples to accelerate that work.
Core Features & Use Cases
- Message history management: Use st.session_state to persist and render conversation history with role-aware rendering.
- Streaming assistant responses: Show token-by-token or chunked model output using st.write_stream for a live typing experience.
- Multimodal inputs: Accept files and audio from users via st.chat_input to support vision or speech workflows.
- UX enhancements: Add avatars, suggestion chips, and feedback widgets to improve onboarding and collect ratings.
- Use Case: Build a customer support chatbot that accepts screenshots, transcribes audio questions, streams model answers, and collects thumbs-up/down feedback.
Quick Start
Create a simple Streamlit chat app that stores messages in st.session_state, displays them with st.chat_message, accepts input with st.chat_input (including files or audio), and streams assistant replies with st.write_stream.