瀏覽代碼

feat: Add top_n to DeepLForm #1739 (#2629)

### 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):
tags/v0.12.0
balibabu 1 年之前
父節點
當前提交
a246e5644b
No account linked to committer's email address
共有 2 個文件被更改,包括 4 次插入5 次删除
  1. 1
    1
      web/src/pages/flow/constant.tsx
  2. 3
    4
      web/src/pages/flow/deepl-form/index.tsx

+ 1
- 1
web/src/pages/flow/constant.tsx 查看文件

@@ -410,7 +410,7 @@ export const initialGoogleScholarValues = {
};

export const initialDeepLValues = {
text: 5,
top_n: 5,
auth_key: 'relevance',
};


+ 3
- 4
web/src/pages/flow/deepl-form/index.tsx 查看文件

@@ -1,5 +1,6 @@
import TopNItem from '@/components/top-n-item';
import { useTranslate } from '@/hooks/common-hooks';
import { Form, InputNumber, Select } from 'antd';
import { Form, Select } from 'antd';
import { DeepLSourceLangOptions, DeepLTargetLangOptions } from '../constant';
import { useBuildSortOptions } from '../form-hooks';
import { IOperatorForm } from '../interface';
@@ -17,9 +18,7 @@ const DeepLForm = ({ onValuesChange, form }: IOperatorForm) => {
form={form}
onValuesChange={onValuesChange}
>
<Form.Item label={t('text')} name={'text'}>
<InputNumber></InputNumber>
</Form.Item>
<TopNItem initialValue={5}></TopNItem>
<Form.Item label={t('authKey')} name={'auth_key'}>
<Select options={options}></Select>
</Form.Item>

Loading…
取消
儲存