fix: update localization keys for image2text and add ocr option (#16076)

### What problem does this PR solve?

fix: update localization keys for image2text and add ocr option

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
chanx
2026-06-16 17:09:08 +08:00
committed by GitHub
parent 509e5b0fed
commit ba8796b8da
4 changed files with 21 additions and 7 deletions

View File

@@ -1810,7 +1810,8 @@ Example: Virtual Hosted Style`,
rerank: 'Rerank',
sequence2text: 'sequence2text',
tts: 'TTS',
image2text: 'OCR',
image2text: 'VLM',
ocr: 'OCR',
speech2text: 'ASR',
},
showToc: 'Show content',

View File

@@ -1518,7 +1518,8 @@ NER使用 spaCy NER 和基于规则的关键词提取来抽取实体和关系
rerank: 'Rerank',
sequence2text: 'sequence2text',
tts: 'TTS',
image2text: 'OCR',
image2text: 'VLM',
ocr: 'OCR',
speech2text: 'ASR',
},
modelFeatures: '模型特性',

View File

@@ -7,6 +7,7 @@ import {
CollapsibleTrigger,
} from '@/components/ui/collapsible';
import { Switch } from '@/components/ui/switch';
import { RAGFlowTooltip } from '@/components/ui/tooltip';
import { ModelStatus } from '@/constants/llm';
import {
useDeleteProviderInstance,
@@ -360,12 +361,22 @@ function ModelListItem({
</span>
))}
{model.model_type.length > 3 && (
<span
className="px-2 py-1 text-xs bg-bg-card text-text-secondary rounded-md"
key="ellipsis"
<RAGFlowTooltip
tooltip={
<div className="flex flex-col gap-1">
{model.model_type.slice(3).map((type) => (
<span key={type}>{type}</span>
))}
</div>
}
>
...
</span>
<span
className="px-2 py-1 text-xs bg-bg-card text-text-secondary rounded-md cursor-pointer"
key="ellipsis"
>
...
</span>
</RAGFlowTooltip>
)}
<Button
size="icon"

View File

@@ -30,6 +30,7 @@ export const MODEL_FIELD_SCHEMA: AddCustomModelDialogFields[] = [
{ value: 'rerank', label: 'modelTypes.rerank' },
{ value: 'tts', label: 'modelTypes.tts' },
{ value: 'image2text', label: 'modelTypes.image2text' },
{ value: 'ocr', label: 'modelTypes.ocr' },
{ value: 'speech2text', label: 'modelTypes.speech2text' },
],
},