mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-06-29 15:31:05 +08:00
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:
@@ -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',
|
||||
|
||||
@@ -1518,7 +1518,8 @@ NER:使用 spaCy NER 和基于规则的关键词提取来抽取实体和关系
|
||||
rerank: 'Rerank',
|
||||
sequence2text: 'sequence2text',
|
||||
tts: 'TTS',
|
||||
image2text: 'OCR',
|
||||
image2text: 'VLM',
|
||||
ocr: 'OCR',
|
||||
speech2text: 'ASR',
|
||||
},
|
||||
modelFeatures: '模型特性',
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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' },
|
||||
],
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user