async function query(data) {
const response = await fetch(
"http://localhost:3000/api/v1/prediction/2aaa80cc-dc0a-4427-ba42-8da68afae0f4", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify(data) } ); const result = await response.json(); return result; } query({"question": "Hey, how are you?"}).then((response) => { console.log(response); });