| 4416 | 4449 | } |
| 4417 | 4450 | |
| 4418 | 4451 | if (oai_settings.chat_completion_source == chat_completion_sources.GROQ) { |
| 4419 | | - if (oai_settings.max_context_unlocked) { |
| 4452 | + const maxContext = getGroqMaxContext(oai_settings.groq_model, oai_settings.max_context_unlocked); |
| 4420 | 4453 | $('#openai_max_context').attr('max', unlocked_maxmaxContext); |
| 4421 | | - } else if (oai_settings.groq_model.includes('gemma2-9b-it')) { |
| 4422 | | - $('#openai_max_context').attr('max', max_8k); |
| 4423 | | - } else if (oai_settings.groq_model.includes('llama-3.3-70b-versatile')) { |
| 4424 | | - $('#openai_max_context').attr('max', max_128k); |
| 4425 | | - } else if (oai_settings.groq_model.includes('llama-3.1-8b-instant')) { |
| 4426 | | - $('#openai_max_context').attr('max', max_128k); |
| 4427 | | - } else if (oai_settings.groq_model.includes('llama3-70b-8192')) { |
| 4428 | | - $('#openai_max_context').attr('max', max_8k); |
| 4429 | | - } else if (oai_settings.groq_model.includes('llama3-8b-8192')) { |
| 4430 | | - $('#openai_max_context').attr('max', max_8k); |
| 4431 | | - } else if (oai_settings.groq_model.includes('mixtral-8x7b-32768')) { |
| 4432 | | - $('#openai_max_context').attr('max', max_32k); |
| 4433 | | - } else if (oai_settings.groq_model.includes('deepseek-r1-distill-llama-70b')) { |
| 4434 | | - $('#openai_max_context').attr('max', max_128k); |
| 4435 | | - } else if (oai_settings.groq_model.includes('llama-3.3-70b-specdec')) { |
| 4436 | | - $('#openai_max_context').attr('max', max_8k); |
| 4437 | | - } else if (oai_settings.groq_model.includes('llama-3.2-1b-preview')) { |
| 4438 | | - $('#openai_max_context').attr('max', max_128k); |
| 4439 | | - } else if (oai_settings.groq_model.includes('llama-3.2-3b-preview')) { |
| 4440 | | - $('#openai_max_context').attr('max', max_128k); |
| 4441 | | - } else if (oai_settings.groq_model.includes('llama-3.2-11b-vision-preview')) { |
| 4442 | | - $('#openai_max_context').attr('max', max_128k); |
| 4443 | | - } else if (oai_settings.groq_model.includes('llama-3.2-90b-vision-preview')) { |
| 4444 | | - $('#openai_max_context').attr('max', max_128k); |
| 4445 | | - } |
| 4446 | 4454 | oai_settings.openai_max_context = Math.min(Number($('#openai_max_context').attr('max')), oai_settings.openai_max_context); |
| 4447 | 4455 | $('#openai_max_context').val(oai_settings.openai_max_context).trigger('input'); |
| 4448 | 4456 | oai_settings.temp_openai = Math.min(oai_max_temp, oai_settings.temp_openai); |