mirror of
https://git.mirrors.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-08-14 01:15:51 +08:00
### What problem does this PR solve? feat: Add top_n to DeepLForm #1739 ### Type of change - [ ] Bug Fix (non-breaking change which fixes an issue) - [x] New Feature (non-breaking change which adds functionality) - [ ] Documentation Update - [ ] Refactoring - [ ] Performance Improvement - [ ] Other (please describe):
This commit is contained in:
parent
96f56a3c43
commit
a246e5644b
@ -410,7 +410,7 @@ export const initialGoogleScholarValues = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const initialDeepLValues = {
|
export const initialDeepLValues = {
|
||||||
text: 5,
|
top_n: 5,
|
||||||
auth_key: 'relevance',
|
auth_key: 'relevance',
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
|
import TopNItem from '@/components/top-n-item';
|
||||||
import { useTranslate } from '@/hooks/common-hooks';
|
import { useTranslate } from '@/hooks/common-hooks';
|
||||||
import { Form, InputNumber, Select } from 'antd';
|
import { Form, Select } from 'antd';
|
||||||
import { DeepLSourceLangOptions, DeepLTargetLangOptions } from '../constant';
|
import { DeepLSourceLangOptions, DeepLTargetLangOptions } from '../constant';
|
||||||
import { useBuildSortOptions } from '../form-hooks';
|
import { useBuildSortOptions } from '../form-hooks';
|
||||||
import { IOperatorForm } from '../interface';
|
import { IOperatorForm } from '../interface';
|
||||||
@ -17,9 +18,7 @@ const DeepLForm = ({ onValuesChange, form }: IOperatorForm) => {
|
|||||||
form={form}
|
form={form}
|
||||||
onValuesChange={onValuesChange}
|
onValuesChange={onValuesChange}
|
||||||
>
|
>
|
||||||
<Form.Item label={t('text')} name={'text'}>
|
<TopNItem initialValue={5}></TopNItem>
|
||||||
<InputNumber></InputNumber>
|
|
||||||
</Form.Item>
|
|
||||||
<Form.Item label={t('authKey')} name={'auth_key'}>
|
<Form.Item label={t('authKey')} name={'auth_key'}>
|
||||||
<Select options={options}></Select>
|
<Select options={options}></Select>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user