feat: remove reasoning from message content in history generation
This commit is contained in:
parent
b3307dd3bd
commit
bd0c9bc825
@ -96,5 +96,5 @@ export function mergeReasoningContent(
|
|||||||
|
|
||||||
originalText = originalText.replace(reasoningTag, "")
|
originalText = originalText.replace(reasoningTag, "")
|
||||||
|
|
||||||
return `${reasoningTag}${originalText + reasoning}`.trim()
|
return `${reasoningTag}${originalText + reasoning}`
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import { isCustomModel } from "@/db/models"
|
import { isCustomModel } from "@/db/models"
|
||||||
|
import { removeReasoning } from "@/libs/reasoning"
|
||||||
import {
|
import {
|
||||||
HumanMessage,
|
HumanMessage,
|
||||||
AIMessage,
|
AIMessage,
|
||||||
@ -51,11 +52,11 @@ export const generateHistory = (
|
|||||||
history.push(
|
history.push(
|
||||||
new AIMessage({
|
new AIMessage({
|
||||||
content: isCustom
|
content: isCustom
|
||||||
? message.content
|
? removeReasoning(message.content)
|
||||||
: [
|
: [
|
||||||
{
|
{
|
||||||
type: "text",
|
type: "text",
|
||||||
text: message.content
|
text: removeReasoning(message.content)
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user