mirror of
https://git.mirrors.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-06-30 19:55:11 +08:00
### What problem does this PR solve? feat: Limit the maximum value of auto keywords to 30 #2687 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
parent
b73fe0cc3c
commit
c86afff447
@ -1,21 +1,29 @@
|
|||||||
import { useTranslate } from '@/hooks/common-hooks';
|
import { useTranslate } from '@/hooks/common-hooks';
|
||||||
import { Form, InputNumber } from 'antd';
|
import { Flex, Form, InputNumber, Slider } from 'antd';
|
||||||
|
|
||||||
const style = {
|
|
||||||
width: '100%',
|
|
||||||
};
|
|
||||||
|
|
||||||
export const AutoKeywordsItem = () => {
|
export const AutoKeywordsItem = () => {
|
||||||
const { t } = useTranslate('knowledgeDetails');
|
const { t } = useTranslate('knowledgeDetails');
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
<Form.Item label={t('autoKeywords')} tooltip={t('autoKeywordsTip')}>
|
||||||
|
<Flex gap={20} align="center">
|
||||||
|
<Flex flex={1}>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t('autoKeywords')}
|
|
||||||
name={['parser_config', 'auto_keywords']}
|
name={['parser_config', 'auto_keywords']}
|
||||||
tooltip={t('autoKeywordsTip')}
|
noStyle
|
||||||
initialValue={0}
|
initialValue={0}
|
||||||
>
|
>
|
||||||
<InputNumber style={style}></InputNumber>
|
<Slider max={30} style={{ width: '100%' }} />
|
||||||
|
</Form.Item>
|
||||||
|
</Flex>
|
||||||
|
<Form.Item
|
||||||
|
name={['parser_config', 'auto_keywords']}
|
||||||
|
noStyle
|
||||||
|
initialValue={0}
|
||||||
|
>
|
||||||
|
<InputNumber max={30} min={0} />
|
||||||
|
</Form.Item>
|
||||||
|
</Flex>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
@ -24,13 +32,25 @@ export const AutoQuestionsItem = () => {
|
|||||||
const { t } = useTranslate('knowledgeDetails');
|
const { t } = useTranslate('knowledgeDetails');
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
<Form.Item label={t('autoQuestions')} tooltip={t('autoQuestionsTip')}>
|
||||||
|
<Flex gap={20} align="center">
|
||||||
|
<Flex flex={1}>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t('autoQuestions')}
|
|
||||||
name={['parser_config', 'auto_questions']}
|
name={['parser_config', 'auto_questions']}
|
||||||
tooltip={t('autoQuestionsTip')}
|
noStyle
|
||||||
initialValue={0}
|
initialValue={0}
|
||||||
>
|
>
|
||||||
<InputNumber style={style}></InputNumber>
|
<Slider max={10} style={{ width: '100%' }} />
|
||||||
|
</Form.Item>
|
||||||
|
</Flex>
|
||||||
|
<Form.Item
|
||||||
|
name={['parser_config', 'auto_questions']}
|
||||||
|
noStyle
|
||||||
|
initialValue={0}
|
||||||
|
>
|
||||||
|
<InputNumber max={10} min={0} />
|
||||||
|
</Form.Item>
|
||||||
|
</Flex>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user