-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Add ability to provide preset response options in gr.Chatbot
/ gr.ChatInterface
#9989
Conversation
gr.Chatbot
/ gr.ChatInterface
🪼 branch checks and previews
Install Gradio from this PR pip install https://gradio-pypi-previews.s3.amazonaws.com/1607c279e37d26f35261449408eaa9fd62a06d5c/gradio-5.6.0-py3-none-any.whl Install Gradio Python Client from this PR pip install "gradio-client @ git+https://github.com/gradio-app/gradio@1607c279e37d26f35261449408eaa9fd62a06d5c#subdirectory=client/python" Install Gradio JS Client from this PR npm install https://gradio-npm-previews.s3.amazonaws.com/1607c279e37d26f35261449408eaa9fd62a06d5c/gradio-client-1.8.0.tgz Use Lite from this PR <script type="module" src="https://gradio-lite-previews.s3.amazonaws.com/1607c279e37d26f35261449408eaa9fd62a06d5c/dist/lite.js""></script> |
🦄 change detectedThis Pull Request includes changes to the following packages.
With the following changelog entry.
Maintainers or the PR author can modify the PR title to modify this entry.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Tweaked the styling a bit (cc @hannahblair): Screen.Recording.2024-11-21.at.7.29.14.AM.online-video-cutter.com.mp4 |
Maybe |
Co-authored-by: Hannah <hannahblair@users.noreply.github.com>
Co-authored-by: Hannah <hannahblair@users.noreply.github.com>
Co-authored-by: Hannah <hannahblair@users.noreply.github.com>
Co-authored-by: Hannah <hannahblair@users.noreply.github.com>
Co-authored-by: Hannah <hannahblair@users.noreply.github.com>
Thanks @hannahblair for the docs fixes! Had no idea I repeat words that often |
Co-authored-by: Hannah <hannahblair@users.noreply.github.com>
js/chatbot/shared/ChatBot.svelte
Outdated
@@ -459,11 +485,6 @@ | |||
justify-content: center; | |||
} | |||
|
|||
.example:hover { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why did we remove this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Accident! Will restore
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left one small comment. Otherwise lgtm!
Thanks @hysts and @dawoodkhan82 for reviewing! |
Adds an optional
options
field toMessageDict
that can take a list of dictionaries ofvalue
and optionally, a separatelabel
, which produces preset options that a user can click on.To see it in action, please run:
demo/chatinterface_options/run.py
Screen.Recording.2024-11-20.at.2.07.07.PM.mov
Closes: #8698
Closes: #4763
Closes: #6372
I'm working on improving the ChatInterface docs so hold off on reviewing those, but once the docs are ready, it'll also close:
Closes: #9917