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.Event
An operation describes an action taken + its result.
It comprises an action and a list of events. operations will be appended to the latest
Turn
in theTracker.turns
.-
type_name
= 'action'¶
-
-
class
rasa_core.events.
ActionExecutionRejected
(action_name, policy=None, confidence=None, timestamp=None)[source]¶ Bases:
rasa_core.events.Event
Notify 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.Event
Bot 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.Event
The agent has said something to the user.
This class is not used in the story training as it is contained in the
ActionExecuted
class. An entry is made in theTracker
.-
type_name
= 'agent'¶
-
-
class
rasa_core.events.
AllSlotsReset
(timestamp=None)[source]¶ Bases:
rasa_core.events.Event
All 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.Event
The bot has said something to the user.
This class is not used in the story training as it is contained in the
ActionExecuted
class. An entry is made in theTracker
.-
type_name
= 'bot'¶
-
-
class
rasa_core.events.
ConversationPaused
(timestamp=None)[source]¶ Bases:
rasa_core.events.Event
Ignore messages from the user to let a human take over.
As a side effect the
Tracker
’spaused
attribute will be set toTrue
.-
type_name
= 'pause'¶
-
-
class
rasa_core.events.
ConversationResumed
(timestamp=None)[source]¶ Bases:
rasa_core.events.Event
Bot takes over conversation.
Inverse of
PauseConversation
. As a side effect theTracker
’spaused
attribute will be set toFalse
.-
type_name
= 'resume'¶
-
-
class
rasa_core.events.
Event
(timestamp=None)[source]¶ Bases:
object
Events describe everything that occurs in a conversation and tell the
rasa_core.trackers.DialogueStateTracker
how 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.Event
Enqueue a followup action.
-
type_name
= 'followup'¶
-
-
class
rasa_core.events.
Form
(name, timestamp=None)[source]¶ Bases:
rasa_core.events.Event
If 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.Event
Event 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.Event
Allows 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.Event
Conversation 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.Event
The 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.Event
Story should get dumped to a file.
-
type_name
= 'export'¶
-
-
class
rasa_core.events.
UserUtteranceReverted
(timestamp=None)[source]¶ Bases:
rasa_core.events.Event
Bot 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.Event
The user has said something to the bot.
As a side effect a new
Turn
will be created in theTracker
.-
type_name
= 'user'¶
-