From 098901b9ab74ce96237be72d3cb6dbba19cb2745 Mon Sep 17 00:00:00 2001 From: kwaroran Date: Sun, 16 Jul 2023 17:33:43 +0900 Subject: [PATCH] [fix] persona formating problem --- src/ts/process/index.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/ts/process/index.ts b/src/ts/process/index.ts index 85edab33..e8d7f5f5 100644 --- a/src/ts/process/index.ts +++ b/src/ts/process/index.ts @@ -229,10 +229,12 @@ export async function sendChat(chatProcessIndex = -1,arg:{chatAdditonalTokens?:n role: 'system', content: replacePlaceholders(lorepmt.act, currentChar.name) }) - unformated.personaPrompt.push({ - role: 'system', - content: replacePlaceholders(db.personaPrompt, currentChar.name) - }) + if(db.personaPrompt){ + unformated.personaPrompt.push({ + role: 'system', + content: replacePlaceholders(db.personaPrompt, currentChar.name) + }) + } if(lorepmt.special_act){ unformated.postEverything.push({