Skip to content

Commit

Permalink
Cambio de error en laurachatbot.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Blaister9 committed Oct 3, 2024
1 parent daa131c commit 08fdc12
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions frontend/src/services/api.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
// frontend/src/services/api.js
const BASE_URL = "https://santensor.com/api/";

// Función para enviar mensajes al chatbot Laura
export async function enviarMensajeLaura(mensaje) {
const response = await fetch(`${BASE_URL}chatbot-laura/`, {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({ mensaje }),
});
const data = await response.json();
return data;
}

// Función para iniciar una conversación
export async function iniciarConversacion(tema) {
const response = await fetch(`${BASE_URL}iniciar_conversacion/`, {
Expand Down

0 comments on commit 08fdc12

Please sign in to comment.