mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-02-18 21:20:39 +01:00
Merge pull request #3439 from sirius422/fix-old-gemini-models
fix: adjust safetySettings handling for legacy Gemini models
This commit is contained in:
commit
0bcf8b5d21
@ -318,7 +318,7 @@ async function sendMakerSuiteRequest(request, response) {
|
||||
let safetySettings = GEMINI_SAFETY;
|
||||
|
||||
// These old models do not support setting the threshold to OFF at all.
|
||||
if (['gemini-1.5-pro-001', 'gemini-1.5-flash-001', 'gemini-1.0-pro-001'].includes(model)) {
|
||||
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', 'gemini-pro', 'gemini-1.0-pro', 'gemini-1.0-pro-001'].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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user