fix: should not normalize user input content (#4985)

This commit is contained in:
Louis 2025-05-14 12:17:47 +07:00 committed by GitHub
parent b64749b4bb
commit 154e0cba47
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -155,7 +155,8 @@ export class MessageRequestBuilder {
const stack = new Stack<ChatCompletionMessage>()
for (const message of messages) {
// Handle message content such as reasoning tags
message.content = this.reasoningTagHandle(message)
if (message.role === ChatCompletionRole.Assistant)
message.content = this.reasoningTagHandle(message)
if (stack.isEmpty()) {
stack.push(message)
continue