diff --git a/src/constants.js b/src/constants.js index 64b9330b2..3b18e732f 100644 --- a/src/constants.js +++ b/src/constants.js @@ -156,7 +156,7 @@ export const GEMINI_SAFETY = [ }, { category: 'HARM_CATEGORY_CIVIC_INTEGRITY', - threshold: 'BLOCK_NONE', + threshold: 'OFF', }, ]; diff --git a/src/endpoints/backends/chat-completions.js b/src/endpoints/backends/chat-completions.js index 4680a20df..4809ae8ac 100644 --- a/src/endpoints/backends/chat-completions.js +++ b/src/endpoints/backends/chat-completions.js @@ -387,11 +387,6 @@ async function sendMakerSuiteRequest(request, response) { if (['gemini-1.5-pro-001', 'gemini-1.5-flash-001', 'gemini-1.5-flash-8b-exp-0827', 'gemini-1.5-flash-8b-exp-0924'].includes(model)) { 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', '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. if (enableWebSearch && !useMultiModal && !isGemma && !isLearnLM && !model.includes('gemini-2.0-flash-lite')) { const searchTool = model.includes('1.5') || model.includes('1.0')