Enhance plugin functionality by adding optional provider parameters and improving thoughts extraction regex

This commit is contained in:
Kwaroran
2024-12-25 04:55:05 +09:00
parent 8b6fc5bc8b
commit 1c51afc626
5 changed files with 46 additions and 4 deletions

View File

@@ -753,7 +753,7 @@ export async function sendChat(chatProcessIndex = -1,arg:{
}
}
let thoughts:string[] = []
formatedChat = formatedChat.replace(/<Thoughts>([\s\S]+?)<\/Thoughts>/g, (match, p1) => {
formatedChat = formatedChat.replace(/<Thoughts>(.+)<\/Thoughts>/gms, (match, p1) => {
thoughts.push(p1)
return ''
})