1import { createChat } from './n8n/chatbot-default.js'; 2 3// generic function for loading css dynamically relative to this script 4function loadCss(url) { 5 const link = document.createElement('link'); 6 link.rel = 'stylesheet'; 7 link.href = new URL(url, import.meta.url).href; 8 document.head.appendChild(link); 9} 10 11// load default and co2online specific css 12loadCss('./n8n/chatbot-default.css'); 13loadCss('./chatbot-co2online.css'); 14 15// Initializes the n8n chat widget and attaches it to the page 16createChat({ 17 webhookUrl: 'https://automation.co2online.de/webhook/f37b30bc-add6-49a9-a538-9123d852bc0b/chat', 18 webhookConfig: { 19 method: 'POST', 20 headers: {} 21 }, 22 target: '#n8n-chat', 23 mode: 'window', 24 chatInputKey: 'chatInput', 25 chatSessionKey: 'sessionId', 26 loadPreviousSession: true, 27 metadata: { }, 28 showWelcomeScreen: false, 29 defaultLanguage: 'de', 30 31 initialMessages: [ 32 "Hallo ð Ich bin der EnergieLotse von co2online. Ich antworte auf Fragen zu Energiesparen, Modernisieren und Förderungen.", 33 34 `Bitte keine persönlichen Daten wie Namen oder Adressen eingeben. Mit der Nutzung des Chats wird den [Datenschutzbestimmungen](https://www.co2online.de/datenschutz/#c45319) zugestimmt. Der Energielotse ist eine KI und kann Fehler machen. Wichtige Informationen bitte überprüfen.`, 35 36 "Wie kann ich beim Modernisieren oder Energiesparen helfen?" 37 ], 38 39 i18n: { 40 de: { 41 title: 'EnergieLotse', 42 subtitle: '', 43 footer: 'Datenschutz', 44 getStarted: 'Neuer Chat', 45 inputPlaceholder: 'Frage eingeben...' 46 } 47 }, 48 49 enableStreaming: true 50});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.