Update Perplexity models
This commit is contained in:
parent
11608e0cb8
commit
101616c422
|
@ -2895,6 +2895,16 @@
|
|||
<h4 data-i18n="Perplexity Model">Perplexity Model</h4>
|
||||
<select id="model_perplexity_select">
|
||||
<optgroup label="Perplexity Models">
|
||||
<option value="llama-3.1-sonar-small-128k-online">llama-3.1-sonar-small-128k-online</option>
|
||||
<option value="llama-3.1-sonar-small-128k-chat">llama-3.1-sonar-small-128k-chat</option>
|
||||
<option value="llama-3.1-sonar-large-128k-online">llama-3.1-sonar-large-128k-online</option>
|
||||
<option value="llama-3.1-sonar-large-128k-chat">llama-3.1-sonar-large-128k-chat</option>
|
||||
</optgroup>
|
||||
<optgroup label="Open-Source Models">
|
||||
<option value="llama-3.1-8b-instruct">llama-3.1-8b-instruct</option>
|
||||
<option value="llama-3.1-70b-instruct">llama-3.1-70b-instruct</option>
|
||||
</optgroup>
|
||||
<optgroup label="Deprecated Models">
|
||||
<option value="llama-3-sonar-small-32k-chat">llama-3-sonar-small-32k-chat</option>
|
||||
<option value="llama-3-sonar-small-32k-online">llama-3-sonar-small-32k-online</option>
|
||||
<option value="llama-3-sonar-large-32k-chat">llama-3-sonar-large-32k-chat</option>
|
||||
|
@ -2903,8 +2913,6 @@
|
|||
<option value="sonar-small-online">sonar-small-online</option>
|
||||
<option value="sonar-medium-chat">sonar-medium-chat</option>
|
||||
<option value="sonar-medium-online">sonar-medium-online</option>
|
||||
</optgroup>
|
||||
<optgroup label="Open-Source Models">
|
||||
<option value="llama-3-8b-instruct">llama-3-8b-instruct</option>
|
||||
<option value="llama-3-70b-instruct">llama-3-70b-instruct</option>
|
||||
<option value="mistral-7b-instruct">mistral-7b-instruct (v0.2)</option>
|
||||
|
|
|
@ -264,7 +264,7 @@ const default_settings = {
|
|||
ai21_model: 'j2-ultra',
|
||||
mistralai_model: 'mistral-medium-latest',
|
||||
cohere_model: 'command-r',
|
||||
perplexity_model: 'llama-3-70b-instruct',
|
||||
perplexity_model: 'llama-3.1-70b-instruct',
|
||||
groq_model: 'llama3-70b-8192',
|
||||
zerooneai_model: 'yi-large',
|
||||
custom_model: '',
|
||||
|
@ -344,7 +344,7 @@ const oai_settings = {
|
|||
ai21_model: 'j2-ultra',
|
||||
mistralai_model: 'mistral-medium-latest',
|
||||
cohere_model: 'command-r',
|
||||
perplexity_model: 'llama-3-70b-instruct',
|
||||
perplexity_model: 'llama-3.1-70b-instruct',
|
||||
groq_model: 'llama3-70b-8192',
|
||||
zerooneai_model: 'yi-large',
|
||||
custom_model: '',
|
||||
|
@ -4201,6 +4201,11 @@ async function onModelChange() {
|
|||
if (oai_settings.max_context_unlocked) {
|
||||
$('#openai_max_context').attr('max', unlocked_max);
|
||||
}
|
||||
else if (oai_settings.perplexity_model.includes('llama-3.1')) {
|
||||
const isOnline = oai_settings.perplexity_model.includes('online');
|
||||
const contextSize = isOnline ? 128 * 1024 - 4000 : 128 * 1024;
|
||||
$('#openai_max_context').attr('max', contextSize);
|
||||
}
|
||||
else if (['llama-3-sonar-small-32k-chat', 'llama-3-sonar-large-32k-chat'].includes(oai_settings.perplexity_model)) {
|
||||
$('#openai_max_context').attr('max', max_32k);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue