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

@@ -2337,7 +2337,7 @@ export function parseChatML(data:string):OpenAIChat[]|null{
let thoughts:string[] = []
v = v.replace(/<Thoughts>(.*?)<\/Thoughts>/g, (match, p1) => {
v = v.replace(/<Thoughts>(.+)<\/Thoughts>/gms, (match, p1) => {
thoughts.push(p1)
return ''
})