Skip to content

Commit 0b64ee5

Browse files
committed
server : filter out harmony thought messages
1 parent d7bef8e commit 0b64ee5

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

tools/server/public/index.html.gz

18 Bytes
Binary file not shown.

tools/server/webui/src/utils/misc.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,10 @@ export function filterThoughtFromMsgs(messages: APIMessage[]) {
130130
role: msg.role,
131131
content:
132132
msg.role === 'assistant'
133-
? contentStr.split('</think>').at(-1)!.trim()
133+
? contentStr
134+
.split(/<\/think>|<\|end\|>/)
135+
.at(-1)!
136+
.trim()
134137
: contentStr,
135138
} as APIMessage;
136139
});

0 commit comments

Comments
 (0)