How to get the 'name' of a 'bot' event?

I’ve implemented a custom fallback action and trying to get the name of the action that bot took just before the user input (which caused the fallback).

I see that the last event (tracker.events[-1]) is ‘user’ event and does not have a ‘name’ field. {'event': 'user', 'timestamp': 1571052762.128754, 'text': 'jhgygx', 'parse_data': {'intent': {'name': 'greet', 'confidence': 0.6017043590545654}, 'entities': [], 'intent_ranking': [...]}

second last event (tracker.events[-2]) is an action and has a ‘name’ field :

{'event': 'action', 'timestamp': 1571052758.228906, 'name': 'action_listen', 'policy': 'policy_0_MemoizationPolicy', 'confidence': 1.0}

tracker.events[-3] is a ‘bot’ event :

{'event': 'bot', 'timestamp': 1571052758.226579, 'text': 'Tell me your email id', 'data': {'elements': None, 'quick_replies': None, 'buttons': None, 'attachment': None, 'image': None, 'custom': None}, 'metadata': {}}

This event is associated with an action utter_ask_emailid in domain file. I need to get this action name of the bot event, but wonder why it’s not present in the event data.

Is there a way to get this ?

config:

  • name: “FallbackPolicy” nlu_threshold: 0.4 core_threshold: 0.3 fallback_action_name: “action_my_fallback”

Thanks!