Files
ragflow/web/src/components/top-n-item.tsx
balibabu b44e65a12e Feat: Replace antd with shadcn and delete the template node. #10427 (#11693)
### What problem does this PR solve?

Feat: Replace antd with shadcn and delete the template node. #10427
### Type of change


- [x] New Feature (non-breaking change which adds functionality)
2025-12-03 14:37:58 +08:00

27 lines
633 B
TypeScript

import { FormLayout } from '@/constants/form';
import { useTranslate } from '@/hooks/common-hooks';
import { z } from 'zod';
import { SliderInputFormField } from './slider-input-form-field';
interface SimilaritySliderFormFieldProps {
max?: number;
}
export const topnSchema = {
top_n: z.number().optional(),
};
export function TopNFormField({ max = 30 }: SimilaritySliderFormFieldProps) {
const { t } = useTranslate('chat');
return (
<SliderInputFormField
name={'top_n'}
label={t('topN')}
max={max}
tooltip={t('topNTip')}
layout={FormLayout.Vertical}
></SliderInputFormField>
);
}