Adding buttons in YAML file - Rasa Open Source - Rasa Community Forum
Adding buttons in YAML file
Post by Arunshowri on Sep 24, 2020
When am adding buttons in domain.yml file we create with pattern
buttons:
- title: "Happy"
payload: "utter_happy"
- title: "Sad"
payload: "utter_cheer_up"
but when I train and open it using rasa x this pattern got reversed and the buttons are not working properly.
it changed to this pattern
- buttons:
- payload: /National
title: National
- payload: /International
title: International
it would be highly helpful if anybody respond on this topic!!
Post by jusce17 on Sep 24, 2020
Hi @Arunshowri, welcome to the community, can you share the whole code here, in the meantime I think you should write something like this:
utter_name_of_utter:
- buttons:
- payload: utter_happy
title: Happy
- payload: utter_cheer_up
title: Sad
text: some display message here
Post by jusce17 on Sep 24, 2020
Also, I believe in the payload you should pass the intent that will trigger the utter, like: If you have an intent : feeling_sad and an utter: utter_cheer_up perhaps it would something like this:
utter_mood:
- buttons:
- payload: /feeling_happy
title: Happy
- payload: /feeling_sad
title: Sad
text: How are you feeling today ?
Hope it helps
Post by Arunshowri on Sep 24, 2020
This is the code before training :
session_config:
session_expiration_time: 60
carry_over_slots_to_new_session: true
intents:
- greet
- goodbye
- affirm
- deny
- mood_great
- mood_unhappy
- bot_challenge
- news_search
- national_news
- international_news
responses:
utter_greet:
- text: Hey! How are you?
utter_news_search:
- text: What would you prefer
buttons:
- title: National
payload: /National
- title: International
payload: /International
utter_national_news:
- text: ‘Here is your national news: [India Today](https://www.indiatoday.in/)’
utter_international_news:
- text: ‘Here is your International news: [India Today](https://www.indiatoday.in/world)’
utter_cheer_up:
- image: [https://i.imgur.com/nGF1K8f.jpg](https://i.imgur.com/nGF1K8f.jpg)
text: ‘Here is something to cheer you up:’
utter_did_that_help:
- text: Did that help you?
utter_happy:
- text: Great, carry on!
utter_goodbye:
- text: Bye
utter_iamabot:
- text: I am a bot, powered by Rasa.
Post by jusce17 on Sep 24, 2020
Can you format your code (put it inside of ` ) or a send a screenshot please
Post by Arunshowri on Sep 28, 2020
hey eden,
i’ve sent you the screenshots please check them and respond asap.
Post by jusce17 on Sep 28, 2020
Hey @Arunshowri, where did you send them ?
Post by Arunshowri on Sep 28, 2020
check your email please!!