From 5ee0a6ec300d7d0d0344f1660ee83adb2d88f871 Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Wed, 30 Oct 2024 01:50:31 +0200 Subject: [PATCH] Support unlocked context size --- public/scripts/openai.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/public/scripts/openai.js b/public/scripts/openai.js index cd76fc117..66e386d46 100644 --- a/public/scripts/openai.js +++ b/public/scripts/openai.js @@ -4324,6 +4324,14 @@ async function onModelChange() { $('#temp_openai').attr('max', oai_max_temp).val(oai_settings.temp_openai).trigger('input'); } + if (oai_settings.chat_completion_source === chat_completion_sources.NANOGPT) { + if (oai_settings.max_context_unlocked) { + $('#openai_max_context').attr('max', unlocked_max); + } else { + $('#openai_max_context').attr('max', max_128k); + } + } + if (oai_settings.chat_completion_source === chat_completion_sources.COHERE) { oai_settings.pres_pen_openai = Math.min(Math.max(0, oai_settings.pres_pen_openai), 1); $('#pres_pen_openai').attr('max', 1).attr('min', 0).val(oai_settings.pres_pen_openai).trigger('input');