Fix: dataset update parent child (#14167)

### What problem does this PR solve?

Correctly set parent child config in parser_config.

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
Lynn
2026-04-17 10:41:50 +08:00
committed by GitHub
parent e03212fd7a
commit f194a09cd6

View File

@@ -302,6 +302,9 @@ export const useUpdateKnowledge = (shouldFetchList = false) => {
filename_embd_weight,
task_page_size,
pages,
children_delimiter,
use_parent_child,
enable_children,
ext,
...parserExt
} = parserConfig;
@@ -319,6 +322,15 @@ export const useUpdateKnowledge = (shouldFetchList = false) => {
filename_embd_weight,
task_page_size,
pages,
parent_child:
children_delimiter !== undefined ||
use_parent_child !== undefined ||
enable_children !== undefined
? {
children_delimiter,
use_parent_child: use_parent_child ?? enable_children,
}
: undefined,
ext: { ...ext, ...parserExt },
};
};