mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-23 23:16:58 +08:00
Refa: image table context window (#12132)
### What problem does this PR solve? Image table context window ### Type of change - [x] Refactoring
This commit is contained in:
@ -120,7 +120,7 @@ export function ChunkMethodDialog({
|
||||
auto_questions: z.coerce.number().optional(),
|
||||
html4excel: z.boolean().optional(),
|
||||
toc_extraction: z.boolean().optional(),
|
||||
image_context_window: z.coerce.number().optional(),
|
||||
image_table_context_window: z.coerce.number().optional(),
|
||||
mineru_parse_method: z.enum(['auto', 'txt', 'ocr']).optional(),
|
||||
mineru_formula_enable: z.boolean().optional(),
|
||||
mineru_table_enable: z.boolean().optional(),
|
||||
|
||||
@ -18,7 +18,7 @@ export function useDefaultParserValues() {
|
||||
auto_questions: 0,
|
||||
html4excel: false,
|
||||
toc_extraction: false,
|
||||
image_context_window: 0,
|
||||
image_table_context_window: 0,
|
||||
mineru_parse_method: 'auto',
|
||||
mineru_formula_enable: true,
|
||||
mineru_table_enable: true,
|
||||
|
||||
@ -208,6 +208,9 @@ export default {
|
||||
plainText: 'Einfach',
|
||||
},
|
||||
knowledgeConfiguration: {
|
||||
imageTableContextWindow: 'Kontextfenster für Bild und Tabelle',
|
||||
imageTableContextWindowTip:
|
||||
'Erfasst N Token Text ober- und unterhalb von Bild und Tabelle, um reicheren Kontext bereitzustellen.',
|
||||
titleDescription:
|
||||
'Aktualisieren Sie hier Ihre Wissensdatenbank-Konfiguration, insbesondere die Chunk-Methode.',
|
||||
name: 'Name der Wissensdatenbank',
|
||||
|
||||
@ -371,8 +371,8 @@ Procedural Memory: Learned skills, habits, and automated procedures.`,
|
||||
globalIndexModel: 'Indexing model',
|
||||
settings: 'Settings',
|
||||
autoMetadataTip: `Automatically generate metadata. Applies to new files during parsing. Existing files require re-parsing to update (chunks remain preserved). Be aware that extra tokens will be consumed by the indexing model specified in 'Configuration'.`,
|
||||
imageContextWindow: 'Image & table context window',
|
||||
imageContextWindowTip:
|
||||
imageTableContextWindow: 'Image & table context window',
|
||||
imageTableContextWindowTip:
|
||||
'Captures N tokens of text above and below the image & table to provide richer background context.',
|
||||
autoMetadata: 'Auto metadata',
|
||||
mineruOptions: 'MinerU Options',
|
||||
|
||||
@ -196,6 +196,9 @@ export default {
|
||||
knowledgeConfiguration: {
|
||||
titleDescription:
|
||||
'Modifiez ici la configuration de votre base de connaissances, notamment la méthode de découpage.',
|
||||
imageTableContextWindow: 'Fenêtre de contexte image & tableau',
|
||||
imageTableContextWindowTip:
|
||||
"Capture N jetons de texte au-dessus et au-dessous de l'image et du tableau pour fournir un contexte plus riche.",
|
||||
name: 'Nom de la base de connaissances',
|
||||
photo: 'Photo de la base de connaissances',
|
||||
photoTip: 'Vous pouvez téléverser un fichier de 4 Mo',
|
||||
|
||||
@ -163,6 +163,9 @@ export default {
|
||||
html4excelTip: `Gunakan bersama dengan metode pemotongan General. Ketika dinonaktifkan, file spreadsheet (XLSX, XLS (Excel 97-2003)) akan dianalisis baris demi baris menjadi pasangan kunci-nilai. Ketika diaktifkan, file spreadsheet akan dianalisis menjadi tabel HTML. Jika tabel asli memiliki lebih dari 12 baris, sistem akan secara otomatis membagi menjadi beberapa tabel HTML setiap 12 baris. Untuk informasi lebih lanjut, lihat https://ragflow.io/docs/dev/enable_excel2html.`,
|
||||
},
|
||||
knowledgeConfiguration: {
|
||||
imageTableContextWindow: 'Jendela konteks gambar & tabel',
|
||||
imageTableContextWindowTip:
|
||||
'Mengambil N token teks di atas dan di bawah gambar dan tabel untuk memberikan konteks latar yang lebih kaya.',
|
||||
titleDescription:
|
||||
'Perbarui detail basis pengetahuan Anda terutama metode parsing di sini.',
|
||||
name: 'Nama basis pengetahuan',
|
||||
|
||||
@ -291,6 +291,9 @@ export default {
|
||||
reRankModelWaring: 'Il modello re-rank richiede molto tempo.',
|
||||
},
|
||||
knowledgeConfiguration: {
|
||||
imageTableContextWindow: 'Finestra di contesto immagine e tabella',
|
||||
imageTableContextWindowTip:
|
||||
"Cattura N token di testo sopra e sotto l'immagine e la tabella per fornire un contesto più ricco.",
|
||||
generationScopeTip:
|
||||
"Determina se RAPTOR viene generato per l'intero dataset o per un singolo file.",
|
||||
scopeDataset: 'Dataset',
|
||||
|
||||
@ -171,6 +171,9 @@ export default {
|
||||
autoQuestionsTip: `ランキングスコアを向上させるために、「システムモデル設定」で定義されたチャットモデルを使用して、ナレッジベースのチャンクごとにN個の質問を抽出します。 これにより、追加のトークンが消費されることに注意してください。 結果はチャンクリストで表示および編集できます。 質問抽出エラーはチャンク処理をブロックしません。空の結果が元のチャンクに追加されます。詳細は https://ragflow.io/docs/dev/autokeyword_autoquestion をご覧ください。`,
|
||||
},
|
||||
knowledgeConfiguration: {
|
||||
imageTableContextWindow: '画像・表コンテキストウィンドウ',
|
||||
imageTableContextWindowTip:
|
||||
'画像と表の上下のテキストをNトークン取得し、より豊かな背景コンテキストを提供します。',
|
||||
titleDescription:
|
||||
'ナレッジベースの設定、特にチャンク方法をここで更新してください。',
|
||||
name: 'ナレッジベース名',
|
||||
|
||||
@ -201,6 +201,9 @@ export default {
|
||||
metaData: 'Metadados',
|
||||
},
|
||||
knowledgeConfiguration: {
|
||||
imageTableContextWindow: 'Janela de contexto de imagem e tabela',
|
||||
imageTableContextWindowTip:
|
||||
'Captura N tokens de texto acima e abaixo da imagem e da tabela para fornecer um contexto de fundo mais rico.',
|
||||
titleDescription:
|
||||
'Atualize a configuração da sua base de conhecimento aqui, especialmente o método de fragmentação.',
|
||||
name: 'Nome da base de conhecimento',
|
||||
|
||||
@ -277,6 +277,9 @@ export default {
|
||||
reRankModelWaring: 'Re-rank модель очень требовательна ко времени.',
|
||||
},
|
||||
knowledgeConfiguration: {
|
||||
imageTableContextWindow: 'Окно контекста изображения и таблицы',
|
||||
imageTableContextWindowTip:
|
||||
'Захватывает N токенов текста выше и ниже изображения и таблицы, чтобы дать более богатый контекст.',
|
||||
generationScopeTip:
|
||||
'Определяет, генерируется ли RAPTOR для всего набора данных или для одного файла.',
|
||||
scopeDataset: 'Датасет',
|
||||
|
||||
@ -182,6 +182,9 @@ export default {
|
||||
documentMetaTips: `<p>Dữ liệu meta ở định dạng Json (không thể tìm kiếm). Nó sẽ được thêm vào prompt cho LLM nếu bất kỳ đoạn nào của tài liệu này được đưa vào prompt.</p> <p>Ví dụ:</p> <b>Dữ liệu meta là:</b><br> <code> { "Author": "Alex Dowson", "Date": "2024-11-12" } </code><br><b>Prompt sẽ là:</b><br> <p>Tài liệu: the_name_of_document</p> <p>Tác giả: Alex Dowson</p> <p>Ngày: 2024-11-12</p> <p>Các đoạn liên quan như sau:</p> <ul> <li> Đây là nội dung của đoạn...</li> <li> Đây là nội dung của đoạn...</li> </ul>`,
|
||||
},
|
||||
knowledgeConfiguration: {
|
||||
imageTableContextWindow: 'Cửa sổ ngữ cảnh hình ảnh & bảng',
|
||||
imageTableContextWindowTip:
|
||||
'Trích xuất N token văn bản phía trên và phía dưới hình ảnh và bảng để cung cấp bối cảnh phong phú hơn.',
|
||||
titleDescription:
|
||||
'Cập nhật cấu hình cơ sở kiến thức của bạn tại đây, đặc biệt là phương thức phân khối.',
|
||||
name: 'Tên cơ sở kiến thức',
|
||||
|
||||
@ -203,6 +203,9 @@ export default {
|
||||
},
|
||||
knowledgeConfiguration: {
|
||||
titleDescription: '在這裡更新您的知識庫詳細信息,尤其是切片方法。',
|
||||
imageTableContextWindow: '影像與表格上下文視窗',
|
||||
imageTableContextWindowTip:
|
||||
'擷取影像與表格上下方的 N 個 token,為該 chunk 提供更豐富的背景上下文。',
|
||||
name: '知識庫名稱',
|
||||
photo: '知識庫圖片',
|
||||
photoTip: '你可以上傳4MB的文件',
|
||||
|
||||
@ -345,6 +345,9 @@ export default {
|
||||
},
|
||||
knowledgeConfiguration: {
|
||||
settings: '设置',
|
||||
imageTableContextWindow: '图像与表格上下文窗口',
|
||||
imageTableContextWindowTip:
|
||||
'抓取图像与表格上下方的 N 个 token,为该 chunk 提供更丰富的背景上下文。',
|
||||
autoMetadata: '自动元数据',
|
||||
mineruOptions: 'MinerU 选项',
|
||||
mineruParseMethod: '解析方法',
|
||||
|
||||
@ -324,14 +324,14 @@ export function ImageContextWindow() {
|
||||
return (
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="parser_config.image_context_window"
|
||||
name="parser_config.image_table_context_window"
|
||||
render={({ field }) => (
|
||||
<FormItem>
|
||||
<FormControl>
|
||||
<SliderInputFormField
|
||||
{...field}
|
||||
label={t('imageContextWindow')}
|
||||
tooltip={t('imageContextWindowTip')}
|
||||
label={t('imageTableContextWindow')}
|
||||
tooltip={t('imageTableContextWindowTip')}
|
||||
defaultValue={0}
|
||||
min={0}
|
||||
max={256}
|
||||
|
||||
@ -32,7 +32,7 @@ export const formSchema = z
|
||||
tag_kb_ids: z.array(z.string()).nullish(),
|
||||
topn_tags: z.number().optional(),
|
||||
toc_extraction: z.boolean().optional(),
|
||||
image_context_window: z.number().optional(),
|
||||
image_table_context_window: z.number().optional(),
|
||||
overlapped_percent: z.number().optional(),
|
||||
// MinerU-specific options
|
||||
mineru_parse_method: z.enum(['auto', 'txt', 'ocr']).optional(),
|
||||
|
||||
@ -70,7 +70,7 @@ export default function DatasetSettings() {
|
||||
html4excel: false,
|
||||
topn_tags: 3,
|
||||
toc_extraction: false,
|
||||
image_context_window: 0,
|
||||
image_table_context_window: 0,
|
||||
overlapped_percent: 0,
|
||||
// MinerU-specific defaults
|
||||
mineru_parse_method: 'auto',
|
||||
|
||||
@ -73,6 +73,10 @@ export function SavingButton() {
|
||||
...values,
|
||||
parser_config: {
|
||||
...values.parser_config,
|
||||
image_context_size:
|
||||
values.parser_config.image_table_context_window,
|
||||
table_context_size:
|
||||
values.parser_config.image_table_context_window,
|
||||
// Unset children delimiter if this option is not enabled
|
||||
children_delimiter: values.parser_config.enable_children
|
||||
? values.parser_config.children_delimiter
|
||||
|
||||
Reference in New Issue
Block a user