DEV Community

loading...
Cover image for RASA - Sessions

RASA - Sessions

Petr Janik
I'm a student of applied informatics at Masaryk University in Brno. I love coding, especially in React, Java and Python.
・1 min read

A conversation session represents the dialogue between the assistant and the user.

When a user begins the conversation with the assistant, the session starts.

The default session configuration looks like this:

session_config:
  session_expiration_time: 60
  carry_over_slots_to_new_session: true
Enter fullscreen mode Exit fullscreen mode

We can override those values in domain.yml.

session_expiration_time defines the time of inactivity in minutes after which a new session will begin. In our case, if the user does not respond fo 60 minutes, a new session is created. Setting this to 0 means infinitely long session.

carry_over_slots_to_new_session: true means that filled slot values are persisted between sessions. Set to false to forget slots between sessions.

You can start a new session anytime by typing /session_start.

Setting carry_over_slots_to_new_session: false and typing /session_start saves us from restarting the rasa shell each time we want to start a new conversation.

You can learn more about sessions in the documentation.

In the next chapter, we will look at continuous integration using GitHub actions.

Repository for this tutorial:

You can checkout the state of the repository at the end of this tutorial by running:

git clone --branch 11-sessions git@github.com:petr7555/rasa-dev-tutorial.git
Enter fullscreen mode Exit fullscreen mode

Discussion (0)