mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-20 04:39:00 +08:00
### What problem does this PR solve? Feat: Supports page rank score for different knowledge bases. #3794 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
33
web/src/components/page-rank.tsx
Normal file
33
web/src/components/page-rank.tsx
Normal file
@ -0,0 +1,33 @@
|
||||
import { useTranslate } from '@/hooks/common-hooks';
|
||||
import { Flex, Form, InputNumber, Slider } from 'antd';
|
||||
|
||||
const PageRank = () => {
|
||||
const { t } = useTranslate('knowledgeConfiguration');
|
||||
|
||||
return (
|
||||
<Form.Item label={t('pageRank')} tooltip={t('pageRankTip')}>
|
||||
<Flex gap={20} align="center">
|
||||
<Flex flex={1}>
|
||||
<Form.Item
|
||||
name={['parser_config', 'pagerank']}
|
||||
noStyle
|
||||
initialValue={0}
|
||||
rules={[{ required: true }]}
|
||||
>
|
||||
<Slider max={100} style={{ width: '100%' }} />
|
||||
</Form.Item>
|
||||
</Flex>
|
||||
<Form.Item
|
||||
name={['parser_config', 'pagerank']}
|
||||
noStyle
|
||||
initialValue={0}
|
||||
rules={[{ required: true }]}
|
||||
>
|
||||
<InputNumber max={100} min={0} />
|
||||
</Form.Item>
|
||||
</Flex>
|
||||
</Form.Item>
|
||||
);
|
||||
};
|
||||
|
||||
export default PageRank;
|
||||
Reference in New Issue
Block a user