We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Use "assistants" for Assistants and Message files, "vision" for Assistants image file inputs,
The purpose documentation says "vision" is a valid purpose, but the spec does not include it:
openai-openapi/openapi.yaml
Line 8603 in 893ba52
The text was updated successfully, but these errors were encountered:
https://platform.openai.com/docs/api-reference/files/create
documentation clearly states
"vision" for Assistants image file inputs
https://platform.openai.com/docs/api-reference/files/object#files/object-purpose
documentation also states vision is an appropriate use for the 'purpose' enum.
vision
i'm under the assumption that my code (snippet below) should be working when using the vision purpose
const isImage = file.name.match(/\.(jpeg|jpg|webp|png)$/i); const filePurpose = isImage ? 'vision' : 'assistants'; const fileData = await openai.files.create({ file: fileObject, purpose: filePurpose });
but i get this error:
Error: 400 Files with extensions [.png] are not supported for retrieval. See https://platform.openai.com/docs/assistants/tools/file-search/supported-files.
should i be using urls rather than trying to push the file buffer like i would for any other file upload purpose?
Sorry, something went wrong.
Any update on this issue ?
I was having the same problem. The correct way to add an image to a thread is to add a message with a content type of image_file: https://platform.openai.com/docs/assistants/deep-dive#creating-image-input-content
image_file
No branches or pull requests
The purpose documentation says "vision" is a valid purpose, but the spec does not include it:
openai-openapi/openapi.yaml
Line 8603 in 893ba52
The text was updated successfully, but these errors were encountered: