Rimuovi il codice commentato e aggiorna gli endpoint API per rimuovere "/hermone" dall'URL di backend

This commit is contained in:
andrea.terzani
2025-03-24 11:08:34 +01:00
parent 7b479fbc29
commit 64699fa365

View File

@@ -20,35 +20,7 @@
</p-inputGroup>
</div>
<!-- CARD DELLE IMPOSTAZIONI -->
<!-- <p-card v-if="showSettings" class="chat-settings-card p-p-2 p-mt-3">
<template #title>
<div class="p-d-flex p-ai-center">
<i class="pi pi-cog p-mr-2"></i>
<span>Chat Settings</span>
</div>
</template>
Checkboxes e campi di testo
<template #content>
<p-inputGroup class="p-mt-2" style="width: 100%">
<div class="p-field-checkbox p-mr-3">
<p-checkbox v-model="useDocumentation" inputId="documentation" binary="true" />
<label for="documentation">Documentation</label>
</div>
<div class="p-field-checkbox p-mr-3">
<p-checkbox v-model="useSource" inputId="source" binary="true" />
<label for="source">Source</label>
</div>
<p-inputText v-model="scenarioExecutionId" placeholder="Enter executionId..." class="p-mr-2" />
<p-button label="Load Context" icon="pi pi-upload" @click="loadContext" class="p-button-outlined p-button-sm" />
<p-inputText disabled v-model="conversationId" placeholder="Enter conversation ID..." class="p-mr-2" />
<p-inputText disabled v-model="project" placeholder="Project" class="p-mr-2" />
<p-inputText disabled v-model="application" placeholder="Application" class="p-mr-2" />
</p-inputGroup>
</template>
</p-card> -->
</div>
</template>
@@ -126,7 +98,7 @@ export default {
return;
}
try {
const response = await fetch(`https://olympus-api-gateway.olympus-wizardai.com/chatservice/get-history?conversationId=${this.conversationId}&lastN=100`, {
const response = await fetch(`${import.meta.env.VITE_BACKEND_URL.remove("/hermone")}/chatservice/get-history?conversationId=${this.conversationId}&lastN=100`, {
method: 'GET',
headers: { 'Content-Type': 'application/json', authorization: 'Bearer ' + this.$auth.token() }
});
@@ -171,7 +143,7 @@ export default {
try {
this.waitingData = true;
const response = await fetch(import.meta.env.VITE_BACKEND_URL+'/chatservice/chat', {
const response = await fetch(import.meta.env.VITE_BACKEND_URL.remove("/hermone")+'/chatservice/chat', {
method: 'POST',
headers: { 'Content-Type': 'application/json', authorization: this.authorization },
body: JSON.stringify(payload)
@@ -233,7 +205,7 @@ export default {
async clearHistory() {
try {
const response = await fetch( import.meta.env.VITE_BACKEND_URL+`/chatservice/delete-history?conversationId=${this.conversationId}`, {
const response = await fetch( `${import.meta.env.VITE_BACKEND_URL.remove("/hermone")}/chatservice/delete-history?conversationId=${this.conversationId}`, {
method: 'DELETE',
headers: { 'Content-Type': 'application/json', authorization: this.authorization }
});
@@ -249,7 +221,7 @@ export default {
async loadContext() {
try {
const response = await fetch(`${import.meta.env.VITE_BACKEND_URL}/chatservice/load-context-to-conversation?conversationId=${this.conversationId}&scenarioExecutionId=${this.scenarioExecutionId}`, {
const response = await fetch(`${import.meta.env.VITE_BACKEND_URL.remove("/hermone")}/chatservice/load-context-to-conversation?conversationId=${this.conversationId}&scenarioExecutionId=${this.scenarioExecutionId}`, {
method: 'GET',
headers: { 'Content-Type': 'application/json', authorization: this.authorization }
});