Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Slushbanq opened this issue May 6, 2024 · 0 comments
Open

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

Slushbanq opened this issue May 6, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@Slushbanq
Copy link

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

@Slushbanq Slushbanq added the bug Something isn't working label May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant