mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-31 22:26:06 +02:00
OpenAI: image support
This commit is contained in:
@@ -123,7 +123,12 @@ public class OpenAI {
|
||||
for (Content content : message.content) {
|
||||
JSONObject jcontent = new JSONObject();
|
||||
jcontent.put("type", content.type);
|
||||
jcontent.put(content.type, content.content);
|
||||
if (CONTENT_IMAGE.equals(content.type)) {
|
||||
JSONObject jimage = new JSONObject();
|
||||
jimage.put("url", content.content);
|
||||
jcontent.put(content.type, jimage);
|
||||
} else
|
||||
jcontent.put(content.type, content.content);
|
||||
jcontents.put(jcontent);
|
||||
}
|
||||
jmessage.put("content", jcontents);
|
||||
|
||||
Reference in New Issue
Block a user