mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-27 08:25:07 +00:00
fix: token limit
This commit is contained in:
@@ -24,8 +24,8 @@ export type Response = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const modeMaxToken = {
|
const modeMaxToken = {
|
||||||
[TrainingModeEnum.index]: 700,
|
[TrainingModeEnum.index]: 6000,
|
||||||
[TrainingModeEnum.qa]: 3300
|
[TrainingModeEnum.qa]: 10000
|
||||||
};
|
};
|
||||||
|
|
||||||
export default withNextCors(async function handler(req: NextApiRequest, res: NextApiResponse<any>) {
|
export default withNextCors(async function handler(req: NextApiRequest, res: NextApiResponse<any>) {
|
||||||
|
@@ -21,7 +21,7 @@ import {
|
|||||||
delOneKbDataByDataId,
|
delOneKbDataByDataId,
|
||||||
getTrainingData
|
getTrainingData
|
||||||
} from '@/api/plugins/kb';
|
} from '@/api/plugins/kb';
|
||||||
import { DeleteIcon } from '@chakra-ui/icons';
|
import { DeleteIcon, RepeatIcon } from '@chakra-ui/icons';
|
||||||
import { fileDownload } from '@/utils/file';
|
import { fileDownload } from '@/utils/file';
|
||||||
import { useMutation, useQuery } from '@tanstack/react-query';
|
import { useMutation, useQuery } from '@tanstack/react-query';
|
||||||
import { useToast } from '@/hooks/useToast';
|
import { useToast } from '@/hooks/useToast';
|
||||||
@@ -146,6 +146,18 @@ const DataCard = ({ kbId }: { kbId: string }) => {
|
|||||||
知识库数据: {total}组
|
知识库数据: {total}组
|
||||||
</Box>
|
</Box>
|
||||||
<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
|
<Button
|
||||||
variant={'base'}
|
variant={'base'}
|
||||||
mr={2}
|
mr={2}
|
||||||
|
Reference in New Issue
Block a user