Files
ragflow/web/src/components/large-model-form-field.tsx
balibabu 850e218051 Feat: Render DynamicCategorize with shadcn-ui. #3221 (#5610)
### 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)
2025-03-04 19:31:32 +08:00

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>
)}
/>
);
}