mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-06-29 15:31:05 +08:00
Fix: The pipeline created from the template fails immediately upon execution. (#16149)
### What problem does this PR solve? Fix: The pipeline created from the template fails immediately upon execution. ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
@@ -69,7 +69,9 @@ export enum TitleChunkerRulesField {
|
||||
Group = 'groupRules',
|
||||
}
|
||||
|
||||
export type TitleChunkerFormSchemaType = z.infer<typeof FormSchema>;
|
||||
export type TitleChunkerFormSchemaType = z.infer<typeof FormSchema> & {
|
||||
rules: z.infer<typeof rulesSchema>;
|
||||
};
|
||||
|
||||
type LevelItemProps = {
|
||||
index: number;
|
||||
|
||||
@@ -355,9 +355,9 @@ function transformTokenChunkerParams(params: TokenChunkerFormSchemaType) {
|
||||
|
||||
function transformTitleChunkerParams(params: TitleChunkerFormSchemaType) {
|
||||
const activeRules =
|
||||
params.method === TitleChunkerMethod.Group
|
||||
(params.method === TitleChunkerMethod.Group
|
||||
? params.groupRules
|
||||
: params.hierarchyRules;
|
||||
: params.hierarchyRules) ?? params.rules;
|
||||
|
||||
const levels = (activeRules || []).map((rule) =>
|
||||
transformObjectArrayToPureArray(rule.levels, 'expression'),
|
||||
|
||||
Reference in New Issue
Block a user