perf: tooltip
This commit is contained in:
@@ -260,6 +260,7 @@ const ChunkImport = ({ kbId }: { kbId: string }) => {
|
||||
段落长度
|
||||
<MyTooltip
|
||||
label={'基于 Gpt3.5 的 Token 计算方法进行分段。前后段落会有 30% 的内容重叠。'}
|
||||
forceShow
|
||||
>
|
||||
<QuestionOutlineIcon ml={1} />
|
||||
</MyTooltip>
|
||||
@@ -287,7 +288,10 @@ const ChunkImport = ({ kbId }: { kbId: string }) => {
|
||||
<Flex py={5} alignItems={'center'}>
|
||||
<Box>
|
||||
预估价格
|
||||
<MyTooltip label={`索引生成计费为: ${formatPrice(unitPrice, 1000)}/1k tokens`}>
|
||||
<MyTooltip
|
||||
label={`索引生成计费为: ${formatPrice(unitPrice, 1000)}/1k tokens`}
|
||||
forceShow
|
||||
>
|
||||
<QuestionOutlineIcon ml={1} />
|
||||
</MyTooltip>
|
||||
</Box>
|
||||
|
||||
@@ -135,6 +135,7 @@ const CsvImport = ({ kbId }: { kbId: string }) => {
|
||||
fileExtension={fileExtension}
|
||||
onSelectFile={onSelectFile}
|
||||
isLoading={selecting}
|
||||
tipText={'如果导入文件乱码,请将 CSV 转成 utf-8 编码格式'}
|
||||
py={emptyFiles ? '100px' : 5}
|
||||
/>
|
||||
|
||||
|
||||
@@ -7,11 +7,12 @@ import MyIcon from '@/components/Icon';
|
||||
|
||||
interface Props extends BoxProps {
|
||||
fileExtension: string;
|
||||
tipText?: string;
|
||||
onSelectFile: (files: File[]) => Promise<void>;
|
||||
isLoading?: boolean;
|
||||
}
|
||||
|
||||
const FileSelect = ({ fileExtension, onSelectFile, isLoading, ...props }: Props) => {
|
||||
const FileSelect = ({ fileExtension, onSelectFile, isLoading, tipText, ...props }: Props) => {
|
||||
const { Loading: FileSelectLoading } = useLoading();
|
||||
|
||||
const { File, onOpen } = useSelectFile({
|
||||
@@ -41,6 +42,11 @@ const FileSelect = ({ fileExtension, onSelectFile, isLoading, ...props }: Props)
|
||||
</Box>
|
||||
</Flex>
|
||||
<Box mt={1}>支持 {fileExtension} 文件</Box>
|
||||
{tipText && (
|
||||
<Box mt={1} fontSize={'sm'} color={'myGray.600'}>
|
||||
{tipText}
|
||||
</Box>
|
||||
)}
|
||||
<FileSelectLoading loading={isLoading} fixed={false} />
|
||||
<File onSelect={onSelectFile} />
|
||||
</Box>
|
||||
|
||||
@@ -263,6 +263,7 @@ const QAImport = ({ kbId }: { kbId: string }) => {
|
||||
QA 拆分引导词{' '}
|
||||
<MyTooltip
|
||||
label={`可输入关于文件内容的范围介绍,例如:\n1. 关于 Laf 的介绍\n2. xxx的简历`}
|
||||
forceShow
|
||||
>
|
||||
<QuestionOutlineIcon ml={1} />
|
||||
</MyTooltip>
|
||||
@@ -282,7 +283,10 @@ const QAImport = ({ kbId }: { kbId: string }) => {
|
||||
<Flex py={5} alignItems={'center'}>
|
||||
<Box>
|
||||
预估价格
|
||||
<MyTooltip label={`索引生成计费为: ${formatPrice(unitPrice, 1000)}/1k tokens`}>
|
||||
<MyTooltip
|
||||
label={`索引生成计费为: ${formatPrice(unitPrice, 1000)}/1k tokens`}
|
||||
forceShow
|
||||
>
|
||||
<QuestionOutlineIcon ml={1} />
|
||||
</MyTooltip>
|
||||
</Box>
|
||||
|
||||
@@ -201,7 +201,7 @@ const Info = (
|
||||
<Flex mt={8} alignItems={'center'} w={'100%'} flexWrap={'wrap'}>
|
||||
<Box flex={['0 0 90px', '0 0 160px']} w={0}>
|
||||
分类标签
|
||||
<MyTooltip label={'用空格隔开多个标签,便于搜索'}>
|
||||
<MyTooltip label={'用空格隔开多个标签,便于搜索'} forceShow>
|
||||
<QuestionOutlineIcon ml={1} />
|
||||
</MyTooltip>
|
||||
</Box>
|
||||
|
||||
@@ -161,6 +161,7 @@ const Test = ({ kbId }: { kbId: string }) => {
|
||||
label={
|
||||
'根据知识库内容与测试文本的相似度进行排序,你可以根据测试结果调整对应的文本。\n注意:测试记录中的数据可能已经被修改过,点击某条测试数据后将展示最新的数据。'
|
||||
}
|
||||
forceShow
|
||||
>
|
||||
<QuestionOutlineIcon
|
||||
ml={2}
|
||||
|
||||
Reference in New Issue
Block a user