#Vision syntax

39 messages · Page 1 of 1 (latest)

modest crater
#

<@&1094455453599137872>

topaz magnet
#

That looks correct to me - but you will also need a human prompt as wel

modest crater
#
[llm/error] [1:llm:ChatOpenAI] [5.26s] LLM run errored with error: "Unsupported MIME type: application/octet-stream"
[04:18:31.385] FATAL (icg/22039): "uncaughtException" detected
    Error: Unsupported MIME type: application/octet-stream
#

At first look, I think it's an issue with "streaming", does Gemini Pro Vision doesn't support streaming? Now I'm getting a different error (progress I guess x))

topaz magnet
#

Gemini on OR supports streaming

#

Can you output the full JSON request that you're sending to OR?

modest crater
#
[04:27:06.343] FATAL (icg/22990): "uncaughtException" detected
TypeError: Cannot read properties of undefined (reading 'message')
at ChatOpenAI.call (/node_modules/@langchain/core/dist/language_models/chat_models.cjs:298:34)
at processTicksAndRejections (node:internal/process/task_queues:95:5)

/Users/zakariamehbi/Code/InsertChatGPT/server/node_modules/@langchain/core/dist/language_models/chat_models.cjs:298
return generations[0][0].message;
^
TypeError: Cannot read properties of undefined (reading 'message')
at ChatOpenAI.call (/node_modules/@langchain/core/dist/language_models/chat_models.cjs:298:34)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
topaz magnet
#

hmm..

#

Is the kwargs mapping correctly via the openAI client you're using?

modest crater
#

Same / Same, no?

#

I'm using Langchain

modest crater
topaz magnet
#

If you try a public image from wiki for example, does it work?

#

Start from there, then debug your public URL

#

I suspect your CF R2 public URL doesn't have the correct mimetype

#

and is returning an octet stream (as specified in the error)

modest crater
#

Actually it's working with GPT 4 that I use directly not via OpenRouter

#

Just not with the models of OpenRouter

topaz magnet
#

hmm, so even the GPT4 on OR doesn' work??

modest crater
#

MIME type: application/octet-stream I get only when I enable streaming, if disable I don't get it

modest crater
topaz magnet
#

I don't think we're cooking the URL if it's GPT4, only with Gemini and the OSS models since they don't understand public URLs

modest crater
#

So you want me to send the blob/binary?

topaz magnet
#

It should be a data-base64 string OR an URL that points to an image file with the correct content-type header (not octet stream, which is a raw binary stream)

#

We might consider supporting those octet links tho, but it would take a bit. Not sure if the octet binary contains any mime type identifier or would we need to parse the header in the binary header blob :d

modest crater
#

I will try to make it work on my end. Now that's the issue with the generation being empty, no?

#

What about the streaming?

topaz magnet
#

Streaming should work afaik - check the playground

topaz magnet
modest crater
#

So, I tried openai/gpt-4-vision-preview, everything is working fine even with my signed url + streaming

#

Using gemini pro vision, the url isn't working, the streaming either

topaz magnet
#

Yeah if the url points to an octet url, we are not parsing it down atm (since the underneath API requires the correct mimetype)

modest crater
#

Oh, it's the same issue you're saying. So if I fix my URL, everything should be fine then

#

@topaz magnet Added contentType to my signed url with auto detection using the path, and I got the response from gemini vision with streaming. killer support!

topaz magnet
#

We will eventually add support for raw octet stream, but likely will be after the holidays

rose ore
#

Hey - I've a mp4 served from telegram which looks to come down as a octet stream from their servers. I wanted to send this to gemini vision but receive the same error as discussed in this thread. What was the fix in the end? I cant change the mime type their server sends.