From 085d852b5784aedeb2739b3f9c948b70c6c24664 Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Wed, 30 Oct 2024 01:52:53 +0200 Subject: [PATCH] Trigger inputs --- public/scripts/openai.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/public/scripts/openai.js b/public/scripts/openai.js index 66e386d46..3d1ddf464 100644 --- a/public/scripts/openai.js +++ b/public/scripts/openai.js @@ -4330,6 +4330,10 @@ async function onModelChange() { } else { $('#openai_max_context').attr('max', max_128k); } + + 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'); + $('#temp_openai').attr('max', oai_max_temp).val(oai_settings.temp_openai).trigger('input'); } if (oai_settings.chat_completion_source === chat_completion_sources.COHERE) {