Update slots values for every Action call

Hi there

I have a custom action that retrieves value of tracker slots, and returns a new slot too. But every time the function is called, if slot X does not have a new value, the previous one is returned. How can I make all slots to be updated when function (custom action) is called?

For example

Slots: {‘name’: ‘john’, ‘age’: ‘32’, ‘experience’: ‘beginner’}

If I then send a message with only slot values ‘name’ and ‘age’, the ‘level’ slot is still considered to be ‘beginner’, while it should be None.

Thanks all

At the end of your action run method you can return [AllSlotsReset()] or [SlotSet(bla, None)].

Typically you would not to reset only certain slots as slots are generally used to remember context for later in the conversation.

Hi @simonm3 thanks for the answer. Let me clarify this: I want slots to be kept during conversation, unless that custom action is triggered again: in that case all the slots it uses should be updated (those that are not specifically called would have a None value. Can this be done?

Not tried it but perhaps you could have a custom action reset_XXX_form that returns the slot resets you want. That would be just before the XXX_form. action.

@ChrisRahme do you know a good solution for this problem? thanks

I agree with Simon

I am not sure how to code it as an action, does any of you have an example or suggestion? thanks all @ChrisRahme