Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

fix segment display the default (#21317)

Ganondorfea68c92bbb17
diff --git a/web/app/components/datasets/create/step-two/index.tsx b/web/app/components/datasets/create/step-two/index.tsx
index 261126dd3c6..acc891407f0 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,
+ },
+ })
+ }
}
}