From ac6916ed462a7e9ec9d7ae913bf087d6ddcab023 Mon Sep 17 00:00:00 2001 From: Emanuele Ferrelli Date: Wed, 2 Apr 2025 17:14:50 +0200 Subject: [PATCH] Resolve Bug chat --- src/components/ChatClient.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/ChatClient.vue b/src/components/ChatClient.vue index bc79c8d..bfcb0e5 100644 --- a/src/components/ChatClient.vue +++ b/src/components/ChatClient.vue @@ -98,7 +98,7 @@ export default { return; } try { - const response = await fetch(`${import.meta.env.VITE_BACKEND_URL.remove("/hermione")}/chatservice/get-history?conversationId=${this.conversationId}&lastN=100`, { + const response = await fetch(`${import.meta.env.VITE_BACKEND_URL.replace("/hermione", "")}/chatservice/get-history?conversationId=${this.conversationId}&lastN=100`, { method: 'GET', headers: { 'Content-Type': 'application/json', authorization: 'Bearer ' + this.$auth.token() } }); @@ -143,7 +143,7 @@ export default { try { this.waitingData = true; - const response = await fetch(import.meta.env.VITE_BACKEND_URL.remove("/hermione")+'/chatservice/chat', { + const response = await fetch(import.meta.env.VITE_BACKEND_URL.replace("/hermione", "")+'/chatservice/chat', { method: 'POST', headers: { 'Content-Type': 'application/json', authorization: this.authorization }, body: JSON.stringify(payload) @@ -205,7 +205,7 @@ export default { async clearHistory() { try { - const response = await fetch( `${import.meta.env.VITE_BACKEND_URL.remove("/hermione")}/chatservice/delete-history?conversationId=${this.conversationId}`, { + const response = await fetch( `${import.meta.env.VITE_BACKEND_URL.replace("/hermione", "")}/chatservice/delete-history?conversationId=${this.conversationId}`, { method: 'DELETE', headers: { 'Content-Type': 'application/json', authorization: this.authorization } }); @@ -221,7 +221,7 @@ export default { async loadContext() { try { - const response = await fetch(`${import.meta.env.VITE_BACKEND_URL.remove("/hermione")}/chatservice/load-context-to-conversation?conversationId=${this.conversationId}&scenarioExecutionId=${this.scenarioExecutionId}`, { + const response = await fetch(`${import.meta.env.VITE_BACKEND_URL.replace("/hermione", "")}/chatservice/load-context-to-conversation?conversationId=${this.conversationId}&scenarioExecutionId=${this.scenarioExecutionId}`, { method: 'GET', headers: { 'Content-Type': 'application/json', authorization: this.authorization } });