-
-
Notifications
You must be signed in to change notification settings - Fork 188
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
chat with image_url bug #176
Comments
i changed \lib\src\core\models\chat\sub_models\choices\sub_models\sub_models\content.dart |
Any update under this issue? |
The latest version 5.1.0 still has this issue. When is the next version expected to be updated? |
I have met this issue when I use model 'gpt-4o'. |
any update on this issue? Seems like the changes from pr 166 didn't make it to the released version |
please @anasfik release this to pub.dev |
For anyone needing encountering this problem, the temporary fix is to fork the package and then apply this fix Link. Has to be done sadly. |
This temprorary fix now not working for anyone who intersted in it. It return error 404 and error message "The model |
Updated my reply |
Is there any solution for this issue ? |
I migrated to https://pub.dev/packages/openai_dart |
How is this not fixed yet, the fix is simple? Also they deprecated the working model |
this is sample format from Openai Docs
messages=[
{
"role": "user",
"content": [
{"type": "text", "text": "What’s in this image?"},
{
"type": "image_url",
"image_url": {
"url": "https://placehold.co/600x400",
},
},
],
}
],
is sample must be
{"type": "imageurl" , "image_url" : { "url": " "https://placehold.co/600x400"}
but dart_openai generates
{"type":"image_url","image_url":"https://placehold.co/600x400"}
so OpenAI api says error
Unhandled Exception: RequestFailedException(message: Invalid type for 'messages[2].content[1].image_url': expected an object, but got a string instead., statusCode: 400
dart_openai version is 5.1.0
The text was updated successfully, but these errors were encountered: