The action_deactivate_form doesn't work

image

the action_deactivate_form doesn’t work,because the slot is not being emptied,why?

Hey @Mr.chen

This story looks ok to me. Maybe you have some other stories that contradict with this one?

first,thank you for your reply.I find the problem,It actually works, except that it just unregisters the form and clears the request_slot, but not the slot that was previously filled, so I redefine the action_deactivate_form, add the AllSlotReset method to the return method, and it’s done.

----deactivate_Form source code class ActionDeactivateForm(Action): “”“Deactivates a form”""

def name(self) -> Text:
    return ACTION_DEACTIVATE_FORM_NAME

async def run(
    self,
    output_channel: "OutputChannel",
    nlg: "NaturalLanguageGenerator",
    tracker: "DialogueStateTracker",
    domain: "Domain",
) -> List[Event]:
    from rasa.core.events import Form, SlotSet

    return [Form(None), SlotSet(REQUESTED_SLOT, None)]

ask you one more question “Form(None)” ,is it equal to “- form{“name”: null}”