Merge pull request #2600 from Succubyss/gemini-1.5-pro-exp-0801

This commit is contained in:
Cohee
2024-08-02 21:39:19 +03:00
committed by GitHub
5 changed files with 15 additions and 2 deletions

View File

@ -271,7 +271,7 @@ async function sendMakerSuiteRequest(request, response) {
};
function getGeminiBody() {
const should_use_system_prompt = ['gemini-1.5-flash-latest', 'gemini-1.5-pro-latest'].includes(model) && request.body.use_makersuite_sysprompt;
const should_use_system_prompt = ['gemini-1.5-flash', 'gemini-1.5-pro'].includes(model) && 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 = {
contents: prompt.contents,

View File

@ -264,8 +264,13 @@ function convertGooglePrompt(messages, model, useSysPrompt = false, charName = '
const PNG_PIXEL = 'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=';
const visionSupportedModels = [
'gemini-1.5-flash',
'gemini-1.5-flash-latest',
'gemini-1.5-flash-001',
'gemini-1.5-pro',
'gemini-1.5-pro-latest',
'gemini-1.5-pro-001',
'gemini-1.5-pro-exp-0801',
'gemini-1.0-pro-vision-latest',
'gemini-pro-vision',
];