Add Mistral Nemo

This commit is contained in:
kwaroran
2024-08-05 17:39:28 +09:00
parent e521a1b366
commit 6eb6743fb2
2 changed files with 9 additions and 4 deletions

View File

@@ -93,9 +93,12 @@
<button class="hover:bg-selected px-6 py-2 text-lg" on:click={() => {changeModel('mancer')}}>Mancer</button>
<button class="hover:bg-selected px-6 py-2 text-lg" on:click={() => {changeModel('openrouter')}}>OpenRouter</button>
<Arcodion name="Mistral API">
<button class="hover:bg-selected px-6 py-2 text-lg" on:click={() => {changeModel('mistral-small-latest')}}>Mistral Small</button>
<button class="hover:bg-selected px-6 py-2 text-lg" on:click={() => {changeModel('mistral-medium-latest')}}>Mistral Medium</button>
<button class="hover:bg-selected px-6 py-2 text-lg" on:click={() => {changeModel('mistral-large-latest')}}>Mistral Medium</button>
{#if showUnrec}
<button class="hover:bg-selected px-6 py-2 text-lg" on:click={() => {changeModel('mistral-small-latest')}}>Mistral Small</button>
<button class="hover:bg-selected px-6 py-2 text-lg" on:click={() => {changeModel('mistral-medium-latest')}}>Mistral Medium</button>
{/if}
<button class="hover:bg-selected px-6 py-2 text-lg" on:click={() => {changeModel('open-mistral-nemo')}}>Mistral Nemo</button>
<button class="hover:bg-selected px-6 py-2 text-lg" on:click={() => {changeModel('mistral-large-latest')}}>Mistral Large</button>
</Arcodion>
<Arcodion name="Google Gemini">
<button class="hover:bg-selected px-6 py-2 text-lg" on:click={() => {changeModel('gemini-1.5-pro-latest')}}>Gemini Pro 1.5</button>

View File

@@ -171,6 +171,7 @@ export async function requestChatDataMain(arg:requestDataArgument, model:'model'
case 'mistral-small-latest':
case 'mistral-medium-latest':
case 'mistral-large-latest':
case 'open-mistral-nemo':
case 'gpt4_turbo_20240409':
case 'gpt4_turbo':
case 'gpt4o':
@@ -295,7 +296,7 @@ export async function requestChatDataMain(arg:requestDataArgument, model:'model'
}
console.log(formatedChat)
if(aiModel.startsWith('mistral')){
if(aiModel.startsWith('mistral') || aiModel === 'open-mistral-nemo'){
requestModel = aiModel
let reformatedChat:OpenAIChatExtra[] = []
@@ -355,6 +356,7 @@ export async function requestChatDataMain(arg:requestDataArgument, model:'model'
temperature: temperature,
max_tokens: maxTokens,
top_p: db.top_p,
safe_prompt: false
},
headers: {
"Authorization": "Bearer " + db.mistralKey,