def _revert_single_affirmation_events() -> List[Event]: return [ UserUtteranceReverted(), # revert affirmation and request # revert original intent (has to be re-added later) UserUtteranceReverted(), # add action listen intent ActionExecuted(action_name=ACTION_LISTEN_NAME), ]
def _revert_rephrasing_events() -> List[Event]: return [ UserUtteranceReverted(), # remove rephrasing # remove feedback and rephrase request UserUtteranceReverted(), # remove affirmation request and false intent UserUtteranceReverted(), # replace action with action listen ActionExecuted(action_name=ACTION_LISTEN_NAME), ]
async def run(self, output_channel, nlg, tracker, domain): from rasa.core.events import UserUtteranceReverted # only utter the template if it is available evts = await super(ActionDefaultFallback, self).run(output_channel, nlg, tracker, domain) return evts + [UserUtteranceReverted()]
async def run(self, output_channel, nlg, tracker, domain): # only utter the template if it is available evts = await super(ActionBack, self).run(output_channel, nlg, tracker, domain) return evts + [UserUtteranceReverted(), UserUtteranceReverted()]