Default HARM_CATEGORY_CIVIC_INTEGRITY to OFF All models support either all BLOCK_NONE, or all OFF.

340be02777311339d95caeea3d7a3a7247908dd2

cloak1505 <170299980+cloak1505@users.noreply.github.com>

2 files changed, +1 -6Showing whitespace changes
src/constants.js+1 -1
@@ -156,7 +156,7 @@ export const GEMINI_SAFETY = [
156156 },
157157 {
158158 category: 'HARM_CATEGORY_CIVIC_INTEGRITY',
159159 threshold: 'BLOCK_NONEOFF',
160160 },
161161];
162162
src/endpoints/backends/chat-completions.js+0 -5
@@ -387,11 +387,6 @@ async function sendMakerSuiteRequest(request, response) {
387387 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)) {
388388 safetySettings = GEMINI_SAFETY.map(setting => ({ ...setting, threshold: 'BLOCK_NONE' }));
389389 }
390- // Interestingly, Gemini 2.0 Flash does support setting the threshold for HARM_CATEGORY_CIVIC_INTEGRITY to OFF.
391- 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)) {
392- safetySettings = GEMINI_SAFETY.map(setting => ({ ...setting, threshold: 'OFF' }));
393- }
394- // Most of the other models allow for setting the threshold of filters, except for HARM_CATEGORY_CIVIC_INTEGRITY, to OFF.
395390
396391 if (enableWebSearch && !useMultiModal && !isGemma && !isLearnLM && !model.includes('gemini-2.0-flash-lite')) {
397392 const searchTool = model.includes('1.5') || model.includes('1.0')