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 critical issue: parsing messages with image_url #477

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

Conversation

dpetrovaliev
Copy link

What:

  • Bug Fix
  • New Feature

Description:

I've experienced issue while using the #openai-php/laravel repo which depends on this repo.
The issue was related to messages with content type image_url instead of image_file. Parsing this type of file within the current structure of the project is wrong. I assume it's copy/paste issue because the structure of the classes that parse image_file response was the same as these for image_url response.

With the current PR I'm solving this issue.

Here is the API reference:
https://platform.openai.com/docs/api-reference/messages/createMessage#messages-createmessage-content

Related:

#456
openai-php/laravel#107
openai-php/laravel#116

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