0

I want to iterate over my story until a slot_value condition is met. Below is my story -

- story: spending form story
  steps:
  - action: utter_examine_spending
  - action: fixed_spending_form
  - active_loop: fixed_spending_form
  - active_loop: null
  - action: spending_form
  - active_loop: spending_form
  - active_loop: null
  - action: action_submit_form

I want to iterate over this story until a particular slot value in the spending_form is true.

Can I do this in the stories.yml itself, or do I need to implement custom actions, if yes, what kind of custom action?

I appreciate any help. Thanks

Rishikesh
  • 115
  • 1
  • 8

1 Answers1

0

It really depends on the slot and the values it can get in terms of implementation. What I can suggest is to use form validation actions to check for the targeted value for your slot. Repeating a form inside a story (perhaps many times) is not a very good practice in terms of design. You can reset the value of the slot each time in the action validate function until the condition meets and set it to true. You can refer to the form validation on Rasa docs.

aLoneStrider
  • 343
  • 1
  • 6
  • 13