mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
### What problem does this PR solve? Implements RAPTOR for better chunking #882 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@ -8,6 +8,9 @@ import {
|
||||
|
||||
import LayoutRecognize from '@/components/layout-recognize';
|
||||
import MaxTokenNumber from '@/components/max-token-number';
|
||||
import ParseConfiguration, {
|
||||
showRaptorParseConfiguration,
|
||||
} from '@/components/parse-configuration';
|
||||
import { useTranslate } from '@/hooks/commonHooks';
|
||||
import { FormInstance } from 'antd/lib';
|
||||
import styles from './index.less';
|
||||
@ -99,15 +102,19 @@ const ConfigurationForm = ({ form }: { form: FormInstance }) => {
|
||||
{({ getFieldValue }) => {
|
||||
const parserId = getFieldValue('parser_id');
|
||||
|
||||
if (parserId === 'naive') {
|
||||
return (
|
||||
<>
|
||||
<MaxTokenNumber></MaxTokenNumber>
|
||||
<LayoutRecognize></LayoutRecognize>
|
||||
</>
|
||||
);
|
||||
}
|
||||
return null;
|
||||
return (
|
||||
<>
|
||||
{parserId === 'naive' && (
|
||||
<>
|
||||
<MaxTokenNumber></MaxTokenNumber>
|
||||
<LayoutRecognize></LayoutRecognize>
|
||||
</>
|
||||
)}
|
||||
{showRaptorParseConfiguration(parserId) && (
|
||||
<ParseConfiguration></ParseConfiguration>
|
||||
)}
|
||||
</>
|
||||
);
|
||||
}}
|
||||
</Form.Item>
|
||||
|
||||
|
||||
@ -62,7 +62,7 @@ export const useFetchKnowledgeConfigurationOnMount = (form: FormInstance) => {
|
||||
'embd_id',
|
||||
'parser_id',
|
||||
'language',
|
||||
'parser_config.chunk_token_num',
|
||||
'parser_config',
|
||||
]),
|
||||
avatar: fileList,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user