We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c74293b commit 6559eafCopy full SHA for 6559eaf
src/worker.mjs
@@ -298,6 +298,9 @@ const transformMsg = async ({ role, content }) => {
298
throw new TypeError(`Unknown "content" item type: "${item.type}"`);
299
}
300
301
+ if (content.every(item => item.type === "image_url")) {
302
+ parts.push({ text: "" }); // to avoid "Unable to submit request because it must have a text parameter"
303
+ }
304
return { role, parts };
305
};
306
0 commit comments