Hi ,
I implemented sample rasa chatbot application,I implemented form.
When I write steps in sotry, In submit button I have written below code.
story: submit form
condition:
active_loop: health_form
steps:
Form is deactivated
action: health_form
active_loop: null
slot_was_set:
requested_slot: null
getting below error:
“YamlValidationException: Failed to validate ‘data\stories.yml’. Please make sure the file is correct and all mandatory parameters are specified. Here are the errors found during validation:
in data\stories.yml:80:
Key ‘condition’ was not defined. Path: ‘/stories/9’”
But above piece of code worked in rules.yml insted of story i replaced with rule.
Hi Subbu - currently stories can’t have conditions. Training should work if you remove that condition.
Is there a use case you had in mind for using stories with this form rather than rules? Forms are built on top of the rules policy with Rasa 2.x, so you should submit the form in a rule. A story for this form would be built to help you cover unhappy paths, like chitchat interjections.
Hi @desmarchris,
In my case ,I have to implement provide form information first next flow will go.
examaple:
username
email
phonenumber these are form fields.
after form filling buttons will display Male and Female.
after click on any one of thesse, gender related info I have to show.
Can you please help me how to handle this using rules for form and how can I write story?
Please provide sample code snippet.
to play that back, you want to collect a few fields, then after that form is submitted, present another slot to fill (male or female) that will change what the answer looks like. Is this right?
Why not just make the last question part of the form as well? You’ll then need to make the gender field featurized so that you can provide different responses based on the result. Let me know if this is what you’re trying to do, and I can help with the rule.
@desmarchris , i think this is what i am looking for , please do help with the rules . Because i tried the same , create a form on the basis of last intent in the form i try to utter with different responses but it is just responding with the fallback action