[feat] add mistral support

This commit is contained in:
kwaroran
2023-12-13 12:33:58 +09:00
parent 0ab32455c3
commit 6f54c90187
6 changed files with 76 additions and 1 deletions

View File

@@ -134,6 +134,10 @@
<span class="text-textcolor">Claude {language.apiKey}</span>
<TextInput marginBottom={true} size={"sm"} placeholder="..." bind:value={$DataBase.claudeAPIKey}/>
{/if}
{#if $DataBase.aiModel.startsWith('mistral') || $DataBase.subModel.startsWith('mistral')}
<span class="text-textcolor">Mistral {language.apiKey}</span>
<TextInput marginBottom={true} size={"sm"} placeholder="..." bind:value={$DataBase.mistralKey}/>
{/if}
{#if $DataBase.aiModel === 'reverse_proxy' || $DataBase.subModel === 'reverse_proxy'}
<span class="text-textcolor mt-2">{language.forceReplaceUrl} URL <Help key="forceUrl"/></span>
<TextInput marginBottom={false} size={"sm"} bind:value={$DataBase.forceReplaceUrl} placeholder="https//..." />

View File

@@ -69,6 +69,12 @@
return "GPT-4 Turbo 1106 Vision"
case 'palm2_unicorn':
return "PaLM2 Unicorn"
case 'mistral-tiny':
return "Mistral Tiny"
case 'mistral-small':
return "Mistral Small"
case 'mistral-medium':
return "Mistral Medium"
default:
if(name.startsWith("horde:::")){
return name.replace(":::", " ")
@@ -144,6 +150,11 @@
{/if}
<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-tiny')}}>Mistral Tiny</button>
<button class="hover:bg-selected px-6 py-2 text-lg" on:click={() => {changeModel('mistral-small')}}>Mistral Small</button>
<button class="hover:bg-selected px-6 py-2 text-lg" on:click={() => {changeModel('mistral-medium')}}>Mistral Medium</button>
</Arcodion>
{#if showUnrec}
<Arcodion name="Google Palm2">
<button class="hover:bg-selected px-6 py-2 text-lg" on:click={() => {changeModel('palm2')}}>Bison</button>