session#
- class besser.bot.core.session.Session(session_id, bot, platform)[source]#
Bases:
objectA user session in a bot execution.
When a user starts interacting with a bot, a session is assigned to him/her to store user related information, such as the current state of the bot, the conversation history, the detected intent with its parameters or any user’s private data. A session can be accessed from the body of the states to read/write user information.
- Parameters:
- delete(key)[source]#
Delete an entry of the session private data storage.
- Parameters:
key (str) – the entry key
- get(key)[source]#
Get an entry of the session private data storage.
- Parameters:
key (str) – the entry key
- Returns:
the entry value, or None if the key does not exist
- Return type:
Any
- move(transition)[source]#
Move to another bot state.
- Parameters:
transition (Transition) – the transition that points to the bot state to move