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:
Yongteng Lei
2025-12-23 19:51:01 +08:00
committed by GitHub
parent 033029eaa1
commit 6c93157b14
17 changed files with 43 additions and 9 deletions

View File

@ -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}

View File

@ -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(),

View File

@ -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',

View File

@ -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