[ref] input to components
This commit is contained in:
@@ -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':{
|
||||
|
||||
@@ -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}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user