mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
cleanup
This commit is contained in:
@@ -252,8 +252,8 @@ async function sendMakerSuiteRequest(request, response) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
function getGeminiBody() {
|
function getGeminiBody() {
|
||||||
let should_use_system_prompt = model === 'gemini-1.5-pro-latest' && request.body.use_makersuite_sysprompt;
|
const should_use_system_prompt = model === 'gemini-1.5-pro-latest' && request.body.use_makersuite_sysprompt;
|
||||||
let prompt = convertGooglePrompt(request.body.messages, model, should_use_system_prompt);
|
const prompt = convertGooglePrompt(request.body.messages, model, should_use_system_prompt);
|
||||||
let body = {
|
let body = {
|
||||||
contents: prompt.contents,
|
contents: prompt.contents,
|
||||||
safetySettings: GEMINI_SAFETY,
|
safetySettings: GEMINI_SAFETY,
|
||||||
|
@@ -276,7 +276,7 @@ function convertGooglePrompt(messages, model, useSysPrompt = false) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const system_instruction = { parts: { text: sys_prompt }};
|
const system_instruction = { parts: { text: sys_prompt.trim() }};
|
||||||
|
|
||||||
const contents = [];
|
const contents = [];
|
||||||
messages.forEach((message, index) => {
|
messages.forEach((message, index) => {
|
||||||
|
Reference in New Issue
Block a user