-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make user's message in a gr.Chatbot
appear immediately
#3092
Comments
I don't know if this is actually possible given that the user message could contain markdown and so does need to be processed in the backend. Perhaps as discussed @aliabid94, we could rewrite the chatbot function itself to yield the user message first, and then return the full response |
@usuyama brought up another good suggestion here: https://github.com/gradio-app/gradio/discussions/3129: the ability add a single message from the bot/user side. I would have expected something like this to work:
or
But neither of them do. cc @dawoodkhan82 |
#3165 didn't close this. |
Just to clarify, it didn't close the first bullet point:
But the other two things mentioned here are closed, right? |
gr.Chatbot
appear immediately
Is there any quick way to do this? I have tried to inheritance Chatbot and rewrite the post-processing function to support these. But it doesn't work. 😅 |
It should now work as of the latest version of gradio ( |
I think making a user's message appear immediately should not be a new feature of the chatbot, but rather a result of a how a user sets up the chatbot component. Specifically, a user should use the I tried to put together a simple example but ran into issues with my knowledge of JS. @dawoodkhan82 do you wanna see if this is doable with Gradio? If so, perhaps we can update our demo / guide with these instructions. If it's not doable, then we can work on making it possible so that we have a really nice UX with the chatbot. |
@abidlabs I think it should actually be handled by the chatbot. I'll take a look into it. Shouldn't be too hard to implement. |
Hmm but if we think very generally, a chatbot function might not even append a user's message to the state in the first place. I really don't think we should assume anything about the chatbot function when designing the component. |
This is now doable via PR #3430 thanks guys! |
Can I write a clickable () in message so that a user can click certain text (with underline) to call a function defined in Gradio script? Just to say it might be conventions for some user experience. |
@aetherwu not currently possible now, but we are planning on adding a button alongside chatbot messages, that you can use to call functions. |
The text was updated successfully, but these errors were encountered: