Tracker
The Tracker class represents a Rasa conversation tracker.
It lets you access your bot's memory in your custom
actions. You can get information about past events and the current state of the
conversation through Tracker attributes and methods.
Attributes
The following are available as attributes of a Tracker object:
-
sender_id- The unique ID of person talking to the bot. -
slots- The list of slots that can be filled as defined in the “ref”domains. -
latest_message- A dictionary containing the attributes of the latest message:intent,entitiesandtext. -
events- A list of all previous events. -
active_loop- The name of the currently active loop. -
latest_action_name- The name of the last action the bot executed.
Methods
The available methods from the Tracker are:
Tracker.current_state
Return the current tracker state as an object.
- Return type
Dict[str, Any]
Tracker.is_paused
State whether the tracker is currently paused.
- Return type
bool
Tracker.get_latest_entity_values
Get entity values found for the passed entity type and optional role and group in latest message. If you are only interested in the first entity of a given type use:
next(tracker.get_latest_entity_values(