Hi, I have a simple form:
forms:
demo_form:
ignored_intents:
- invoice_time
required_slots:
- demo_only
- demo_period
- demo_nature
- demo_data
- demo_paper_front
- demo_paper_front_confirm
- demo_paper_back
- demo_paper_back_confirm
- demo_paper_selfie
- demo_paper_selfie_confirm
- demo_payment
- demo_payment_confirm
and 2 rules to handle the form:
- rule: activate demo form
steps:
- intent: firma # intent that triggers form activation
- action: demo_form # run the form
- active_loop: demo_form
- rule: Submit demo form
condition:
# Condition that form is active.
- active_loop: demo_form
steps:
# Form is deactivated
- action: demo_form
- active_loop: null
- slot_was_set:
- requested_slot: null
# The actions we want to run when the form is submitted.
- action: action_demo_submit
Everything is OK here. But when using rasa interactive
to generate a story it generates a long story with every requested_slot and every intent the input matches. For exemple: the slot demo_period definition is:
demo_period:
type: text
mappings:
- type: from_text
conditions:
- active_loop: demo_form
requested_slot: demo_period
But the rasa interactive
includes the intent plan_duration
which has nothing to do here. it also set the value I inserted which is irrelevant because the user can insert any text.
Another problem with this is that if I generate multiple stories for the same form and I add new slots or remove some slots I will have trouble updating those stories.
This is the story it generates:
- story: interactive_story_1
steps:
- intent: greet
- action: utter_greet
- intent: firma
- action: demo_form
- active_loop: demo_form
- slot_was_set:
- requested_slot: demo_only
- intent: confirm_service
- slot_was_set:
- demo_only: 1
- action: demo_form
- slot_was_set:
- requested_slot: demo_period
- intent: plan_duration
entities:
- plan_duration: '3'
- slot_was_set:
- demo_period: '3'
- slot_was_set:
- plan_duration: '3'
- intent: plan_duration
entities:
- plan_duration: '3'
- action: demo_form
- slot_was_set:
- demo_period: null
- slot_was_set:
- requested_slot: demo_period
- intent: plan_duration
entities:
- plan_duration: '3'
- slot_was_set:
- demo_period: '3'
- slot_was_set:
- plan_duration: '3'
- action: demo_form
- slot_was_set:
- demo_period: 3-años-35.85
- slot_was_set:
- requested_slot: demo_nature
- intent: confirm_service
- slot_was_set:
- demo_nature: si
- intent: request_information_general
- slot_was_set:
- demo_nature: natural
- action: demo_form
- slot_was_set:
- demo_nature: natural
- slot_was_set:
- requested_slot: demo_data
- intent: duration
- slot_was_set:
- demo_data: cedula 1254788
- action: demo_form
- slot_was_set:
- requested_slot: demo_paper_front
- intent: quit_demo
- action: demo_form
- slot_was_set:
- demo_paper_front: hdjsds
- slot_was_set:
- requested_slot: demo_paper_front_confirm
- intent: confirm_service
- slot_was_set:
- demo_paper_front_confirm: 1
- action: demo_form
- slot_was_set:
- requested_slot: demo_paper_back
- intent: quit_demo
- action: demo_form
- slot_was_set:
- demo_paper_back: hdjsds
- slot_was_set:
- requested_slot: demo_paper_back_confirm
- intent: confirm_service
- slot_was_set:
- demo_paper_back_confirm: 1
- action: demo_form
- slot_was_set:
- requested_slot: demo_paper_selfie
- intent: quit_demo
- action: demo_form
- slot_was_set:
- demo_paper_selfie: hdjsds
- slot_was_set:
- requested_slot: demo_paper_selfie_confirm
- intent: confirm_service
- slot_was_set:
- demo_paper_selfie_confirm: 1
- action: demo_form
- slot_was_set:
- requested_slot: demo_payment
- intent: quit_demo
- action: demo_form
- slot_was_set:
- demo_payment: hdjsds
- slot_was_set:
- requested_slot: demo_payment_confirm
- intent: confirm_service
- slot_was_set:
- demo_payment_confirm: 1
- action: demo_form
- slot_was_set:
- requested_slot: null
- active_loop: null
- action: action_demo_submit
- slot_was_set:
- demo_period: null
- slot_was_set:
- demo_nature: null
- slot_was_set:
- demo_data: null
- slot_was_set:
- demo_paper_front: null
- slot_was_set:
- demo_paper_back: null
- slot_was_set:
- demo_paper_selfie: null
- slot_was_set:
- demo_payment: null
- slot_was_set:
- demo_paper_front_confirm: null
- slot_was_set:
- demo_paper_back_confirm: null
- slot_was_set:
- demo_paper_selfie_confirm: null
- slot_was_set:
- demo_payment_confirm: null
- slot_was_set:
- demo_only: null