Hey, I have a bit of conundrum. I want to make a use case where depending on the value of a slot, or whether it is filled or not. I want to create different stories.
Here is a simple example:
----- nlu.md---------------
intent:affirm
- yes
- indeed
- of course
- that sounds good
- correct
intent:b_tellme
- tell me about the color
- tell about color
- tell color
intent:choose
- /choose{“color”: “blue”}
- /choose{“color”: “red”}
intent:debug
- debug
- test
- testing
intent:deny
- no
- never
- I don’t think so
- don’t like that
- no way
- not really
intent:goodbye
- bye
- goodbye
- see you around
- see you later
intent:greet
- hey
- hello
- hi
- good morning
- good evening
- hey there
- hi
intent:r_tellme
- tell me about the color
- tell about color
- tell color
synonym:blue
- {“color”: “blue”}
synonym:red
- {“color”: “red”}
--------------stories.md----------------------------------
greet path
- greet
- utter_greet
- choose
- utter_response
say goodbye
- goodbye
- utter_goodbye
tell color path
- r_tellme{“color”:“red”}
- utter_red
tell color path2
- b_tellme{“color”:“blue”}
- utter_blue
tell color path3
- r_tellme
- utter_nono1
tell color path4
- b_tellme
- utter_nono2
debug path
- debug
- utter_response
----------------domain.yml--------------------------------
%YAML 1.1
actions:
- utter_blue
- utter_did_that_help
- utter_goodbye
- utter_greet
- utter_nono1
- utter_nono2
- utter_red
- utter_response
entities:
- color
intents:
- greet
- choose
- goodbye
- affirm
- deny
- r_tellme
- b_tellme
- debug
slots: color: type: unfeaturized
templates: utter_blue:
- text: Color is blue
utter_did_that_help:
- text: Did that help you?
utter_goodbye:
- text: Bye
utter_greet:
-
buttons:
- payload: ‘/choose{“color”: “blue”}’ title: blue
- payload: ‘/choose{“color”: “red”}’ title: red
text: Hey! How are you?
utter_nono1:
- text: Nono 1
utter_nono2:
- text: Nono 2
utter_red:
- text: Color is red
utter_response:
- text: ‘{color}’
Based on the stories, you can see that I want the (tell color 1) to trigger if my color slot is set to “red”, (tell color2) story to trigger if the color slot is set to “blue” and the other 2 stories to trigger if my color is not set beforehand. Is there any alternate way to implement this if the functionality is not available?