Update popup.js

This commit is contained in:
Alex 2023-03-16 13:42:28 +00:00
parent b67ade3610
commit 60cc1d8ee5

View File

@ -21,12 +21,12 @@ document.getElementById("message-form").addEventListener("submit", function(even
}
// send post request to server http://127.0.0.1:5000/ with message in json body
fetch('http://127.0.0.1:5000/api/answer', {
fetch('http://127.0.0.1:5001/api/answer', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({question: message}),
body: JSON.stringify({question: message, history: null}),
})
.then(response => response.json())
.then(data => {