mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-02-23 07:27:41 +01:00
Merge pull request #3271 from tincansimagine/geminifeat2
Fix: Ensure "OFF" safety settings are applied to gemini-2.0-flash-exp for unfiltered responses
This commit is contained in:
commit
f91e1b3d2f
@ -308,9 +308,15 @@ async function sendMakerSuiteRequest(request, response) {
|
||||
) && request.body.use_makersuite_sysprompt;
|
||||
|
||||
const prompt = convertGooglePrompt(request.body.messages, model, should_use_system_prompt, getPromptNames(request));
|
||||
let safetySettings = GEMINI_SAFETY;
|
||||
|
||||
if (model.includes('gemini-2.0-flash-exp')) {
|
||||
safetySettings = GEMINI_SAFETY.map(setting => ({ ...setting, threshold: 'OFF' }));
|
||||
}
|
||||
|
||||
let body = {
|
||||
contents: prompt.contents,
|
||||
safetySettings: GEMINI_SAFETY,
|
||||
safetySettings: safetySettings,
|
||||
generationConfig: generationConfig,
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user