| 4330 | 4330 | } else { |
| 4331 | 4331 | $('#openai_max_context').attr('max', max_128k); |
| 4332 | 4332 | } |
| 4333 | + |
| 4334 | + oai_settings.openai_max_context = Math.min(Number($('#openai_max_context').attr('max')), oai_settings.openai_max_context); |
| 4335 | + $('#openai_max_context').val(oai_settings.openai_max_context).trigger('input'); |
| 4336 | + $('#temp_openai').attr('max', oai_max_temp).val(oai_settings.temp_openai).trigger('input'); |
| 4333 | 4337 | } |
| 4334 | 4338 | |
| 4335 | 4339 | if (oai_settings.chat_completion_source === chat_completion_sources.COHERE) { |