feat: integrate with chatbot
This commit is contained in:
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,57 @@
|
||||
<link href="/chat.styles.css" rel="stylesheet" />
|
||||
|
||||
<div id="chat"></div>
|
||||
|
||||
<script type="module">
|
||||
import { createChat } from '/chat.bundle.es.js';
|
||||
|
||||
createChat({
|
||||
// Webhook URL
|
||||
webhookUrl: 'https://n8n.ep-reisen.app/webhook/e104e40e-6134-4825-a6f0-8a646d882662/chat',
|
||||
|
||||
// Target Element
|
||||
target: '#chat',
|
||||
|
||||
// Window Mode (floating button)
|
||||
mode: 'window',
|
||||
|
||||
// Metadata für Analytics
|
||||
metadata: {
|
||||
source: 'website',
|
||||
url: window.location.href,
|
||||
path: window.location.pathname,
|
||||
referrer: document.referrer || 'direct'
|
||||
},
|
||||
|
||||
// Welcome Screen ausblenden
|
||||
showWelcomeScreen: false,
|
||||
|
||||
// Initiale Begrüßung (DU-Form)
|
||||
initialMessages: [
|
||||
'Hallo! 👋',
|
||||
'Ich bin der EP Reisen Assistent und helfe dir gerne bei allgemeinen Fragen rund um Skiverleih, Parkplätze und vieles mehr!'
|
||||
],
|
||||
|
||||
// Deutsche Texte (DU-Form)
|
||||
i18n: {
|
||||
en: {
|
||||
title: 'EP Reisen Chat',
|
||||
subtitle: 'Fragen zu deiner Skireise? Wir sind für dich da!',
|
||||
footer: '',
|
||||
getStarted: 'Neue Nachricht',
|
||||
inputPlaceholder: 'Deine Frage hier eingeben...'
|
||||
}
|
||||
},
|
||||
|
||||
// Session Management
|
||||
loadPreviousSession: true,
|
||||
chatSessionKey: 'ep_reisen_session',
|
||||
chatInputKey: 'chatInput',
|
||||
|
||||
// File Uploads deaktiviert
|
||||
allowFileUploads: false,
|
||||
|
||||
// Streaming (aktiviere falls gewünscht)
|
||||
enableStreaming: false
|
||||
});
|
||||
</script>
|
||||
@@ -186,4 +186,6 @@
|
||||
<script type="application/ld+json">
|
||||
<f:format.raw>{totalRatings.jsonData->f:format.json()}</f:format.raw>
|
||||
</script>
|
||||
|
||||
<f:render partial="Chatbot" arguments="{_all}"/>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user