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
7981b61c
authored
Jun 16, 2025
by
Archer
Committed by
GitHub
Jun 16, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
perf: yuque dataset (#5040)
* perf: yuque dataset * doc
parent
450d0a54
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
139 additions
and
53 deletions
+139
-53
docSite/content/zh-cn/docs/development/upgrading/4912.md
+3
-0
packages/service/core/ai/config/provider/Doubao.json
+66
-0
packages/service/core/ai/config/provider/Qwen.json
+17
-17
packages/service/core/dataset/apiDataset/custom/api.ts
+1
-1
packages/service/core/dataset/apiDataset/yuqueDataset/api.ts
+1
-0
packages/service/core/dataset/read.ts
+1
-1
projects/app/src/pageComponents/account/model/ModelDashboard/DataTableComponent.tsx
+2
-2
projects/app/src/pageComponents/account/model/ModelDashboard/index.tsx
+1
-1
projects/app/src/pageComponents/dataset/detail/Import/diffSource/APIDataset.tsx
+47
-31
No files found.
docSite/content/zh-cn/docs/development/upgrading/4912.md
View file @
7981b61c
...
...
@@ -14,6 +14,8 @@ weight: 788
3.
问题分类和内容提取,提示词中自动加入上一轮结果进行额外引导。
4.
判断器支持变量引用。
5.
商业版支持知识库分块时,LLM 进行自动分段识别。
6.
Admin 管理员数据看板。
7.
豆包 1.6 系列模型,更新 qwen 模型配置。
## ⚙️ 优化
...
...
@@ -25,6 +27,7 @@ weight: 788
6.
MCP 工具调用,使用 Raw schema 进行工具调用,保障完整性。
7.
删除知识库文件时,如果文件不存在,不会阻断删除。
8.
升级 MCP SDK,兼容最新的 HTTPStreamable。
9.
语雀文档库,递归获取文档类型目录下的数据。
## 🐛 修复
...
...
packages/service/core/ai/config/provider/Doubao.json
View file @
7981b61c
...
...
@@ -2,6 +2,72 @@
"provider"
:
"Doubao"
,
"list"
:
[
{
"model"
:
"Doubao-Seed-1.6"
,
"name"
:
"Doubao-Seed-1.6"
,
"maxContext"
:
220000
,
"maxResponse"
:
16000
,
"quoteMaxToken"
:
220000
,
"maxTemperature"
:
1
,
"showTopP"
:
true
,
"showStopSign"
:
true
,
"vision"
:
true
,
"toolChoice"
:
true
,
"functionCall"
:
false
,
"defaultSystemChatPrompt"
:
""
,
"datasetProcess"
:
true
,
"usedInClassify"
:
true
,
"usedInExtractFields"
:
true
,
"usedInQueryExtension"
:
true
,
"usedInToolCall"
:
true
,
"defaultConfig"
:
{},
"fieldMap"
:
{},
"type"
:
"llm"
},
{
"model"
:
"Doubao-Seed-1.6-thinking"
,
"name"
:
"Doubao-Seed-1.6-thinking"
,
"maxContext"
:
220000
,
"maxResponse"
:
16000
,
"quoteMaxToken"
:
220000
,
"maxTemperature"
:
1
,
"showTopP"
:
true
,
"showStopSign"
:
true
,
"vision"
:
true
,
"toolChoice"
:
true
,
"functionCall"
:
false
,
"defaultSystemChatPrompt"
:
""
,
"datasetProcess"
:
true
,
"usedInClassify"
:
true
,
"usedInExtractFields"
:
true
,
"usedInQueryExtension"
:
true
,
"usedInToolCall"
:
true
,
"defaultConfig"
:
{},
"fieldMap"
:
{},
"type"
:
"llm"
},
{
"model"
:
"Doubao-Seed-1.6-flash"
,
"name"
:
"Doubao-Seed-1.6-flash"
,
"maxContext"
:
220000
,
"maxResponse"
:
16000
,
"quoteMaxToken"
:
220000
,
"maxTemperature"
:
1
,
"showTopP"
:
true
,
"showStopSign"
:
true
,
"vision"
:
true
,
"toolChoice"
:
true
,
"functionCall"
:
false
,
"defaultSystemChatPrompt"
:
""
,
"datasetProcess"
:
true
,
"usedInClassify"
:
true
,
"usedInExtractFields"
:
true
,
"usedInQueryExtension"
:
true
,
"usedInToolCall"
:
true
,
"defaultConfig"
:
{},
"fieldMap"
:
{},
"type"
:
"llm"
},
{
"model"
:
"Doubao-1.5-lite-32k"
,
"name"
:
"Doubao-1.5-lite-32k"
,
"maxContext"
:
32000
,
...
...
packages/service/core/ai/config/provider/Qwen.json
View file @
7981b61c
...
...
@@ -4,9 +4,9 @@
{
"model"
:
"qwen-max"
,
"name"
:
"Qwen-max"
,
"maxContext"
:
32
000
,
"maxResponse"
:
4
000
,
"quoteMaxToken"
:
6
000
,
"maxContext"
:
128
000
,
"maxResponse"
:
8
000
,
"quoteMaxToken"
:
120
000
,
"maxTemperature"
:
1
,
"vision"
:
false
,
"toolChoice"
:
true
,
...
...
@@ -27,10 +27,10 @@
{
"model"
:
"qwen-vl-max"
,
"name"
:
"qwen-vl-max"
,
"maxContext"
:
32
000
,
"maxResponse"
:
2
000
,
"quoteMaxToken"
:
20000
,
"maxTemperature"
:
1
.2
,
"maxContext"
:
128
000
,
"maxResponse"
:
8
000
,
"quoteMaxToken"
:
1
20000
,
"maxTemperature"
:
1
,
"vision"
:
true
,
"toolChoice"
:
false
,
"functionCall"
:
false
,
...
...
@@ -49,9 +49,9 @@
{
"model"
:
"qwen-plus"
,
"name"
:
"Qwen-plus"
,
"maxContext"
:
64
000
,
"maxContext"
:
128
000
,
"maxResponse"
:
8000
,
"quoteMaxToken"
:
6
0000
,
"quoteMaxToken"
:
12
0000
,
"maxTemperature"
:
1
,
"vision"
:
false
,
"toolChoice"
:
true
,
...
...
@@ -72,10 +72,10 @@
{
"model"
:
"qwen-vl-plus"
,
"name"
:
"qwen-vl-plus"
,
"maxContext"
:
32
000
,
"maxResponse"
:
2
000
,
"quoteMaxToken"
:
20000
,
"maxTemperature"
:
1
.2
,
"maxContext"
:
128
000
,
"maxResponse"
:
8
000
,
"quoteMaxToken"
:
1
20000
,
"maxTemperature"
:
1
,
"vision"
:
true
,
"toolChoice"
:
false
,
"functionCall"
:
false
,
...
...
@@ -92,9 +92,9 @@
{
"model"
:
"qwen-turbo"
,
"name"
:
"Qwen-turbo"
,
"maxContext"
:
1
28
000
,
"maxContext"
:
1
000
000
,
"maxResponse"
:
8000
,
"quoteMaxToken"
:
100000
,
"quoteMaxToken"
:
100000
0
,
"maxTemperature"
:
1
,
"vision"
:
false
,
"toolChoice"
:
true
,
...
...
@@ -487,9 +487,9 @@
{
"model"
:
"qwen-long"
,
"name"
:
"qwen-long"
,
"maxContext"
:
100000
,
"maxContext"
:
100000
00
,
"maxResponse"
:
6000
,
"quoteMaxToken"
:
10000
,
"quoteMaxToken"
:
10000
000
,
"maxTemperature"
:
1
,
"vision"
:
false
,
"toolChoice"
:
false
,
...
...
packages/service/core/dataset/apiDataset/custom/api.ts
View file @
7981b61c
...
...
@@ -106,7 +106,7 @@ export const useApiDatasetRequest = ({ apiServer }: { apiServer: APIFileServer }
const
formattedFiles
=
files
.
map
((
file
)
=>
({
...
file
,
hasChild
:
file
.
type
===
'folder'
hasChild
:
file
.
hasChild
??
file
.
type
===
'folder'
}));
return
formattedFiles
;
...
...
packages/service/core/dataset/apiDataset/yuqueDataset/api.ts
View file @
7981b61c
...
...
@@ -198,6 +198,7 @@ export const useYuqueDatasetRequest = ({ yuqueServer }: { yuqueServer: YuqueServ
}:
{
apiFileId
:
string
;
}):
Promise
<
ApiFileReadContentResponse
>
=>
{
if
(
typeof
apiFileId
!==
'string'
)
return
Promise
.
reject
(
'Invalid file id'
);
const
[
parentId
,
fileId
]
=
apiFileId
.
split
(
/-
(
.*
?)
-
(
.*
)
/
);
const
data
=
await
request
<
{
title
:
string
;
body
:
string
}
>
(
...
...
packages/service/core/dataset/read.ts
View file @
7981b61c
...
...
@@ -167,7 +167,7 @@ export const readApiServerFileContent = async ({
};
export
const
rawText2Chunks
=
async
({
rawText
,
rawText
=
''
,
chunkTriggerType
=
ChunkTriggerConfigTypeEnum
.
minSize
,
chunkTriggerMinSize
=
1000
,
backupParse
,
...
...
projects/app/src/pageComponents/account/model/ModelDashboard/DataTableComponent.tsx
View file @
7981b61c
...
...
@@ -140,7 +140,7 @@ const DataTableComponent = ({
model
:
item
.
model
,
totalCalls
:
item
.
totalCalls
,
errorCalls
:
item
.
errorCalls
,
totalCost
:
item
.
totalCost
,
totalCost
:
Math
.
floor
(
item
.
totalCost
)
,
avgResponseTime
:
successCalls
>
0
?
item
.
totalResponseTime
/
successCalls
/
1000
:
0
,
avgTtfb
:
successCalls
>
0
?
item
.
totalTtfb
/
successCalls
/
1000
:
0
});
...
...
@@ -201,7 +201,7 @@ const DataTableComponent = ({
model
:
modelName
,
totalCalls
:
item
.
totalCalls
,
errorCalls
:
item
.
errorCalls
,
totalCost
:
item
.
totalCost
,
totalCost
:
Math
.
floor
(
item
.
totalCost
)
,
avgResponseTime
:
successCalls
>
0
?
item
.
totalResponseTime
/
successCalls
/
1000
:
0
,
avgTtfb
:
successCalls
>
0
?
item
.
totalTtfb
/
successCalls
/
1000
:
0
});
...
...
projects/app/src/pageComponents/account/model/ModelDashboard/index.tsx
View file @
7981b61c
...
...
@@ -349,7 +349,7 @@ const ModelDashboard = ({ Tab }: { Tab: React.ReactNode }) => {
inputTokens
,
outputTokens
,
totalTokens
,
totalCost
,
totalCost
:
Math
.
floor
(
totalCost
)
,
avgResponseTime
:
Math
.
round
(
avgResponseTime
*
100
)
/
100
,
avgTtfb
:
Math
.
round
(
avgTtfb
*
100
)
/
100
,
maxRpm
,
...
...
projects/app/src/pageComponents/dataset/detail/Import/diffSource/APIDataset.tsx
View file @
7981b61c
...
...
@@ -70,8 +70,10 @@ const CustomAPIFileInput = () => {
}
);
const
{
data
:
existIdList
=
[]
}
=
useRequest2
(
()
=>
getApiDatasetFileListExistId
({
datasetId
:
datasetDetail
.
_id
}),
const
{
data
:
existIdList
=
new
Set
()
}
=
useRequest2
(
async
()
=>
{
return
new
Set
<
string
>
(
await
getApiDatasetFileListExistId
({
datasetId
:
datasetDetail
.
_id
}));
},
{
manual
:
false
}
...
...
@@ -89,7 +91,12 @@ const CustomAPIFileInput = () => {
const
allFiles
:
APIFileItem
[]
=
[];
for
(
const
file
of
files
)
{
if
(
file
.
type
===
'folder'
)
{
if
(
sources
.
some
((
item
)
=>
item
.
apiFileId
===
file
.
id
))
{
allFiles
.
push
(
file
);
continue
;
}
if
(
file
.
hasChild
)
{
const
folderFiles
=
await
getApiDatasetFileList
({
datasetId
:
datasetDetail
.
_id
,
parentId
:
file
?.
id
...
...
@@ -97,27 +104,28 @@ const CustomAPIFileInput = () => {
const
subFiles
=
await
getFilesRecursively
(
folderFiles
);
allFiles
.
push
(...
subFiles
);
}
else
{
allFiles
.
push
(
file
);
}
allFiles
.
push
(
file
);
}
return
allFiles
;
};
const
allFiles
=
await
getFilesRecursively
(
selectFiles
);
const
uniqueFiles
=
allFiles
.
filter
(
(
item
,
index
,
array
)
=>
!
existIdList
.
has
(
item
.
id
)
&&
array
.
findIndex
((
file
)
=>
file
.
id
===
item
.
id
)
===
index
);
setSources
(
allFiles
.
filter
((
item
)
=>
!
existIdList
.
includes
(
item
.
id
))
.
map
((
item
)
=>
({
id
:
item
.
id
,
apiFileId
:
item
.
id
,
apiFile
:
item
,
createStatus
:
'waiting'
,
sourceName
:
item
.
name
,
icon
:
getSourceNameIcon
({
sourceName
:
item
.
name
})
as
any
}))
uniqueFiles
.
map
((
item
)
=>
({
id
:
item
.
id
,
apiFileId
:
item
.
id
,
apiFile
:
item
,
createStatus
:
'waiting'
,
sourceName
:
item
.
name
,
icon
:
getSourceNameIcon
({
sourceName
:
item
.
name
})
as
any
}))
);
},
{
...
...
@@ -147,15 +155,24 @@ const CustomAPIFileInput = () => {
[
selectFiles
]
);
const
handleSelectAll
=
useCallback
(()
=>
{
const
isAllSelected
=
fileList
.
length
===
selectFiles
.
length
;
const
isAllSelected
=
useMemo
(()
=>
{
return
fileList
.
every
(
(
item
)
=>
existIdList
.
has
(
item
.
id
)
||
selectFiles
.
some
((
file
)
=>
file
.
id
===
item
.
id
)
);
},
[
fileList
,
selectFiles
,
existIdList
]);
const
handleSelectAll
=
useCallback
(()
=>
{
if
(
isAllSelected
)
{
setSelectFiles
([]);
setSelectFiles
((
state
)
=>
state
.
filter
((
file
)
=>
!
fileList
.
find
((
item
)
=>
item
.
id
===
file
.
id
))
);
}
else
{
setSelectFiles
(
fileList
);
setSelectFiles
((
state
)
=>
[
...
state
.
filter
((
file
)
=>
!
fileList
.
find
((
item
)
=>
item
.
id
===
file
.
id
)),
...
fileList
.
filter
((
item
)
=>
!
existIdList
.
has
(
item
.
id
))
]);
}
},
[
fileList
,
selectFiles
]);
},
[
isAllSelected
,
fileList
,
existIdList
]);
return
(
<
MyBox
isLoading=
{
loading
}
position=
"relative"
h=
"full"
>
...
...
@@ -193,23 +210,22 @@ const CustomAPIFileInput = () => {
fontSize=
{
'sm'
}
fontWeight=
{
'medium'
}
color=
{
'myGray.900'
}
onClick=
{
(
e
)
=>
{
if
(
!
(
e
.
target
as
HTMLElement
).
closest
(
'.checkbox'
))
{
handleSelectAll
();
}
}
}
//
onClick={(e) => {
//
if (!(e.target as HTMLElement).closest('.checkbox')) {
//
handleSelectAll();
//
}
//
}}
>
<
Checkbox
className=
"checkbox"
mr=
{
2
}
isChecked=
{
fileList
.
length
===
selectFiles
.
length
}
isChecked=
{
isAllSelected
}
onChange=
{
handleSelectAll
}
/>
{
t
(
'common:Select_all'
)
}
</
Flex
>
{
fileList
.
map
((
item
)
=>
{
const
isFolder
=
item
.
type
===
'folder'
;
const
isExists
=
existIdList
.
includes
(
item
.
id
);
const
isExists
=
existIdList
.
has
(
item
.
id
);
const
isChecked
=
isExists
||
selectFiles
.
some
((
file
)
=>
file
.
id
===
item
.
id
);
return
(
...
...
@@ -243,9 +259,9 @@ const CustomAPIFileInput = () => {
/>
<
MyIcon
name=
{
!
isFolder
?
(
getSourceNameIcon
({
sourceName
:
item
.
name
})
as
any
)
:
'common/folderFill'
item
.
type
===
'folder'
?
'common/folderFill'
:
(
getSourceNameIcon
({
sourceName
:
item
.
name
})
as
any
)
}
w=
{
'18px'
}
mr=
{
1.5
}
...
...
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