How to initiate a new session.
Zorro30 opened this issue · 4 comments
@Alexmhack
Everytime I run the server I land upon the very same chat session I left behind. How can I start a new session every time I start a server, is there a provision for the same?
Checkout Session-Persistence on Rasa Webchat.
Sorry in advance I am new to this.
@Alexmhack
I saw the documentation of Rasa webchat there I saw the storage parameter where I can change it to session instead of local. But in the code In this repo I cannot find the particular file where you have storage as a parameter.
In templates/index.hmtl file add another object like,
<script>
WebChat.default.init({
selector: "#webchat",
initPayload: "/get_started",
interval: 1000, // 1000 ms between each message
customData: {"sender": "django"}, // arbitrary custom data. Stay minimal as this will be added to the socket
socketUrl: "http://localhost:5500/",
title: "Connect",
subtitle: "The bot which connects people",
profileAvatar: "https://rasa.com/assets/img/demo/rasa_avatar.png",
showCloseButton: true,
fullScreenMode: false
,
params: {
storage: "local"
# <- place storage option here
}
})
</script>
Thanks, it worked.
After setting storage: 'session' if I close the browser the chat is gone.