Implementation:Infiniflow Ragflow LayoutRecognizeFormField Component
| Knowledge Sources | |
|---|---|
| Domains | Frontend, UI_Components, Document_Processing |
| Last Updated | 2026-02-12 06:00 GMT |
Overview
Concrete form field for selecting document layout recognition methods with dynamic options from multiple LLM model types provided by the RAGFlow frontend.
Description
Exports LayoutRecognizeFormField and ParseDocumentType enum (DeepDOC, PlainText, Docling, TCADPParser). The form field dynamically builds its option list from registered LLM models of type "layout_recognize" and supports conditional rendering of MinerU and PaddleOCR sub-options.
Usage
Import this component in dataset configuration forms where users choose the document layout recognition engine for parsing uploaded documents.
Code Reference
Source Location
- Repository: Infiniflow_Ragflow
- File: web/src/components/layout-recognize-form-field.tsx
- Lines: 1-126
Signature
export enum ParseDocumentType {
DeepDOC = 'DeepDOC',
PlainText = 'PlainText',
Docling = 'Docling',
TCADPParser = 'TCADPParser',
}
export function LayoutRecognizeFormField({
name, horizontal, optionsWithoutLLM, label,
showMineruOptions, showPaddleocrOptions,
}: {
name?: string;
horizontal?: boolean;
optionsWithoutLLM?: { value: string; label: string }[];
label?: ReactNode;
showMineruOptions?: boolean;
showPaddleocrOptions?: boolean;
}): JSX.Element;
Import
import { LayoutRecognizeFormField, ParseDocumentType } from '@/components/layout-recognize-form-field';
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| name | string | No | Form field name (default: 'layout_recognize') |
| showMineruOptions | boolean | No | Show MinerU config fields |
| showPaddleocrOptions | boolean | No | Show PaddleOCR config fields |
Outputs
| Name | Type | Description |
|---|---|---|
| Form value | string | Selected layout recognizer identifier |
Usage Examples
import { LayoutRecognizeFormField } from '@/components/layout-recognize-form-field';
<FormProvider {...methods}>
<LayoutRecognizeFormField showMineruOptions showPaddleocrOptions />
</FormProvider>