Add thoughts

This commit is contained in:
Kwaroran
2024-12-24 04:15:32 +09:00
parent 8f667d6394
commit 048652656c

View File

@@ -2335,9 +2335,17 @@ export function parseChatML(data:string):OpenAIChat[]|null{
v = v.substring(0, v.length - ender.length) v = v.substring(0, v.length - ender.length)
} }
let thoughts:string[] = []
v = v.replace(/<Thoughts>(.*?)<\/Thoughts>/g, (match, p1) => {
thoughts.push(p1)
return ''
})
return { return {
role: role, role: role,
content: risuChatParser(v) content: risuChatParser(v),
thoughts: thoughts
} }
}) })
} }