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');