### What problem does this PR solve? fix dataset-page's bugs,Input component supports icon, added Radio component, and removed antd from chunk-result-bar page [#3221 ](https://github.com/infiniflow/ragflow/issues/3221) ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
22 lines
613 B
TypeScript
22 lines
613 B
TypeScript
import { FormLayout } from '@/constants/form';
|
|
import { useTranslate } from '@/hooks/common-hooks';
|
|
import { SliderInputFormField } from './slider-input-form-field';
|
|
|
|
interface IProps {
|
|
initialValue?: number;
|
|
max?: number;
|
|
}
|
|
|
|
export function MaxTokenNumberFormField({ max = 2048, initialValue }: IProps) {
|
|
const { t } = useTranslate('knowledgeConfiguration');
|
|
|
|
return (
|
|
<SliderInputFormField
|
|
name={'parser_config.chunk_token_num'}
|
|
label={t('chunkTokenNumber')}
|
|
max={max}
|
|
defaultValue={initialValue ?? 0}
|
|
layout={FormLayout.Horizontal}
|
|
></SliderInputFormField>
|
|
);
|
|
}
|