midjourney-api
midjourney-api copied to clipboard
Error describing image: response.arrayBuffer is not a function
trafficstars
the code that reproduces this issue or a replay of the bug
export const describeImage = webMethod( Permissions.Anyone, async (imageUrl) => { const SALAI_TOKEN = "XXXXX"; const MIDJOURNEY_SERVER_ID = "XXXXX"; const MIDJOURNEY_CHANNEL_ID = "XXXXX";
const client = new Midjourney({
ServerId: MIDJOURNEY_SERVER_ID,
ChannelId: MIDJOURNEY_CHANNEL_ID,
SalaiToken: SALAI_TOKEN,
fetch: fetch,
Ws: true,
Debug: true
});
try {
await client.Connect();
const description = await client.Describe(imageUrl);
console.log("Image Description:", description);
return description;
} catch (error) {
console.error("Error describing image:", error);
throw error;
}
}
);
Describe the bug
Describe the bug
GUYS PLEASE SOMEONE HELP! The code works when I replace the "Describe" with "Imagine" function as you can see here.
Expected behavior
But when I use the describe function with a simple link it gives me this error:
Note that I am building a website and I am using the fetch and the Describe function on the backend code.
error log
🎊 ws ready!!! Hi: Slushbanq event READY_SUPPLEMENTAL 2024-05-06T01:23:05.897Z Error describing image: response.arrayBuffer is not a function response.arrayBuffer is not a function