Hi,
Could anyone please tell me on how to add buttons to our rasa chat bot in the GUI?
I would want these buttons to be displayed as potential intents which the user could click on rather than typing them. Can someone please tell me how to do this?
@SyedBilalHasan This is the demo example for your reference and this will take both button and user input, if in case use want to type then how you will deal that scenario, it up to your use case and choice.You can customise as per your need.
In domain.yml
intents:
- one
- two
- three
utter_menu:
- text: Select the topic or write your question below.
buttons:
- title: '1'
payload: /one
- title: '2'
payload: /two
- title: '3'
payload: /three
utter_ask_one:
- text: you selected one
utter_ask_two:
- text: you selected two
utter_ask_three:
- text: you selected three
In nlu.yml
version: "2.0"
nlu:
- intent: one
examples: |
- 1
- one
- one please
- 1 please
- intent: two
examples: |
- 2
- two
- two please
- 2 please
- intent: three
examples: |
- 3
- three
- three please
- 3 please
In stories.yml
version: '2.0'
stories:
- story: one menu
steps:
- intent: one
- action: utter_ask_one
- story: two menu
steps:
- intent: two
- action: utter_ask_two
- story: three menu
steps:
- intent: three
- action: utter_ask_three