[feat] add local code
This commit is contained in:
@@ -404,7 +404,7 @@
|
||||
|
||||
{#if $DataBase.useAutoSuggestions}
|
||||
<Suggestion messageInput={(msg)=>messageInput=(
|
||||
($DataBase.subModel === "textgen_webui" || $DataBase.subModel === "mancer") && $DataBase.autoSuggestClean
|
||||
($DataBase.subModel === "textgen_webui" || $DataBase.subModel === "mancer" || $DataBase.subModel.startsWith('local_')) && $DataBase.autoSuggestClean
|
||||
? msg.replace(/ +\(.+?\) *$| - [^"'*]*?$/, '')
|
||||
: msg
|
||||
)} {send}/>
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
}
|
||||
]
|
||||
|
||||
if($DataBase.subModel === "textgen_webui" || $DataBase.subModel === 'mancer'){
|
||||
if($DataBase.subModel === "textgen_webui" || $DataBase.subModel === 'mancer' || $DataBase.subModel.startsWith('local_')){
|
||||
promptbody = [
|
||||
{
|
||||
role: 'system',
|
||||
|
||||
@@ -265,7 +265,7 @@
|
||||
{/if}
|
||||
<span class="text-textcolor2 mb-6 text-sm">{($DataBase.temperature / 100).toFixed(2)}</span>
|
||||
|
||||
{#if $DataBase.aiModel === 'textgen_webui' || $DataBase.subModel === 'mancer'}
|
||||
{#if $DataBase.aiModel === 'textgen_webui' || $DataBase.subModel === 'mancer' || $DataBase.subModel.startsWith('local_')}
|
||||
<span class="text-textcolor">Repetition Penalty</span>
|
||||
<SliderInput min={1} max={1.5} step={0.01} bind:value={$DataBase.ooba.repetition_penalty}/>
|
||||
<span class="text-textcolor2 mb-6 text-sm">{($DataBase.ooba.repetition_penalty).toFixed(2)}</span>
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
import Arcodion from "./Arcodion.svelte";
|
||||
import { language } from "src/lang";
|
||||
import { isNodeServer, isTauri } from "src/ts/storage/globalApi";
|
||||
import { checkLocalModel } from "src/ts/process/models/local";
|
||||
import { alertError } from "src/ts/alert";
|
||||
let openAdv = true
|
||||
|
||||
export let value = ""
|
||||
@@ -32,6 +34,8 @@
|
||||
return "GPT-4 0613"
|
||||
case "gpt4_32k_0613":
|
||||
return "GPT-4 32k 0613"
|
||||
case 'local_gptq':
|
||||
return 'Local Model GPTQ'
|
||||
case "palm2":
|
||||
return "PaLM2"
|
||||
case "textgen_webui":
|
||||
@@ -111,10 +115,20 @@
|
||||
{/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('openrouter')}}>OpenRouter</button>
|
||||
<!-- <button class="hover:bg-selected px-6 py-2 text-lg" on:click={async () => {
|
||||
const res = (await checkLocalModel())
|
||||
if(res === 'success'){
|
||||
changeModel('local_gptq')
|
||||
}
|
||||
else{
|
||||
alertError("python 3.10, cuda 11.7 and git must be installed to run it. " + res)
|
||||
}
|
||||
// changeModel('local_gptq')
|
||||
}}>Local Model GPTQ</button> -->
|
||||
<button class="hover:bg-selected px-6 py-2 text-lg" on:click={() => {changeModel('textgen_webui')}}>Oobabooga WebUI</button>
|
||||
<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('palm2')}}>Google PaLM2</button>
|
||||
<button class="hover:bg-selected px-6 py-2 text-lg" on:click={() => {changeModel('openrouter')}}>OpenRouter</button>
|
||||
<button class="hover:bg-selected px-6 py-2 text-lg" on:click={() => {changeModel('kobold')}}>Kobold</button>
|
||||
<Arcodion name="Novellist">
|
||||
<button class="p-2 hover:text-green-500" on:click={() => {changeModel('novellist')}}>SuperTrin</button>
|
||||
|
||||
Reference in New Issue
Block a user