format_message, ) from rasa.shared.nlu.constants import INTENT_NAME_KEY from tests.core.policies.test_rule_policy import GREET_INTENT_NAME, UTTER_GREET_ACTION @pytest.mark.parametrize( "one_event,another_event", [ ( UserUttered("/greet", {"name": "greet", "confidence": 1.0}, []), UserUttered("/goodbye", {"name": "goodbye", "confidence": 1.0}, []), ), (SlotSet("my_slot", "value"), SlotSet("my__other_slot", "value")), (Restarted(), None), (AllSlotsReset(), None), (ConversationPaused(), None), (ConversationResumed(), None), (StoryExported(), None), (ActionReverted(), None), (UserUtteranceReverted(), None), (SessionStarted(), None), (ActionExecuted("my_action"), ActionExecuted("my_other_action")), (FollowupAction("my_action"), FollowupAction("my_other_action")), ( BotUttered("my_text", {"my_data": 1}), BotUttered("my_other_test", {"my_other_data": 1}), ), ( AgentUttered("my_text", "my_data"), AgentUttered("my_other_test", "my_other_data"),
def test_json_parse_reset(): evt = {"event": "reset_slots"} assert Event.from_parameters(evt) == AllSlotsReset()
"entity": "name", "value": "John", "role": "contact", "group": "test" }]), DefinePrevUserUtteredFeaturization( use_text_for_featurization=False, timestamp=None, metadata=None), ReminderCancelled(timestamp=1621590172.3872123), ReminderScheduled( timestamp=None, trigger_date_time=datetime.now(), intent="greet"), ActionExecutionRejected(action_name="my_action"), LegacyFormValidation(validate=True, timestamp=None), LoopInterrupted(timestamp=None, is_interrupted=False), ActiveLoop(name="loop"), LegacyForm(name="my_form"), AllSlotsReset(), SlotSet(key="my_slot", value={}), SlotSet(key="my slot", value=[]), SlotSet(key="test", value=1), SlotSet(key="test", value="text"), ConversationResumed(), ConversationPaused(), FollowupAction(name="test"), StoryExported(), Restarted(), ActionReverted(), UserUtteranceReverted(), BotUttered(text="Test bot utterance"), UserUttered( parse_data={ "entities": [],