Skip to content
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

imageUrl Doesn't Work #152

Closed
marc-wilson opened this issue Feb 1, 2024 · 3 comments
Closed

imageUrl Doesn't Work #152

marc-wilson opened this issue Feb 1, 2024 · 3 comments

Comments

@marc-wilson
Copy link

OpenAIChatCompletionChoiceMessageContentItemModel.imageUrl(<url>) does not work. Always throughs an 'invalid message content, see platform docs' message.

#144 seems like it may fix it.

@anasfik
Copy link
Owner

anasfik commented Feb 21, 2024

Thank you mentioning this, it is fixed.

@anasfik anasfik closed this as completed Feb 21, 2024
@RafaelFleury
Copy link

It still doenst work. But theres another error now. I tried even using te example code of the README.md

it returns this error:
[OpenAI] an error occurred, throwing exception: RequestFailedException(message: Invalid type for 'messages[0].content[1].image_url': expected an object, but got a string instead., statusCode: 400)

thats it or im making some pretty rookie mistake

@marc-wilson
Copy link
Author

marc-wilson commented Apr 16, 2024

@RafaelFleury FWIW this library is kind of pointless if you're familiar with Open API/Swagger. OpenAI provides an Open API spec so you can just generate a dart client from that.

The only downside is that in order for it to be generated with dart 3, we need this PR to be merged: OpenAPITools/openapi-generator#18001

I ended up just creating a node api using the open ai client on npm. Might leverage the generated client when the open api dart 3 generator is supported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants