[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)
db.promptTemplate.push({
type: 'postEverything'
})
if(promptTemplate){
promptTemplate.push({
type: 'postEverything'
})
}
if((!currentChar.utilityBot) && (!promptTemplate)){
const mainp = currentChar.systemPrompt?.replaceAll('{{original}}', db.mainPrompt) || db.mainPrompt