How do i create buttons in rasa X?

ella
(Shiraz Ghosh) #1

So I tried putting this code in my domain.yml file but whenever i load rasa x and go to that path, it doesn’t seem to work.

domain.yml

Templates:
  utter_init:
  - text: Hi ! I am your friendly xyz AI chatbot. You can select from the options below or type on your own?
    buttons:
    - title: Happy
      payload: /mood_great
    - title: Sad
      payload: /mood_unhappy

Output:

(JG) #2

hey @Shiraz, can you try adding the value in the “title” fields of buttons in quotes, I mean this way:

title : “Happy”

(Ella Rohm-Ensing) #3

@JiteshGaikwad has a good point, put your payloads also in quotes. Do your buttons work in rasa shell but not in Rasa X?

1 Like
(Shiraz Ghosh) #4

That didn’t help… when i use that command “rasa train” it edits my domain.yml file and removes those quotes

(Shiraz Ghosh) #5

Yes. They do work. I can use my arrow keys to make a choice. The problem still persists when i try the same thing in rasa x.

A quick hack that i found to get around the problem is to load an image before the buttons. The buttons then get displayed properly. But this can’t be a solution.

(Ella Rohm-Ensing) #6

That’s quite strange. What version of Rasa X is it? We just released a new one yesterday, could you try updating to 0.19.3 and see if the problem persists?