@n8n/n8n-nodes-langchain 1.98.1 → 1.99.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/README.md +0 -2
  2. package/dist/known/nodes.json +4 -0
  3. package/dist/methods/defined.json +3 -0
  4. package/dist/methods/referenced.json +3 -0
  5. package/dist/nodes/ModelSelector/ModelSelector.node.js +175 -0
  6. package/dist/nodes/ModelSelector/ModelSelector.node.js.map +1 -0
  7. package/dist/nodes/ModelSelector/helpers.js +85 -0
  8. package/dist/nodes/ModelSelector/helpers.js.map +1 -0
  9. package/dist/nodes/agents/Agent/V1/AgentV1.node.js +2 -1
  10. package/dist/nodes/agents/Agent/V1/AgentV1.node.js.map +1 -1
  11. package/dist/nodes/agents/Agent/V2/AgentV2.node.js +2 -1
  12. package/dist/nodes/agents/Agent/V2/AgentV2.node.js.map +1 -1
  13. package/dist/nodes/agents/Agent/agents/utils.js.map +1 -1
  14. package/dist/nodes/embeddings/EmbeddingsGoogleGemini/EmbeddingsGoogleGemini.node.js +4 -3
  15. package/dist/nodes/embeddings/EmbeddingsGoogleGemini/EmbeddingsGoogleGemini.node.js.map +1 -1
  16. package/dist/nodes/embeddings/EmbeddingsMistralCloud/EmbeddingsMistralCloud.node.js +1 -1
  17. package/dist/nodes/embeddings/EmbeddingsMistralCloud/EmbeddingsMistralCloud.node.js.map +1 -1
  18. package/dist/nodes/llms/LMChatAnthropic/LmChatAnthropic.node.js +1 -1
  19. package/dist/nodes/llms/LMChatAnthropic/LmChatAnthropic.node.js.map +1 -1
  20. package/dist/nodes/llms/LMChatOpenAi/LmChatOpenAi.node.js +1 -1
  21. package/dist/nodes/llms/LMChatOpenAi/LmChatOpenAi.node.js.map +1 -1
  22. package/dist/nodes/llms/LMOpenAi/LmOpenAi.node.js +1 -1
  23. package/dist/nodes/llms/LMOpenAi/LmOpenAi.node.js.map +1 -1
  24. package/dist/nodes/llms/LmChatDeepSeek/LmChatDeepSeek.node.js +1 -1
  25. package/dist/nodes/llms/LmChatDeepSeek/LmChatDeepSeek.node.js.map +1 -1
  26. package/dist/nodes/llms/LmChatGoogleGemini/LmChatGoogleGemini.node.js +1 -1
  27. package/dist/nodes/llms/LmChatGoogleGemini/LmChatGoogleGemini.node.js.map +1 -1
  28. package/dist/nodes/llms/LmChatGroq/LmChatGroq.node.js +1 -1
  29. package/dist/nodes/llms/LmChatGroq/LmChatGroq.node.js.map +1 -1
  30. package/dist/nodes/llms/LmChatMistralCloud/LmChatMistralCloud.node.js +1 -1
  31. package/dist/nodes/llms/LmChatMistralCloud/LmChatMistralCloud.node.js.map +1 -1
  32. package/dist/nodes/llms/LmChatOpenRouter/LmChatOpenRouter.node.js +1 -1
  33. package/dist/nodes/llms/LmChatOpenRouter/LmChatOpenRouter.node.js.map +1 -1
  34. package/dist/nodes/llms/LmChatXAiGrok/LmChatXAiGrok.node.js +1 -1
  35. package/dist/nodes/llms/LmChatXAiGrok/LmChatXAiGrok.node.js.map +1 -1
  36. package/dist/nodes/llms/N8nLlmTracing.js +37 -13
  37. package/dist/nodes/llms/N8nLlmTracing.js.map +1 -1
  38. package/dist/nodes/llms/N8nNonEstimatingTracing.js +167 -0
  39. package/dist/nodes/llms/N8nNonEstimatingTracing.js.map +1 -0
  40. package/dist/nodes/mcp/McpTrigger/McpServer.js +18 -0
  41. package/dist/nodes/mcp/McpTrigger/McpServer.js.map +1 -1
  42. package/dist/nodes/mcp/McpTrigger/McpTrigger.node.js +20 -6
  43. package/dist/nodes/mcp/McpTrigger/McpTrigger.node.js.map +1 -1
  44. package/dist/nodes/text_splitters/TextSplitterTokenSplitter/TextSplitterTokenSplitter.node.js +2 -5
  45. package/dist/nodes/text_splitters/TextSplitterTokenSplitter/TextSplitterTokenSplitter.node.js.map +1 -1
  46. package/dist/nodes/text_splitters/TextSplitterTokenSplitter/TokenTextSplitter.js +59 -0
  47. package/dist/nodes/text_splitters/TextSplitterTokenSplitter/TokenTextSplitter.js.map +1 -0
  48. package/dist/nodes/vector_store/VectorStoreMongoDBAtlas/VectorStoreMongoDBAtlas.node.js +20 -8
  49. package/dist/nodes/vector_store/VectorStoreMongoDBAtlas/VectorStoreMongoDBAtlas.node.js.map +1 -1
  50. package/dist/types/nodes.json +6 -5
  51. package/dist/types/types.js +15 -0
  52. package/dist/types/types.js.map +1 -1
  53. package/dist/utils/N8nTool.js.map +1 -1
  54. package/dist/utils/output_parsers/N8nStructuredOutputParser.js +7 -0
  55. package/dist/utils/output_parsers/N8nStructuredOutputParser.js.map +1 -1
  56. package/dist/utils/tokenizer/cl100k_base.json +1 -0
  57. package/dist/utils/tokenizer/o200k_base.json +1 -0
  58. package/dist/utils/tokenizer/tiktoken.js +64 -0
  59. package/dist/utils/tokenizer/tiktoken.js.map +1 -0
  60. package/package.json +26 -24
@@ -1,2 +1,17 @@
1
1
  "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+ var types_exports = {};
16
+ module.exports = __toCommonJS(types_exports);
2
17
  //# sourceMappingURL=types.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
1
+ {"version":3,"sources":["../../types/types.ts"],"sourcesContent":["import type { z } from 'zod';\n\nexport type OpenAICompatibleCredential = { apiKey: string; url: string };\n\nexport type ZodObjectAny = z.ZodObject<any, any, any, any>;\n"],"mappings":";;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../utils/N8nTool.ts"],"sourcesContent":["import type { DynamicStructuredToolInput } from '@langchain/core/tools';\nimport { DynamicStructuredTool, DynamicTool } from '@langchain/core/tools';\nimport { StructuredOutputParser } from 'langchain/output_parsers';\nimport type { ISupplyDataFunctions, IDataObject } from 'n8n-workflow';\nimport { NodeConnectionTypes, jsonParse, NodeOperationError } from 'n8n-workflow';\nimport type { ZodTypeAny } from 'zod';\nimport { ZodBoolean, ZodNullable, ZodNumber, ZodObject, ZodOptional } from 'zod';\n\nconst getSimplifiedType = (schema: ZodTypeAny) => {\n\tif (schema instanceof ZodObject) {\n\t\treturn 'object';\n\t} else if (schema instanceof ZodNumber) {\n\t\treturn 'number';\n\t} else if (schema instanceof ZodBoolean) {\n\t\treturn 'boolean';\n\t} else if (schema instanceof ZodNullable || schema instanceof ZodOptional) {\n\t\treturn getSimplifiedType(schema.unwrap());\n\t}\n\n\treturn 'string';\n};\n\nconst getParametersDescription = (parameters: Array<[string, ZodTypeAny]>) =>\n\tparameters\n\t\t.map(\n\t\t\t([name, schema]) =>\n\t\t\t\t`${name}: (description: ${schema.description ?? ''}, type: ${getSimplifiedType(schema)}, required: ${!schema.isOptional()})`,\n\t\t)\n\t\t.join(',\\n ');\n\nexport const prepareFallbackToolDescription = (toolDescription: string, schema: ZodObject<any>) => {\n\tlet description = `${toolDescription}`;\n\n\tconst toolParameters = Object.entries<ZodTypeAny>(schema.shape);\n\n\tif (toolParameters.length) {\n\t\tdescription += `\nTool expects valid stringified JSON object with ${toolParameters.length} properties.\nProperty names with description, type and required status:\n${getParametersDescription(toolParameters)}\nALL parameters marked as required must be provided`;\n\t}\n\n\treturn description;\n};\n\nexport class N8nTool extends DynamicStructuredTool {\n\tconstructor(\n\t\tprivate context: ISupplyDataFunctions,\n\t\tfields: DynamicStructuredToolInput,\n\t) {\n\t\tsuper(fields);\n\t}\n\n\tasDynamicTool(): DynamicTool {\n\t\tconst { name, func, schema, context, description } = this;\n\n\t\tconst parser = new StructuredOutputParser(schema);\n\n\t\tconst wrappedFunc = async function (query: string) {\n\t\t\tlet parsedQuery: object;\n\n\t\t\t// First we try to parse the query using the structured parser (Zod schema)\n\t\t\ttry {\n\t\t\t\tparsedQuery = await parser.parse(query);\n\t\t\t} catch (e) {\n\t\t\t\t// If we were unable to parse the query using the schema, we try to gracefully handle it\n\t\t\t\tlet dataFromModel;\n\n\t\t\t\ttry {\n\t\t\t\t\t// First we try to parse a JSON with more relaxed rules\n\t\t\t\t\tdataFromModel = jsonParse<IDataObject>(query, { acceptJSObject: true });\n\t\t\t\t} catch (error) {\n\t\t\t\t\t// In case of error,\n\t\t\t\t\t// If model supplied a simple string instead of an object AND only one parameter expected, we try to recover the object structure\n\t\t\t\t\tif (Object.keys(schema.shape).length === 1) {\n\t\t\t\t\t\tconst parameterName = Object.keys(schema.shape)[0];\n\t\t\t\t\t\tdataFromModel = { [parameterName]: query };\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Finally throw an error if we were unable to parse the query\n\t\t\t\t\t\tthrow new NodeOperationError(\n\t\t\t\t\t\t\tcontext.getNode(),\n\t\t\t\t\t\t\t`Input is not a valid JSON: ${error.message}`,\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// If we were able to parse the query with a fallback, we try to validate it using the schema\n\t\t\t\t// Here we will throw an error if the data still does not match the schema\n\t\t\t\tparsedQuery = schema.parse(dataFromModel);\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\t// Call tool function with parsed query\n\t\t\t\tconst result = await func(parsedQuery);\n\n\t\t\t\treturn result;\n\t\t\t} catch (e) {\n\t\t\t\tconst { index } = context.addInputData(NodeConnectionTypes.AiTool, [[{ json: { query } }]]);\n\t\t\t\tvoid context.addOutputData(NodeConnectionTypes.AiTool, index, e);\n\n\t\t\t\treturn e.toString();\n\t\t\t}\n\t\t};\n\n\t\treturn new DynamicTool({\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AM,OAAO,MAAM,KAAK;AAAA,MACvC,SAAS,GAAG;AAEX,YAAI;AAEJ,YAAI;AAEH,8BAAgB,+BAAuB,OAAO,EAAE,gBAAgB,KAAK,CAAC;AAAA,QACvE,SAAS,OAAO;AAGf,cAAI,OAAO,KAAK,OAAO,KAAK,EAAE,WAAW,GAAG;AAC3C,kBAAM,gBAAgB,OAAO,KAAK,OAAO,KAAK,EAAE,CAAC;AACjD,4BAAgB,EAAE,CAAC,aAAa,GAAG,MAAM;AAAA,UAC1C,OAAO;AAEN,kBAAM,IAAI;AAAA,cACT,QAAQ,QAAQ;AAAA,cAChB,8BAA8B,MAAM,OAAO;AAAA,YAC5C;AAAA,UACD;AAAA,QACD;AAIA,sBAAc,OAAO,MAAM,aAAa;AAAA,MACzC;AAEA,UAAI;AAEH,cAAM,SAAS,MAAM,KAAK,WAAW;AAErC,eAAO;AAAA,MACR,SAAS,GAAG;AACX,cAAM,EAAE,MAAM,IAAI,QAAQ,aAAa,wCAAoB,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC;AAC1F,aAAK,QAAQ,cAAc,wCAAoB,QAAQ,OAAO,CAAC;AAE/D,eAAO,EAAE,SAAS;AAAA,MACnB;AAAA,IACD;AAEA,WAAO,IAAI,yBAAY;AAAA,MACtB;AAAA,MACA,aAAa,+BAA+B,aAAa,MAAM;AAAA,MAC/D,MAAM;AAAA,IACP,CAAC;AAAA,EACF;AACD;","names":[]}
1
+ {"version":3,"sources":["../../utils/N8nTool.ts"],"sourcesContent":["import type { DynamicStructuredToolInput } from '@langchain/core/tools';\nimport { DynamicStructuredTool, DynamicTool } from '@langchain/core/tools';\nimport { StructuredOutputParser } from 'langchain/output_parsers';\nimport type { ISupplyDataFunctions, IDataObject } from 'n8n-workflow';\nimport { NodeConnectionTypes, jsonParse, NodeOperationError } from 'n8n-workflow';\nimport type { ZodTypeAny } from 'zod';\nimport { ZodBoolean, ZodNullable, ZodNumber, ZodObject, ZodOptional } from 'zod';\n\nimport type { ZodObjectAny } from '../types/types';\n\nconst getSimplifiedType = (schema: ZodTypeAny) => {\n\tif (schema instanceof ZodObject) {\n\t\treturn 'object';\n\t} else if (schema instanceof ZodNumber) {\n\t\treturn 'number';\n\t} else if (schema instanceof ZodBoolean) {\n\t\treturn 'boolean';\n\t} else if (schema instanceof ZodNullable || schema instanceof ZodOptional) {\n\t\treturn getSimplifiedType(schema.unwrap());\n\t}\n\n\treturn 'string';\n};\n\nconst getParametersDescription = (parameters: Array<[string, ZodTypeAny]>) =>\n\tparameters\n\t\t.map(\n\t\t\t([name, schema]) =>\n\t\t\t\t`${name}: (description: ${schema.description ?? ''}, type: ${getSimplifiedType(schema)}, required: ${!schema.isOptional()})`,\n\t\t)\n\t\t.join(',\\n ');\n\nexport const prepareFallbackToolDescription = (toolDescription: string, schema: ZodObject<any>) => {\n\tlet description = `${toolDescription}`;\n\n\tconst toolParameters = Object.entries<ZodTypeAny>(schema.shape);\n\n\tif (toolParameters.length) {\n\t\tdescription += `\nTool expects valid stringified JSON object with ${toolParameters.length} properties.\nProperty names with description, type and required status:\n${getParametersDescription(toolParameters)}\nALL parameters marked as required must be provided`;\n\t}\n\n\treturn description;\n};\n\nexport class N8nTool extends DynamicStructuredTool<ZodObjectAny> {\n\tconstructor(\n\t\tprivate context: ISupplyDataFunctions,\n\t\tfields: DynamicStructuredToolInput<ZodObjectAny>,\n\t) {\n\t\tsuper(fields);\n\t}\n\n\tasDynamicTool(): DynamicTool {\n\t\tconst { name, func, schema, context, description } = this;\n\n\t\tconst parser = new StructuredOutputParser(schema);\n\n\t\tconst wrappedFunc = async function (query: string) {\n\t\t\tlet parsedQuery: object;\n\n\t\t\t// First we try to parse the query using the structured parser (Zod schema)\n\t\t\ttry {\n\t\t\t\tparsedQuery = await parser.parse(query);\n\t\t\t} catch (e) {\n\t\t\t\t// If we were unable to parse the query using the schema, we try to gracefully handle it\n\t\t\t\tlet dataFromModel;\n\n\t\t\t\ttry {\n\t\t\t\t\t// First we try to parse a JSON with more relaxed rules\n\t\t\t\t\tdataFromModel = jsonParse<IDataObject>(query, { acceptJSObject: true });\n\t\t\t\t} catch (error) {\n\t\t\t\t\t// In case of error,\n\t\t\t\t\t// If model supplied a simple string instead of an object AND only one parameter expected, we try to recover the object structure\n\t\t\t\t\tif (Object.keys(schema.shape).length === 1) {\n\t\t\t\t\t\tconst parameterName = Object.keys(schema.shape)[0];\n\t\t\t\t\t\tdataFromModel = { [parameterName]: query };\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Finally throw an error if we were unable to parse the query\n\t\t\t\t\t\tthrow new NodeOperationError(\n\t\t\t\t\t\t\tcontext.getNode(),\n\t\t\t\t\t\t\t`Input is not a valid JSON: ${error.message}`,\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// If we were able to parse the query with a fallback, we try to validate it using the schema\n\t\t\t\t// Here we will throw an error if the data still does not match the schema\n\t\t\t\tparsedQuery = schema.parse(dataFromModel);\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\t// Call tool function with parsed query\n\t\t\t\tconst result = await func(parsedQuery);\n\n\t\t\t\treturn result;\n\t\t\t} catch (e) {\n\t\t\t\tconst { index } = context.addInputData(NodeConnectionTypes.AiTool, [[{ json: { query } }]]);\n\t\t\t\tvoid context.addOutputData(NodeConnectionTypes.AiTool, index, e);\n\n\t\t\t\treturn e.toString();\n\t\t\t}\n\t\t};\n\n\t\treturn new DynamicTool({\n\t\t\tname,\n\t\t\tdescription: prepareFallbackToolDescription(description, schema),\n\t\t\tfunc: wrappedFunc,\n\t\t});\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,mBAAmD;AACnD,4BAAuC;AAEvC,0BAAmE;AAEnE,iBAA2E;AAI3E,MAAM,oBAAoB,CAAC,WAAuB;AACjD,MAAI,kBAAkB,sBAAW;AAChC,WAAO;AAAA,EACR,WAA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M;AAAA,UAC1C,OAAO;AAEN,kBAAM,IAAI;AAAA,cACT,QAAQ,QAAQ;AAAA,cAChB,8BAA8B,MAAM,OAAO;AAAA,YAC5C;AAAA,UACD;AAAA,QACD;AAIA,sBAAc,OAAO,MAAM,aAAa;AAAA,MACzC;AAEA,UAAI;AAEH,cAAM,SAAS,MAAM,KAAK,WAAW;AAErC,eAAO;AAAA,MACR,SAAS,GAAG;AACX,cAAM,EAAE,MAAM,IAAI,QAAQ,aAAa,wCAAoB,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC;AAC1F,aAAK,QAAQ,cAAc,wCAAoB,QAAQ,OAAO,CAAC;AAE/D,eAAO,EAAE,SAAS;AAAA,MACnB;AAAA,IACD;AAEA,WAAO,IAAI,yBAAY;AAAA,MACtB;AAAA,MACA,aAAa,+BAA+B,aAAa,MAAM;AAAA,MAC/D,MAAM;AAAA,IACP,CAAC;AAAA,EACF;AACD;","names":[]}
@@ -68,6 +68,13 @@ class N8nStructuredOutputParser extends import_output_parsers.StructuredOutputPa
68
68
  description: "To continue the execution when this happens, change the 'On Error' parameter in the root node's settings"
69
69
  }
70
70
  );
71
+ if (e instanceof SyntaxError) {
72
+ nodeError.context.outputParserFailReason = "Invalid JSON in model output";
73
+ } else if (text.trim() === "{}" || e instanceof import_zod.z.ZodError && e.issues?.[0] && e.issues?.[0].code === "invalid_type" && e.issues?.[0].path?.[0] === "output" && e.issues?.[0].expected === "object" && e.issues?.[0].received === "undefined") {
74
+ nodeError.context.outputParserFailReason = "Model output wrapper is an empty object";
75
+ } else if (e instanceof import_zod.z.ZodError) {
76
+ nodeError.context.outputParserFailReason = "Model output does not match the expected schema";
77
+ }
71
78
  (0, import_helpers.logAiEvent)(this.context, "ai-output-parsed", {
72
79
  text,
73
80
  response: e.message ?? e
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../utils/output_parsers/N8nStructuredOutputParser.ts"],"sourcesContent":["import type { Callbacks } from '@langchain/core/callbacks/manager';\nimport { StructuredOutputParser } from 'langchain/output_parsers';\nimport get from 'lodash/get';\nimport type { ISupplyDataFunctions } from 'n8n-workflow';\nimport { NodeConnectionTypes, NodeOperationError } from 'n8n-workflow';\nimport { z } from 'zod';\n\nimport { logAiEvent, unwrapNestedOutput } from '../helpers';\n\nconst STRUCTURED_OUTPUT_KEY = '__structured__output';\nconst STRUCTURED_OUTPUT_OBJECT_KEY = '__structured__output__object';\nconst STRUCTURED_OUTPUT_ARRAY_KEY = '__structured__output__array';\n\nexport class N8nStructuredOutputParser extends StructuredOutputParser<\n\tz.ZodType<object, z.ZodTypeDef, object>\n> {\n\tconstructor(\n\t\tprivate context: ISupplyDataFunctions,\n\t\tzodSchema: z.ZodSchema<object>,\n\t) {\n\t\tsuper(zodSchema);\n\t}\n\n\tlc_namespace = ['langchain', 'output_parsers', 'structured'];\n\n\tasync parse(\n\t\ttext: string,\n\t\t_callbacks?: Callbacks,\n\t\terrorMapper?: (error: Error) => Error,\n\t): Promise<object> {\n\t\tconst { index } = this.context.addInputData(NodeConnectionTypes.AiOutputParser, [\n\t\t\t[{ json: { action: 'parse', text } }],\n\t\t]);\n\t\ttry {\n\t\t\tconst jsonString = text.includes('```') ? text.split(/```(?:json)?/)[1] : text;\n\t\t\tconst json = JSON.parse(jsonString.trim());\n\t\t\tconst parsed = await this.schema.parseAsync(json);\n\n\t\t\tlet result = (get(parsed, [STRUCTURED_OUTPUT_KEY, STRUCTURED_OUTPUT_OBJECT_KEY]) ??\n\t\t\t\tget(parsed, [STRUCTURED_OUTPUT_KEY, STRUCTURED_OUTPUT_ARRAY_KEY]) ??\n\t\t\t\tget(parsed, STRUCTURED_OUTPUT_KEY) ??\n\t\t\t\tparsed) as Record<string, unknown>;\n\n\t\t\t// Unwrap any doubly-nested output structures (e.g., {output: {output: {...}}})\n\t\t\tresult = unwrapNestedOutput(result);\n\n\t\t\tlogAiEvent(this.context, 'ai-output-parsed', { text, response: result });\n\n\t\t\tthis.context.addOutputData(NodeConnectionTypes.AiOutputParser, index, [\n\t\t\t\t[{ json: { action: 'parse', response: result } }],\n\t\t\t]);\n\n\t\t\treturn result;\n\t\t} catch (e) {\n\t\t\tconst nodeError = new NodeOperationError(\n\t\t\t\tthis.context.getNode(),\n\t\t\t\t\"Model output doesn't fit required format\",\n\t\t\t\t{\n\t\t\t\t\tdescription:\n\t\t\t\t\t\t\"To continue the execution when this happens, change the 'On Error' parameter in the root node's settings\",\n\t\t\t\t},\n\t\t\t);\n\n\t\t\tlogAiEvent(this.context, 'ai-output-parsed', {\n\t\t\t\ttext,\n\t\t\t\tresponse: e.message ?? e,\n\t\t\t});\n\n\t\t\tthis.context.addOutputData(NodeConnectionTypes.AiOutputParser, index, nodeError);\n\t\t\tif (errorMapper) {\n\t\t\t\tthrow errorMapper(e);\n\t\t\t}\n\n\t\t\tthrow nodeError;\n\t\t}\n\t}\n\n\tstatic async fromZodJsonSchema(\n\t\tzodSchema: z.ZodSchema<object>,\n\t\tnodeVersion: number,\n\t\tcontext: ISupplyDataFunctions,\n\t): Promise<N8nStructuredOutputParser> {\n\t\tlet returnSchema: z.ZodType<object, z.ZodTypeDef, object>;\n\t\tif (nodeVersion === 1) {\n\t\t\treturnSchema = z.object({\n\t\t\t\t[STRUCTURED_OUTPUT_KEY]: z\n\t\t\t\t\t.object({\n\t\t\t\t\t\t[STRUCTURED_OUTPUT_OBJECT_KEY]: zodSchema.optional(),\n\t\t\t\t\t\t[STRUCTURED_OUTPUT_ARRAY_KEY]: z.array(zodSchema).optional(),\n\t\t\t\t\t})\n\t\t\t\t\t.describe(\n\t\t\t\t\t\t`Wrapper around the output data. It can only contain ${STRUCTURED_OUTPUT_OBJECT_KEY} or ${STRUCTURED_OUTPUT_ARRAY_KEY} but never both.`,\n\t\t\t\t\t)\n\t\t\t\t\t.refine(\n\t\t\t\t\t\t(data) => {\n\t\t\t\t\t\t\t// Validate that one and only one of the properties exists\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\tBoolean(data[STRUCTURED_OUTPUT_OBJECT_KEY]) !==\n\t\t\t\t\t\t\t\tBoolean(data[STRUCTURED_OUTPUT_ARRAY_KEY])\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tmessage:\n\t\t\t\t\t\t\t\t'One and only one of __structured__output__object and __structured__output__array should be present.',\n\t\t\t\t\t\t\tpath: [STRUCTURED_OUTPUT_KEY],\n\t\t\t\t\t\t},\n\t\t\t\t\t),\n\t\t\t});\n\t\t} else if (nodeVersion < 1.3) {\n\t\t\treturnSchema = z.object({\n\t\t\t\toutput: zodSchema.optional(),\n\t\t\t});\n\t\t} else {\n\t\t\treturnSchema = z.object({\n\t\t\t\toutput: zodSchema,\n\t\t\t});\n\t\t}\n\n\t\treturn new N8nStructuredOutputParser(context, returnSchema);\n\t}\n\n\tgetSchema() {\n\t\treturn this.schema;\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,4BAAuC;AACvC,iBAAgB;AAEhB,0BAAwD;AACxD,iBAAkB;AAElB,qBAA+C;AAE/C,MAAM,wBAAwB;AAC9B,MAAM,+BAA+B;AACrC,MAAM,8BAA8B;AAE7B,MAAM,kCAAkC,6CAE7C;AAAA,EACD,YACS,SACR,WACC;AACD,UAAM,SAAS;AAHP;AAMT,wBAAe,CAAC,aAAa,kBAAkB,YAAY;AAAA,EAF3D;AAAA,EAIA,MAAM,MACL,MACA,YACA,aACkB;AAClB,UAAM,EAAE,MAAM,IAAI,KAAK,QAAQ,aAAa,wCAAoB,gBAAgB;AAAA,MAC/E,CAAC,EAAE,MAAM,EAAE,QAAQ,SAAS,KAAK,EAAE,CAAC;AAAA,IACrC,CAAC;AACD,QAAI;AACH,YAAM,aAAa,KAAK,SAAS,KAAK,IAAI,KAAK,MAAM,cAAc,EAAE,CAAC,IAAI;AAC1E,YAAM,OAAO,KAAK,MAAM,W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,4BAA4B,CAAC,MAC1C,QAAQ,KAAK,2BAA2B,CAAC;AAAA,UAE3C;AAAA,UACA;AAAA,YACC,SACC;AAAA,YACD,MAAM,CAAC,qBAAqB;AAAA,UAC7B;AAAA,QACD;AAAA,MACF,CAAC;AAAA,IACF,WAAW,cAAc,KAAK;AAC7B,qBAAe,aAAE,OAAO;AAAA,QACvB,QAAQ,UAAU,SAAS;AAAA,MAC5B,CAAC;AAAA,IACF,OAAO;AACN,qBAAe,aAAE,OAAO;AAAA,QACvB,QAAQ;AAAA,MACT,CAAC;AAAA,IACF;AAEA,WAAO,IAAI,0BAA0B,SAAS,YAAY;AAAA,EAC3D;AAAA,EAEA,YAAY;AACX,WAAO,KAAK;AAAA,EACb;AACD;","names":["get"]}
1
+ {"version":3,"sources":["../../../utils/output_parsers/N8nStructuredOutputParser.ts"],"sourcesContent":["import type { Callbacks } from '@langchain/core/callbacks/manager';\nimport { StructuredOutputParser } from 'langchain/output_parsers';\nimport get from 'lodash/get';\nimport type { ISupplyDataFunctions } from 'n8n-workflow';\nimport { NodeConnectionTypes, NodeOperationError } from 'n8n-workflow';\nimport { z } from 'zod';\n\nimport { logAiEvent, unwrapNestedOutput } from '../helpers';\n\nconst STRUCTURED_OUTPUT_KEY = '__structured__output';\nconst STRUCTURED_OUTPUT_OBJECT_KEY = '__structured__output__object';\nconst STRUCTURED_OUTPUT_ARRAY_KEY = '__structured__output__array';\n\nexport class N8nStructuredOutputParser extends StructuredOutputParser<\n\tz.ZodType<object, z.ZodTypeDef, object>\n> {\n\tconstructor(\n\t\tprivate context: ISupplyDataFunctions,\n\t\tzodSchema: z.ZodSchema<object>,\n\t) {\n\t\tsuper(zodSchema);\n\t}\n\n\tlc_namespace = ['langchain', 'output_parsers', 'structured'];\n\n\tasync parse(\n\t\ttext: string,\n\t\t_callbacks?: Callbacks,\n\t\terrorMapper?: (error: Error) => Error,\n\t): Promise<object> {\n\t\tconst { index } = this.context.addInputData(NodeConnectionTypes.AiOutputParser, [\n\t\t\t[{ json: { action: 'parse', text } }],\n\t\t]);\n\n\t\ttry {\n\t\t\tconst jsonString = text.includes('```') ? text.split(/```(?:json)?/)[1] : text;\n\t\t\tconst json = JSON.parse(jsonString.trim());\n\t\t\tconst parsed = await this.schema.parseAsync(json);\n\n\t\t\tlet result = (get(parsed, [STRUCTURED_OUTPUT_KEY, STRUCTURED_OUTPUT_OBJECT_KEY]) ??\n\t\t\t\tget(parsed, [STRUCTURED_OUTPUT_KEY, STRUCTURED_OUTPUT_ARRAY_KEY]) ??\n\t\t\t\tget(parsed, STRUCTURED_OUTPUT_KEY) ??\n\t\t\t\tparsed) as Record<string, unknown>;\n\n\t\t\t// Unwrap any doubly-nested output structures (e.g., {output: {output: {...}}})\n\t\t\tresult = unwrapNestedOutput(result);\n\n\t\t\tlogAiEvent(this.context, 'ai-output-parsed', { text, response: result });\n\n\t\t\tthis.context.addOutputData(NodeConnectionTypes.AiOutputParser, index, [\n\t\t\t\t[{ json: { action: 'parse', response: result } }],\n\t\t\t]);\n\n\t\t\treturn result;\n\t\t} catch (e) {\n\t\t\tconst nodeError = new NodeOperationError(\n\t\t\t\tthis.context.getNode(),\n\t\t\t\t\"Model output doesn't fit required format\",\n\t\t\t\t{\n\t\t\t\t\tdescription:\n\t\t\t\t\t\t\"To continue the execution when this happens, change the 'On Error' parameter in the root node's settings\",\n\t\t\t\t},\n\t\t\t);\n\n\t\t\t// Add additional context to the error\n\t\t\tif (e instanceof SyntaxError) {\n\t\t\t\tnodeError.context.outputParserFailReason = 'Invalid JSON in model output';\n\t\t\t} else if (\n\t\t\t\ttext.trim() === '{}' ||\n\t\t\t\t(e instanceof z.ZodError &&\n\t\t\t\t\te.issues?.[0] &&\n\t\t\t\t\te.issues?.[0].code === 'invalid_type' &&\n\t\t\t\t\te.issues?.[0].path?.[0] === 'output' &&\n\t\t\t\t\te.issues?.[0].expected === 'object' &&\n\t\t\t\t\te.issues?.[0].received === 'undefined')\n\t\t\t) {\n\t\t\t\tnodeError.context.outputParserFailReason = 'Model output wrapper is an empty object';\n\t\t\t} else if (e instanceof z.ZodError) {\n\t\t\t\tnodeError.context.outputParserFailReason =\n\t\t\t\t\t'Model output does not match the expected schema';\n\t\t\t}\n\n\t\t\tlogAiEvent(this.context, 'ai-output-parsed', {\n\t\t\t\ttext,\n\t\t\t\tresponse: e.message ?? e,\n\t\t\t});\n\n\t\t\tthis.context.addOutputData(NodeConnectionTypes.AiOutputParser, index, nodeError);\n\t\t\tif (errorMapper) {\n\t\t\t\tthrow errorMapper(e);\n\t\t\t}\n\n\t\t\tthrow nodeError;\n\t\t}\n\t}\n\n\tstatic async fromZodJsonSchema(\n\t\tzodSchema: z.ZodSchema<object>,\n\t\tnodeVersion: number,\n\t\tcontext: ISupplyDataFunctions,\n\t): Promise<N8nStructuredOutputParser> {\n\t\tlet returnSchema: z.ZodType<object, z.ZodTypeDef, object>;\n\t\tif (nodeVersion === 1) {\n\t\t\treturnSchema = z.object({\n\t\t\t\t[STRUCTURED_OUTPUT_KEY]: z\n\t\t\t\t\t.object({\n\t\t\t\t\t\t[STRUCTURED_OUTPUT_OBJECT_KEY]: zodSchema.optional(),\n\t\t\t\t\t\t[STRUCTURED_OUTPUT_ARRAY_KEY]: z.array(zodSchema).optional(),\n\t\t\t\t\t})\n\t\t\t\t\t.describe(\n\t\t\t\t\t\t`Wrapper around the output data. It can only contain ${STRUCTURED_OUTPUT_OBJECT_KEY} or ${STRUCTURED_OUTPUT_ARRAY_KEY} but never both.`,\n\t\t\t\t\t)\n\t\t\t\t\t.refine(\n\t\t\t\t\t\t(data) => {\n\t\t\t\t\t\t\t// Validate that one and only one of the properties exists\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\tBoolean(data[STRUCTURED_OUTPUT_OBJECT_KEY]) !==\n\t\t\t\t\t\t\t\tBoolean(data[STRUCTURED_OUTPUT_ARRAY_KEY])\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tmessage:\n\t\t\t\t\t\t\t\t'One and only one of __structured__output__object and __structured__output__array should be present.',\n\t\t\t\t\t\t\tpath: [STRUCTURED_OUTPUT_KEY],\n\t\t\t\t\t\t},\n\t\t\t\t\t),\n\t\t\t});\n\t\t} else if (nodeVersion < 1.3) {\n\t\t\treturnSchema = z.object({\n\t\t\t\toutput: zodSchema.optional(),\n\t\t\t});\n\t\t} else {\n\t\t\treturnSchema = z.object({\n\t\t\t\toutput: zodSchema,\n\t\t\t});\n\t\t}\n\n\t\treturn new N8nStructuredOutputParser(context, returnSchema);\n\t}\n\n\tgetSchema() {\n\t\treturn this.schema;\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,4BAAuC;AACvC,iBAAgB;AAEhB,0BAAwD;AACxD,iBAAkB;AAElB,qBAA+C;AAE/C,MAAM,wBAAwB;AAC9B,MAAM,+BAA+B;AACrC,MAAM,8BAA8B;AAE7B,MAAM,kCAAkC,6CAE7C;AAAA,EACD,YACS,SACR,WACC;AACD,UAAM,SAAS;AAHP;AAMT,wBAAe,CAAC,aAAa,kBAAkB,YAAY;AAAA,EAF3D;AAAA,EAIA,MAAM,MACL,MACA,YACA,aACkB;AAClB,UAAM,EAAE,MAAM,IAAI,KAAK,QAAQ,aAAa,wCAAoB,gBAAgB;AAAA,MAC/E,CAAC,EAAE,MAAM,EAAE,QAAQ,SAAS,KAAK,EAAE,CAAC;AAAA,IACrC,CAAC;AAED,QAAI;AACH,YAAM,aAAa,KAAK,SAAS,KAAK,IAAI,KAAK,MAAM,cAAc,EAAE,CAAC,IAAI;AAC1E,YAAM,OAAO,KAAK,MAAM,WAAW,KAAK,CAAC;AACzC,YAAM,SAAS,MAAM,KAAK,OAAO,WAAW,IAAI;AAEhD,UAAI,aAAU,WAAAA,SAAI,QAAQ,CAAC,uBAAuB,4BAA4B,CAAC,SAC9E,WAAAA,SAAI,QAAQ,CAAC,uBAAuB,2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