'Tracker' object has no attribute '_reset'

Hi,

I want to reset an executed Form programmatically. According to

the following has to be implemented:

def apply_to(self, tracker):
    from rasa.core.actions.action import ACTION_LISTEN_NAME

    tracker._reset()
    tracker.trigger_followup_action(ACTION_LISTEN_NAME)

If I do that, the AttributeError in the title is thrown. After investigating the method definitions - may it be the case, that the documentation is not up to date at this point?

I know that I could add the restart_functionality per intent in my stories but with growing size and amount of stories, that doesn’t seem to be the best way…

I there any other way to achieve this functionality? I have tried to return [Restarted()] but that didn’t help.

I found it out myself: I could use self.deactivate() to achieve the desired functionality.

Don’t know how to solve this issue yet but I figured out the reason. I guess you are importing Tracker from rasa_sdk too. Tracker from rasa_sdk package doesn’t have that method.

To achieve the same goal

from rasa_sdk.events import Restarted
class ActionCustom(Action):
    def run(self, dispatcher, tracker, domain):
        ...
        return [Restarted()]