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
85e6a0f3
authored
Jun 14, 2023
by
archer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: token limit
parent
dab70378
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
3 deletions
+15
-3
client/src/pages/api/openapi/kb/pushData.ts
+2
-2
client/src/pages/kb/components/DataCard.tsx
+13
-1
No files found.
client/src/pages/api/openapi/kb/pushData.ts
View file @
85e6a0f3
...
...
@@ -24,8 +24,8 @@ export type Response = {
};
const
modeMaxToken
=
{
[
TrainingModeEnum
.
index
]:
7
00
,
[
TrainingModeEnum
.
qa
]:
33
00
[
TrainingModeEnum
.
index
]:
60
00
,
[
TrainingModeEnum
.
qa
]:
100
00
};
export
default
withNextCors
(
async
function
handler
(
req
:
NextApiRequest
,
res
:
NextApiResponse
<
any
>
)
{
...
...
client/src/pages/kb/components/DataCard.tsx
View file @
85e6a0f3
...
...
@@ -21,7 +21,7 @@ import {
delOneKbDataByDataId
,
getTrainingData
}
from
'@/api/plugins/kb'
;
import
{
DeleteIcon
}
from
'@chakra-ui/icons'
;
import
{
DeleteIcon
,
RepeatIcon
}
from
'@chakra-ui/icons'
;
import
{
fileDownload
}
from
'@/utils/file'
;
import
{
useMutation
,
useQuery
}
from
'@tanstack/react-query'
;
import
{
useToast
}
from
'@/hooks/useToast'
;
...
...
@@ -146,6 +146,18 @@ const DataCard = ({ kbId }: { kbId: string }) => {
知识库数据:
{
total
}
组
</
Box
>
<
Box
>
<
IconButton
icon=
{
<
RepeatIcon
/>
}
aria
-
label=
{
'refresh'
}
variant=
{
'base'
}
isLoading=
{
isLoading
}
mr=
{
[
2
,
4
]
}
size=
{
'sm'
}
onClick=
{
()
=>
{
refetchData
(
pageNum
);
getTrainingData
({
kbId
,
init
:
true
});
}
}
/>
<
Button
variant=
{
'base'
}
mr=
{
2
}
...
...
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