client
client copied to clipboard
fix critical issue: parsing messages with image_url
What:
- [x] 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:
https://github.com/openai-php/client/issues/456 https://github.com/openai-php/laravel/issues/107 https://github.com/openai-php/laravel/issues/116