Started to work on interaction views. However, need a quick check in because of a python upgrade systemwide that breaks code.

This commit is contained in:
Josako
2024-06-21 09:52:06 +02:00
parent c5370c8026
commit cc9f6c95aa
19 changed files with 553 additions and 112 deletions

View File

@@ -8,6 +8,7 @@ class EveAIChatWidget extends HTMLElement {
this.socket = null; // Initialize socket to null
this.attributesSet = false; // Flag to check if all attributes are set
this.jwtToken = null; // Initialize jwtToken to null
this.userTimezone = Intl.DateTimeFormat().resolvedOptions().timeZone; // Detect user's timezone
console.log('EveAIChatWidget constructor called');
}
@@ -229,8 +230,8 @@ class EveAIChatWidget extends HTMLElement {
case 'RAG_GOOGLE':
algorithmClass = 'fingerprint-rag-google';
break;
case 'RAG_LLM':
algorithmClass = 'fingerprint-rag-llm';
case 'LLM':
algorithmClass = 'fingerprint-llm';
break;
default:
algorithmClass = '';
@@ -299,7 +300,13 @@ toggleFeedback(thumbsUp, thumbsDown, feedback, interactionId) {
return;
}
console.log('Sending message to backend');
this.socket.emit('user_message', { tenantId: this.tenantId, token: this.jwtToken, message, language: this.language });
this.socket.emit('user_message', {
tenantId: this.tenantId,
token: this.jwtToken,
message,
language: this.language,
timezone: this.userTimezone
});
this.setStatusMessage('Processing started ...')
}