Smurfens
CCConvex Community
•Created by Smurfens on 10/19/2024 in #support-community
OpenAi assistant vision - stored image url
Hi!
I am trying to use an image, that is stored in Convex, with OpenAi Assistant vision. Using the image url, i am getting an error from openai
"Uncaught Error: 400 Invalid 'content[1].image_url.url'. Expected url to end in a supported format: jpeg, jpg, png, gif, webp.".
Url format used:
"https://xxxx-xxxx-xxxx.convex.cloud/api/storage/:id"
As it says, the url for the stored image is missing the filetype ending, like a "normal" image url have. Is there a way to serve the image with the image format at the end? Am I missing something in the docs...?
Would hate to have to store seperate images in third-party just for this....
Openai vison docs:
https://platform.openai.com/docs/guides/vision
Exampel from openai:
{
"type": "image_url",
"image_url": {
"url": "https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Gfp-wisconsin-madison-the-nature-boardwalk.jpg/2560px-Gfp-wisconsin-madison-the-nature-boardwalk.jpg",
},
},
Thanks!
All the best,
Hampus
7 replies