misc.generate: forgot to set POST
This commit is contained in:
parent
a3a693a727
commit
b15bcfbdf3
1 changed files with 2 additions and 0 deletions
|
@ -406,11 +406,13 @@ generate.callback = async function (msg, line) {
|
|||
if (!line || line.length === 0) return "Arguments required.";
|
||||
|
||||
let request = await fetch("https://backend.craiyon.com/generate", {
|
||||
method: "POST",
|
||||
headers: GENERATE_HEADERS,
|
||||
body: JSON.stringify({prompt: line}),
|
||||
});
|
||||
while (request.status !== 200) {
|
||||
request = await fetch("https://backend.craiyon.com/generate", {
|
||||
method: "POST",
|
||||
headers: GENERATE_HEADERS,
|
||||
body: JSON.stringify({prompt: line}),
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue