Is there any callback when session timesout . Session_expiration_time just tells the inactivity time but is there any way I can detect in the code through any function that session has timed out for a user, as I want to perform custom action when it expires.
When the session expires, Rasa will call action_session_start so you can add the custom action code there.
From my experience, this only happens once and if the user sends in a message.
So for example, if the session timeout is set to 5 minutes, after 5 minutes nothing will happen; if then the user accesses the bot after 10 minutes, then
action_session_start will be called at that point.
Yes, That’s correct. Until you come back to bot after session expires, action_session_start is not called. I was looking for something which should be called automatically when session ends.
@rudi did you manage to solve this problem? I´m having the same problema, action_session_start only triggers when the user sends a message after the expiration time.
No, there’s nothing in Rasa to have actions performed outside of a user’s request, besides the following two features:
Reaching Out to the User - but reminders are stored in memory, so you can’t have a lot of them, and you lose them if the server crashes or restarts, so I wouldn’t rely on them
Reaching Out to the User - External events, but this requires you to build something that stores and performs the triggers.
Okay, I´ll check them out.