mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Try to fix Gemini requiring stop strings.
This commit is contained in:
@@ -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 = {
|
||||
|
Reference in New Issue
Block a user