Add thoughts
This commit is contained in:
@@ -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
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user