Add thoughts

This commit is contained in:
Kwaroran
2024-12-20 02:15:48 +09:00
parent 755a10a7ae
commit 73e94658fd
4 changed files with 57 additions and 12 deletions

View File

@@ -752,12 +752,7 @@ export async function sendChat(chatProcessIndex = -1,arg:{
break
}
}
if(usingPromptTemplate && DBState.db.promptSettings.maxThoughtTagDepth !== -1){
const depth = ms.length - index
if(depth >= DBState.db.promptSettings.maxThoughtTagDepth){
formatedChat = formatedChat.replace(/<Thoughts>(.+?)<\/Thoughts>/gm, '')
}
}
formatedChat = formatedChat.replace(/<Thoughts>(.+?)<\/Thoughts>/gm, '')
const chat:OpenAIChat = {
role: role,