Hi I am taking user input using RASA forms but i want to change story based on a particular slot value
Can anyone suggest me how to design story.md for that
Thanks in advance
Hi I am taking user input using RASA forms but i want to change story based on a particular slot value
Can anyone suggest me how to design story.md for that
Thanks in advance
I do this, but not with the stories.md. I do it in the actions.py. I have an ordernumber form, which asks the user for the order_id of their order.
In the actions.py I check it like:
match = re.match("([^0-9]|^)[0-9]{6}([^0-9]|$)", value)
if match:
ordernumber = match.group(0)
dispatcher.utter_template('utter_ask_postcode', tracker)
return {'ordernumber': ordernumber}
else:
dispatcher.utter_template('utter_wrong_ordernumber', tracker)
return None
If the ordernumber is valid, it asks for postcode (utter_ask_postcode). If not, it asks for the ordernumber again.
You can easily use that to make a forking path; check the user input and have different utter_template calls based on what the input was.