Customized restart action issue

Hello, I have customized the default action - “action_restart” and it is working. But the issue is that, after /restart → action_restart is executed and then there is a random utter reply. For example:

  • Your input → /restart
  • Hello! How are you doing today?
  • Your input →

I want to be like this:

  • Your input → /restart
  • Your input →

How can I remove that message in between? I have not added any stories or rules. I have simply added some custom behavior in action_restart and I have added “action_restart” under “actions” in domain file. Please help!

Hi! :blush:

I think its better tell to user the chat has restarted but… Can you try?

from import  ActionExecuted

class ActionRestart(Action):

  def name(self) -> Text:
      return "action_restart"

  async def run(
      self, dispatcher, tracker: Tracker, domain: Dict[Text, Any]
  ) -> List[Dict[Text, Any]]:

      # custom behavior

      return [ActionExecuted("action_listen")]

and use rules too

1 Like