Events¶
List of all the events the dialogue system is able to handle and supports.
An event can be referenced by its type_name attribute (e.g. when returning
events in an http callback).
-
class
rasa_core.events.ActionExecuted(action_name, policy=None, confidence=None, timestamp=None)[source]¶ Bases:
rasa_core.events.EventAn operation describes an action taken + its result.
It comprises an action and a list of events. operations will be appended to the latest
Turnin theTracker.turns.-
type_name= 'action'¶
-
-
class
rasa_core.events.ActionExecutionRejected(action_name, policy=None, confidence=None, timestamp=None)[source]¶ Bases:
rasa_core.events.EventNotify Core that the execution of the action has been rejected
-
type_name= 'action_execution_rejected'¶
-
-
class
rasa_core.events.ActionReverted(timestamp=None)[source]¶ Bases:
rasa_core.events.EventBot undoes its last action.
The bot everts everything until before the most recent action. This includes the action itself, as well as any events that action created, like set slot events - the bot will now predict a new action using the state before the most recent action.
-
type_name= 'undo'¶
-
-
class
rasa_core.events.AgentUttered(text=None, data=None, timestamp=None)[source]¶ Bases:
rasa_core.events.EventThe agent has said something to the user.
This class is not used in the story training as it is contained in the
ActionExecutedclass. An entry is made in theTracker.-
type_name= 'agent'¶
-
-
class
rasa_core.events.AllSlotsReset(timestamp=None)[source]¶ Bases:
rasa_core.events.EventAll Slots are reset to their initial values.
If you want to keep the dialogue history and only want to reset the slots, you can use this event to set all the slots to their initial values.
-
type_name= 'reset_slots'¶
-
-
class
rasa_core.events.BotUttered(text=None, data=None, timestamp=None)[source]¶ Bases:
rasa_core.events.EventThe bot has said something to the user.
This class is not used in the story training as it is contained in the
ActionExecutedclass. An entry is made in theTracker.-
type_name= 'bot'¶
-
-
class
rasa_core.events.ConversationPaused(timestamp=None)[source]¶ Bases:
rasa_core.events.EventIgnore messages from the user to let a human take over.
As a side effect the
Tracker’spausedattribute will be set toTrue.-
type_name= 'pause'¶
-
-
class
rasa_core.events.ConversationResumed(timestamp=None)[source]¶ Bases:
rasa_core.events.EventBot takes over conversation.
Inverse of
PauseConversation. As a side effect theTracker’spausedattribute will be set toFalse.-
type_name= 'resume'¶
-
-
class
rasa_core.events.Event(timestamp=None)[source]¶ Bases:
objectEvents describe everything that occurs in a conversation and tell the
rasa_core.trackers.DialogueStateTrackerhow to update its state.-
static
from_parameters(parameters: Dict[str, Any], default: Optional[Type[Event]] = None) → Optional[rasa_core.events.Event][source]¶
-
static
from_story_string(event_name: str, parameters: Dict[str, Any], default: Optional[Type[Event]] = None) → Optional[List[rasa_core.events.Event]][source]¶
-
static
resolve_by_type(type_name: str, default: Optional[Type[Event]] = None) → Optional[Type[rasa_core.events.Event]][source]¶ Returns a slots class by its type name.
-
type_name= 'event'¶
-
static
-
class
rasa_core.events.FollowupAction(name, timestamp=None)[source]¶ Bases:
rasa_core.events.EventEnqueue a followup action.
-
type_name= 'followup'¶
-
-
class
rasa_core.events.Form(name, timestamp=None)[source]¶ Bases:
rasa_core.events.EventIf name is not None: activates a form with name else deactivates active form
-
type_name= 'form'¶
-
-
class
rasa_core.events.FormValidation(validate, timestamp=None)[source]¶ Bases:
rasa_core.events.EventEvent added by FormPolicy to notify form action whether or not to validate the user input
-
type_name= 'form_validation'¶
-
-
class
rasa_core.events.ReminderScheduled(action_name, trigger_date_time, name=None, kill_on_user_message=True, timestamp=None)[source]¶ Bases:
rasa_core.events.EventAllows asynchronous scheduling of action execution.
As a side effect the message processor will schedule an action to be run at the trigger date.
-
type_name= 'reminder'¶
-
-
class
rasa_core.events.Restarted(timestamp=None)[source]¶ Bases:
rasa_core.events.EventConversation should start over & history wiped.
Instead of deleting all events, this event can be used to reset the trackers state (e.g. ignoring any past user messages & resetting all the slots).
-
type_name= 'restart'¶
-
-
class
rasa_core.events.SlotSet(key, value=None, timestamp=None)[source]¶ Bases:
rasa_core.events.EventThe user has specified their preference for the value of a
slot.Every slot has a name and a value. This event can be used to set a value for a slot on a conversation.
As a side effect the
Tracker’s slots will be updated so thattracker.slots[key]=value.-
type_name= 'slot'¶
-
-
class
rasa_core.events.StoryExported(path=None, timestamp=None)[source]¶ Bases:
rasa_core.events.EventStory should get dumped to a file.
-
type_name= 'export'¶
-
-
class
rasa_core.events.UserUtteranceReverted(timestamp=None)[source]¶ Bases:
rasa_core.events.EventBot reverts everything until before the most recent user message.
The bot will revert all events after the latest UserUttered, this also means that the last event on the tracker is usually action_listen and the bot is waiting for a new user message.
-
type_name= 'rewind'¶
-
-
class
rasa_core.events.UserUttered(text, intent=None, entities=None, parse_data=None, timestamp=None, input_channel=None, message_id=None)[source]¶ Bases:
rasa_core.events.EventThe user has said something to the bot.
As a side effect a new
Turnwill be created in theTracker.-
type_name= 'user'¶
-