Change Reverse proxy name to Custom and add additionalParams
This commit is contained in:
@@ -159,7 +159,7 @@
|
||||
<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>
|
||||
<span class="text-textcolor mt-2">URL <Help key="forceUrl"/></span>
|
||||
<TextInput marginBottom={false} size={"sm"} bind:value={$DataBase.forceReplaceUrl} placeholder="https//..." />
|
||||
<span class="text-textcolor mt-4"> {language.proxyAPIKey}</span>
|
||||
<TextInput marginBottom={false} size={"sm"} placeholder="leave it blank if it hasn't password" bind:value={$DataBase.proxyKey} />
|
||||
@@ -577,6 +577,46 @@
|
||||
</table>
|
||||
</Arcodion>
|
||||
|
||||
{#if $DataBase.aiModel === 'reverse_proxy'}
|
||||
<Arcodion styled name="{language.additionalParams} " help="additionalParams">
|
||||
<table class="contain w-full max-w-full tabler">
|
||||
<tr>
|
||||
<th class="font-medium">{language.key}</th>
|
||||
<th class="font-medium">{language.value}</th>
|
||||
<th>
|
||||
<button class="font-medium cursor-pointer hover:text-green-500 w-full flex justify-center items-center" on:click={() => {
|
||||
let additionalParams = $DataBase.additionalParams
|
||||
additionalParams.push(['', ''])
|
||||
$DataBase.additionalParams = additionalParams
|
||||
}}><PlusIcon /></button>
|
||||
</th>
|
||||
</tr>
|
||||
{#if $DataBase.bias.length === 0}
|
||||
<tr>
|
||||
<div class="text-textcolor2">{language.noData}</div>
|
||||
</tr>
|
||||
{/if}
|
||||
{#each $DataBase.additionalParams as additionalParams, i}
|
||||
<tr>
|
||||
<td class="font-medium truncate">
|
||||
<TextInput bind:value={$DataBase.additionalParams[i][0]} size="lg" fullwidth/>
|
||||
</td>
|
||||
<td class="font-medium truncate">
|
||||
<TextInput bind:value={$DataBase.additionalParams[i][1]} size="lg" fullwidth/>
|
||||
</td>
|
||||
<td>
|
||||
<button class="font-medium flex justify-center items-center h-full cursor-pointer hover:text-green-500 w-full" on:click={() => {
|
||||
let additionalParams = $DataBase.additionalParams
|
||||
additionalParams.splice(i, 1)
|
||||
$DataBase.additionalParams = additionalParams
|
||||
}}><TrashIcon /></button>
|
||||
</td>
|
||||
</tr>
|
||||
{/each}
|
||||
</table>
|
||||
</Arcodion>
|
||||
{/if}
|
||||
|
||||
|
||||
{#if !$DataBase.promptTemplate}
|
||||
<div class="flex items-center mt-4">
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
<button class="p-2 hover:text-green-500" on:click={() => {changeModel('claude-1.0')}}>claude-v1.0</button>
|
||||
{/if}
|
||||
</Arcodion>
|
||||
<button class="hover:bg-selected px-6 py-2 text-lg" on:click={() => {changeModel('reverse_proxy')}}>Reverse Proxy</button>
|
||||
<button class="hover:bg-selected px-6 py-2 text-lg" on:click={() => {changeModel('reverse_proxy')}}>Custom (OpenAI-compatible)</button>
|
||||
{#if $DataBase.tpo && isTauri}
|
||||
<button class="hover:bg-selected px-6 py-2 text-lg" on:click={async () => {
|
||||
const selected = await open({
|
||||
@@ -129,6 +129,7 @@
|
||||
{/each}
|
||||
{/await}
|
||||
</Arcodion>
|
||||
<button class="hover:bg-selected px-6 py-2 text-lg" on:click={() => {changeModel('oaicomp')}}>Custom (OpenAI-compatible)</button>
|
||||
{#if showUnrec}
|
||||
<Arcodion name="WebLLM Local">
|
||||
<button class="hover:bg-selected px-6 py-2 text-lg" on:click={() => {changeModel('hf:::Xenova/opt-350m')}}>opt-350m</button>
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
import { DataBase } from "src/ts/storage/database";
|
||||
import RealmLicense from "./RealmLicense.svelte";
|
||||
import MultiLangDisplay from "../GUI/MultiLangDisplay.svelte";
|
||||
import { tooltip } from "src/ts/gui/tooltip";
|
||||
|
||||
export let openedData:hubType
|
||||
|
||||
@@ -35,7 +36,7 @@
|
||||
{/each}
|
||||
</div>
|
||||
<div class="flex flex-wrap w-full flex-row gap-1 mt-2">
|
||||
<span class="text-textcolor2">
|
||||
<span class="text-textcolor2" use:tooltip={language.popularityLevelDesc}>
|
||||
{language.popularityLevel.replace('{}', openedData.download.toString())}
|
||||
</span>
|
||||
<div class="border-l-selected border-l ml-1 mr-1"></div>
|
||||
|
||||
@@ -15,6 +15,12 @@
|
||||
if( today.getMonth() === 3 && today.getDate() === 1){
|
||||
specialDay = 'aprilFool'
|
||||
}
|
||||
if( today.getMonth() === 3 && today.getDate() === 14){
|
||||
specialDay = 'anniversary'
|
||||
}
|
||||
if( today.getMonth() === 9 && today.getDate() === 31){
|
||||
specialDay = 'halloween'
|
||||
}
|
||||
let iconAnimation = 0
|
||||
let clicks = 0
|
||||
let score = 0
|
||||
|
||||
Reference in New Issue
Block a user