I want a chatbot with buttons in Slack integrated RASA Bot for example, How are you feeling? Sad or Happy. I want two-buttons(one for happy and one for sad) here and get input from the user and followed by other questions. What will be the stories.md, nlu.md, domain.yml, and frontend python code?
You can implement the buttons in your domain.yml file. It could look like the following:
responses:
utter_greet:
- text: "Hey! How are you?"
buttons:
- title: "great"
payload: "great"
- title: "super sad"
payload: "super sad"
The payload will then be sent to the nlu model to make the prediction on the intent. That's why your nlu.md should have examples for like mood_sad, mood_great in there.
Your stories.md should look regular - it should have examples of how the conversations could go. For example:
* greet
- utter_greet
* mood_sad
- action_cheer_up
You can also restrict the nlu part on buttons by sending actual intents (and potential entities) to the RegexInterpreter. In that case, you can define buttons in your domain as follows:
utter_greet:
- text: "Hey! How are you?"
buttons:
- title: "great"
payload: '/mood_great'
- title: "super sad"
payload: '/mood_sad'