fix segment display the default (#21317)

Co-authored-by: lizb <lizb@sugon.com>
This commit is contained in:
Ganondorf 2025-06-23 13:48:39 +08:00 committed by GitHub
parent b348455144
commit ea68c92bbb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -512,6 +512,20 @@ const StepTwo = ({
setOverlap(overlap!) setOverlap(overlap!)
setRules(rules.pre_processing_rules) setRules(rules.pre_processing_rules)
setDefaultConfig(rules) setDefaultConfig(rules)
if (documentDetail.dataset_process_rule.mode === 'hierarchical') {
setParentChildConfig({
chunkForContext: rules.parent_mode || 'paragraph',
parent: {
delimiter: escape(rules.segmentation.separator),
maxLength: rules.segmentation.max_tokens,
},
child: {
delimiter: escape(rules.subchunk_segmentation.separator),
maxLength: rules.subchunk_segmentation.max_tokens,
},
})
}
} }
} }