anasfik / openai

Dart/Flutter SDK for ChatGPT and all OpenAI APIs (GPT, Dall-e..)
https://pub.dev/packages/dart_openai
MIT License
591 stars 184 forks source link

(dart_openai 5.1.0) Broken `OpenAIChatCompletionChoiceMessageContentItemModel.imageUrl` #191

Open gmpassos opened 3 months ago

gmpassos commented 3 months ago

The latest published version (dart_openai: 5.1.0) is incompatible with the API due to an invalid JSON payload for a chat completion message with content of type "image_url".

It appears that this bug has already been fixed in the current main branch: https://github.com/anasfik/openai/blob/650ffbf93961962fec1554ba817c07d9700e2002/lib/src/core/models/chat/sub_models/choices/sub_models/sub_models/content.dart#L74

Could you please publish a new version? Best regards.

If you need any help with this package, let me know.

gmpassos commented 3 months ago

FYI @anasfik

Intelliabb commented 2 months ago

Yup. Same issue. When are you planning on pushing this fix out?

Muzammil-Bit commented 2 months ago

Any update on this or work around?

franboladoruiz commented 2 months ago

Use openai_dart package instead. It's aligned with the latest OpenAI API.

gmpassos commented 2 months ago

@anasfik any update?

MbBrainz commented 1 month ago

Ive created a fix and pr for this here: https://github.com/anasfik/openai/pull/198

MbBrainz commented 1 month ago

I think you guys should depricate this package in favor of this @franboladoruiz @franboladoruiz

Use openai_dart package instead. It's aligned with the latest OpenAI API.

franboladoruiz commented 1 month ago

I am not sure why OpenAI only lists the dart_openai package in their Community Libraries section. I guess a lot of people like me start using dart_openai because of this, only to find out later that it's not aligned with the latest API, and then have to migrate the integration to openai_dart.

hukumsingh87 commented 1 month ago

https://github.com/anasfik/openai/pull/198 is correct fix. @anasfik you should merge it and release it as new version.