repush
This commit is contained in:
parent
84be9fc2ba
commit
f7cab6aec0
1 changed files with 5 additions and 0 deletions
|
@ -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)
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue