[fix] fix prompttemplate pushing

This commit is contained in:
kwaroran
2023-08-09 02:48:54 +09:00
parent 5951a29dff
commit 97e1410f81

View File

@@ -170,10 +170,11 @@ export async function sendChat(chatProcessIndex = -1,arg:{chatAdditonalTokens?:n
} }
const promptTemplate = cloneDeep(db.promptTemplate) const promptTemplate = cloneDeep(db.promptTemplate)
if(promptTemplate){
db.promptTemplate.push({ promptTemplate.push({
type: 'postEverything' type: 'postEverything'
}) })
}
if((!currentChar.utilityBot) && (!promptTemplate)){ if((!currentChar.utilityBot) && (!promptTemplate)){
const mainp = currentChar.systemPrompt?.replaceAll('{{original}}', db.mainPrompt) || db.mainPrompt const mainp = currentChar.systemPrompt?.replaceAll('{{original}}', db.mainPrompt) || db.mainPrompt