ultra re-addition (just in case), fixed system prompt line

This commit is contained in:
Succubyss 2024-08-02 15:26:15 -05:00
parent 7e8b7e128e
commit 366070adee
3 changed files with 7 additions and 2 deletions

View File

@ -2810,6 +2810,8 @@
<option value="gemini-pro-vision">Gemini Pro Vision (1.0)</option>
<option value="text-bison-001">PaLM 2 (Legacy)</option>
<option value="chat-bison-001">PaLM 2 Chat (Legacy)</option>
<option value="gemini-ultra">Gemini Ultra (1.0)</option>
<option value="gemini-1.0-ultra-latest">Gemini 1.0 Ultra</option>
</optgroup>
<optgroup label="Subversions">
<option value="gemini-1.5-pro-exp-0801">Gemini 1.5 Pro Experiment 2024-08-01</option>

View File

@ -4068,10 +4068,13 @@ async function onModelChange() {
$('#openai_max_context').attr('max', max_32k);
} else if (value === 'text-bison-001') {
$('#openai_max_context').attr('max', max_8k);
// The ultra endpoints are possibly dead:
} else if (value.includes('gemini-1.0-ultra') || value === 'gemini-ultra') {
$('#openai_max_context').attr('max', max_32k);
} else {
$('#openai_max_context').attr('max', max_4k);
}
let makersuite_max_temp = value.includes('vision') ? 1.0 : 2.0;
let makersuite_max_temp = (value.includes('vision') || value.includes('ultra')) ? 1.0 : 2.0;
oai_settings.temp_openai = Math.min(makersuite_max_temp, oai_settings.temp_openai);
$('#temp_openai').attr('max', makersuite_max_temp).val(oai_settings.temp_openai).trigger('input');
oai_settings.openai_max_context = Math.min(Number($('#openai_max_context').attr('max')), oai_settings.openai_max_context);

View File

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