Update Kobold
This commit is contained in:
@@ -265,7 +265,6 @@
|
||||
{#if $DataBase.aiModel.startsWith("horde") || $DataBase.subModel.startsWith("horde") }
|
||||
<span class="text-textcolor">Horde {language.apiKey}</span>
|
||||
<TextInput hideText marginBottom={true} bind:value={$DataBase.hordeConfig.apiKey} />
|
||||
|
||||
{/if}
|
||||
{#if $DataBase.aiModel === 'textgen_webui' || $DataBase.subModel === 'textgen_webui'
|
||||
|| $DataBase.aiModel === 'mancer' || $DataBase.subModel === 'mancer'}
|
||||
@@ -283,7 +282,9 @@
|
||||
<span class="text-textcolor mt-2">Ooba {language.providerURL}</span>
|
||||
<TextInput marginBottom={true} bind:value={$DataBase.textgenWebUIBlockingURL} placeholder="https://..."/>
|
||||
{/if}
|
||||
|
||||
{#if $DataBase.aiModel.startsWith("horde") || $DataBase.aiModel === 'kobold' }
|
||||
<ChatFormatSettings />
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
{#if submenu === 1 || submenu === -1}
|
||||
@@ -386,7 +387,7 @@
|
||||
<ChatFormatSettings />
|
||||
</div>
|
||||
<Check bind:check={$DataBase.ooba.formating.useName} name={language.useNamePrefix}/>
|
||||
|
||||
|
||||
{:else if $DataBase.aiModel.startsWith('novelai')}
|
||||
<div class="flex flex-col p-3 bg-darkbg mt-4">
|
||||
<span class="text-textcolor">Starter</span>
|
||||
|
||||
@@ -113,8 +113,8 @@
|
||||
<button class="hover:bg-selected px-6 py-2 text-lg" on:click={() => {changeModel('palm2')}}>Bison</button>
|
||||
<button class="hover:bg-selected px-6 py-2 text-lg" on:click={() => {changeModel('palm2_unicorn')}}>Unicorn</button>
|
||||
</Arcodion>
|
||||
<button class="hover:bg-selected px-6 py-2 text-lg" on:click={() => {changeModel('kobold')}}>Kobold</button>
|
||||
{/if}
|
||||
<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>
|
||||
<button class="p-2 hover:text-green-500" on:click={() => {changeModel('novellist_damsel')}}>Damsel</button>
|
||||
|
||||
@@ -1356,19 +1356,24 @@ export async function requestChatDataMain(arg:requestDataArgument, model:'model'
|
||||
|
||||
}
|
||||
case "kobold":{
|
||||
const prompt = stringlizeChat(formated, currentChar?.name ?? '', arg.continue)
|
||||
const prompt = applyChatTemplate(formated)
|
||||
const url = new URL(db.koboldURL)
|
||||
if(url.pathname.length < 3){
|
||||
url.pathname = 'api/v1/generate'
|
||||
}
|
||||
|
||||
const body:KoboldGenerationInputSchema = {
|
||||
"prompt": prompt,
|
||||
"temperature": (db.temperature / 100),
|
||||
"top_p": db.top_p,
|
||||
max_length: maxTokens,
|
||||
max_context_length: db.maxContext,
|
||||
n: 1
|
||||
}
|
||||
|
||||
const da = await globalFetch(url.toString(), {
|
||||
method: "POST",
|
||||
body: {
|
||||
"prompt": prompt,
|
||||
"temperature": (db.temperature / 100),
|
||||
"top_p": 0.9
|
||||
},
|
||||
body: body,
|
||||
headers: {
|
||||
"content-type": "application/json",
|
||||
},
|
||||
@@ -2280,7 +2285,7 @@ export async function requestChatDataMain(arg:requestDataArgument, model:'model'
|
||||
|
||||
}
|
||||
if(aiModel.startsWith("horde:::")){
|
||||
const prompt = stringlizeChat(formated, currentChar?.name ?? '', arg.continue)
|
||||
const prompt = applyChatTemplate(formated)
|
||||
|
||||
const realModel = aiModel.split(":::")[1]
|
||||
|
||||
@@ -2446,3 +2451,41 @@ function getOpenUserString(){
|
||||
console.log(userString)
|
||||
return userString
|
||||
}
|
||||
|
||||
|
||||
|
||||
export interface KoboldSamplerSettingsSchema {
|
||||
rep_pen?: number;
|
||||
rep_pen_range?: number;
|
||||
rep_pen_slope?: number;
|
||||
top_k?: number;
|
||||
top_a?: number;
|
||||
top_p?: number;
|
||||
tfs?: number;
|
||||
typical?: number;
|
||||
temperature?: number;
|
||||
}
|
||||
|
||||
export interface KoboldGenerationInputSchema extends KoboldSamplerSettingsSchema {
|
||||
prompt: string;
|
||||
use_memory?: boolean;
|
||||
use_story?: boolean;
|
||||
use_authors_note?: boolean;
|
||||
use_world_info?: boolean;
|
||||
use_userscripts?: boolean;
|
||||
soft_prompt?: string;
|
||||
max_length?: number;
|
||||
max_context_length?: number;
|
||||
n: number;
|
||||
disable_output_formatting?: boolean;
|
||||
frmttriminc?: boolean;
|
||||
frmtrmblln?: boolean;
|
||||
frmtrmspch?: boolean;
|
||||
singleline?: boolean;
|
||||
disable_input_formatting?: boolean;
|
||||
frmtadsnsp?: boolean;
|
||||
quiet?: boolean;
|
||||
sampler_order?: number[];
|
||||
sampler_seed?: number;
|
||||
sampler_full_determinism?: boolean;
|
||||
}
|
||||
Reference in New Issue
Block a user