mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-18 03:26:42 +08:00
### What problem does this PR solve? Feat: Render DynamicCategorize with shadcn-ui. #3221 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
32 lines
725 B
TypeScript
32 lines
725 B
TypeScript
import {
|
|
FormControl,
|
|
FormField,
|
|
FormItem,
|
|
FormLabel,
|
|
FormMessage,
|
|
} from '@/components/ui/form';
|
|
import { useFormContext } from 'react-hook-form';
|
|
import { useTranslation } from 'react-i18next';
|
|
import { NextLLMSelect } from './llm-select';
|
|
|
|
export function LargeModelFormField() {
|
|
const form = useFormContext();
|
|
const { t } = useTranslation();
|
|
|
|
return (
|
|
<FormField
|
|
control={form.control}
|
|
name="llm_id"
|
|
render={({ field }) => (
|
|
<FormItem>
|
|
<FormLabel tooltip={t('chat.modelTip')}>{t('chat.model')}</FormLabel>
|
|
<FormControl>
|
|
<NextLLMSelect {...field} />
|
|
</FormControl>
|
|
<FormMessage />
|
|
</FormItem>
|
|
)}
|
|
/>
|
|
);
|
|
}
|