Socket.io doesnt save chat history - Getting Started with Rasa / Tutorials, Resources & Videos - Rasa Community Forum
👋 Introducing the Rasa Playground
Socket.io doesnt save chat history
2.2k views
post by acapothman on Sep 24, 2020
Hi Rasa Community! I have been using this HTML code for testing when I realized the chat history with the users did not save when I ran Rasa X to check the conversations my chatbot had with test users. Am I missing something or did I do it wrong? Feel free to comment thanks!
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Test Lisa</title>
<link rel="stylesheet" href="css/styles.css?v=1.0">
</head>
<body>
<div id="webchat"></div>
<script src="https://cdn.jsdelivr.net/npm/rasa-webchat/lib/index.min.js"></script>
<script>
WebChat.default.init({
selector: "#webchat",
initPayload: "/greet",
customData: {"language": "en"}, // arbitrary custom data. Stay minimal as this will be added to the socket
socketUrl: "https://ngrokurl.ngrok.io",
socketPath: "/socket.io/",
title: "Lisa",
subtitle: "Chat with the new Edaran Bot!",
params: {"storage": "session"} // can be set to "local" or "session". details in storage section.
})
</script>
</body>
</html>
I have also added the socket.io auth in my credentials.yml
socketio:
user_message_evt: user_uttered
bot_message_evt: bot_uttered
session_persistence: true/false
2.2k views
post by Nishet on Sep 25, 2020
your chat history saved in local storage. For use local storage press ctrl+shift+I (inspect) and then go to application. In application there are 2 options Local and session storage. Check these 2 options; you got your chat history.
post by acapothman on Sep 28, 2020
Hi sorry for the late reply was busy on the weekend. If I set it on session where should I check for it? And if I set it on local where should I check for it?
post by forwitai on Dec 23, 2020
Hello @acapothman, did you find a solution? thanks.