Files
ragflow/web/src/components/top-n-item.tsx
balibabu 0c9a7caa9d feat: add llm Select to KeywordExtractForm #918 (#1492)
### What problem does this PR solve?

feat: add llm Select to KeywordExtractForm #918

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
2024-07-12 17:22:01 +08:00

28 lines
498 B
TypeScript

import { useTranslate } from '@/hooks/commonHooks';
import { Form, Slider } from 'antd';
type FieldType = {
top_n?: number;
};
interface IProps {
initialValue?: number;
}
const TopNItem = ({ initialValue = 8 }: IProps) => {
const { t } = useTranslate('chat');
return (
<Form.Item<FieldType>
label={t('topN')}
name={'top_n'}
initialValue={initialValue}
tooltip={t('topNTip')}
>
<Slider max={30} />
</Form.Item>
);
};
export default TopNItem;