Closed mpdifran closed 2 weeks ago
This updates the chat message to allow including image content with text, as per OpenAI documentation.
If there's only 1 content, and it's a text, the chat message will be encoded as so:
{ "role": "user", "content": "The text." }
If there's multiple contents in a message, it will be encoded like so:
{ "role": "user", "content": [ { "type": "text", "text": "The text." }, { "type": "image_url", "image_url": { "url": "https://image.com/my-image.jpg" } } ] }
This updates the chat message to allow including image content with text, as per OpenAI documentation.
If there's only 1 content, and it's a text, the chat message will be encoded as so:
If there's multiple contents in a message, it will be encoded like so: