-
Notifications
You must be signed in to change notification settings - Fork 336
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
feat: Prompt suggestions for ui.chatbot #2250 #2265
Conversation
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.
Thanks @marek-mihok.
- The suggestions could use some styling, they do not need to look like raw buttons.
- Position suggestions into a grid rather than vertically - similar to other big chat players.
- The example could use some polish as well, it's very rough at the moment.
First 2 points are done:
Screen.Recording.2024-02-14.at.14.16.54.mov
Screen.Recording.2024-02-14.at.14.19.52.mov
@mturoci what do you mean by rough? In terms of code quality or the use case relevance? Can you give me some thoughts about what you consider a proper example? |
Would that demo persuade you to use Wave? Probably not. Would be better to append the suggestion right away, but add a slight timeout on suggestion selection to emulate computation, hide suggestions in the meantime, then append the response. |
Looks better, the border radius is off though. Try to use the same as used in the rest of our cards/components. |
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.
Looks good, just a few small comments.
The PR fulfills these requirements: (check all the apply)
main
branch.feat: Add a button #xxx
, where "xxx" is the issue number).Closes #xxx
, where "xxx" is the issue number.ui
folder, unit tests (make test
) still pass.This PR brings
suggestions: ChatSuggestion[]
attribute to show clickable prompt suggestions under the last response in ui.chatbot component. When the suggestion is clicked, it firessuggestion
event which can subsequently be handled by the user.The user input can be limited to prompt suggestions only by specifying
disabled
prop which disables user input or it can be used in a combination with text input as well.Updated API is as follows:
The same API update also applies to
ui.chatbot_card
component.Closes #2250