Skip to content

Commit 154e0cb

Browse files
authored
fix: should not normalize user input content (#4985)
1 parent b64749b commit 154e0cb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

web/utils/messageRequestBuilder.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,8 @@ export class MessageRequestBuilder {
155155
const stack = new Stack<ChatCompletionMessage>()
156156
for (const message of messages) {
157157
// Handle message content such as reasoning tags
158-
message.content = this.reasoningTagHandle(message)
158+
if (message.role === ChatCompletionRole.Assistant)
159+
message.content = this.reasoningTagHandle(message)
159160
if (stack.isEmpty()) {
160161
stack.push(message)
161162
continue

0 commit comments

Comments
 (0)