When constructing a message using the OpenAIChatCompletionChoiceMessageContentItemModel.imageUrl constructor the JSON is built wrong. Image Requests require a JSON object for imageUrl not a String.
The JSON should have this format: imageUrl: {url: 'imageUrl'} not imageUrl: 'imageUrl'.
I guess there might be an existing solution/workaround for this, or they changed the API syntax, but this is the solution that worked for me.
When constructing a message using the
OpenAIChatCompletionChoiceMessageContentItemModel.imageUrl
constructor the JSON is built wrong. Image Requests require a JSON object for imageUrl not a String.The JSON should have this format:
imageUrl: {url: 'imageUrl'}
notimageUrl: 'imageUrl'
.I guess there might be an existing solution/workaround for this, or they changed the API syntax, but this is the solution that worked for me.