Tracker
These docs are for version 1.x of Rasa Open Source.
Docs for the new version 2.0 can be found here.
User Guide
- Installation
- Rasa Tutorial
- Command Line Interface
- Architecture
- Messaging and Voice Channels
- Evaluating Models
- Validate Data
- Running the Server
- Running Rasa with Docker
- Cloud Storage
NLU
- About
- Using NLU Only
- Training Data Format
- Choosing a Pipeline
- Language Support
- Entity Extraction
- Components
Core
- About
- Stories
- Domains
- Responses
- Actions
- Policies
- Slots
- Forms
- Retrieval Actions
- Interactive Learning
- Fallback Actions
- Knowledge Base Actions
Conversation Design
API Reference
- Action Server
- HTTP API
- Jupyter Notebooks
- Agent
- Custom NLU Components
- Events
- Tracker
- Tracker Stores
- Event Brokers
- Lock Stores
- Training Data Importers
- Featurization
- Migration Guide
- Rasa Change Log
Migrate from (beta)
Reference
Versions
viewing: 1.3.10
Tracker
classrasa.core.trackers.``DialogueStateTracker( sender_id, slots, max_event_history=None, sender_source=None)
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
applied_events()
Returns all actions that should be applied - w/o reverted events.
Return typeList
as_dialogue()
Return a Dialogue object containing all of the turns.
This can be serialised and later used to recover the state of this tracker exactly.
Return typeDialogue
change_form_to( form_name)
Activate or deactivate a form
Return typeNone
clear_followup_action()
Clears follow up action when it was executed.
Return typeNone
copy()
Creates a duplicate of this tracker
Return type
[DialogueStateTracker]
current_slot_values()
Return the currently set values of the slots
Return typeDict
current_state( event_verbosity=<EventVerbosity.NONE: 1>)
Return the current tracker state as an object.
Return typeDict
events_after_latest_restart()
Return a list of events after the most recent restart.
Return typeList
export_stories( e2e=False, include_source=False)
Dump the tracker as a story in the Rasa Core story format.
Returns the dumped tracker as a string.
Return typestr
export_stories_to_file( export_path='debug.md')
Dump the tracker as a story to a file.
Return typeNone
classmethodfrom_dict( sender_id, events_as_dict, slots=None, max_event_history=None)
Create a tracker from dump.
The dump should be an array of dumped events. When restoring the tracker, these events will be replayed to recreate the state.
Return type
[DialogueStateTracker]
generate_all_prior_trackers()
Returns a generator of the previous trackers of this tracker.
The resulting array is representing the trackers before each action.
Return typeGenerator
get_last_event_for( event_type, action_names_to_exclude=None, skip=0)
Gets the last event of a given type which was actually applied.
Returns event which matched the query or None if no event matched.
Return typeOptional
get_latest_entity_values( entity_type, entity_role=None, entity_group=None)
Get entity values found for the passed entity type and optional role and group in latest message.
Return typeIterator
get_latest_input_channel()
Get the name of the input_channel of the latest UserUttered event
Return typeOptional
get_slot( key)
Retrieves the value of a slot.
Return typeOptional
idx_after_latest_restart()
Return the idx of the most recent restart in the list of events.
Return typeint
init_copy()
Creates a new state tracker with the same initial values.
Return type
[DialogueStateTracker]
is_paused()
State whether the tracker is currently paused.
Return typebool
last_executed_action_has( name, skip=0)
Returns whether last ActionExecuted event had a specific name.
Returns True if last executed action had name name, otherwise False.
Return typebool
past_states( domain)
Generate the past states of this tracker based on the history.
Return typedeque
recreate_from_dialogue( dialogue)
Use a serialised Dialogue to update the trackers state.
Return typeNone
reject_action( action_name)
Notify active form that it was rejected
Return typeNone
replay_events()
Update the tracker based on a list of events.
Return typeNone
set_form_validation( validate)
Toggle form validation
Return typeNone
set_latest_action_name( action_name)
Set latest action name and reset form validation and rejection parameters
Return typeNone
travel_back_in_time( target_time)
Creates a new tracker with a state at a specific timestamp.
Return type
[DialogueStateTracker]
trigger_followup_action( action)
Triggers another action following the execution of the current.
Return typeNone
update( event, domain=None)
Modify the state of the tracker according to an Event.
Return typeNone