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