#Vision syntax
39 messages · Page 1 of 1 (latest)
That looks correct to me - but you will also need a human prompt as wel
[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))
Gemini on OR supports streaming
Can you output the full JSON request that you're sending to OR?
[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)
Should look like this:
hmm..
Is the kwargs mapping correctly via the openAI client you're using?
Idk what that means
basically whether the argument you have above maps correctly to the API request shape
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)
Actually it's working with GPT 4 that I use directly not via OpenRouter
Just not with the models of OpenRouter
hmm, so even the GPT4 on OR doesn' work??
MIME type: application/octet-stream I get only when I enable streaming, if disable I don't get it
Not sure, but I can try
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
So you want me to send the blob/binary?
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
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?
lmk if this doesn't work - that'd be a P0 bug on our end
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
Yeah if the url points to an octet url, we are not parsing it down atm (since the underneath API requires the correct mimetype)
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!
We will eventually add support for raw octet stream, but likely will be after the holidays
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.