From d248c531920ba6619cf5fc4d9fdabe0a29c46811 Mon Sep 17 00:00:00 2001 From: kwaroran Date: Thu, 9 Nov 2023 20:11:04 +0900 Subject: [PATCH] [fix] romanizer fix --- src/lang/en.ts | 2 +- src/ts/process/index.ts | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/lang/en.ts b/src/lang/en.ts index 436af41c..832d0e6a 100644 --- a/src/lang/en.ts +++ b/src/lang/en.ts @@ -96,7 +96,7 @@ export const languageEnglish = { + "\n - `{{bg::}}`: 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", diff --git a/src/ts/process/index.ts b/src/ts/process/index.ts index 1428dab0..06ca78dc 100644 --- a/src/ts/process/index.ts +++ b/src/ts/process/index.ts @@ -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'){