From ea68c92bbb17f9715219ca603e17c8f72c61ae5f Mon Sep 17 00:00:00 2001 From: Ganondorf <364776488@qq.com> Date: Mon, 23 Jun 2025 13:48:39 +0800 Subject: [PATCH] fix segment display the default (#21317) Co-authored-by: lizb --- .../components/datasets/create/step-two/index.tsx | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/web/app/components/datasets/create/step-two/index.tsx b/web/app/components/datasets/create/step-two/index.tsx index 261126dd3c..acc891407f 100644 --- a/web/app/components/datasets/create/step-two/index.tsx +++ b/web/app/components/datasets/create/step-two/index.tsx @@ -512,6 +512,20 @@ const StepTwo = ({ setOverlap(overlap!) setRules(rules.pre_processing_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, + }, + }) + } } }