As described in https://rasa.com/docs/action-server/sdk-tracker, we can use Tracker to recall the latest user’s intent/entity/message, but what about getting the bot’s latest utter/action? Please take a look at this story.
“action_dealwith_wildcard_fallback” should result in “utter_rephrase” or “utter_emotion_is_from_you” depending on the latest action.
As you can see, I will use “nlu_fallback” as a wildcard intent, and it is really important for “action_dealwith_wildcard_fallback” to get “ask_why_sad_due_to_someone” to respond properly. Please let me know if there is a way for this. Thanks!
You could set a slot when action_dealwith_wildcard_fallback is executed. In action_dealwith_wildcard_fallback, you can check if that slot is set and do your thing. Don’t forget to unset the slot after that.
Setting a slot when action_dealwith_wildcard_fallback is executed cannot give any clue for whether the bot has to say utter_rephrase or utter_emotion_is_from_you. If we can set a slot for ask_why_sad_due_to_someone, it sounds plausible. Can we set a special slot for the bot’s response as well? I guess it is for NLU only.
I probably misunderstood what you want to check exactly, but the general idea is still the same
Glad you solved it anyway!
If I’m correct, the proposed solution there, using tracker.events, is in essence the same as the one I proposed using tracker.events_after_latest_restart.