Rimuovi il codice commentato e aggiorna gli endpoint API per rimuovere "/hermone" dall'URL di backend
This commit is contained in:
@@ -20,35 +20,7 @@
|
|||||||
</p-inputGroup>
|
</p-inputGroup>
|
||||||
</div>
|
</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>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -126,7 +98,7 @@ export default {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
try {
|
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',
|
method: 'GET',
|
||||||
headers: { 'Content-Type': 'application/json', authorization: 'Bearer ' + this.$auth.token() }
|
headers: { 'Content-Type': 'application/json', authorization: 'Bearer ' + this.$auth.token() }
|
||||||
});
|
});
|
||||||
@@ -171,7 +143,7 @@ export default {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
this.waitingData = true;
|
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',
|
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)
|
||||||
@@ -233,7 +205,7 @@ export default {
|
|||||||
|
|
||||||
async clearHistory() {
|
async clearHistory() {
|
||||||
try {
|
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',
|
method: 'DELETE',
|
||||||
headers: { 'Content-Type': 'application/json', authorization: this.authorization }
|
headers: { 'Content-Type': 'application/json', authorization: this.authorization }
|
||||||
});
|
});
|
||||||
@@ -249,7 +221,7 @@ export default {
|
|||||||
|
|
||||||
async loadContext() {
|
async loadContext() {
|
||||||
try {
|
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',
|
method: 'GET',
|
||||||
headers: { 'Content-Type': 'application/json', authorization: this.authorization }
|
headers: { 'Content-Type': 'application/json', authorization: this.authorization }
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user