Open japentaca opened 1 month ago
Just for clarifying, everything works OK calling it using Curl.
This works OK ( obviously, without streaming)
async function query(data) {
const response = await fetch(
"https://{my-url}/api/v1/prediction/{my chat id}",
{
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(data)
}
);
const result = await response.json();
return result;
}
query({
"question": "Hey, how are you?",
"overrideConfig": {
"returnSourceDocuments": true
}
}).then((response) => {
console.log(response);
});
I tried to run the example in the readme file ( replacing the url and chatId) "flowise-sdk": "^1.0.9", node version: 20.15.0 SO: Windows
In the console, the completion object look like this
But the for await loop gets nothing and the script ends.