mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
### What problem does this PR solve? fix: Optimize internationalization configuration - Update multi-language options, adding general translations for functions like Select All and Clear - Add internationalization support for modules like Chat, Search, and Datasets ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
24 lines
654 B
TypeScript
24 lines
654 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')}
|
|
tooltip={t('chunkTokenNumberTip')}
|
|
max={max}
|
|
defaultValue={initialValue ?? 0}
|
|
layout={FormLayout.Horizontal}
|
|
></SliderInputFormField>
|
|
);
|
|
}
|