feat: add ingestion pipeline children delimiters configs (#11979)

### What problem does this PR solve?

Add children delimiters for Ingestion pipeline config

### Type of change

- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
Jimmy Ben Klieve
2025-12-17 11:18:54 +08:00
committed by GitHub
parent 30019dab9f
commit 2595644dfd
10 changed files with 218 additions and 3 deletions

View File

@ -2,6 +2,7 @@ import {
AutoKeywordsFormField,
AutoQuestionsFormField,
} from '@/components/auto-keywords-form-field';
import { ChildrenDelimiterForm } from '@/components/children-delimiter-form';
import { DelimiterFormField } from '@/components/delimiter-form-field';
import { ExcelToHtmlFormField } from '@/components/excel-to-html-form-field';
import { LayoutRecognizeFormField } from '@/components/layout-recognize-form-field';
@ -21,6 +22,7 @@ export function NaiveConfiguration() {
<MinerUOptionsFormField></MinerUOptionsFormField>
<MaxTokenNumberFormField initialValue={512}></MaxTokenNumberFormField>
<DelimiterFormField></DelimiterFormField>
<ChildrenDelimiterForm />
<EnableTocToggle />
<OverlappedPercent />
</ConfigurationFormContainer>

View File

@ -24,6 +24,8 @@ export const formSchema = z
layout_recognize: z.string(),
chunk_token_num: z.number(),
delimiter: z.string(),
enable_children: z.boolean(),
children_delimiter: z.string(),
auto_keywords: z.number().optional(),
auto_questions: z.number().optional(),
html4excel: z.boolean(),

View File

@ -63,6 +63,8 @@ export default function DatasetSettings() {
layout_recognize: DocumentType.DeepDOC,
chunk_token_num: 512,
delimiter: `\n`,
enable_children: false,
children_delimiter: `\n`,
auto_keywords: 0,
auto_questions: 0,
html4excel: false,

View File

@ -67,6 +67,13 @@ export function SavingButton() {
await saveKnowledgeConfiguration({
kb_id,
...values,
parser_config: {
...values.parser_config,
// Unset children delimiter if this option is not enabled
children_delimiter: values.parser_config.enable_children
? values.parser_config.children_delimiter
: null,
},
});
})();
}