mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-02-03 12:47:35 +01:00
Try to fix Gemini requiring stop strings.
This commit is contained in:
parent
df3d7a048e
commit
8ee452993b
@ -257,6 +257,10 @@ async function sendMakerSuiteRequest(request, response) {
|
||||
};
|
||||
|
||||
function getGeminiBody() {
|
||||
if (!Array.isArray(generationConfig.stopSequences) || !generationConfig.stopSequences.length) {
|
||||
delete generationConfig.stopSequences;
|
||||
}
|
||||
|
||||
const should_use_system_prompt = (model.includes('gemini-1.5-flash') || model.includes('gemini-1.5-pro')) && request.body.use_makersuite_sysprompt;
|
||||
const prompt = convertGooglePrompt(request.body.messages, model, should_use_system_prompt, request.body.char_name, request.body.user_name);
|
||||
let body = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user