From 2a8f3e7334194f0d5fcafbdea05dfccb672be58c Mon Sep 17 00:00:00 2001 From: Cohee Date: Wed, 5 Jul 2023 23:42:29 +0300 Subject: [PATCH] Unlocked context for Scale --- public/scripts/openai.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/public/scripts/openai.js b/public/scripts/openai.js index 937d622ec..cd0d9c87a 100644 --- a/public/scripts/openai.js +++ b/public/scripts/openai.js @@ -1626,7 +1626,11 @@ async function onModelChange() { } if (oai_settings.chat_completion_source == chat_completion_sources.SCALE) { - $('#openai_max_context').attr('max', scale_max); + if (oai_settings.max_context_unlocked) { + $('#openai_max_context').attr('max', unlocked_max); + } else { + $('#openai_max_context').attr('max', scale_max); + } oai_settings.openai_max_context = Math.min(Number($('#openai_max_context').attr('max')), oai_settings.openai_max_context); $('#openai_max_context').val(oai_settings.openai_max_context).trigger('input'); }