Support unlocked context size

5ee0a6ec300d7d0d0344f1660ee83adb2d88f871

Cohee <18619528+Cohee1207@users.noreply.github.com>

1 files changed, +8 -0Showing whitespace changes
public/scripts/openai.js+8 -0
@@ -4324,6 +4324,14 @@ async function onModelChange() {
4324 $('#temp_openai').attr('max', oai_max_temp).val(oai_settings.temp_openai).trigger('input');4324 $('#temp_openai').attr('max', oai_max_temp).val(oai_settings.temp_openai).trigger('input');
4325 }4325 }
43264326
4327 if (oai_settings.chat_completion_source === chat_completion_sources.NANOGPT) {
4328 if (oai_settings.max_context_unlocked) {
4329 $('#openai_max_context').attr('max', unlocked_max);
4330 } else {
4331 $('#openai_max_context').attr('max', max_128k);
4332 }
4333 }
4334
4327 if (oai_settings.chat_completion_source === chat_completion_sources.COHERE) {4335 if (oai_settings.chat_completion_source === chat_completion_sources.COHERE) {
4328 oai_settings.pres_pen_openai = Math.min(Math.max(0, oai_settings.pres_pen_openai), 1);4336 oai_settings.pres_pen_openai = Math.min(Math.max(0, oai_settings.pres_pen_openai), 1);
4329 $('#pres_pen_openai').attr('max', 1).attr('min', 0).val(oai_settings.pres_pen_openai).trigger('input');4337 $('#pres_pen_openai').attr('max', 1).attr('min', 0).val(oai_settings.pres_pen_openai).trigger('input');