perf: chunk filter
This commit is contained in:
@@ -258,7 +258,9 @@ const ChunkImport = ({ kbId }: { kbId: string }) => {
|
||||
<Box>
|
||||
段落长度
|
||||
<MyTooltip
|
||||
label={'基于 Gpt3.5 的 Token 计算方法进行分段。前后段落会有 30% 的内容重叠。'}
|
||||
label={
|
||||
'按结束标点符号进行分段。前后段落会有 30% 的内容重叠。\n中文文档建议不要超过800,英文不要超过1500'
|
||||
}
|
||||
forceShow
|
||||
>
|
||||
<QuestionOutlineIcon ml={1} />
|
||||
@@ -269,7 +271,7 @@ const ChunkImport = ({ kbId }: { kbId: string }) => {
|
||||
flex={1}
|
||||
defaultValue={chunkLen}
|
||||
min={300}
|
||||
max={1000}
|
||||
max={2000}
|
||||
step={10}
|
||||
onChange={(e) => {
|
||||
setChunkLen(+e);
|
||||
@@ -294,10 +296,7 @@ const ChunkImport = ({ kbId }: { kbId: string }) => {
|
||||
<QuestionOutlineIcon ml={1} />
|
||||
</MyTooltip>
|
||||
</Box>
|
||||
<Box ml={4}>
|
||||
{}
|
||||
{price}元
|
||||
</Box>
|
||||
<Box ml={4}>{price}元</Box>
|
||||
</Flex>
|
||||
<Flex mt={3}>
|
||||
{showRePreview && (
|
||||
|
||||
@@ -1,18 +1,5 @@
|
||||
import React, { useState, useCallback, useMemo } from 'react';
|
||||
import {
|
||||
Box,
|
||||
Flex,
|
||||
Button,
|
||||
useTheme,
|
||||
NumberInput,
|
||||
NumberInputField,
|
||||
NumberInputStepper,
|
||||
NumberIncrementStepper,
|
||||
NumberDecrementStepper,
|
||||
Image,
|
||||
Textarea,
|
||||
Input
|
||||
} from '@chakra-ui/react';
|
||||
import { Box, Flex, Button, useTheme, Image, Input } from '@chakra-ui/react';
|
||||
import { useToast } from '@/hooks/useToast';
|
||||
import { useConfirm } from '@/hooks/useConfirm';
|
||||
import { readTxtContent, readPdfContent, readDocContent } from '@/utils/file';
|
||||
@@ -48,7 +35,7 @@ type FileItemType = {
|
||||
const QAImport = ({ kbId }: { kbId: string }) => {
|
||||
const model = qaModelList[0]?.model;
|
||||
const unitPrice = qaModelList[0]?.price || 3;
|
||||
const chunkLen = qaModelList[0].maxToken / 2;
|
||||
const chunkLen = qaModelList[0].maxToken * 0.45;
|
||||
const theme = useTheme();
|
||||
const router = useRouter();
|
||||
const { toast } = useToast();
|
||||
|
||||
Reference in New Issue
Block a user