| 4403 | if (oai_settings.chat_completion_source == chat_completion_sources.GROQ) { | 4403 | if (oai_settings.chat_completion_source == chat_completion_sources.GROQ) { |
| 4404 | if (oai_settings.max_context_unlocked) { | 4404 | if (oai_settings.max_context_unlocked) { |
| 4405 | $('#openai_max_context').attr('max', unlocked_max); | 4405 | $('#openai_max_context').attr('max', unlocked_max); |
| 4406 | } | 4406 | } else if (oai_settings.groq_model.includes('gemma2-9b-it')) { |
| 4407 | else if (oai_settings.groq_model.includes('llama-3.2') && oai_settings.groq_model.includes('-preview')) { | | |
| 4408 | $('#openai_max_context').attr('max', max_8k); | 4407 | $('#openai_max_context').attr('max', max_8k); |
| 4409 | } | 4408 | } else if (oai_settings.groq_model.includes('llama-3.3-70b-versatile')) { |
| 4410 | else if (oai_settings.groq_model.includes('llama-3.3') || oai_settings.groq_model.includes('llama-3.2') || oai_settings.groq_model.includes('llama-3.1')) { | | |
| 4411 | $('#openai_max_context').attr('max', max_128k); | 4409 | $('#openai_max_context').attr('max', max_128k); |
| 4412 | } | 4410 | } else if (oai_settings.groq_model.includes('llama-3.1-8b-instant')) { |
| 4413 | else if (oai_settings.groq_model.includes('llama3-groq')) { | 4411 | $('#openai_max_context').attr('max', max_128k); |
| | 4412 | } else if (oai_settings.groq_model.includes('llama3-70b-8192')) { |
| 4414 | $('#openai_max_context').attr('max', max_8k); | 4413 | $('#openai_max_context').attr('max', max_8k); |
| 4415 | } | 4414 | } else if (oai_settings.groq_model.includes('llama3-8b-8192')) { |
| 4416 | else if (['llama3-8b-8192', 'llama3-70b-8192', 'gemma-7b-it', 'gemma2-9b-it'].includes(oai_settings.groq_model)) { | | |
| 4417 | $('#openai_max_context').attr('max', max_8k); | 4415 | $('#openai_max_context').attr('max', max_8k); |
| 4418 | } | 4416 | } else if (oai_settings.groq_model.includes('mixtral-8x7b-32768')) { |
| 4419 | else if (['mixtral-8x7b-32768'].includes(oai_settings.groq_model)) { | | |
| 4420 | $('#openai_max_context').attr('max', max_32k); | 4417 | $('#openai_max_context').attr('max', max_32k); |
| 4421 | } | 4418 | } else if (oai_settings.groq_model.includes('deepseek-r1-distill-llama-70b')) { |
| 4422 | else { | 4419 | $('#openai_max_context').attr('max', max_128k); |
| 4423 | $('#openai_max_context').attr('max', max_4k); | 4420 | } else if (oai_settings.groq_model.includes('llama-3.3-70b-specdec')) { |
| | 4421 | $('#openai_max_context').attr('max', max_8k); |
| | 4422 | } else if (oai_settings.groq_model.includes('llama-3.2-1b-preview')) { |
| | 4423 | $('#openai_max_context').attr('max', max_128k); |
| | 4424 | } else if (oai_settings.groq_model.includes('llama-3.2-3b-preview')) { |
| | 4425 | $('#openai_max_context').attr('max', max_128k); |
| | 4426 | } else if (oai_settings.groq_model.includes('llama-3.2-11b-vision-preview')) { |
| | 4427 | $('#openai_max_context').attr('max', max_128k); |
| | 4428 | } else if (oai_settings.groq_model.includes('llama-3.2-90b-vision-preview')) { |
| | 4429 | $('#openai_max_context').attr('max', max_128k); |
| 4424 | } | 4430 | } |
| 4425 | oai_settings.openai_max_context = Math.min(Number($('#openai_max_context').attr('max')), oai_settings.openai_max_context); | 4431 | oai_settings.openai_max_context = Math.min(Number($('#openai_max_context').attr('max')), oai_settings.openai_max_context); |
| 4426 | $('#openai_max_context').val(oai_settings.openai_max_context).trigger('input'); | 4432 | $('#openai_max_context').val(oai_settings.openai_max_context).trigger('input'); |