Skip to content

Commit

Permalink
Feat: Set default value of layout_recognize to "DeepDOC"
Browse files Browse the repository at this point in the history
  • Loading branch information
cike8899 committed Jan 22, 2025
1 parent 1bf4796 commit 7404233
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions web/src/components/layout-recognize.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,17 @@ import { useSelectLlmOptionsByModelType } from '@/hooks/llm-hooks';
import { Form, Select } from 'antd';
import { useMemo } from 'react';

const enum DocumentType {
DeepDOC = 'DeepDOC',
PlainText = 'Plain Text',
}

const LayoutRecognize = () => {
const { t } = useTranslate('knowledgeDetails');
const allOptions = useSelectLlmOptionsByModelType();

const options = useMemo(() => {
const list = ['DeepDOC', 'Plain Text'].map((x) => ({
const list = [DocumentType.DeepDOC, DocumentType.PlainText].map((x) => ({
label: x,
value: x,
}));
Expand All @@ -21,8 +26,7 @@ const LayoutRecognize = () => {
<Form.Item
name={['parser_config', 'layout_recognize']}
label={t('layoutRecognize')}
initialValue={true}
valuePropName="checked"
initialValue={DocumentType.DeepDOC}
tooltip={t('layoutRecognizeTip')}
>
<Select options={options} />
Expand Down

0 comments on commit 7404233

Please sign in to comment.