notice
This is unreleased documentation for Rasa Documentation Main/Unreleased version.
For the latest released documentation, see the latest version (3.x).
Events
Internally, Rasa conversations are represented as a list of events. Rasa SDK provides classes for each event, and takes care of turning instances of event classes into properly formatted event payloads.
This page is about the event classes in rasa_sdk
.
The side effects of events and their underlying
payloads are identical regardless of whether you use rasa_sdk
or another action
server.
For details about the side effects of an event, its underlying
payload and the class in Rasa it is translated to
see the documentation for events for all action servers
(also linked to in each section).
Importing events
All events written in a Rasa SDK action server need to be imported from rasa_sdk.events
.
Event Classes
SlotSet
Underlying event: slot
Parameters:
key
: Name of the slot to setvalue
: Value to set the slot to. The datatype must match the type of the slottimestamp
: Optional timestamp of the event
Example
AllSlotsReset
Underlying event: reset_slots
Parameters:
timestamp
: Optional timestamp of the event
Example:
ReminderScheduled
Underlying event: reminder
Parameters:
intent_name
: Intent which the reminder will triggertrigger_date_time
: Datetime at which the execution of the action should be triggered.entities
: Entities to send with the intentname
: ID of the reminder. If there are multiple reminders with the same id only the last will be run.kill_on_user_message
: Whether a user message before the trigger time will abort the remindertimestamp
: Optional timestamp of the event
Example:
ReminderCancelled
Underlying event: cancel_reminder
Parameters:
name
: ID of the reminder.intent_name
: Intent which the reminder triggersentities
: Entities sent with the intenttimestamp
: Optional timestamp of the event
Example:
ConversationPaused
Underlying event: pause
Parameters:
timestamp
: Optional timestamp of the event
Example:
ConversationResumed
Underlying event: resume
Parameters:
timestamp
: Optional timestamp of the event
Example:
FollowupAction
Underlying event: followup
Parameters:
name
: The name of the follow up action that will be executed.timestamp
: Optional timestamp of the event
Example:
UserUtteranceReverted
Underlying event: rewind
Parameters:
timestamp
: Optional timestamp of the event
Example:
ActionReverted
Underlying event: undo
Parameters:
timestamp
: Optional timestamp of the event
Example:
Restarted
Underlying event: restart
Parameters:
timestamp
: Optional timestamp of the event
Example:
SessionStarted
Underlying event: session_started
Parameters:
timestamp
: Optional timestamp of the event
Example:
UserUttered
Underlying event: user
Parameters:
text
: Text of the user messageparse_data
: Parsed data of user message. This is ordinarily filled by NLU.input_channel
: The channel on which the message was receivedtimestamp
: Optional timestamp of the event
Example:
BotUttered
Underlying event: bot
Parameters:
text
: The text the bot sends to the userdata
: Any non-text elements of the bot response. The structure ofdata
matches that ofresponses
given in the API spec.metadata
: Arbitrary key-value metadatatimestamp
: Optional timestamp of the event
Example:
ActionExecuted
Underlying event: action
Parameters:
action_name
: Name of the action that was calledpolicy
: The policy used to predict the actionconfidence
: The confidence with which the action was predictedtimestamp
: Optional timestamp of the event
Example: