Bug on ChatClient

This commit is contained in:
2025-04-02 16:50:16 +02:00
parent b7a5a284a5
commit a93a0b9e4a

View File

@@ -98,7 +98,7 @@ export default {
return; return;
} }
try { try {
const response = await fetch(`${import.meta.env.VITE_BACKEND_URL.remove("/hermone")}/chatservice/get-history?conversationId=${this.conversationId}&lastN=100`, { const response = await fetch(`${import.meta.env.VITE_BACKEND_URL.remove("/hermione")}/chatservice/get-history?conversationId=${this.conversationId}&lastN=100`, {
method: 'GET', method: 'GET',
headers: { 'Content-Type': 'application/json', authorization: 'Bearer ' + this.$auth.token() } headers: { 'Content-Type': 'application/json', authorization: 'Bearer ' + this.$auth.token() }
}); });
@@ -143,7 +143,7 @@ export default {
try { try {
this.waitingData = true; this.waitingData = true;
const response = await fetch(import.meta.env.VITE_BACKEND_URL.remove("/hermone")+'/chatservice/chat', { const response = await fetch(import.meta.env.VITE_BACKEND_URL.remove("/hermione")+'/chatservice/chat', {
method: 'POST', method: 'POST',
headers: { 'Content-Type': 'application/json', authorization: this.authorization }, headers: { 'Content-Type': 'application/json', authorization: this.authorization },
body: JSON.stringify(payload) body: JSON.stringify(payload)
@@ -205,7 +205,7 @@ export default {
async clearHistory() { async clearHistory() {
try { try {
const response = await fetch( `${import.meta.env.VITE_BACKEND_URL.remove("/hermone")}/chatservice/delete-history?conversationId=${this.conversationId}`, { const response = await fetch( `${import.meta.env.VITE_BACKEND_URL.remove("/hermione")}/chatservice/delete-history?conversationId=${this.conversationId}`, {
method: 'DELETE', method: 'DELETE',
headers: { 'Content-Type': 'application/json', authorization: this.authorization } headers: { 'Content-Type': 'application/json', authorization: this.authorization }
}); });
@@ -221,7 +221,7 @@ export default {
async loadContext() { async loadContext() {
try { try {
const response = await fetch(`${import.meta.env.VITE_BACKEND_URL.remove("/hermone")}/chatservice/load-context-to-conversation?conversationId=${this.conversationId}&scenarioExecutionId=${this.scenarioExecutionId}`, { const response = await fetch(`${import.meta.env.VITE_BACKEND_URL.remove("/hermione")}/chatservice/load-context-to-conversation?conversationId=${this.conversationId}&scenarioExecutionId=${this.scenarioExecutionId}`, {
method: 'GET', method: 'GET',
headers: { 'Content-Type': 'application/json', authorization: this.authorization } headers: { 'Content-Type': 'application/json', authorization: this.authorization }
}); });