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

fix(model): image_url changed to object from string as specified in OpenAI API spec #198

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

MbBrainz
Copy link

I noticed the request Exception below and went searching.

As discussed in the openai community forum here The image_url should be an object and not a string. In the current implementation, the image_url will be set as a string and this will always result in the following response from the openai api:

RequestFailedException(message: Invalid type for 'messages[1].content[0].image_url': expected an object, but got a string instead

In the forum discussion, it is mentioned that the api specs were outdated, but its not anymore as specified under the image tab at the openai chat completion api spec

@MbBrainz
Copy link
Author

@anasfik @signmotion

@MbBrainz
Copy link
Author

MbBrainz commented Oct 1, 2024

Fixes #191

@RuABraun
Copy link

RuABraun commented Dec 29, 2024

I think this also needs a change

The type needs to be "image_url". I found that to work and it also matches the docs

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

Successfully merging this pull request may close these issues.

3 participants