mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
### What problem does this PR solve? feat: Add component ExecSQL #1739 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
29 lines
526 B
TypeScript
29 lines
526 B
TypeScript
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;
|