streamlit icon indicating copy to clipboard operation
streamlit copied to clipboard

Autocomplete for chat_input

Open liunux4odoo opened this issue 2 years ago • 6 comments

Problem

The new chat_input element is great for chatbot apps. It would be very useful if it can give user suggestions when inputting.

Some feature requests (#6604, #5602) were submitted for the text_input element. And then they were suggested to use streamlit-searchbox as alternative.

Since official chat_input has been shinny released, I think it's good timing to bring the autocomplete feature to it.

Thanks.


Community voting on feature requests enables the Streamlit team to understand which features are most important to our users.

If you'd like the Streamlit team to prioritize this feature request, please use the 👍 (thumbs up emoji) reaction in response to the initial post.

liunux4odoo avatar Jul 25 '23 08:07 liunux4odoo

Yup, we are thinking about this! Do you have a concrete use case in mind / which suggestions you'd like to show? The more detail the better!

jrieke avatar Jul 25 '23 15:07 jrieke

@jrieke Hope streamlit can support some use case like discord or telegram bot, for example when I input “/”, there will show a list of command starts with “/” like “/clear”, “/upload”and shown with caption of the command.

The command list and caption can be a dict defined with st.chat_input.

imClumsyPanda avatar Jul 25 '23 15:07 imClumsyPanda

@jrieke Thanks for quick concerning.

Making chat_input behave like streamlit-searchbox would be sufficient.

For example:

st.chat_input('please input your question', autocomplete: List[str]=[])

When user is inputing, the input widget dropdown a list of strings which filtered dynamically by the current input, then user can make a quick selection from the list.

liunux4odoo avatar Jul 25 '23 15:07 liunux4odoo

any update on this ?

tejeshbhalla avatar Aug 21 '23 10:08 tejeshbhalla

@jrieke Hi, any updates?

austinmw avatar Mar 13 '24 19:03 austinmw

maybe https://github.com/sobkevich/streamlit-copilot is all you need

LinXueyuanStdio avatar Jun 09 '24 13:06 LinXueyuanStdio

It would be nice to have this capability. It's a lot of hacking to get anything similar to work, and it comes with lots of baggage.

wparker1339 avatar Jun 10 '25 19:06 wparker1339