From 0017358f8b6de330b88e0b23e4731bcb3249285a Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Fri, 14 Mar 2025 20:15:04 +0200 Subject: [PATCH] Gemini inline images (#3681) * Gemini images for non-streaming * Parse images on stream * Add toggle for image request * Add extraction params to extractImageFromData * Add explicit break and return * Add more JSdoc to processImageAttachment * Add file name prefix * Add object argument for saveReply * Add defaults to saveReply params * Use type for saveReply result * Change type check in saveReply backward compat --- public/index.html | 17 +++ public/script.js | 114 +++++++++++++++++++-- public/scripts/openai.js | 18 +++- public/scripts/sse-stream.js | 3 +- src/endpoints/backends/chat-completions.js | 19 ++-- 5 files changed, 155 insertions(+), 16 deletions(-) diff --git a/public/index.html b/public/index.html index 63caa13df..9a9379569 100644 --- a/public/index.html +++ b/public/index.html @@ -1997,6 +1997,23 @@ +
+ +
+ + Allows the model to return image attachments. + + + Incompatible with the following features: function calling, web search, system prompt. + +
+