[feat] added miro and cfg to nai
This commit is contained in:
@@ -142,8 +142,22 @@ export interface NAISettings{
|
||||
presencePenalty: number
|
||||
typicalp:number
|
||||
starter:string
|
||||
mirostat_lr?:number
|
||||
mirostat_tau?:number
|
||||
cfg_scale?:number
|
||||
}
|
||||
|
||||
export const NovelAIROrder = [
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
|
||||
|
||||
|
||||
]
|
||||
|
||||
export const NovelAIBadWordIds = [
|
||||
[60],
|
||||
[62],
|
||||
|
||||
@@ -406,13 +406,16 @@ export async function requestChatDataMain(arg:requestDataArgument, model:'model'
|
||||
use_string: true,
|
||||
return_full_text: false,
|
||||
prefix: prefix,
|
||||
order: [2, 3, 0, 4, 1],
|
||||
order: [6, 2, 3, 0, 4, 1, 5, 8],
|
||||
typical_p: gen.typicalp,
|
||||
repetition_penalty_whitelist:[49256,49264,49231,49230,49287,85,49255,49399,49262,336,333,432,363,468,492,745,401,426,623,794,1096,2919,2072,7379,1259,2110,620,526,487,16562,603,805,761,2681,942,8917,653,3513,506,5301,562,5010,614,10942,539,2976,462,5189,567,2032,123,124,125,126,127,128,129,130,131,132,588,803,1040,49209,4,5,6,7,8,9,10,11,12],
|
||||
stop_sequences: [[49287], [49405]],
|
||||
bad_words_ids: NovelAIBadWordIds,
|
||||
logit_bias_exp: logit_bias_exp
|
||||
|
||||
logit_bias_exp: logit_bias_exp,
|
||||
mirostat_lr: gen.mirostat_lr ?? 1,
|
||||
mirostat_tau: gen.mirostat_tau ?? 0,
|
||||
cfg_scale: gen.cfg_scale ?? 1,
|
||||
cfg_uc: ""
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -264,7 +264,7 @@ export const prebuiltPresets:{OAI:botPreset,ooba:botPreset,NAI:botPreset} = {
|
||||
{
|
||||
"type": "chat",
|
||||
"rangeStart": 0,
|
||||
"rangeEnd": -9
|
||||
"rangeEnd": -6
|
||||
},
|
||||
{
|
||||
"type": "plain",
|
||||
@@ -274,19 +274,19 @@ export const prebuiltPresets:{OAI:botPreset,ooba:botPreset,NAI:botPreset} = {
|
||||
},
|
||||
{
|
||||
"type": "persona",
|
||||
"innerFormat": "description of {{user}}: {{slot}}\n***"
|
||||
"innerFormat": "[description of {{user}}: {{slot}}]"
|
||||
},
|
||||
{
|
||||
"type": "description",
|
||||
"innerFormat": "description of {{char}}: {{slot}}\n***"
|
||||
"innerFormat": "[description of {{char}}: {{slot}}]"
|
||||
},
|
||||
{
|
||||
"type": "lorebook",
|
||||
},
|
||||
{
|
||||
"type": "chat",
|
||||
"rangeStart": -9,
|
||||
"rangeEnd": -3
|
||||
"rangeStart": -6,
|
||||
"rangeEnd": -2
|
||||
},
|
||||
{
|
||||
"type": "plain",
|
||||
@@ -299,10 +299,12 @@ export const prebuiltPresets:{OAI:botPreset,ooba:botPreset,NAI:botPreset} = {
|
||||
},
|
||||
{
|
||||
"type": "chat",
|
||||
"rangeStart": -3,
|
||||
"rangeStart": -2,
|
||||
"rangeEnd": "end"
|
||||
}
|
||||
]
|
||||
],
|
||||
"NAIadventure": true,
|
||||
"NAIappendName": true
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -310,6 +310,11 @@ export function setDatabase(data:Database){
|
||||
key:'',
|
||||
freeApi: false
|
||||
}
|
||||
data.NAIadventure ??= false
|
||||
data.NAIappendName ??= true
|
||||
data.NAIsettings.cfg_scale ??= 1
|
||||
data.NAIsettings.mirostat_tau ??= 0
|
||||
data.NAIsettings.mirostat_lr ??= 1
|
||||
changeLanguage(data.language)
|
||||
DataBase.set(data)
|
||||
}
|
||||
@@ -638,6 +643,8 @@ export interface botPreset{
|
||||
autoSuggestPrefix?: string
|
||||
autoSuggestClean?: boolean
|
||||
promptTemplate?:Proompt[]
|
||||
NAIadventure?: boolean
|
||||
NAIappendName?: boolean
|
||||
}
|
||||
|
||||
|
||||
@@ -808,7 +815,8 @@ export const presetTemplate:botPreset = {
|
||||
proxyKey: '',
|
||||
bias: [],
|
||||
ooba: cloneDeep(defaultOoba),
|
||||
ainconfig: cloneDeep(defaultAIN)
|
||||
ainconfig: cloneDeep(defaultAIN),
|
||||
|
||||
}
|
||||
|
||||
const defaultSdData:[string,string][] = [
|
||||
@@ -857,7 +865,9 @@ export function saveCurrentPreset(){
|
||||
proxyRequestModel: db.proxyRequestModel,
|
||||
openrouterRequestModel: db.openrouterRequestModel,
|
||||
NAISettings: cloneDeep(db.NAIsettings),
|
||||
promptTemplate: db.promptTemplate ?? null
|
||||
promptTemplate: db.promptTemplate ?? null,
|
||||
NAIadventure: db.NAIadventure ?? false,
|
||||
NAIappendName: db.NAIappendName ?? false,
|
||||
}
|
||||
db.botPresets = pres
|
||||
setDatabase(db)
|
||||
@@ -917,6 +927,11 @@ export function setPreset(db:Database, newPres: botPreset){
|
||||
db.autoSuggestPrefix = newPres.autoSuggestPrefix ?? db.autoSuggestPrefix
|
||||
db.autoSuggestClean = newPres.autoSuggestClean ?? db.autoSuggestClean
|
||||
db.promptTemplate = newPres.promptTemplate
|
||||
db.NAIadventure = newPres.NAIadventure
|
||||
db.NAIappendName = newPres.NAIappendName
|
||||
db.NAIsettings.cfg_scale ??= 1
|
||||
db.NAIsettings.mirostat_tau ??= 0
|
||||
db.NAIsettings.mirostat_lr ??= 1
|
||||
return db
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user