feat(Structured Output Parser Node): Mark all parameters as required for schemas generated from JSON example (#15935)

This commit is contained in:
Eugene
2025-06-05 12:11:21 +02:00
committed by GitHub
parent 6cf07200dc
commit 7711e4b052
10 changed files with 980 additions and 21 deletions

View File

@@ -106,10 +106,14 @@ export class N8nStructuredOutputParser extends StructuredOutputParser<
},
),
});
} else {
} else if (nodeVersion < 1.3) {
returnSchema = z.object({
output: zodSchema.optional(),
});
} else {
returnSchema = z.object({
output: zodSchema,
});
}
return new N8nStructuredOutputParser(context, returnSchema);