Slots not resetting

I’m modifying the wellness bot and am having trouble resetting the slot values. I want to reset the slot values after all of them. have been filled and the bot displays them to the user.

Following the documentation, I tried adding to stories - action: action_deactivate_loop - active_loop: null but this caused an error in rule contradiction for the predicted action of listen. So, i then tried to add this same two actions to Rules, but it doesn’t reset the slots. When I engage the bot with a greeting and it accesses the health form, it assumes they’ve already been filled.

Here’s the relevant stories and rules

- rule: Submit form
  condition:
    # Condition that form is active.
    - active_loop: health_form
  steps:
  - action: health_form
  - active_loop: null
    # The action we want to run when the form is submitted.
  - action: action_submit_results
  - action: utter_slots_values
  - action: action_deactivate_loop
  - active_loop: null

And, from stories:

- story: survey happy path
  steps:
  - intent: greet
  - action: utter_greet
  - intent: affirm
  - action: health_form
  - active_loop: health_form

I’m not sure why the rules would be contradicting action_listen. Thanks for any help and let me know if I can make this question more clear

Mhm, you should actually just need the rule. The story is not necessary. In my opinion this should work:

- rule: Submit form
  condition:
    # Condition that form is active.
    - active_loop: health_form
  steps:
  - action: health_form
  - active_loop: null
    # The action we want to run when the form is submitted.
  - action: action_submit_results
  - action: utter_slots_values
  - action: action_reset_slots. # That should be a custom action returning a `AllSlotsReset` event

@Tobias_Wochinger I’m looking at the same example, I was following the course provided by Rasa through udemy and the teacher didn’t mention the file rules, even in here https://github.com/RasaHQ/wellness-check-bot there isn’t this file. is it possible to update the assistant, plz there is a lot of changes and it will help us understand better. thanks

Rules were introduced in Rasa Open Source 2.0 which was released at the end of last year. We wrote an extensive migration guide here

1 Like