[fix] romanizer fix

This commit is contained in:
kwaroran
2023-11-09 20:11:04 +09:00
parent 55ef73a06b
commit d248c53192
2 changed files with 8 additions and 5 deletions

View File

@@ -96,7 +96,7 @@ export const languageEnglish = {
+ "\n - `{{bg::<asset name>}}`: inject the background as asset",
additionalText: "The text that would be added to Character Description only when ai thinks its needed, so you can put long texts here. seperate with double newlines.",
charjs: "A javascript code that would run with character. for example, you can check `https://github.com/kwaroran/RisuAI/blob/main/src/etc/example-char.js`",
romanizer: "Romanizer is a plugin that converts non-roman characters to roman characters to reduce tokens when using non-roman characters while requesting data.",
romanizer: "Romanizer is a plugin that converts non-roman characters to roman characters to reduce tokens when using non-roman characters while requesting data. this can result diffrent output from the original model. it is not recommended to use this plugin when using roman characters on chat.",
},
setup: {
chooseProvider: "Choose AI Provider",

View File

@@ -488,10 +488,13 @@ export async function sendChat(chatProcessIndex = -1,arg:{chatAdditonalTokens?:n
}
}
unformated.postEverything.push({
role: 'system',
content: `user and assistant are chatting with romanized ${r.mostUsed}, but always respond with ${r.mostUsed} with ${r.mostUsed} letters.`
})
if(r.mostUsed !== 'roman'){
unformated.postEverything.push({
role: 'system',
content: `user and assistant are chatting with romanized ${r.mostUsed}, but always respond with ${r.mostUsed} with ${r.mostUsed} letters.`
})
}
}
if(nowChatroom.supaMemory && db.supaMemoryType !== 'none'){