Describe the problem/error/question
Please share your workflow
This is how I installed chat on the site
<script src="https://cdn.jsdelivr.net/npm/vue@2"></script>
<div>Текст</div>
<link href="https://nn.mirrox-hub.ru/webhook/ffa96977-51a8-4a83-bfe9-a345394adc2a" rel="stylesheet" />
<script type="module">
import { createChat } from 'https://nn.mirrox-hub.ru/webhook/b87ab0ec-6a76-4c88-9003-efcee0df90c3';
createChat({
webhookUrl: 'https://nn.mirrox-hub.ru/webhook/87b86322-47fa-48d3-8968-93c0ae2ffe31'
});
</script>
It seems like I wrote in the code so that the history is stored. But for some reason, when the page is refreshed, the site changes sessionId
Okay, I understand that the first time you open a page, in theory you can somehow pull up the history from the database, but I don’t understand in what format the data should be returned to a request from a chat like loadPreviousSession
For chat mode you need to give {“output”:“{{ $json.body.chatInput }}”} in the last node
But it’s not clear from the documentation how to save adi sessions and load the history in what format. I understand that you need to give something like metadata, but in what format should you give the array of messages?
n the lower node the code Respond to Webhook1 was downloaded from here https://cdn.jsdelivr.net/npm/@n8n/chat/chat.bundle.es.js