Add bias escapes

This commit is contained in:
kwaroran
2024-09-15 18:18:44 +09:00
parent e8c482e5e6
commit 19b3e17619

View File

@@ -800,7 +800,7 @@ export async function sendChat(chatProcessIndex = -1,arg:{
}
let biases:[string,number][] = db.bias.concat(currentChar.bias).map((v) => {
return [risuChatParser(v[0].replaceAll("\\n","\n"), {chara: currentChar}),v[1]]
return [risuChatParser(v[0].replaceAll("\\n","\n").replaceAll("\\r","\r").replaceAll("\\\\","\\"), {chara: currentChar}),v[1]]
})
let memories:OpenAIChat[] = []