mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-20 04:39:00 +08:00
### What problem does this PR solve? Feat: Initialize the data pipeline canvas. #9869 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
69 lines
1.8 KiB
TypeScript
69 lines
1.8 KiB
TypeScript
import { NextLLMSelect } from '@/components/llm-select/next';
|
|
import { MessageHistoryWindowSizeFormField } from '@/components/message-history-window-size-item';
|
|
import {
|
|
Form,
|
|
FormControl,
|
|
FormField,
|
|
FormItem,
|
|
FormLabel,
|
|
FormMessage,
|
|
} from '@/components/ui/form';
|
|
import { RAGFlowSelect } from '@/components/ui/select';
|
|
import { useTranslation } from 'react-i18next';
|
|
import { INextOperatorForm } from '../../interface';
|
|
import { GoogleLanguageOptions } from '../../options';
|
|
|
|
const RewriteQuestionForm = ({ form }: INextOperatorForm) => {
|
|
const { t } = useTranslation();
|
|
|
|
return (
|
|
<Form {...form}>
|
|
<form
|
|
className="space-y-6"
|
|
onSubmit={(e) => {
|
|
e.preventDefault();
|
|
}}
|
|
>
|
|
<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>
|
|
)}
|
|
/>
|
|
<FormField
|
|
control={form.control}
|
|
name="language"
|
|
render={({ field }) => (
|
|
<FormItem>
|
|
<FormLabel tooltip={t('chat.languageTip')}>
|
|
{t('chat.language')}
|
|
</FormLabel>
|
|
<FormControl>
|
|
<RAGFlowSelect
|
|
options={GoogleLanguageOptions}
|
|
allowClear={true}
|
|
{...field}
|
|
></RAGFlowSelect>
|
|
</FormControl>
|
|
<FormMessage />
|
|
</FormItem>
|
|
)}
|
|
/>
|
|
|
|
<MessageHistoryWindowSizeFormField></MessageHistoryWindowSizeFormField>
|
|
</form>
|
|
</Form>
|
|
);
|
|
};
|
|
|
|
export default RewriteQuestionForm;
|