fix(AgentMessageComponent): 修复部分场景下未返回 reasoning_content 的问题 #261
This commit is contained in:
parent
04f49f48d5
commit
e7137b883b
@ -148,6 +148,13 @@ const parsedData = computed(() => {
|
||||
let content = props.message.content.trim() || '';
|
||||
let reasoning_content = props.message.additional_kwargs?.reasoning_content || '';
|
||||
|
||||
if (reasoning_content) {
|
||||
return {
|
||||
content,
|
||||
reasoning_content,
|
||||
}
|
||||
}
|
||||
|
||||
// Regex to find <think>...</think> or an unclosed <think>... at the end of the string.
|
||||
const thinkRegex = /<think>(.*?)<\/think>|<think>(.*?)$/s;
|
||||
const thinkMatch = content.match(thinkRegex);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user