Warning: This document is for an old version of Rasa Core. The latest version is 0.14.5.

Dialogue State Tracker

The tracker stores and maintains the state of the dialogue with a single user. It is stored in a tracker store, retrieved when incoming messages for the conversation are received and updated after actions have been executed

class rasa_core.trackers.DialogueStateTracker(sender_id, slots, max_event_history=None)[source]

Maintains the state of a conversation.

The field max_event_history will only give you these last events, it can be set in the tracker_store

current_state(event_verbosity: rasa_core.trackers.EventVerbosity = <EventVerbosity.NONE: 1>) → Dict[str, Any][source]

Return the current tracker state as an object.

current_slot_values()[source]

Return the currently set values of the slots

get_slot(key: str) → Optional[Any][source]

Retrieves the value of a slot.

get_latest_entity_values(entity_type: str) → Iterator[str][source]

Get entity values found for the passed entity name in latest msg.

If you are only interested in the first entity of a given type use next(tracker.get_latest_entity_values(“my_entity_name”), None). If no entity is found None is the default result.

copy()[source]

Creates a duplicate of this tracker

Have questions or feedback?

We have a very active support community on Rasa Community Forum that is happy to help you with your questions. If you have any feedback for us or a specific suggestion for improving the docs, feel free to share it by creating an issue on Rasa Core GitHub repository.