refactor: remove enable_multimodal and adjust parent-child configuration

- Removed the `enable_multimodal` field from the `ChunkingConfigOverride` interface and related components to streamline configuration.
- Updated the logic in `UploadConfirmDialog.vue` to default `enableParentChild` to false when initializing from knowledge base info.
- Modified the `mergeChunkingConfig` function to ensure that `EnableParentChild` is authoritative, allowing explicit control over its state.
- Added a new test case in `knowledge_process_config_test.go` to verify the behavior of parent-child toggles in process configuration resolution.
This commit is contained in:
wizardchen
2026-06-09 20:13:49 +08:00
committed by lyingbug
parent 76dc23226d
commit d8a26f7c23
6 changed files with 28 additions and 24 deletions
@@ -1026,7 +1026,6 @@ const buildSubmitData = () => {
chunk_size: formData.value.chunkingConfig.chunkSize,
chunk_overlap: formData.value.chunkingConfig.chunkOverlap,
separators: formData.value.chunkingConfig.separators,
enable_multimodal: formData.value.multimodalConfig.enabled,
enable_parent_child: formData.value.chunkingConfig.enableParentChild,
parent_chunk_size: formData.value.chunkingConfig.parentChunkSize,
child_chunk_size: formData.value.chunkingConfig.childChunkSize,
@@ -622,7 +622,7 @@ function initFromKbInfo(kb: any) {
chunkOverlap: kb.chunking_config?.chunk_overlap || 80,
separators: kb.chunking_config?.separators || ['\n\n', '\n', '。', '!', '?', ';', ';'],
parserEngineRules: kb.chunking_config?.parser_engine_rules || undefined,
enableParentChild: kb.chunking_config?.enable_parent_child ?? true,
enableParentChild: kb.chunking_config?.enable_parent_child ?? false,
parentChunkSize: kb.chunking_config?.parent_chunk_size || 4096,
childChunkSize: kb.chunking_config?.child_chunk_size || 384,
strategy: kb.chunking_config?.strategy || 'auto',