Improving chat functionality significantly throughout the application.

This commit is contained in:
Josako
2024-06-12 11:07:18 +02:00
parent 27b6de8734
commit be311c440b
22 changed files with 604 additions and 127 deletions

View File

@@ -1,9 +1,10 @@
// static/js/eveai-sdk.js
class EveAI {
constructor(tenantId, apiKey, domain) {
constructor(tenantId, apiKey, domain, language) {
this.tenantId = tenantId;
this.apiKey = apiKey;
this.domain = domain;
this.language = language;
console.log('EveAI constructor:', { tenantId, apiKey, domain });
}
@@ -17,10 +18,12 @@ class EveAI {
chatWidget.setAttribute('tenant-id', this.tenantId);
chatWidget.setAttribute('api-key', this.apiKey);
chatWidget.setAttribute('domain', this.domain);
chatWidget.setAttribute('language', this.language);
console.log('Attributes set in chat widget:', {
tenantId: chatWidget.getAttribute('tenant-id'),
apiKey: chatWidget.getAttribute('api-key'),
domain: chatWidget.getAttribute('domain')
domain: chatWidget.getAttribute('domain'),
language: chatWidget.getAttribute('language')
});
});
} else {