refactor: Make custom chain of thought prompt option unrecommended

This commit is contained in:
kwaroran
2024-05-27 10:51:28 +09:00
parent 40c832d31a
commit 7e1e3ecc61
3 changed files with 9 additions and 5 deletions

View File

@@ -669,7 +669,7 @@ export async function sendChat(chatProcessIndex = -1,arg:{chatAdditonalTokens?:n
formatedChat = name + ': ' + formatedChat
attr.push('nameAdded')
}
if(usingPromptTemplate && db.promptSettings.customChainOfThought && db.promptSettings.maxThoughtTagDepth !== -1){
if(usingPromptTemplate && db.promptSettings.maxThoughtTagDepth !== -1){
const depth = ms.length - index
if(depth >= db.promptSettings.maxThoughtTagDepth){
formatedChat = formatedChat.replace(/<Thoughts>(.+?)<\/Thoughts>/gm, '')