Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
赵月辉
/
fastgpt-migrated
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Unverified
Commit
8714b434
authored
Mar 03, 2026
by
Archer
Committed by
GitHub
Mar 03, 2026
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: adapt sequence (#6496)
parent
87b0bca3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
12 deletions
+13
-12
document/content/docs/self-host/upgrading/4-14/4148.mdx
+1
-0
document/data/doc-last-modified.json
+0
-0
packages/global/core/chat/adapt.ts
+12
-12
No files found.
document/content/docs/self-host/upgrading/4-14/4148.mdx
View file @
8714b434
...
@@ -15,4 +15,5 @@ description: 'FastGPT V4.14.8 更新说明'
...
@@ -15,4 +15,5 @@ description: 'FastGPT V4.14.8 更新说明'
## 🐛 修复
## 🐛 修复
1. 新 SDK 兼容:连续调用同一个 MCP 服务时,多次连接导致报错。
1. 新 SDK 兼容:连续调用同一个 MCP 服务时,多次连接导致报错。
2. 文本与工具同时输出时,保存后顺序异常。
document/data/doc-last-modified.json
View file @
8714b434
This diff is collapsed.
Click to expand it.
packages/global/core/chat/adapt.ts
View file @
8714b434
...
@@ -323,6 +323,18 @@ export const GPTMessages2Chats = ({
...
@@ -323,6 +323,18 @@ export const GPTMessages2Chats = ({
}
}
});
});
}
}
if
(
typeof
item
.
content
===
'string'
&&
item
.
content
)
{
const
lastValue
=
value
[
value
.
length
-
1
];
if
(
lastValue
&&
lastValue
.
text
)
{
lastValue
.
text
.
content
+=
item
.
content
;
}
else
{
value
.
push
({
text
:
{
content
:
item
.
content
}
});
}
}
if
(
item
.
tool_calls
&&
reserveTool
)
{
if
(
item
.
tool_calls
&&
reserveTool
)
{
// save tool calls
// save tool calls
const
toolCalls
=
item
.
tool_calls
as
ChatCompletionMessageToolCall
[];
const
toolCalls
=
item
.
tool_calls
as
ChatCompletionMessageToolCall
[];
...
@@ -384,18 +396,6 @@ export const GPTMessages2Chats = ({
...
@@ -384,18 +396,6 @@ export const GPTMessages2Chats = ({
interactive
:
item
.
interactive
interactive
:
item
.
interactive
});
});
}
}
if
(
typeof
item
.
content
===
'string'
&&
item
.
content
)
{
const
lastValue
=
value
[
value
.
length
-
1
];
if
(
lastValue
&&
lastValue
.
text
)
{
lastValue
.
text
.
content
+=
item
.
content
;
}
else
{
value
.
push
({
text
:
{
content
:
item
.
content
}
});
}
}
return
{
return
{
dataId
:
item
.
dataId
,
dataId
:
item
.
dataId
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment