streamlit
streamlit copied to clipboard
Autocomplete for chat_input
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.
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 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.
@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.
any update on this ?
@jrieke Hi, any updates?
maybe https://github.com/sobkevich/streamlit-copilot is all you need
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.