Merge branch 'kwaroran:main' into main
This commit is contained in:
@@ -12,7 +12,7 @@ import { defaultColorScheme, type ColorScheme } from '../gui/colorscheme';
|
||||
import type { PromptItem, PromptSettings } from '../process/prompt';
|
||||
import type { OobaChatCompletionRequestParams } from '../model/ooba';
|
||||
|
||||
export let appVer = "141.0.0"
|
||||
export let appVer = "141.2.0"
|
||||
export let webAppSubVer = ''
|
||||
|
||||
|
||||
@@ -462,6 +462,8 @@ export function setDatabase(data:Database){
|
||||
translate: {},
|
||||
otherAx: {}
|
||||
}
|
||||
data.customFlags ??= []
|
||||
data.enableCustomFlags ??= false
|
||||
changeLanguage(data.language)
|
||||
setDatabaseLite(data)
|
||||
}
|
||||
@@ -852,6 +854,9 @@ export interface Database{
|
||||
translateBeforeHTMLFormatting:boolean
|
||||
autoTranslateCachedOnly:boolean
|
||||
lightningRealmImport:boolean
|
||||
notification: boolean
|
||||
customFlags: LLMFlags[]
|
||||
enableCustomFlags: boolean
|
||||
}
|
||||
|
||||
interface SeparateParameters{
|
||||
@@ -1171,6 +1176,8 @@ export interface botPreset{
|
||||
systemContentReplacement?: string
|
||||
systemRoleReplacement?: 'user'|'assistant'
|
||||
openAIPrediction?: string
|
||||
enableCustomFlags?: boolean
|
||||
customFlags?: LLMFlags[]
|
||||
}
|
||||
|
||||
|
||||
@@ -1469,6 +1476,8 @@ export function saveCurrentPreset(){
|
||||
customAPIFormat: safeStructuredClone(db.customAPIFormat),
|
||||
systemContentReplacement: db.systemContentReplacement,
|
||||
systemRoleReplacement: db.systemRoleReplacement,
|
||||
customFlags: safeStructuredClone(db.customFlags),
|
||||
enableCustomFlags: db.enableCustomFlags,
|
||||
}
|
||||
db.botPresets = pres
|
||||
setDatabase(db)
|
||||
@@ -1574,6 +1583,8 @@ export function setPreset(db:Database, newPres: botPreset){
|
||||
db.customAPIFormat = safeStructuredClone(newPres.customAPIFormat) ?? LLMFormat.OpenAICompatible
|
||||
db.systemContentReplacement = newPres.systemContentReplacement ?? ''
|
||||
db.systemRoleReplacement = newPres.systemRoleReplacement ?? 'user'
|
||||
db.customFlags = safeStructuredClone(newPres.customFlags) ?? []
|
||||
db.enableCustomFlags = newPres.enableCustomFlags ?? false
|
||||
return db
|
||||
}
|
||||
|
||||
@@ -1584,7 +1595,7 @@ import type { RisuModule } from '../process/modules';
|
||||
import type { HypaV2Data } from '../process/memory/hypav2';
|
||||
import { decodeRPack, encodeRPack } from '../rpack/rpack_bg';
|
||||
import { DBState, selectedCharID } from '../stores.svelte';
|
||||
import { LLMFormat } from '../model/modellist';
|
||||
import { LLMFlags, LLMFormat } from '../model/modellist';
|
||||
import type { Parameter } from '../process/request';
|
||||
|
||||
export async function downloadPreset(id:number, type:'json'|'risupreset'|'return' = 'json'){
|
||||
|
||||
Reference in New Issue
Block a user