main #28

Merged
Patrick_Pluto merged 8 commits from YasinOnm08/interstellar_ai:main into main 2024-09-20 10:55:47 +02:00
Showing only changes of commit f7cab6aec0 - Show all commits

View file

@ -11,9 +11,14 @@ onmessage = function (e) {
};
const getResponse = () => {
messageComplete:boolean = false
while(!messageComplete)
axios.get('https://localhost:5000/interstellar/api/ai_get?access_token=' + access_token)
.then(Response => {
postMessage(Response.data.response)
if (Response.data.status == 200) {
messageComplete = true
}
}).catch(error => {
console.error("Error with GET response request:", error)
})