Resetting conversation based on timestamp

Hi,

I wasn’t able to find much information about resetting a conversation. Basically I’m currently facing an issue where if let’s say a user picks up from a previous conversation (they went away for awhile and then came back), they typically want to start with a fresh conversation. But Rasa will continue off with the previous conversation’s context since the sender id is identical. Other than trying to change the sender id, I had an idea to create a custom action which would check the tracker state to see when the last time the user had sent a message. If it’s been awhile, then I want to check with the user if they wish to continue where they left off or if they want to restart.

I’m currently just studying what information the tracker returns, and I’m seeing that in the events section, a timestamp is returned like this for example, 'timestamp': 1568232373.5441573. Is this timestamp supposed to be the number of seconds of the current day? I’m not really sure how to use this time to check with my current time.

Thanks

The timestamp is the time in seconds since 1970 (so a standard unix timestamp). The decimal part are subseconds.

You can use the Restarted event to reset the trackers state.

Great! Thanks for info.