DEV Community

Cover image for RASA - Sessions
Petr Janik
Petr Janik

Posted on

3 3

RASA - Sessions

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

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay