fix(Structured Output Parser Node, Auto-fixing Output Parser Node, Tools Agent Node): Structured output improvements (#13908)

Co-authored-by: Oleg Ivaniv <me@olegivaniv.com>
This commit is contained in:
Eugene
2025-03-13 18:20:24 +03:00
committed by GitHub
parent 31037484a5
commit 5b6b78709e
7 changed files with 138 additions and 13 deletions

View File

@@ -39,7 +39,12 @@ export class N8nOutputFixingParser extends BaseOutputParser {
try {
// First attempt to parse the completion
const response = await this.outputParser.parse(completion, callbacks, (e) => e);
const response = await this.outputParser.parse(completion, callbacks, (e) => {
if (e instanceof OutputParserException) {
return e;
}
return new OutputParserException(e.message, completion);
});
logAiEvent(this.context, 'ai-output-parsed', { text: completion, response });
this.context.addOutputData(NodeConnectionType.AiOutputParser, index, [