gemini-2.0-flash-exp-image-generation

This commit is contained in:
Cohee
2025-03-15 14:58:06 +02:00
parent aa94774963
commit 0c7d5c76e2
5 changed files with 6 additions and 2 deletions

View File

@@ -358,7 +358,7 @@ async function sendMakerSuiteRequest(request, response) {
delete generationConfig.stopSequences;
}
const useMultiModal = requestImages && (model.includes('gemini-2.0-flash-exp'));
const useMultiModal = requestImages && ['gemini-2.0-flash-exp', 'gemini-2.0-flash-exp-image-generation'].includes(model);
if (useMultiModal) {
generationConfig.responseModalities = ['text', 'image'];
}
@@ -381,7 +381,7 @@ async function sendMakerSuiteRequest(request, response) {
safetySettings = GEMINI_SAFETY.map(setting => ({ ...setting, threshold: 'BLOCK_NONE' }));
}
// Interestingly, Gemini 2.0 Flash does support setting the threshold for HARM_CATEGORY_CIVIC_INTEGRITY to OFF.
else if (['gemini-2.0-flash', 'gemini-2.0-flash-001', 'gemini-2.0-flash-exp'].includes(model)) {
else if (['gemini-2.0-flash', 'gemini-2.0-flash-001', 'gemini-2.0-flash-exp', 'gemini-2.0-flash-exp-image-generation'].includes(model)) {
safetySettings = GEMINI_SAFETY.map(setting => ({ ...setting, threshold: 'OFF' }));
}
// Most of the other models allow for setting the threshold of filters, except for HARM_CATEGORY_CIVIC_INTEGRITY, to OFF.

View File

@@ -370,6 +370,7 @@ export function convertGooglePrompt(messages, model, useSysPrompt, names) {
'gemini-2.0-flash-thinking-exp-01-21',
'gemini-2.0-flash-thinking-exp-1219',
'gemini-2.0-flash-exp',
'gemini-2.0-flash-exp-image-generation',
'gemini-1.5-flash',
'gemini-1.5-flash-latest',
'gemini-1.5-flash-001',