diff --git a/public/index.html b/public/index.html index c26d7faf8..6aca42f15 100644 --- a/public/index.html +++ b/public/index.html @@ -1563,6 +1563,7 @@ + diff --git a/public/scripts/openai.js b/public/scripts/openai.js index 98fc20608..e48debf82 100644 --- a/public/scripts/openai.js +++ b/public/scripts/openai.js @@ -1611,7 +1611,7 @@ async function onModelChange() { if (oai_settings.chat_completion_source == chat_completion_sources.WINDOWAI) { if (value == '' && 'ai' in window) { - value = await window.ai.getCurrentModel(); + value = (await window.ai.getCurrentModel()) || ''; } if (oai_settings.max_context_unlocked) { @@ -1629,6 +1629,9 @@ async function onModelChange() { else if (value.includes('gpt-3.5')) { $('#openai_max_context').attr('max', gpt3_max); } + else if (value.includes('gpt-4-32k')) { + $('#openai_max_context').attr('max', gpt4_32k_max); + } else if (value.includes('gpt-4')) { $('#openai_max_context').attr('max', gpt4_max); }