File size: 526 Bytes
68ed806 be99f83 53bc504 0109a6b 53bc504 0109a6b be99f83 53bc504 be99f83 0109a6b be99f83 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
import { useTranslate } from '@/hooks/common-hooks';
import { Form, Slider } from 'antd';
type FieldType = {
top_n?: number;
};
interface IProps {
initialValue?: number;
max?: number;
}
const TopNItem = ({ initialValue = 8, max = 30 }: IProps) => {
const { t } = useTranslate('chat');
return (
<Form.Item<FieldType>
label={t('topN')}
name={'top_n'}
initialValue={initialValue}
tooltip={t('topNTip')}
>
<Slider max={max} />
</Form.Item>
);
};
export default TopNItem;
|