streamlit / streamlit

Streamlit — A faster way to build and share data apps.
https://streamlit.io
Apache License 2.0
38.3k stars 3.33k forks source link

Add configurable buttons into `st.chat_input` #10737

Open lukasmasuch opened 1 week ago

lukasmasuch commented 1 week ago

Checklist

Summary

Add support for configurable toggle buttons which are integrated into the chat input field similar to how its supported in many of the LLM-based apps:

Image

Why?

Allows implementing more complex LLM-based apps in Streamlit.

How?

prompt = st.chat_input(..., options=[":material/search: Search", ":material/science: Deep research"])

st.write("Prompt text", prompt.text)
st.write("Selected options", prompt.options)

Additional Context

No response

github-actions[bot] commented 1 week ago

To help Streamlit prioritize this feature, react with a 👍 (thumbs up emoji) to the initial post.

Your vote helps us identify which enhancements matter most to our users.

Visits