How to reset a single slot in your stories.md file?

Hi all,

At a certain point in my dialogue i want to reset a slot.

I have to retrieve an ID from the user and then i ask confirmation if it’s correctly typed in. If it is not, i have to reset the slot.

I tried with action_restart and that works, but it removes all slots. What’s the equivalent for just one?

Thanks!

1 Like

I think resetting a slot is the same as setting it to None.

I never tried it but I think you have two solutions to do it :

  • slot{"requested_slot": "None"} in your story (maybe no quote around None)
  • return [SlotSet("requested_slot", None])] at the end of your custom action.

I’m not sure about those two solutions (and the fact that setting it to None is the same as resetting) but I hope it helps

Thanks for the answer! Adding a custom action (so your 2nd solution) worked!

I have also found that only the custom action way works, not the story slot filling way, anyone else found this?