mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-01-31 23:55:06 +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:
@ -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