@n8n/n8n-nodes-langchain 1.73.1 → 1.74.0

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 (96) hide show
  1. package/LICENSE.md +5 -3
  2. package/dist/build.tsbuildinfo +1 -1
  3. package/dist/nodes/chains/ChainLLM/ChainLlm.node.js +1 -0
  4. package/dist/nodes/chains/ChainLLM/ChainLlm.node.js.map +1 -1
  5. package/dist/nodes/chains/ChainRetrievalQA/ChainRetrievalQa.node.js +1 -0
  6. package/dist/nodes/chains/ChainRetrievalQA/ChainRetrievalQa.node.js.map +1 -1
  7. package/dist/nodes/chains/ChainSummarization/ChainSummarization.node.js +1 -0
  8. package/dist/nodes/chains/ChainSummarization/ChainSummarization.node.js.map +1 -1
  9. package/dist/nodes/document_loaders/DocumentDefaultDataLoader/DocumentDefaultDataLoader.node.js +1 -1
  10. package/dist/nodes/document_loaders/DocumentDefaultDataLoader/DocumentDefaultDataLoader.node.js.map +1 -1
  11. package/dist/nodes/llms/LmChatGoogleVertex/LmChatGoogleVertex.node.js +2 -0
  12. package/dist/nodes/llms/LmChatGoogleVertex/LmChatGoogleVertex.node.js.map +1 -1
  13. package/dist/nodes/memory/MemoryBufferWindow/MemoryBufferWindow.node.js +1 -0
  14. package/dist/nodes/memory/MemoryBufferWindow/MemoryBufferWindow.node.js.map +1 -1
  15. package/dist/nodes/memory/MemoryChatRetriever/MemoryChatRetriever.node.js +1 -0
  16. package/dist/nodes/memory/MemoryChatRetriever/MemoryChatRetriever.node.js.map +1 -1
  17. package/dist/nodes/memory/MemoryMotorhead/MemoryMotorhead.node.js +1 -0
  18. package/dist/nodes/memory/MemoryMotorhead/MemoryMotorhead.node.js.map +1 -1
  19. package/dist/nodes/output_parser/OutputParserAutofixing/OutputParserAutofixing.node.js +1 -0
  20. package/dist/nodes/output_parser/OutputParserAutofixing/OutputParserAutofixing.node.js.map +1 -1
  21. package/dist/nodes/output_parser/OutputParserItemList/OutputParserItemList.node.js +1 -0
  22. package/dist/nodes/output_parser/OutputParserItemList/OutputParserItemList.node.js.map +1 -1
  23. package/dist/nodes/output_parser/OutputParserStructured/OutputParserStructured.node.js +1 -0
  24. package/dist/nodes/output_parser/OutputParserStructured/OutputParserStructured.node.js.map +1 -1
  25. package/dist/nodes/retrievers/RetrieverContextualCompression/RetrieverContextualCompression.node.js +1 -0
  26. package/dist/nodes/retrievers/RetrieverContextualCompression/RetrieverContextualCompression.node.js.map +1 -1
  27. package/dist/nodes/retrievers/RetrieverMultiQuery/RetrieverMultiQuery.node.js +1 -0
  28. package/dist/nodes/retrievers/RetrieverMultiQuery/RetrieverMultiQuery.node.js.map +1 -1
  29. package/dist/nodes/retrievers/RetrieverVectorStore/RetrieverVectorStore.node.js +1 -0
  30. package/dist/nodes/retrievers/RetrieverVectorStore/RetrieverVectorStore.node.js.map +1 -1
  31. package/dist/nodes/retrievers/RetrieverWorkflow/RetrieverWorkflow.node.js +1 -0
  32. package/dist/nodes/retrievers/RetrieverWorkflow/RetrieverWorkflow.node.js.map +1 -1
  33. package/dist/nodes/text_splitters/TextSplitterCharacterTextSplitter/TextSplitterCharacterTextSplitter.node.js +1 -0
  34. package/dist/nodes/text_splitters/TextSplitterCharacterTextSplitter/TextSplitterCharacterTextSplitter.node.js.map +1 -1
  35. package/dist/nodes/text_splitters/TextSplitterRecursiveCharacterTextSplitter/TextSplitterRecursiveCharacterTextSplitter.node.js +1 -0
  36. package/dist/nodes/text_splitters/TextSplitterRecursiveCharacterTextSplitter/TextSplitterRecursiveCharacterTextSplitter.node.js.map +1 -1
  37. package/dist/nodes/text_splitters/TextSplitterTokenSplitter/TextSplitterTokenSplitter.node.js +1 -0
  38. package/dist/nodes/text_splitters/TextSplitterTokenSplitter/TextSplitterTokenSplitter.node.js.map +1 -1
  39. package/dist/nodes/tools/ToolCalculator/ToolCalculator.node.js +1 -0
  40. package/dist/nodes/tools/ToolCalculator/ToolCalculator.node.js.map +1 -1
  41. package/dist/nodes/tools/ToolCode/ToolCode.node.js +1 -0
  42. package/dist/nodes/tools/ToolCode/ToolCode.node.js.map +1 -1
  43. package/dist/nodes/tools/ToolVectorStore/ToolVectorStore.node.js +10 -8
  44. package/dist/nodes/tools/ToolVectorStore/ToolVectorStore.node.js.map +1 -1
  45. package/dist/nodes/tools/ToolWorkflow/ToolWorkflow.node.d.ts +3 -4
  46. package/dist/nodes/tools/ToolWorkflow/ToolWorkflow.node.js +13 -466
  47. package/dist/nodes/tools/ToolWorkflow/ToolWorkflow.node.js.map +1 -1
  48. package/dist/nodes/tools/ToolWorkflow/v1/ToolWorkflowV1.node.d.ts +6 -0
  49. package/dist/nodes/tools/ToolWorkflow/v1/ToolWorkflowV1.node.js +194 -0
  50. package/dist/nodes/tools/ToolWorkflow/v1/ToolWorkflowV1.node.js.map +1 -0
  51. package/dist/nodes/tools/ToolWorkflow/v1/versionDescription.d.ts +2 -0
  52. package/dist/nodes/tools/ToolWorkflow/v1/versionDescription.js +311 -0
  53. package/dist/nodes/tools/ToolWorkflow/v1/versionDescription.js.map +1 -0
  54. package/dist/nodes/tools/ToolWorkflow/v2/ToolWorkflowV2.node.d.ts +12 -0
  55. package/dist/nodes/tools/ToolWorkflow/v2/ToolWorkflowV2.node.js +32 -0
  56. package/dist/nodes/tools/ToolWorkflow/v2/ToolWorkflowV2.node.js.map +1 -0
  57. package/dist/nodes/tools/ToolWorkflow/v2/utils/FromAIParser.d.ts +19 -0
  58. package/dist/nodes/tools/ToolWorkflow/v2/utils/FromAIParser.js +192 -0
  59. package/dist/nodes/tools/ToolWorkflow/v2/utils/FromAIParser.js.map +1 -0
  60. package/dist/nodes/tools/ToolWorkflow/v2/utils/WorkflowToolService.d.ts +23 -0
  61. package/dist/nodes/tools/ToolWorkflow/v2/utils/WorkflowToolService.js +202 -0
  62. package/dist/nodes/tools/ToolWorkflow/v2/utils/WorkflowToolService.js.map +1 -0
  63. package/dist/nodes/tools/ToolWorkflow/v2/versionDescription.d.ts +2 -0
  64. package/dist/nodes/tools/ToolWorkflow/v2/versionDescription.js +134 -0
  65. package/dist/nodes/tools/ToolWorkflow/v2/versionDescription.js.map +1 -0
  66. package/dist/nodes/vector_store/VectorStoreInMemory/VectorStoreInMemory.node.js +1 -0
  67. package/dist/nodes/vector_store/VectorStoreInMemory/VectorStoreInMemory.node.js.map +1 -1
  68. package/dist/nodes/vector_store/VectorStorePGVector/VectorStorePGVector.node.js +1 -1
  69. package/dist/nodes/vector_store/VectorStorePGVector/VectorStorePGVector.node.js.map +1 -1
  70. package/dist/nodes/vector_store/VectorStorePinecone/VectorStorePinecone.node.js +2 -2
  71. package/dist/nodes/vector_store/VectorStorePinecone/VectorStorePinecone.node.js.map +1 -1
  72. package/dist/nodes/vector_store/VectorStorePinecone/pinecone.dark.svg +21 -0
  73. package/dist/nodes/vector_store/VectorStorePinecone/pinecone.svg +21 -1
  74. package/dist/nodes/vector_store/VectorStoreSupabase/VectorStoreSupabase.node.js +1 -1
  75. package/dist/nodes/vector_store/VectorStoreSupabase/VectorStoreSupabase.node.js.map +1 -1
  76. package/dist/nodes/vector_store/VectorStoreZep/VectorStoreZep.node.js +16 -4
  77. package/dist/nodes/vector_store/VectorStoreZep/VectorStoreZep.node.js.map +1 -1
  78. package/dist/nodes/vector_store/shared/MemoryVectorStoreManager.js.map +1 -1
  79. package/dist/nodes/vector_store/shared/createVectorStoreNode.d.ts +4 -3
  80. package/dist/nodes/vector_store/shared/createVectorStoreNode.js +111 -11
  81. package/dist/nodes/vector_store/shared/createVectorStoreNode.js.map +1 -1
  82. package/dist/nodes/vendors/OpenAi/transport/index.js +7 -2
  83. package/dist/nodes/vendors/OpenAi/transport/index.js.map +1 -1
  84. package/dist/types/credentials.json +2 -2
  85. package/dist/types/nodes.json +30 -29
  86. package/dist/utils/N8nBinaryLoader.d.ts +2 -2
  87. package/dist/utils/N8nBinaryLoader.js +5 -5
  88. package/dist/utils/N8nBinaryLoader.js.map +1 -1
  89. package/dist/utils/N8nJsonLoader.d.ts +2 -2
  90. package/dist/utils/N8nJsonLoader.js +1 -1
  91. package/dist/utils/N8nJsonLoader.js.map +1 -1
  92. package/dist/utils/N8nTool.js +1 -1
  93. package/dist/utils/N8nTool.js.map +1 -1
  94. package/dist/utils/descriptions.js +2 -2
  95. package/dist/utils/descriptions.js.map +1 -1
  96. package/package.json +7 -7
@@ -8,14 +8,15 @@ const sharedFields_1 = require("../../../utils/sharedFields");
8
8
  class ToolVectorStore {
9
9
  constructor() {
10
10
  this.description = {
11
- displayName: 'Vector Store Tool',
11
+ displayName: 'Vector Store Question Answer Tool',
12
12
  name: 'toolVectorStore',
13
13
  icon: 'fa:database',
14
+ iconColor: 'black',
14
15
  group: ['transform'],
15
16
  version: [1],
16
- description: 'Retrieve context from vector store',
17
+ description: 'Answer questions with a vector store',
17
18
  defaults: {
18
- name: 'Vector Store Tool',
19
+ name: 'Answer questions with a vector store',
19
20
  },
20
21
  codex: {
21
22
  categories: ['AI'],
@@ -50,20 +51,21 @@ class ToolVectorStore {
50
51
  properties: [
51
52
  (0, sharedFields_1.getConnectionHintNoticeField)(["ai_agent"]),
52
53
  {
53
- displayName: 'Name',
54
+ displayName: 'Data Name',
54
55
  name: 'name',
55
56
  type: 'string',
56
57
  default: '',
57
- placeholder: 'e.g. company_knowledge_base',
58
+ placeholder: 'e.g. users_info',
58
59
  validateType: 'string-alphanumeric',
59
- description: 'Name of the vector store',
60
+ description: 'Name of the data in vector store. This will be used to fill this tool description: Useful for when you need to answer questions about [name]. Whenever you need information about [data description], you should ALWAYS use this. Input should be a fully formed question.',
60
61
  },
61
62
  {
62
- displayName: 'Description',
63
+ displayName: 'Description of Data',
63
64
  name: 'description',
64
65
  type: 'string',
65
66
  default: '',
66
- placeholder: 'Retrieves data about [insert information about your data here]...',
67
+ placeholder: "[Describe your data here, e.g. a user's name, email, etc.]",
68
+ description: 'Describe the data in vector store. This will be used to fill this tool description: Useful for when you need to answer questions about [name]. Whenever you need information about [data description], you should ALWAYS use this. Input should be a fully formed question.',
67
69
  typeOptions: {
68
70
  rows: 3,
69
71
  },
@@ -1 +1 @@
1
- {"version":3,"file":"ToolVectorStore.node.js","sourceRoot":"","sources":["../../../../nodes/tools/ToolVectorStore/ToolVectorStore.node.ts"],"names":[],"mappings":";;;AAEA,6CAAmD;AACnD,2CAAoD;AASpD,kDAA+C;AAC/C,sDAAmE;AAEnE,MAAa,eAAe;IAA5B;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,mBAAmB;YAChC,IAAI,EAAE,iBAAiB;YACvB,IAAI,EAAE,aAAa;YACnB,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC,CAAC,CAAC;YACZ,WAAW,EAAE,oCAAoC;YACjD,QAAQ,EAAE;gBACT,IAAI,EAAE,mBAAmB;aACzB;YACD,KAAK,EAAE;gBACN,UAAU,EAAE,CAAC,IAAI,CAAC;gBAClB,aAAa,EAAE;oBACd,EAAE,EAAE,CAAC,OAAO,CAAC;oBACb,KAAK,EAAE,CAAC,aAAa,CAAC;iBACtB;gBACD,SAAS,EAAE;oBACV,oBAAoB,EAAE;wBACrB;4BACC,GAAG,EAAE,uGAAuG;yBAC5G;qBACD;iBACD;aACD;YAED,MAAM,EAAE;gBACP;oBACC,WAAW,EAAE,cAAc;oBAC3B,cAAc,EAAE,CAAC;oBACjB,IAAI,kBAAkC;oBACtC,QAAQ,EAAE,IAAI;iBACd;gBACD;oBACC,WAAW,EAAE,OAAO;oBACpB,cAAc,EAAE,CAAC;oBACjB,IAAI,oBAAoC;oBACxC,QAAQ,EAAE,IAAI;iBACd;aACD;YAED,OAAO,EAAE,WAA2B;YACpC,WAAW,EAAE,CAAC,MAAM,CAAC;YACrB,UAAU,EAAE;gBACX,IAAA,2CAA4B,EAAC,YAA4B,CAAC;gBAC1D;oBACC,WAAW,EAAE,MAAM;oBACnB,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,QAAQ;oBACd,OAAO,EAAE,EAAE;oBACX,WAAW,EAAE,6BAA6B;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AE,IAAA,uBAAU,EAAC,eAAe,EAAE,IAAI,CAAC;SAC3C,CAAC;IACH,CAAC;CACD;AAvGD,0CAuGC"}
1
+ {"version":3,"file":"ToolVectorStore.node.js","sourceRoot":"","sources":["../../../../nodes/tools/ToolVectorStore/ToolVectorStore.node.ts"],"names":[],"mappings":";;;AAEA,6CAAmD;AACnD,2CAAoD;AASpD,kDAA+C;AAC/C,sDAAmE;AAEnE,MAAa,eAAe;IAA5B;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,mCAAmC;YAChD,IAAI,EAAE,iBAAiB;YACvB,IAAI,EAAE,aAAa;YACnB,SAAS,EAAE,OAAO;YAClB,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC,CAAC,CAAC;YACZ,WAAW,EAAE,sCAAsC;YACnD,QAAQ,EAAE;gBACT,IAAI,EAAE,sCAAsC;aAC5C;YACD,KAAK,EAAE;gBACN,UAAU,EAAE,CAAC,IAAI,CAAC;gBAClB,aAAa,EAAE;oBACd,EAAE,EAAE,CAAC,OAAO,CAAC;oBACb,KAAK,EAAE,CAAC,aAAa,CAAC;iBACtB;gBACD,SAAS,EAAE;oBACV,oBAAoB,EAAE;wBACrB;4BACC,GAAG,EAAE,uGAAuG;yBAC5G;qBACD;iBACD;aACD;YAED,MAAM,EAAE;gBACP;oBACC,WAAW,EAAE,cAAc;oBAC3B,cAAc,EAAE,CAAC;oBACjB,IAAI,kBAAkC;oBACtC,QAAQ,EAAE,IAAI;iBACd;gBACD;oBACC,WAAW,EAAE,OAAO;oBACpB,cAAc,EAAE,CAAC;oBACjB,IAAI,oBAAoC;oBACxC,QAAQ,EAAE,IAAI;iBACd;aACD;YAED,OAAO,EAAE,WAA2B;YACpC,WAAW,EAAE,CAAC,MAAM,CAAC;YACrB,UAAU,EAAE;gBACX,IAAA,2CAA4B,EAAC,YAA4B,CAAC;gBAC1D;oBACC,WAAW,EAAE,WAAW;oBACxB,IAAI,EAAE,MAAM;oBACZ,I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AAO,CAAC,GAAG,EAAE,WAAW,EAAE;YACjE,CAAC,EAAE,IAAI;SACP,CAAC,CAAC;QAEH,OAAO;YACN,QAAQ,EAAE,IAAA,uBAAU,EAAC,eAAe,EAAE,IAAI,CAAC;SAC3C,CAAC;IACH,CAAC;CACD;AA3GD,0CA2GC"}
@@ -1,5 +1,4 @@
1
- import type { INodeType, INodeTypeDescription, ISupplyDataFunctions, SupplyData } from 'n8n-workflow';
2
- export declare class ToolWorkflow implements INodeType {
3
- description: INodeTypeDescription;
4
- supplyData(this: ISupplyDataFunctions, itemIndex: number): Promise<SupplyData>;
1
+ import { VersionedNodeType } from 'n8n-workflow';
2
+ export declare class ToolWorkflow extends VersionedNodeType {
3
+ constructor();
5
4
  }
@@ -1,62 +1,17 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
35
- var __importDefault = (this && this.__importDefault) || function (mod) {
36
- return (mod && mod.__esModule) ? mod : { "default": mod };
37
- };
38
2
  Object.defineProperty(exports, "__esModule", { value: true });
39
3
  exports.ToolWorkflow = void 0;
40
- const tools_1 = require("@langchain/core/tools");
41
- const get_1 = __importDefault(require("lodash/get"));
42
- const isObject_1 = __importDefault(require("lodash/isObject"));
43
- const manual = __importStar(require("n8n-nodes-base/dist/nodes/Set/v2/manual.mode"));
44
4
  const n8n_workflow_1 = require("n8n-workflow");
45
- const descriptions_1 = require("../../../utils/descriptions");
46
- const schemaParsing_1 = require("../../../utils/schemaParsing");
47
- const sharedFields_1 = require("../../../utils/sharedFields");
48
- class ToolWorkflow {
5
+ const ToolWorkflowV1_node_1 = require("./v1/ToolWorkflowV1.node");
6
+ const ToolWorkflowV2_node_1 = require("./v2/ToolWorkflowV2.node");
7
+ class ToolWorkflow extends n8n_workflow_1.VersionedNodeType {
49
8
  constructor() {
50
- this.description = {
51
- displayName: 'Call n8n Workflow Tool',
9
+ const baseDescription = {
10
+ displayName: 'Call n8n Sub-Workflow Tool',
52
11
  name: 'toolWorkflow',
53
12
  icon: 'fa:network-wired',
54
13
  group: ['transform'],
55
- version: [1, 1.1, 1.2, 1.3],
56
14
  description: 'Uses another n8n workflow as a tool. Allows packaging any n8n node(s) as a tool.',
57
- defaults: {
58
- name: 'Call n8n Workflow Tool',
59
- },
60
15
  codex: {
61
16
  categories: ['AI'],
62
17
  subcategories: {
@@ -71,424 +26,16 @@ class ToolWorkflow {
71
26
  ],
72
27
  },
73
28
  },
74
- inputs: [],
75
- outputs: ["ai_tool"],
76
- outputNames: ['Tool'],
77
- properties: [
78
- (0, sharedFields_1.getConnectionHintNoticeField)(["ai_agent"]),
79
- {
80
- displayName: 'See an example of a workflow to suggest meeting slots using AI <a href="/templates/1953" target="_blank">here</a>.',
81
- name: 'noticeTemplateExample',
82
- type: 'notice',
83
- default: '',
84
- },
85
- {
86
- displayName: 'Name',
87
- name: 'name',
88
- type: 'string',
89
- default: '',
90
- placeholder: 'My_Color_Tool',
91
- displayOptions: {
92
- show: {
93
- '@version': [1],
94
- },
95
- },
96
- },
97
- {
98
- displayName: 'Name',
99
- name: 'name',
100
- type: 'string',
101
- default: '',
102
- placeholder: 'e.g. My_Color_Tool',
103
- validateType: 'string-alphanumeric',
104
- description: 'The name of the function to be called, could contain letters, numbers, and underscores only',
105
- displayOptions: {
106
- show: {
107
- '@version': [{ _cnd: { gte: 1.1 } }],
108
- },
109
- },
110
- },
111
- {
112
- displayName: 'Description',
113
- name: 'description',
114
- type: 'string',
115
- default: '',
116
- placeholder: 'Call this tool to get a random color. The input should be a string with comma separted names of colors to exclude.',
117
- typeOptions: {
118
- rows: 3,
119
- },
120
- },
121
- {
122
- displayName: 'This tool will call the workflow you define below, and look in the last node for the response. The workflow needs to start with an Execute Workflow trigger',
123
- name: 'executeNotice',
124
- type: 'notice',
125
- default: '',
126
- },
127
- {
128
- displayName: 'Source',
129
- name: 'source',
130
- type: 'options',
131
- options: [
132
- {
133
- name: 'Database',
134
- value: 'database',
135
- description: 'Load the workflow from the database by ID',
136
- },
137
- {
138
- name: 'Define Below',
139
- value: 'parameter',
140
- description: 'Pass the JSON code of a workflow',
141
- },
142
- ],
143
- default: 'database',
144
- description: 'Where to get the workflow to execute from',
145
- },
146
- {
147
- displayName: 'Workflow ID',
148
- name: 'workflowId',
149
- type: 'string',
150
- displayOptions: {
151
- show: {
152
- source: ['database'],
153
- '@version': [{ _cnd: { lte: 1.1 } }],
154
- },
155
- },
156
- default: '',
157
- required: true,
158
- description: 'The workflow to execute',
159
- hint: 'Can be found in the URL of the workflow',
160
- },
161
- {
162
- displayName: 'Workflow',
163
- name: 'workflowId',
164
- type: 'workflowSelector',
165
- displayOptions: {
166
- show: {
167
- source: ['database'],
168
- '@version': [{ _cnd: { gte: 1.2 } }],
169
- },
170
- },
171
- default: '',
172
- required: true,
173
- },
174
- {
175
- displayName: 'Workflow JSON',
176
- name: 'workflowJson',
177
- type: 'json',
178
- typeOptions: {
179
- rows: 10,
180
- },
181
- displayOptions: {
182
- show: {
183
- source: ['parameter'],
184
- },
185
- },
186
- default: '\n\n\n\n\n\n\n\n\n',
187
- required: true,
188
- description: 'The workflow JSON code to execute',
189
- },
190
- {
191
- displayName: 'Field to Return',
192
- name: 'responsePropertyName',
193
- type: 'string',
194
- default: 'response',
195
- required: true,
196
- hint: 'The field in the last-executed node of the workflow that contains the response',
197
- description: 'Where to find the data that this tool should return. n8n will look in the output of the last-executed node of the workflow for a field with this name, and return its value.',
198
- displayOptions: {
199
- show: {
200
- '@version': [{ _cnd: { lt: 1.3 } }],
201
- },
202
- },
203
- },
204
- {
205
- displayName: 'Extra Workflow Inputs',
206
- name: 'fields',
207
- placeholder: 'Add Value',
208
- type: 'fixedCollection',
209
- description: "These will be output by the 'execute workflow' trigger of the workflow being called",
210
- typeOptions: {
211
- multipleValues: true,
212
- sortable: true,
213
- },
214
- default: {},
215
- options: [
216
- {
217
- name: 'values',
218
- displayName: 'Values',
219
- values: [
220
- {
221
- displayName: 'Name',
222
- name: 'name',
223
- type: 'string',
224
- default: '',
225
- placeholder: 'e.g. fieldName',
226
- description: 'Name of the field to set the value of. Supports dot-notation. Example: data.person[0].name.',
227
- requiresDataPath: 'single',
228
- },
229
- {
230
- displayName: 'Type',
231
- name: 'type',
232
- type: 'options',
233
- description: 'The field value type',
234
- options: [
235
- {
236
- name: 'String',
237
- value: 'stringValue',
238
- },
239
- {
240
- name: 'Number',
241
- value: 'numberValue',
242
- },
243
- {
244
- name: 'Boolean',
245
- value: 'booleanValue',
246
- },
247
- {
248
- name: 'Array',
249
- value: 'arrayValue',
250
- },
251
- {
252
- name: 'Object',
253
- value: 'objectValue',
254
- },
255
- ],
256
- default: 'stringValue',
257
- },
258
- {
259
- displayName: 'Value',
260
- name: 'stringValue',
261
- type: 'string',
262
- default: '',
263
- displayOptions: {
264
- show: {
265
- type: ['stringValue'],
266
- },
267
- },
268
- validateType: 'string',
269
- ignoreValidationDuringExecution: true,
270
- },
271
- {
272
- displayName: 'Value',
273
- name: 'numberValue',
274
- type: 'string',
275
- default: '',
276
- displayOptions: {
277
- show: {
278
- type: ['numberValue'],
279
- },
280
- },
281
- validateType: 'number',
282
- ignoreValidationDuringExecution: true,
283
- },
284
- {
285
- displayName: 'Value',
286
- name: 'booleanValue',
287
- type: 'options',
288
- default: 'true',
289
- options: [
290
- {
291
- name: 'True',
292
- value: 'true',
293
- },
294
- {
295
- name: 'False',
296
- value: 'false',
297
- },
298
- ],
299
- displayOptions: {
300
- show: {
301
- type: ['booleanValue'],
302
- },
303
- },
304
- validateType: 'boolean',
305
- ignoreValidationDuringExecution: true,
306
- },
307
- {
308
- displayName: 'Value',
309
- name: 'arrayValue',
310
- type: 'string',
311
- default: '',
312
- placeholder: 'e.g. [ arrayItem1, arrayItem2, arrayItem3 ]',
313
- displayOptions: {
314
- show: {
315
- type: ['arrayValue'],
316
- },
317
- },
318
- validateType: 'array',
319
- ignoreValidationDuringExecution: true,
320
- },
321
- {
322
- displayName: 'Value',
323
- name: 'objectValue',
324
- type: 'json',
325
- default: '={}',
326
- typeOptions: {
327
- rows: 2,
328
- },
329
- displayOptions: {
330
- show: {
331
- type: ['objectValue'],
332
- },
333
- },
334
- validateType: 'object',
335
- ignoreValidationDuringExecution: true,
336
- },
337
- ],
338
- },
339
- ],
340
- },
341
- {
342
- displayName: 'Specify Input Schema',
343
- name: 'specifyInputSchema',
344
- type: 'boolean',
345
- description: 'Whether to specify the schema for the function. This would require the LLM to provide the input in the correct format and would validate it against the schema.',
346
- noDataExpression: true,
347
- default: false,
348
- },
349
- { ...descriptions_1.schemaTypeField, displayOptions: { show: { specifyInputSchema: [true] } } },
350
- descriptions_1.jsonSchemaExampleField,
351
- descriptions_1.inputSchemaField,
352
- ],
353
- };
354
- }
355
- async supplyData(itemIndex) {
356
- const workflowProxy = this.getWorkflowDataProxy(0);
357
- const name = this.getNodeParameter('name', itemIndex);
358
- const description = this.getNodeParameter('description', itemIndex);
359
- let subExecutionId;
360
- let subWorkflowId;
361
- const useSchema = this.getNodeParameter('specifyInputSchema', itemIndex);
362
- let tool = undefined;
363
- const runFunction = async (query, runManager) => {
364
- const source = this.getNodeParameter('source', itemIndex);
365
- const workflowInfo = {};
366
- if (source === 'database') {
367
- const nodeVersion = this.getNode().typeVersion;
368
- if (nodeVersion <= 1.1) {
369
- workflowInfo.id = this.getNodeParameter('workflowId', itemIndex);
370
- }
371
- else {
372
- const { value } = this.getNodeParameter('workflowId', itemIndex, {});
373
- workflowInfo.id = value;
374
- }
375
- subWorkflowId = workflowInfo.id;
376
- }
377
- else if (source === 'parameter') {
378
- const workflowJson = this.getNodeParameter('workflowJson', itemIndex);
379
- try {
380
- workflowInfo.code = JSON.parse(workflowJson);
381
- subWorkflowId = workflowProxy.$workflow.id;
382
- }
383
- catch (error) {
384
- throw new n8n_workflow_1.NodeOperationError(this.getNode(), `The provided workflow is not valid JSON: "${error.message}"`, {
385
- itemIndex,
386
- });
387
- }
388
- }
389
- const rawData = { query };
390
- const workflowFieldsJson = this.getNodeParameter('fields.values', itemIndex, [], {
391
- rawExpressions: true,
392
- });
393
- for (const entry of workflowFieldsJson) {
394
- if (entry.type === 'objectValue' && entry.objectValue.startsWith('=')) {
395
- rawData[entry.name] = entry.objectValue.replace(/^=+/, '');
396
- }
397
- }
398
- const options = {
399
- include: 'all',
400
- };
401
- const newItem = await manual.execute.call(this, { json: { query } }, itemIndex, options, rawData, this.getNode());
402
- const items = [newItem];
403
- let receivedData;
404
- try {
405
- receivedData = await this.executeWorkflow(workflowInfo, items, runManager?.getChild(), {
406
- parentExecution: {
407
- executionId: workflowProxy.$execution.id,
408
- workflowId: workflowProxy.$workflow.id,
409
- },
410
- });
411
- subExecutionId = receivedData.executionId;
412
- }
413
- catch (error) {
414
- throw new n8n_workflow_1.NodeOperationError(this.getNode(), error);
415
- }
416
- const response = (0, get_1.default)(receivedData, 'data[0][0].json');
417
- if (response === undefined) {
418
- throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'There was an error: "The workflow did not return a response"');
419
- }
420
- return response;
421
- };
422
- const toolHandler = async (query, runManager) => {
423
- const { index } = this.addInputData("ai_tool", [[{ json: { query } }]]);
424
- let response = '';
425
- let executionError;
426
- try {
427
- response = await runFunction(query, runManager);
428
- }
429
- catch (error) {
430
- executionError = error;
431
- response = `There was an error: "${error.message}"`;
432
- }
433
- if (typeof response === 'number') {
434
- response = response.toString();
435
- }
436
- if ((0, isObject_1.default)(response)) {
437
- response = JSON.stringify(response, null, 2);
438
- }
439
- if (typeof response !== 'string') {
440
- executionError = new n8n_workflow_1.NodeOperationError(this.getNode(), 'Wrong output type returned', {
441
- description: `The response property should be a string, but it is an ${typeof response}`,
442
- });
443
- response = `There was an error: "${executionError.message}"`;
444
- }
445
- let metadata;
446
- if (subExecutionId && subWorkflowId) {
447
- metadata = {
448
- subExecution: {
449
- executionId: subExecutionId,
450
- workflowId: subWorkflowId,
451
- },
452
- };
453
- }
454
- if (executionError) {
455
- void this.addOutputData("ai_tool", index, executionError, metadata);
456
- }
457
- else {
458
- const json = (0, n8n_workflow_1.jsonParse)(response, { fallbackValue: { response } });
459
- void this.addOutputData("ai_tool", index, [[{ json }]], metadata);
460
- }
461
- return response;
462
- };
463
- const functionBase = {
464
- name,
465
- description,
466
- func: toolHandler,
29
+ defaultVersion: 2,
467
30
  };
468
- if (useSchema) {
469
- try {
470
- const jsonExample = this.getNodeParameter('jsonSchemaExample', itemIndex, '');
471
- const inputSchema = this.getNodeParameter('inputSchema', itemIndex, '');
472
- const schemaType = this.getNodeParameter('schemaType', itemIndex);
473
- const jsonSchema = schemaType === 'fromJson'
474
- ? (0, schemaParsing_1.generateSchema)(jsonExample)
475
- : (0, n8n_workflow_1.jsonParse)(inputSchema);
476
- const zodSchema = (0, schemaParsing_1.convertJsonSchemaToZod)(jsonSchema);
477
- tool = new tools_1.DynamicStructuredTool({
478
- schema: zodSchema,
479
- ...functionBase,
480
- });
481
- }
482
- catch (error) {
483
- throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Error during parsing of JSON Schema. \n ' + error);
484
- }
485
- }
486
- else {
487
- tool = new tools_1.DynamicTool(functionBase);
488
- }
489
- return {
490
- response: tool,
31
+ const nodeVersions = {
32
+ 1: new ToolWorkflowV1_node_1.ToolWorkflowV1(baseDescription),
33
+ 1.1: new ToolWorkflowV1_node_1.ToolWorkflowV1(baseDescription),
34
+ 1.2: new ToolWorkflowV1_node_1.ToolWorkflowV1(baseDescription),
35
+ 1.3: new ToolWorkflowV1_node_1.ToolWorkflowV1(baseDescription),
36
+ 2: new ToolWorkflowV2_node_1.ToolWorkflowV2(baseDescription),
491
37
  };
38
+ super(nodeVersions, baseDescription);
492
39
  }
493
40
  }
494
41
  exports.ToolWorkflow = ToolWorkflow;
@@ -1 +1 @@
1
- {"version":3,"file":"ToolWorkflow.node.js","sourceRoot":"","sources":["../../../../nodes/tools/ToolWorkflow/ToolWorkflow.node.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,iDAA2E;AAE3E,qDAA6B;AAC7B,+DAAuC;AAEvC,qFAAuE;AAevE,+CAAiF;AAEjF,sDAAgG;AAChG,wDAA8E;AAC9E,sDAAmE;AAInE,MAAa,YAAY;IAAzB;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,wBAAwB;YACrC,IAAI,EAAE,cAAc;YACpB,IAAI,EAAE,kBAAkB;YACxB,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC;YAC3B,WAAW,EAAE,kFAAkF;YAC/F,QAAQ,EAAE;gBACT,IAAI,EAAE,wBAAwB;aAC9B;YACD,KAAK,EAAE;gBACN,UAAU,EAAE,CAAC,IAAI,CAAC;gBAClB,aAAa,EAAE;oBACd,EAAE,EAAE,CAAC,OAA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IAAA,wBAAS,EAAc,WAAW,CAAC,CAAC;gBAExC,MAAM,SAAS,GAAG,IAAA,sCAAsB,EAAmB,UAAU,CAAC,CAAC;gBAEvE,IAAI,GAAG,IAAI,6BAAqB,CAAC;oBAChC,MAAM,EAAE,SAAS;oBACjB,GAAG,YAAY;iBACf,CAAC,CAAC;YACJ,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBAChB,MAAM,IAAI,iCAAkB,CAC3B,IAAI,CAAC,OAAO,EAAE,EACd,0CAA0C,GAAG,KAAK,CAClD,CAAC;YACH,CAAC;QACF,CAAC;aAAM,CAAC;YACP,IAAI,GAAG,IAAI,mBAAW,CAAC,YAAY,CAAC,CAAC;QACtC,CAAC;QAED,OAAO;YACN,QAAQ,EAAE,IAAI;SACd,CAAC;IACH,CAAC;CACD;AAxhBD,oCAwhBC"}
1
+ {"version":3,"file":"ToolWorkflow.node.js","sourceRoot":"","sources":["../../../../nodes/tools/ToolWorkflow/ToolWorkflow.node.ts"],"names":[],"mappings":";;;AACA,+CAAiD;AAEjD,kEAA0D;AAC1D,kEAA0D;AAE1D,MAAa,YAAa,SAAQ,gCAAiB;IAClD;QACC,MAAM,eAAe,GAA6B;YACjD,WAAW,EAAE,4BAA4B;YACzC,IAAI,EAAE,cAAc;YACpB,IAAI,EAAE,kBAAkB;YACxB,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,WAAW,EACV,kFAAkF;YACnF,KAAK,EAAE;gBACN,UAAU,EAAE,CAAC,IAAI,CAAC;gBAClB,aAAa,EAAE;oBACd,EAAE,EAAE,CAAC,OAAO,CAAC;oBACb,KAAK,EAAE,CAAC,mBAAmB,CAAC;iBAC5B;gBACD,SAAS,EAAE;oBACV,oBAAoB,EAAE;wBACrB;4BACC,GAAG,EAAE,oGAAoG;yBACzG;qBACD;iBACD;aACD;YACD,cAAc,EAAE,CAAC;SACjB,CAAC;QAEF,MAAM,YAAY,GAAuC;YACxD,CAAC,EAAE,IAAI,oCAAc,CAAC,eAAe,CAAC;YACtC,GAAG,EAAE,IAAI,oCAAc,CAAC,eAAe,CAAC;YACxC,GAAG,EAAE,IAAI,oCAAc,CAAC,eAAe,CAAC;YACxC,GAAG,EAAE,IAAI,oCAAc,CAAC,eAAe,CAAC;YACxC,CAAC,EAAE,IAAI,oCAAc,CAAC,eAAe,CAAC;SACtC,CAAC;QACF,KAAK,CAAC,YAAY,EAAE,eAAe,CAAC,CAAC;IACtC,CAAC;CACD;AAnCD,oCAmCC"}
@@ -0,0 +1,6 @@
1
+ import type { INodeType, INodeTypeDescription, ISupplyDataFunctions, SupplyData, INodeTypeBaseDescription } from 'n8n-workflow';
2
+ export declare class ToolWorkflowV1 implements INodeType {
3
+ description: INodeTypeDescription;
4
+ constructor(baseDescription: INodeTypeBaseDescription);
5
+ supplyData(this: ISupplyDataFunctions, itemIndex: number): Promise<SupplyData>;
6
+ }