| 387 | 387 | 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)) { |
| 388 | 388 | safetySettings = GEMINI_SAFETY.map(setting => ({ ...setting, threshold: 'BLOCK_NONE' })); |
| 389 | 389 | } |
| 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. |
| 395 | 390 | |
| 396 | 391 | if (enableWebSearch && !useMultiModal && !isGemma && !isLearnLM && !model.includes('gemini-2.0-flash-lite')) { |
| 397 | 392 | const searchTool = model.includes('1.5') || model.includes('1.0') |