Hey everybody,
My Use Case:
Implement a session timeout which asks the user after x minutes of inactivity if the conversation should be continued from the last checkpoint, or be reset. The session timeout is triggered from outside of rasa by a /session_timeout
-intent which is sent after the inactivity.
Problem:
Currently the timeout only works for sessions which follow the path of the provided stories. (below) Any ideas on how i could generalize this since i cant take into account all possible story paths.
How to write a general rule/story which takes the user back to the last state of the conversation in case it should be continued or simply call action_reset when the user wants start a now session?
Current configuration:
rules.yml
- rule: user session timeout
condition:
- active_loop: travel_booking_form
steps:
- intent: session_timeout
- action: action_deactivate_loop
- active_loop: null
- action: utter_ask_session_timeout
stories.yml
- story: Session timeout inside form basic restart
steps:
- intent: travel_booking
- action: utter_self_booking_option
- intent: affirm
- action: action_set_name
- action: utter_travel_booking
- action: travel_booking_form
- active_loop: travel_booking_form
- intent: session_timeout
- action: action_deactivate_loop
- active_loop: null
- action: utter_ask_session_timeout
- intent: deny
- action: action_restart
- story: Session timeout inside form basic continue
steps:
- intent: travel_booking
- action: utter_self_booking_option
- intent: affirm
- action: action_set_name
- action: utter_travel_booking
- action: travel_booking_form
- active_loop: travel_booking_form
- intent: session_timeout
- action: action_deactivate_loop
- active_loop: null
- action: utter_ask_session_timeout
- intent: affirm
- action: travel_booking_form
- active_loop: travel_booking_form
- story: Session timeout basic continue
steps:
- intent: greet
- action: utter_greet
- action: utter_info
- intent: session_timeout
- action: utter_ask_session_timeout
- intent: affirm
- action: utter_info
- story: Session timeout basic restart
steps:
- intent: greet
- action: utter_greet
- action: utter_info
- intent: session_timeout
- action: utter_ask_session_timeout
- intent: deny
- action: action_restart
- action: utter_info
Thanks for your help