Bot is failing in the middle of the converstion

Hello everyone,

nlu.yml

  • intent: dress_recommendation examples: |

    • what should I wear today
  • intent: user_gender examples: |

    • [male] {“entity”:“gender”,“value”:“male”}
    • [female] {“entity”:“gender”,“value”:“female”}
  • intent: user_bodytype examples: |

    • [skinny] {“entity”:“bodytype”,“value”:“skinny”}
    • my bodytype is [skinny] {“entity”:“bodytype”,“value”:“skinny”}
    • i’m [skinny] {“entity”:“bodytype”,“value”:“skinny”}
    • [slim] {“entity”:“bodytype”,“value”:“slim”}
    • my bodytype is [slim] {“entity”:“bodytype”,“value”:“slim”}
    • i’m [slim] {“entity”:“bodytype”,“value”:“slim”}

domain.yml

intents:

  • dress_recommendation
  • user_gender
  • user_bodytype entities:
  • gender
  • bodytype slots: gender: type: text bodytype: type: text

stories.yml

  • story: flow testing steps:
    • intent: great
    • action: utter_greet
    • intent: dress_recommendation
    • action: utter_ask_user_gender
    • intent: user_gender
    • slot_was_set:
      • gender: “male”
    • slot_was_set:
      • gender: “female”
    • action: utter_ask_user_bodytype
    • intent: user_bodytype
    • slot_was_set:
      • bodytype: “skinny”
    • slot_was_set:
      • bodytype: “slim”

domain.yml

responses: utter_greet: - text: “Hey! How may I assist you?”

utter_ask_user_gender: - text: “Sure, I will suggest you, for that may I know your gender please?” buttons: - title: “Male” payload: ‘/user_gender{{“gender”: “male”}}’ - title: “Female” payload: ‘/user_gender{{“gender”: “female”}}’

utter_ask_user_bodytype: - text: “Thank you, may I know your body type?” buttons: - title: “Skinny” payload: ‘/user_bodytype{{“bodytype”: “skinny”}}’ - title: “Slim” payload: ‘/user_bodytype{{“bodytype”: “slim”}}’

when I run the model, it is working till utter_ask_user_gender, it is giving me options male and female, but when I select any one option, from there it is not going anywhere. Can anyone please help me with this? I’m trying to get the values through payload buttons and store them in the slots, so that I can pass those values to any custom ml model and get results through it. I’m running this on rasa open source not rasa-x Any optimized code would be much appreciated!

Hello Srikanth,

Thank you for your question. You can run with rasa shell --debug and see what is going wrong. Unfortunately, it is quite hard to check your code since it is pasted as a text. A good tip is to denote your code with these brackets </> (it is a button option when you write your question) or code format with ``` like mentioned here.

Also, in case you have more slots and more complicated actions you can consider using Forms.