Skip to content

RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

Feat: Add the Experimental text to the option of the large model of the Image2text type of LayoutRecognizeItem (#5495)

balibabu6a71314d7081
diff --git a/web/src/components/layout-recognize.tsx b/web/src/components/layout-recognize.tsx
index 3279ac980e..b5642c37fb 100644
--- a/web/src/components/layout-recognize.tsx
+++ b/web/src/components/layout-recognize.tsx
@@ -20,7 +20,24 @@ const LayoutRecognize = () => {
value: x,
}));
- return [...list, ...allOptions[LlmModelType.Image2text]];
+ const image2TextList = allOptions[LlmModelType.Image2text].map((x) => {
+ return {
+ ...x,
+ options: x.options.map((y) => {
+ return {
+ ...y,
+ label: (
+ <div className="flex justify-between items-center gap-2">
+ {y.label}
+ <span className="text-red-500 text-sm">Experimental</span>
+ </div>
+ ),
+ };
+ }),
+ };
+ });
+
+ return [...list, ...image2TextList];
}, [allOptions, t]);
return (
@@ -30,7 +47,7 @@ const LayoutRecognize = () => {
initialValue={DocumentType.DeepDOC}
tooltip={t('layoutRecognizeTip')}
>
- <Select options={options} />
+ <Select options={options} popupMatchSelectWidth={false} />
</Form.Item>
);
};