def run(self, dispatcher: CollectingDispatcher, tracker: Tracker, domain: Dict[Text, Any]) -> List['Event']: # Fallback caused by TwoStageFallbackPolicy if (len(tracker.events) >= 4 and tracker.events[-4].get('name') == 'action_default_ask_affirmation'): dispatcher.utter_template('utter_restart_with_button', tracker) return [ SlotSet('feedback_value', 'negative'), ConversationPaused() ] # Fallback caused by Core else: dispatcher.utter_template('utter_default', tracker) return [UserUtteranceReverted()]
def run( self, dispatcher: CollectingDispatcher, tracker: Tracker, domain: Dict[Text, Any], ) -> List["Event"]: last_utter = get_last_utter_action(tracker, dispatcher) if "action_default_fallback" == last_utter: dispatcher.utter_message( "handoff to human: implementazione notifica" ) # TODO implement handoff return [ConversationPaused()] # first time else: dispatcher.utter_template("utter_default", tracker) return [UserUtteranceReverted()]
def run( self, dispatcher: CollectingDispatcher, tracker: Tracker, domain: Dict[Text, Any], ) -> List["Event"]: # Fallback caused by TwoStageFallbackPolicy if ( len(tracker.events) >= 4 and tracker.events[-4].get("name") == "action_default_ask_affirmation" ): dispatcher.utter_template("utter_restart_with_button", tracker) return [SlotSet("feedback_value", "negative"), ConversationPaused()] # Fallback caused by Core else: dispatcher.utter_template("utter_default", tracker) return [UserUtteranceReverted()]
def run(self, dispatcher, tracker, domain): return [ConversationPaused()]
def run(self, dispatcher, tracker, domain): dispatcher.utter_template('utter_conversation_paused', tracker) return [ConversationPaused()]