Arunshowri
(Arunshowri)
September 24, 2020, 12:01pm
1
When am adding buttons in doamin.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!!
jusce17
(Eden)
September 24, 2020, 12:36pm
2
Hi @Arunshowri , welcome to the community, can you share the whole code here, in the meantime I think you should right something like this:
utter_name_of_utter:
- buttons:
- payload: utter_happy
title: Happy
- payload: utter_cheer_up
title: Sad
text: some display message here
jusce17
(Eden)
September 24, 2020, 12:39pm
3
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
Arunshowri
(Arunshowri)
September 24, 2020, 3:07pm
4
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 ’
utter_international_news:
text: ‘Here is your International news: India Today ’
utter_cheer_up:
image: 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.
here is the code after 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:
buttons:
payload: /National
title: National
payload: /International
title: International
text: What would you prefer
utter_national_news:
text: ‘Here is your national news: India Today ’
utter_international_news:
text: ‘Here is your International news: India Today ’
utter_cheer_up:
image: 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:
jusce17
(Eden)
September 24, 2020, 9:51pm
5
Can you format your code (put it inside of `` ) or a send a screenshot please
Arunshowri
(Arunshowri)
September 28, 2020, 8:33am
6
hey eden ,
i’ve sent you the screenshots please check them and respond asap.
jusce17
(Eden)
September 28, 2020, 9:10am
7
Hey @Arunshowri , where did you send them ?
Arunshowri
(Arunshowri)
September 28, 2020, 9:27am
8
check your email please!!