Skip to content

Error describing image: response.arrayBuffer is not a function #271

@Slushbanq

Description

@Slushbanq

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.
image

Expected behavior
But when I use the describe function with a simple link it gives me this error:
image

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions