[ref] input to components

This commit is contained in:
kwaroran
2023-07-18 18:18:14 +09:00
parent 26421fde03
commit c0622c4f0d
24 changed files with 291 additions and 161 deletions

View File

@@ -337,6 +337,11 @@ export function risuChatParser(da:string, arg:{
}
case 'char':
case 'bot':{
let selectedChar = get(selectedCharID)
let currentChar = db.characters[selectedChar]
if(currentChar.type !== 'group'){
return currentChar.name
}
if(chara){
if(typeof(chara) === 'string'){
return chara
@@ -345,8 +350,6 @@ export function risuChatParser(da:string, arg:{
return chara.name
}
}
let selectedChar = get(selectedCharID)
let currentChar = db.characters[selectedChar]
return currentChar.name
}
case 'user':{

View File

@@ -140,7 +140,7 @@ export function processScriptFull(char:character|groupChat, data:string, mode:Sc
}
}
}
if(db.officialplugins.automark){
if(db.officialplugins.automark && mode === 'editdisplay'){
data = autoMarkPlugin(data)
}
return {data, emoChanged}

View File

@@ -959,4 +959,21 @@ function formDataToString(formData: FormData): string {
}
return params.join('&');
}
}
export function getModelMaxContext(model:string):number|undefined{
if(model.startsWith('gpt35')){
if(model.includes('16k')){
return 16000
}
return 4000
}
if(model.startsWith('gpt4')){
if(model.includes('32k')){
return 32000
}
return 8000
}
return undefined
}