@n8n/n8n-nodes-langchain 1.85.3 → 1.87.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 (692) hide show
  1. package/dist/credentials/AnthropicApi.credentials.js +64 -41
  2. package/dist/credentials/AnthropicApi.credentials.js.map +1 -1
  3. package/dist/credentials/AzureOpenAiApi.credentials.js +70 -47
  4. package/dist/credentials/AzureOpenAiApi.credentials.js.map +1 -1
  5. package/dist/credentials/CohereApi.credentials.js +55 -32
  6. package/dist/credentials/CohereApi.credentials.js.map +1 -1
  7. package/dist/credentials/DeepSeekApi.credentials.js +61 -38
  8. package/dist/credentials/DeepSeekApi.credentials.js.map +1 -1
  9. package/dist/credentials/GooglePalmApi.credentials.js +61 -38
  10. package/dist/credentials/GooglePalmApi.credentials.js.map +1 -1
  11. package/dist/credentials/GroqApi.credentials.js +55 -32
  12. package/dist/credentials/GroqApi.credentials.js.map +1 -1
  13. package/dist/credentials/HuggingFaceApi.credentials.js +55 -32
  14. package/dist/credentials/HuggingFaceApi.credentials.js.map +1 -1
  15. package/dist/credentials/MistralCloudApi.credentials.js +56 -33
  16. package/dist/credentials/MistralCloudApi.credentials.js.map +1 -1
  17. package/dist/credentials/MotorheadApi.credentials.js +68 -45
  18. package/dist/credentials/MotorheadApi.credentials.js.map +1 -1
  19. package/dist/credentials/OllamaApi.credentials.js +47 -24
  20. package/dist/credentials/OllamaApi.credentials.js.map +1 -1
  21. package/dist/credentials/OpenRouterApi.credentials.js +61 -38
  22. package/dist/credentials/OpenRouterApi.credentials.js.map +1 -1
  23. package/dist/credentials/PineconeApi.credentials.js +57 -34
  24. package/dist/credentials/PineconeApi.credentials.js.map +1 -1
  25. package/dist/credentials/QdrantApi.credentials.js +64 -41
  26. package/dist/credentials/QdrantApi.credentials.js.map +1 -1
  27. package/dist/credentials/SerpApi.credentials.js +55 -32
  28. package/dist/credentials/SerpApi.credentials.js.map +1 -1
  29. package/dist/credentials/WolframAlphaApi.credentials.js +59 -36
  30. package/dist/credentials/WolframAlphaApi.credentials.js.map +1 -1
  31. package/dist/credentials/XAiApi.credentials.js +61 -38
  32. package/dist/credentials/XAiApi.credentials.js.map +1 -1
  33. package/dist/credentials/XataApi.credentials.js +69 -46
  34. package/dist/credentials/XataApi.credentials.js.map +1 -1
  35. package/dist/credentials/ZepApi.credentials.js +74 -51
  36. package/dist/credentials/ZepApi.credentials.js.map +1 -1
  37. package/dist/known/nodes.json +12 -0
  38. package/dist/nodes/agents/Agent/Agent.node.js +426 -405
  39. package/dist/nodes/agents/Agent/Agent.node.js.map +1 -1
  40. package/dist/nodes/agents/Agent/agents/ConversationalAgent/description.js +111 -87
  41. package/dist/nodes/agents/Agent/agents/ConversationalAgent/description.js.map +1 -1
  42. package/dist/nodes/agents/Agent/agents/ConversationalAgent/execute.js +99 -75
  43. package/dist/nodes/agents/Agent/agents/ConversationalAgent/execute.js.map +1 -1
  44. package/dist/nodes/agents/Agent/agents/ConversationalAgent/prompt.js +30 -4
  45. package/dist/nodes/agents/Agent/agents/ConversationalAgent/prompt.js.map +1 -1
  46. package/dist/nodes/agents/Agent/agents/OpenAiFunctionsAgent/description.js +101 -77
  47. package/dist/nodes/agents/Agent/agents/OpenAiFunctionsAgent/description.js.map +1 -1
  48. package/dist/nodes/agents/Agent/agents/OpenAiFunctionsAgent/execute.js +108 -83
  49. package/dist/nodes/agents/Agent/agents/OpenAiFunctionsAgent/execute.js.map +1 -1
  50. package/dist/nodes/agents/Agent/agents/OpenAiFunctionsAgent/prompt.js +27 -3
  51. package/dist/nodes/agents/Agent/agents/OpenAiFunctionsAgent/prompt.js.map +1 -1
  52. package/dist/nodes/agents/Agent/agents/PlanAndExecuteAgent/description.js +87 -63
  53. package/dist/nodes/agents/Agent/agents/PlanAndExecuteAgent/description.js.map +1 -1
  54. package/dist/nodes/agents/Agent/agents/PlanAndExecuteAgent/execute.js +90 -67
  55. package/dist/nodes/agents/Agent/agents/PlanAndExecuteAgent/execute.js.map +1 -1
  56. package/dist/nodes/agents/Agent/agents/PlanAndExecuteAgent/prompt.js +27 -3
  57. package/dist/nodes/agents/Agent/agents/PlanAndExecuteAgent/prompt.js.map +1 -1
  58. package/dist/nodes/agents/Agent/agents/ReActAgent/description.js +131 -107
  59. package/dist/nodes/agents/Agent/agents/ReActAgent/description.js.map +1 -1
  60. package/dist/nodes/agents/Agent/agents/ReActAgent/execute.js +101 -82
  61. package/dist/nodes/agents/Agent/agents/ReActAgent/execute.js.map +1 -1
  62. package/dist/nodes/agents/Agent/agents/ReActAgent/prompt.js +36 -6
  63. package/dist/nodes/agents/Agent/agents/ReActAgent/prompt.js.map +1 -1
  64. package/dist/nodes/agents/Agent/agents/SqlAgent/description.js +206 -181
  65. package/dist/nodes/agents/Agent/agents/SqlAgent/description.js.map +1 -1
  66. package/dist/nodes/agents/Agent/agents/SqlAgent/execute.js +130 -104
  67. package/dist/nodes/agents/Agent/agents/SqlAgent/execute.js.map +1 -1
  68. package/dist/nodes/agents/Agent/agents/SqlAgent/other/handlers/mysql.js +40 -16
  69. package/dist/nodes/agents/Agent/agents/SqlAgent/other/handlers/mysql.js.map +1 -1
  70. package/dist/nodes/agents/Agent/agents/SqlAgent/other/handlers/postgres.js +41 -17
  71. package/dist/nodes/agents/Agent/agents/SqlAgent/other/handlers/postgres.js.map +1 -1
  72. package/dist/nodes/agents/Agent/agents/SqlAgent/other/handlers/sqlite.js +67 -67
  73. package/dist/nodes/agents/Agent/agents/SqlAgent/other/handlers/sqlite.js.map +1 -1
  74. package/dist/nodes/agents/Agent/agents/SqlAgent/other/prompts.js +30 -4
  75. package/dist/nodes/agents/Agent/agents/SqlAgent/other/prompts.js.map +1 -1
  76. package/dist/nodes/agents/Agent/agents/ToolsAgent/description.js +72 -48
  77. package/dist/nodes/agents/Agent/agents/ToolsAgent/description.js.map +1 -1
  78. package/dist/nodes/agents/Agent/agents/ToolsAgent/execute.js +262 -216
  79. package/dist/nodes/agents/Agent/agents/ToolsAgent/execute.js.map +1 -1
  80. package/dist/nodes/agents/Agent/agents/ToolsAgent/prompt.js +27 -3
  81. package/dist/nodes/agents/Agent/agents/ToolsAgent/prompt.js.map +1 -1
  82. package/dist/nodes/agents/Agent/agents/utils.js +48 -17
  83. package/dist/nodes/agents/Agent/agents/utils.js.map +1 -1
  84. package/dist/nodes/agents/OpenAiAssistant/OpenAiAssistant.node.js +377 -355
  85. package/dist/nodes/agents/OpenAiAssistant/OpenAiAssistant.node.js.map +1 -1
  86. package/dist/nodes/agents/OpenAiAssistant/utils.js +53 -27
  87. package/dist/nodes/agents/OpenAiAssistant/utils.js.map +1 -1
  88. package/dist/nodes/chains/ChainLLM/ChainLlm.node.js +126 -95
  89. package/dist/nodes/chains/ChainLLM/ChainLlm.node.js.map +1 -1
  90. package/dist/nodes/chains/ChainLLM/methods/chainExecutor.js +101 -69
  91. package/dist/nodes/chains/ChainLLM/methods/chainExecutor.js.map +1 -1
  92. package/dist/nodes/chains/ChainLLM/methods/config.js +268 -243
  93. package/dist/nodes/chains/ChainLLM/methods/config.js.map +1 -1
  94. package/dist/nodes/chains/ChainLLM/methods/imageUtils.js +94 -60
  95. package/dist/nodes/chains/ChainLLM/methods/imageUtils.js.map +1 -1
  96. package/dist/nodes/chains/ChainLLM/methods/index.js +35 -9
  97. package/dist/nodes/chains/ChainLLM/methods/index.js.map +1 -1
  98. package/dist/nodes/chains/ChainLLM/methods/promptUtils.js +100 -60
  99. package/dist/nodes/chains/ChainLLM/methods/promptUtils.js.map +1 -1
  100. package/dist/nodes/chains/ChainLLM/methods/responseFormatter.js +46 -22
  101. package/dist/nodes/chains/ChainLLM/methods/responseFormatter.js.map +1 -1
  102. package/dist/nodes/chains/ChainLLM/methods/types.js +15 -1
  103. package/dist/nodes/chains/ChainLLM/methods/types.js.map +1 -1
  104. package/dist/nodes/chains/ChainRetrievalQA/ChainRetrievalQa.node.js +260 -233
  105. package/dist/nodes/chains/ChainRetrievalQA/ChainRetrievalQa.node.js.map +1 -1
  106. package/dist/nodes/chains/ChainSummarization/ChainSummarization.node.js +60 -37
  107. package/dist/nodes/chains/ChainSummarization/ChainSummarization.node.js.map +1 -1
  108. package/dist/nodes/chains/ChainSummarization/V1/ChainSummarizationV1.node.js +234 -208
  109. package/dist/nodes/chains/ChainSummarization/V1/ChainSummarizationV1.node.js.map +1 -1
  110. package/dist/nodes/chains/ChainSummarization/V2/ChainSummarizationV2.node.js +379 -334
  111. package/dist/nodes/chains/ChainSummarization/V2/ChainSummarizationV2.node.js.map +1 -1
  112. package/dist/nodes/chains/ChainSummarization/helpers.js +67 -43
  113. package/dist/nodes/chains/ChainSummarization/helpers.js.map +1 -1
  114. package/dist/nodes/chains/ChainSummarization/prompt.js +30 -4
  115. package/dist/nodes/chains/ChainSummarization/prompt.js.map +1 -1
  116. package/dist/nodes/chains/InformationExtractor/InformationExtractor.node.js +261 -229
  117. package/dist/nodes/chains/InformationExtractor/InformationExtractor.node.js.map +1 -1
  118. package/dist/nodes/chains/InformationExtractor/helpers.js +48 -28
  119. package/dist/nodes/chains/InformationExtractor/helpers.js.map +1 -1
  120. package/dist/nodes/chains/InformationExtractor/types.js +15 -1
  121. package/dist/nodes/chains/InformationExtractor/types.js.map +1 -1
  122. package/dist/nodes/chains/SentimentAnalysis/SentimentAnalysis.node.js +227 -197
  123. package/dist/nodes/chains/SentimentAnalysis/SentimentAnalysis.node.js.map +1 -1
  124. package/dist/nodes/chains/TextClassifier/TextClassifier.node.js +242 -215
  125. package/dist/nodes/chains/TextClassifier/TextClassifier.node.js.map +1 -1
  126. package/dist/nodes/code/Code.node.js +308 -267
  127. package/dist/nodes/code/Code.node.js.map +1 -1
  128. package/dist/nodes/document_loaders/DocumentBinaryInputLoader/DocumentBinaryInputLoader.node.js +199 -166
  129. package/dist/nodes/document_loaders/DocumentBinaryInputLoader/DocumentBinaryInputLoader.node.js.map +1 -1
  130. package/dist/nodes/document_loaders/DocumentDefaultDataLoader/DocumentDefaultDataLoader.node.js +303 -277
  131. package/dist/nodes/document_loaders/DocumentDefaultDataLoader/DocumentDefaultDataLoader.node.js.map +1 -1
  132. package/dist/nodes/document_loaders/DocumentGithubLoader/DocumentGithubLoader.node.js +136 -110
  133. package/dist/nodes/document_loaders/DocumentGithubLoader/DocumentGithubLoader.node.js.map +1 -1
  134. package/dist/nodes/document_loaders/DocumentJSONInputLoader/DocumentJsonInputLoader.node.js +107 -77
  135. package/dist/nodes/document_loaders/DocumentJSONInputLoader/DocumentJsonInputLoader.node.js.map +1 -1
  136. package/dist/nodes/embeddings/EmbeddingsAwsBedrock/EmbeddingsAwsBedrock.node.js +135 -110
  137. package/dist/nodes/embeddings/EmbeddingsAwsBedrock/EmbeddingsAwsBedrock.node.js.map +1 -1
  138. package/dist/nodes/embeddings/EmbeddingsAzureOpenAi/EmbeddingsAzureOpenAi.node.js +152 -126
  139. package/dist/nodes/embeddings/EmbeddingsAzureOpenAi/EmbeddingsAzureOpenAi.node.js.map +1 -1
  140. package/dist/nodes/embeddings/EmbeddingsCohere/EmbeddingsCohere.node.js +126 -101
  141. package/dist/nodes/embeddings/EmbeddingsCohere/EmbeddingsCohere.node.js.map +1 -1
  142. package/dist/nodes/embeddings/EmbeddingsGoogleGemini/EmbeddingsGoogleGemini.node.js +146 -117
  143. package/dist/nodes/embeddings/EmbeddingsGoogleGemini/EmbeddingsGoogleGemini.node.js.map +1 -1
  144. package/dist/nodes/embeddings/EmbeddingsGoogleVertex/EmbeddingsGoogleVertex.node.js +166 -0
  145. package/dist/nodes/embeddings/EmbeddingsGoogleVertex/EmbeddingsGoogleVertex.node.js.map +1 -0
  146. package/dist/nodes/embeddings/EmbeddingsGoogleVertex/google.svg +1 -0
  147. package/dist/nodes/embeddings/EmbeddingsHuggingFaceInference/EmbeddingsHuggingFaceInference.node.js +118 -89
  148. package/dist/nodes/embeddings/EmbeddingsHuggingFaceInference/EmbeddingsHuggingFaceInference.node.js.map +1 -1
  149. package/dist/nodes/embeddings/EmbeddingsMistralCloud/EmbeddingsMistralCloud.node.js +165 -136
  150. package/dist/nodes/embeddings/EmbeddingsMistralCloud/EmbeddingsMistralCloud.node.js.map +1 -1
  151. package/dist/nodes/embeddings/EmbeddingsOllama/EmbeddingsOllama.node.js +76 -51
  152. package/dist/nodes/embeddings/EmbeddingsOllama/EmbeddingsOllama.node.js.map +1 -1
  153. package/dist/nodes/embeddings/EmbeddingsOpenAI/EmbeddingsOpenAi.node.js +228 -201
  154. package/dist/nodes/embeddings/EmbeddingsOpenAI/EmbeddingsOpenAi.node.js.map +1 -1
  155. package/dist/nodes/llms/LMChatAnthropic/LmChatAnthropic.node.js +306 -272
  156. package/dist/nodes/llms/LMChatAnthropic/LmChatAnthropic.node.js.map +1 -1
  157. package/dist/nodes/llms/LMChatAnthropic/methods/searchModels.js +58 -36
  158. package/dist/nodes/llms/LMChatAnthropic/methods/searchModels.js.map +1 -1
  159. package/dist/nodes/llms/LMChatOllama/LmChatOllama.node.js +87 -61
  160. package/dist/nodes/llms/LMChatOllama/LmChatOllama.node.js.map +1 -1
  161. package/dist/nodes/llms/LMChatOpenAi/LmChatOpenAi.node.js +340 -316
  162. package/dist/nodes/llms/LMChatOpenAi/LmChatOpenAi.node.js.map +1 -1
  163. package/dist/nodes/llms/LMChatOpenAi/methods/loadModels.js +54 -30
  164. package/dist/nodes/llms/LMChatOpenAi/methods/loadModels.js.map +1 -1
  165. package/dist/nodes/llms/LMCohere/LmCohere.node.js +119 -93
  166. package/dist/nodes/llms/LMCohere/LmCohere.node.js.map +1 -1
  167. package/dist/nodes/llms/LMOllama/LmOllama.node.js +86 -60
  168. package/dist/nodes/llms/LMOllama/LmOllama.node.js.map +1 -1
  169. package/dist/nodes/llms/LMOllama/description.js +235 -207
  170. package/dist/nodes/llms/LMOllama/description.js.map +1 -1
  171. package/dist/nodes/llms/LMOpenAi/LmOpenAi.node.js +239 -214
  172. package/dist/nodes/llms/LMOpenAi/LmOpenAi.node.js.map +1 -1
  173. package/dist/nodes/llms/LMOpenHuggingFaceInference/LmOpenHuggingFaceInference.node.js +159 -133
  174. package/dist/nodes/llms/LMOpenHuggingFaceInference/LmOpenHuggingFaceInference.node.js.map +1 -1
  175. package/dist/nodes/llms/LmChatAwsBedrock/LmChatAwsBedrock.node.js +167 -140
  176. package/dist/nodes/llms/LmChatAwsBedrock/LmChatAwsBedrock.node.js.map +1 -1
  177. package/dist/nodes/llms/LmChatAzureOpenAi/LmChatAzureOpenAi.node.js +193 -168
  178. package/dist/nodes/llms/LmChatAzureOpenAi/LmChatAzureOpenAi.node.js.map +1 -1
  179. package/dist/nodes/llms/LmChatDeepSeek/LmChatDeepSeek.node.js +236 -212
  180. package/dist/nodes/llms/LmChatDeepSeek/LmChatDeepSeek.node.js.map +1 -1
  181. package/dist/nodes/llms/LmChatGoogleGemini/LmChatGoogleGemini.node.js +163 -133
  182. package/dist/nodes/llms/LmChatGoogleGemini/LmChatGoogleGemini.node.js.map +1 -1
  183. package/dist/nodes/llms/LmChatGoogleVertex/LmChatGoogleVertex.node.js +194 -164
  184. package/dist/nodes/llms/LmChatGoogleVertex/LmChatGoogleVertex.node.js.map +1 -1
  185. package/dist/nodes/llms/LmChatGoogleVertex/error-handling.js +36 -14
  186. package/dist/nodes/llms/LmChatGoogleVertex/error-handling.js.map +1 -1
  187. package/dist/nodes/llms/LmChatGroq/LmChatGroq.node.js +160 -134
  188. package/dist/nodes/llms/LmChatGroq/LmChatGroq.node.js.map +1 -1
  189. package/dist/nodes/llms/LmChatMistralCloud/LmChatMistralCloud.node.js +205 -179
  190. package/dist/nodes/llms/LmChatMistralCloud/LmChatMistralCloud.node.js.map +1 -1
  191. package/dist/nodes/llms/LmChatOpenRouter/LmChatOpenRouter.node.js +235 -212
  192. package/dist/nodes/llms/LmChatOpenRouter/LmChatOpenRouter.node.js.map +1 -1
  193. package/dist/nodes/llms/LmChatXAiGrok/LmChatXAiGrok.node.js +236 -212
  194. package/dist/nodes/llms/LmChatXAiGrok/LmChatXAiGrok.node.js.map +1 -1
  195. package/dist/nodes/llms/N8nLlmTracing.js +162 -127
  196. package/dist/nodes/llms/N8nLlmTracing.js.map +1 -1
  197. package/dist/nodes/llms/gemini-common/additional-options.js +103 -78
  198. package/dist/nodes/llms/gemini-common/additional-options.js.map +1 -1
  199. package/dist/nodes/llms/gemini-common/safety-options.js +75 -49
  200. package/dist/nodes/llms/gemini-common/safety-options.js.map +1 -1
  201. package/dist/nodes/llms/n8nDefaultFailedAttemptHandler.js +60 -24
  202. package/dist/nodes/llms/n8nDefaultFailedAttemptHandler.js.map +1 -1
  203. package/dist/nodes/llms/n8nLlmFailedAttemptHandler.js +46 -24
  204. package/dist/nodes/llms/n8nLlmFailedAttemptHandler.js.map +1 -1
  205. package/dist/nodes/memory/MemoryBufferWindow/MemoryBufferWindow.node.js +153 -130
  206. package/dist/nodes/memory/MemoryBufferWindow/MemoryBufferWindow.node.js.map +1 -1
  207. package/dist/nodes/memory/MemoryChatRetriever/MemoryChatRetriever.node.js +109 -84
  208. package/dist/nodes/memory/MemoryChatRetriever/MemoryChatRetriever.node.js.map +1 -1
  209. package/dist/nodes/memory/MemoryManager/MemoryManager.node.js +358 -318
  210. package/dist/nodes/memory/MemoryManager/MemoryManager.node.js.map +1 -1
  211. package/dist/nodes/memory/MemoryMongoDbChat/MemoryMongoDbChat.node.js +155 -0
  212. package/dist/nodes/memory/MemoryMongoDbChat/MemoryMongoDbChat.node.js.map +1 -0
  213. package/dist/nodes/memory/MemoryMongoDbChat/mongodb.dark.svg +3 -0
  214. package/dist/nodes/memory/MemoryMongoDbChat/mongodb.svg +3 -0
  215. package/dist/nodes/memory/MemoryMotorhead/MemoryMotorhead.node.js +128 -104
  216. package/dist/nodes/memory/MemoryMotorhead/MemoryMotorhead.node.js.map +1 -1
  217. package/dist/nodes/memory/MemoryPostgresChat/MemoryPostgresChat.node.js +120 -97
  218. package/dist/nodes/memory/MemoryPostgresChat/MemoryPostgresChat.node.js.map +1 -1
  219. package/dist/nodes/memory/MemoryRedisChat/MemoryRedisChat.node.js +172 -150
  220. package/dist/nodes/memory/MemoryRedisChat/MemoryRedisChat.node.js.map +1 -1
  221. package/dist/nodes/memory/MemoryXata/MemoryXata.node.js +153 -125
  222. package/dist/nodes/memory/MemoryXata/MemoryXata.node.js.map +1 -1
  223. package/dist/nodes/memory/MemoryZep/MemoryZep.node.js +159 -133
  224. package/dist/nodes/memory/MemoryZep/MemoryZep.node.js.map +1 -1
  225. package/dist/nodes/memory/descriptions.js +78 -48
  226. package/dist/nodes/memory/descriptions.js.map +1 -1
  227. package/dist/nodes/output_parser/OutputParserAutofixing/OutputParserAutofixing.node.js +129 -90
  228. package/dist/nodes/output_parser/OutputParserAutofixing/OutputParserAutofixing.node.js.map +1 -1
  229. package/dist/nodes/output_parser/OutputParserAutofixing/prompt.js +27 -3
  230. package/dist/nodes/output_parser/OutputParserAutofixing/prompt.js.map +1 -1
  231. package/dist/nodes/output_parser/OutputParserItemList/OutputParserItemList.node.js +103 -68
  232. package/dist/nodes/output_parser/OutputParserItemList/OutputParserItemList.node.js.map +1 -1
  233. package/dist/nodes/output_parser/OutputParserStructured/OutputParserStructured.node.js +129 -102
  234. package/dist/nodes/output_parser/OutputParserStructured/OutputParserStructured.node.js.map +1 -1
  235. package/dist/nodes/retrievers/RetrieverContextualCompression/RetrieverContextualCompression.node.js +99 -69
  236. package/dist/nodes/retrievers/RetrieverContextualCompression/RetrieverContextualCompression.node.js.map +1 -1
  237. package/dist/nodes/retrievers/RetrieverMultiQuery/RetrieverMultiQuery.node.js +118 -88
  238. package/dist/nodes/retrievers/RetrieverMultiQuery/RetrieverMultiQuery.node.js.map +1 -1
  239. package/dist/nodes/retrievers/RetrieverVectorStore/RetrieverVectorStore.node.js +88 -60
  240. package/dist/nodes/retrievers/RetrieverVectorStore/RetrieverVectorStore.node.js.map +1 -1
  241. package/dist/nodes/retrievers/RetrieverWorkflow/RetrieverWorkflow.node.js +400 -356
  242. package/dist/nodes/retrievers/RetrieverWorkflow/RetrieverWorkflow.node.js.map +1 -1
  243. package/dist/nodes/text_splitters/TextSplitterCharacterTextSplitter/TextSplitterCharacterTextSplitter.node.js +99 -74
  244. package/dist/nodes/text_splitters/TextSplitterCharacterTextSplitter/TextSplitterCharacterTextSplitter.node.js.map +1 -1
  245. package/dist/nodes/text_splitters/TextSplitterRecursiveCharacterTextSplitter/TextSplitterRecursiveCharacterTextSplitter.node.js +132 -103
  246. package/dist/nodes/text_splitters/TextSplitterRecursiveCharacterTextSplitter/TextSplitterRecursiveCharacterTextSplitter.node.js.map +1 -1
  247. package/dist/nodes/text_splitters/TextSplitterTokenSplitter/TextSplitterTokenSplitter.node.js +96 -68
  248. package/dist/nodes/text_splitters/TextSplitterTokenSplitter/TextSplitterTokenSplitter.node.js.map +1 -1
  249. package/dist/nodes/tools/ToolCalculator/ToolCalculator.node.js +69 -44
  250. package/dist/nodes/tools/ToolCalculator/ToolCalculator.node.js.map +1 -1
  251. package/dist/nodes/tools/ToolCode/ToolCode.node.js +261 -235
  252. package/dist/nodes/tools/ToolCode/ToolCode.node.js.map +1 -1
  253. package/dist/nodes/tools/ToolHttpRequest/ToolHttpRequest.node.js +384 -328
  254. package/dist/nodes/tools/ToolHttpRequest/ToolHttpRequest.node.js.map +1 -1
  255. package/dist/nodes/tools/ToolHttpRequest/descriptions.js +394 -357
  256. package/dist/nodes/tools/ToolHttpRequest/descriptions.js.map +1 -1
  257. package/dist/nodes/tools/ToolHttpRequest/interfaces.js +15 -1
  258. package/dist/nodes/tools/ToolHttpRequest/interfaces.js.map +1 -1
  259. package/dist/nodes/tools/ToolHttpRequest/utils.js +587 -551
  260. package/dist/nodes/tools/ToolHttpRequest/utils.js.map +1 -1
  261. package/dist/nodes/tools/ToolSerpApi/ToolSerpApi.node.js +131 -106
  262. package/dist/nodes/tools/ToolSerpApi/ToolSerpApi.node.js.map +1 -1
  263. package/dist/nodes/tools/ToolThink/ToolThink.node.js +94 -0
  264. package/dist/nodes/tools/ToolThink/ToolThink.node.js.map +1 -0
  265. package/dist/nodes/tools/ToolVectorStore/ToolVectorStore.node.js +131 -100
  266. package/dist/nodes/tools/ToolVectorStore/ToolVectorStore.node.js.map +1 -1
  267. package/dist/nodes/tools/ToolWikipedia/ToolWikipedia.node.js +70 -46
  268. package/dist/nodes/tools/ToolWikipedia/ToolWikipedia.node.js.map +1 -1
  269. package/dist/nodes/tools/ToolWolframAlpha/ToolWolframAlpha.node.js +75 -50
  270. package/dist/nodes/tools/ToolWolframAlpha/ToolWolframAlpha.node.js.map +1 -1
  271. package/dist/nodes/tools/ToolWorkflow/ToolWorkflow.node.js +64 -41
  272. package/dist/nodes/tools/ToolWorkflow/ToolWorkflow.node.js.map +1 -1
  273. package/dist/nodes/tools/ToolWorkflow/v1/ToolWorkflowV1.node.js +193 -185
  274. package/dist/nodes/tools/ToolWorkflow/v1/ToolWorkflowV1.node.js.map +1 -1
  275. package/dist/nodes/tools/ToolWorkflow/v1/versionDescription.js +326 -287
  276. package/dist/nodes/tools/ToolWorkflow/v1/versionDescription.js.map +1 -1
  277. package/dist/nodes/tools/ToolWorkflow/v2/ToolWorkflowV2.node.js +50 -27
  278. package/dist/nodes/tools/ToolWorkflow/v2/ToolWorkflowV2.node.js.map +1 -1
  279. package/dist/nodes/tools/ToolWorkflow/v2/methods/index.js +36 -35
  280. package/dist/nodes/tools/ToolWorkflow/v2/methods/index.js.map +1 -1
  281. package/dist/nodes/tools/ToolWorkflow/v2/methods/localResourceMapping.js +40 -18
  282. package/dist/nodes/tools/ToolWorkflow/v2/methods/localResourceMapping.js.map +1 -1
  283. package/dist/nodes/tools/ToolWorkflow/v2/utils/WorkflowToolService.js +256 -201
  284. package/dist/nodes/tools/ToolWorkflow/v2/utils/WorkflowToolService.js.map +1 -1
  285. package/dist/nodes/tools/ToolWorkflow/v2/versionDescription.js +159 -126
  286. package/dist/nodes/tools/ToolWorkflow/v2/versionDescription.js.map +1 -1
  287. package/dist/nodes/trigger/ChatTrigger/ChatTrigger.node.js +513 -489
  288. package/dist/nodes/trigger/ChatTrigger/ChatTrigger.node.js.map +1 -1
  289. package/dist/nodes/trigger/ChatTrigger/GenericFunctions.js +70 -41
  290. package/dist/nodes/trigger/ChatTrigger/GenericFunctions.js.map +1 -1
  291. package/dist/nodes/trigger/ChatTrigger/constants.js +27 -3
  292. package/dist/nodes/trigger/ChatTrigger/constants.js.map +1 -1
  293. package/dist/nodes/trigger/ChatTrigger/error.js +39 -17
  294. package/dist/nodes/trigger/ChatTrigger/error.js.map +1 -1
  295. package/dist/nodes/trigger/ChatTrigger/templates.js +73 -33
  296. package/dist/nodes/trigger/ChatTrigger/templates.js.map +1 -1
  297. package/dist/nodes/trigger/ChatTrigger/types.js +15 -1
  298. package/dist/nodes/trigger/ChatTrigger/types.js.map +1 -1
  299. package/dist/nodes/trigger/ManualChatTrigger/ManualChatTrigger.node.js +87 -63
  300. package/dist/nodes/trigger/ManualChatTrigger/ManualChatTrigger.node.js.map +1 -1
  301. package/dist/nodes/vector_store/VectorStoreInMemory/VectorStoreInMemory.node.js +75 -52
  302. package/dist/nodes/vector_store/VectorStoreInMemory/VectorStoreInMemory.node.js.map +1 -1
  303. package/dist/nodes/vector_store/VectorStoreInMemoryInsert/VectorStoreInMemoryInsert.node.js +117 -83
  304. package/dist/nodes/vector_store/VectorStoreInMemoryInsert/VectorStoreInMemoryInsert.node.js.map +1 -1
  305. package/dist/nodes/vector_store/VectorStoreInMemoryLoad/VectorStoreInMemoryLoad.node.js +91 -62
  306. package/dist/nodes/vector_store/VectorStoreInMemoryLoad/VectorStoreInMemoryLoad.node.js.map +1 -1
  307. package/dist/nodes/vector_store/VectorStoreMongoDBAtlas/VectorStoreMongoDBAtlas.node.js +240 -213
  308. package/dist/nodes/vector_store/VectorStoreMongoDBAtlas/VectorStoreMongoDBAtlas.node.js.map +1 -1
  309. package/dist/nodes/vector_store/VectorStorePGVector/VectorStorePGVector.node.js +256 -221
  310. package/dist/nodes/vector_store/VectorStorePGVector/VectorStorePGVector.node.js.map +1 -1
  311. package/dist/nodes/vector_store/VectorStorePinecone/VectorStorePinecone.node.js +131 -109
  312. package/dist/nodes/vector_store/VectorStorePinecone/VectorStorePinecone.node.js.map +1 -1
  313. package/dist/nodes/vector_store/VectorStorePineconeInsert/VectorStorePineconeInsert.node.js +137 -107
  314. package/dist/nodes/vector_store/VectorStorePineconeInsert/VectorStorePineconeInsert.node.js.map +1 -1
  315. package/dist/nodes/vector_store/VectorStorePineconeLoad/VectorStorePineconeLoad.node.js +125 -98
  316. package/dist/nodes/vector_store/VectorStorePineconeLoad/VectorStorePineconeLoad.node.js.map +1 -1
  317. package/dist/nodes/vector_store/VectorStoreQdrant/VectorStoreQdrant.node.js +124 -100
  318. package/dist/nodes/vector_store/VectorStoreQdrant/VectorStoreQdrant.node.js.map +1 -1
  319. package/dist/nodes/vector_store/VectorStoreSupabase/VectorStoreSupabase.node.js +116 -95
  320. package/dist/nodes/vector_store/VectorStoreSupabase/VectorStoreSupabase.node.js.map +1 -1
  321. package/dist/nodes/vector_store/VectorStoreSupabaseInsert/VectorStoreSupabaseInsert.node.js +129 -99
  322. package/dist/nodes/vector_store/VectorStoreSupabaseInsert/VectorStoreSupabaseInsert.node.js.map +1 -1
  323. package/dist/nodes/vector_store/VectorStoreSupabaseLoad/VectorStoreSupabaseLoad.node.js +121 -94
  324. package/dist/nodes/vector_store/VectorStoreSupabaseLoad/VectorStoreSupabaseLoad.node.js.map +1 -1
  325. package/dist/nodes/vector_store/VectorStoreZep/VectorStoreZep.node.js +133 -113
  326. package/dist/nodes/vector_store/VectorStoreZep/VectorStoreZep.node.js.map +1 -1
  327. package/dist/nodes/vector_store/VectorStoreZepInsert/VectorStoreZepInsert.node.js +141 -111
  328. package/dist/nodes/vector_store/VectorStoreZepInsert/VectorStoreZepInsert.node.js.map +1 -1
  329. package/dist/nodes/vector_store/VectorStoreZepLoad/VectorStoreZepLoad.node.js +121 -94
  330. package/dist/nodes/vector_store/VectorStoreZepLoad/VectorStoreZepLoad.node.js.map +1 -1
  331. package/dist/nodes/vector_store/shared/MemoryManager/MemoryCalculator.js +65 -37
  332. package/dist/nodes/vector_store/shared/MemoryManager/MemoryCalculator.js.map +1 -1
  333. package/dist/nodes/vector_store/shared/MemoryManager/MemoryVectorStoreManager.js +220 -159
  334. package/dist/nodes/vector_store/shared/MemoryManager/MemoryVectorStoreManager.js.map +1 -1
  335. package/dist/nodes/vector_store/shared/MemoryManager/StoreCleanupService.js +120 -87
  336. package/dist/nodes/vector_store/shared/MemoryManager/StoreCleanupService.js.map +1 -1
  337. package/dist/nodes/vector_store/shared/MemoryManager/config.js +50 -26
  338. package/dist/nodes/vector_store/shared/MemoryManager/config.js.map +1 -1
  339. package/dist/nodes/vector_store/shared/MemoryManager/types.js +15 -1
  340. package/dist/nodes/vector_store/shared/MemoryManager/types.js.map +1 -1
  341. package/dist/nodes/vector_store/shared/createVectorStoreNode/constants.js +67 -41
  342. package/dist/nodes/vector_store/shared/createVectorStoreNode/constants.js.map +1 -1
  343. package/dist/nodes/vector_store/shared/createVectorStoreNode/createVectorStoreNode.js +240 -194
  344. package/dist/nodes/vector_store/shared/createVectorStoreNode/createVectorStoreNode.js.map +1 -1
  345. package/dist/nodes/vector_store/shared/createVectorStoreNode/methods/listSearch.js +75 -50
  346. package/dist/nodes/vector_store/shared/createVectorStoreNode/methods/listSearch.js.map +1 -1
  347. package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/index.js +28 -19
  348. package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/index.js.map +1 -1
  349. package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/insertOperation.js +58 -29
  350. package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/insertOperation.js.map +1 -1
  351. package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/loadOperation.js +62 -29
  352. package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/loadOperation.js.map +1 -1
  353. package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/retrieveAsToolOperation.js +72 -38
  354. package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/retrieveAsToolOperation.js.map +1 -1
  355. package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/retrieveOperation.js +36 -12
  356. package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/retrieveOperation.js.map +1 -1
  357. package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/updateOperation.js +64 -34
  358. package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/updateOperation.js.map +1 -1
  359. package/dist/nodes/vector_store/shared/createVectorStoreNode/types.js +15 -1
  360. package/dist/nodes/vector_store/shared/createVectorStoreNode/types.js.map +1 -1
  361. package/dist/nodes/vector_store/shared/createVectorStoreNode/utils.js +40 -12
  362. package/dist/nodes/vector_store/shared/createVectorStoreNode/utils.js.map +1 -1
  363. package/dist/nodes/vector_store/shared/descriptions.js +93 -65
  364. package/dist/nodes/vector_store/shared/descriptions.js.map +1 -1
  365. package/dist/nodes/vector_store/shared/processDocuments.js +58 -35
  366. package/dist/nodes/vector_store/shared/processDocuments.js.map +1 -1
  367. package/dist/nodes/vendors/OpenAi/OpenAi.node.js +39 -16
  368. package/dist/nodes/vendors/OpenAi/OpenAi.node.js.map +1 -1
  369. package/dist/nodes/vendors/OpenAi/actions/assistant/create.operation.js +267 -228
  370. package/dist/nodes/vendors/OpenAi/actions/assistant/create.operation.js.map +1 -1
  371. package/dist/nodes/vendors/OpenAi/actions/assistant/deleteAssistant.operation.js +49 -24
  372. package/dist/nodes/vendors/OpenAi/actions/assistant/deleteAssistant.operation.js.map +1 -1
  373. package/dist/nodes/vendors/OpenAi/actions/assistant/index.js +100 -94
  374. package/dist/nodes/vendors/OpenAi/actions/assistant/index.js.map +1 -1
  375. package/dist/nodes/vendors/OpenAi/actions/assistant/list.operation.js +83 -59
  376. package/dist/nodes/vendors/OpenAi/actions/assistant/list.operation.js.map +1 -1
  377. package/dist/nodes/vendors/OpenAi/actions/assistant/message.operation.js +255 -227
  378. package/dist/nodes/vendors/OpenAi/actions/assistant/message.operation.js.map +1 -1
  379. package/dist/nodes/vendors/OpenAi/actions/assistant/update.operation.js +216 -171
  380. package/dist/nodes/vendors/OpenAi/actions/assistant/update.operation.js.map +1 -1
  381. package/dist/nodes/vendors/OpenAi/actions/audio/generate.operation.js +186 -157
  382. package/dist/nodes/vendors/OpenAi/actions/audio/generate.operation.js.map +1 -1
  383. package/dist/nodes/vendors/OpenAi/actions/audio/index.js +92 -88
  384. package/dist/nodes/vendors/OpenAi/actions/audio/index.js.map +1 -1
  385. package/dist/nodes/vendors/OpenAi/actions/audio/transcribe.operation.js +108 -76
  386. package/dist/nodes/vendors/OpenAi/actions/audio/transcribe.operation.js.map +1 -1
  387. package/dist/nodes/vendors/OpenAi/actions/audio/translate.operation.js +99 -67
  388. package/dist/nodes/vendors/OpenAi/actions/audio/translate.operation.js.map +1 -1
  389. package/dist/nodes/vendors/OpenAi/actions/descriptions.js +75 -50
  390. package/dist/nodes/vendors/OpenAi/actions/descriptions.js.map +1 -1
  391. package/dist/nodes/vendors/OpenAi/actions/file/deleteFile.operation.js +75 -50
  392. package/dist/nodes/vendors/OpenAi/actions/file/deleteFile.operation.js.map +1 -1
  393. package/dist/nodes/vendors/OpenAi/actions/file/index.js +80 -76
  394. package/dist/nodes/vendors/OpenAi/actions/file/index.js.map +1 -1
  395. package/dist/nodes/vendors/OpenAi/actions/file/list.operation.js +74 -49
  396. package/dist/nodes/vendors/OpenAi/actions/file/list.operation.js.map +1 -1
  397. package/dist/nodes/vendors/OpenAi/actions/file/upload.operation.js +108 -78
  398. package/dist/nodes/vendors/OpenAi/actions/file/upload.operation.js.map +1 -1
  399. package/dist/nodes/vendors/OpenAi/actions/image/analyze.operation.js +206 -187
  400. package/dist/nodes/vendors/OpenAi/actions/image/analyze.operation.js.map +1 -1
  401. package/dist/nodes/vendors/OpenAi/actions/image/generate.operation.js +240 -213
  402. package/dist/nodes/vendors/OpenAi/actions/image/generate.operation.js.map +1 -1
  403. package/dist/nodes/vendors/OpenAi/actions/image/index.js +70 -67
  404. package/dist/nodes/vendors/OpenAi/actions/image/index.js.map +1 -1
  405. package/dist/nodes/vendors/OpenAi/actions/node.type.js +15 -1
  406. package/dist/nodes/vendors/OpenAi/actions/node.type.js.map +1 -1
  407. package/dist/nodes/vendors/OpenAi/actions/router.js +100 -97
  408. package/dist/nodes/vendors/OpenAi/actions/router.js.map +1 -1
  409. package/dist/nodes/vendors/OpenAi/actions/text/classify.operation.js +93 -70
  410. package/dist/nodes/vendors/OpenAi/actions/text/classify.operation.js.map +1 -1
  411. package/dist/nodes/vendors/OpenAi/actions/text/index.js +71 -67
  412. package/dist/nodes/vendors/OpenAi/actions/text/index.js.map +1 -1
  413. package/dist/nodes/vendors/OpenAi/actions/text/message.operation.js +307 -278
  414. package/dist/nodes/vendors/OpenAi/actions/text/message.operation.js.map +1 -1
  415. package/dist/nodes/vendors/OpenAi/actions/versionDescription.js +143 -141
  416. package/dist/nodes/vendors/OpenAi/actions/versionDescription.js.map +1 -1
  417. package/dist/nodes/vendors/OpenAi/helpers/constants.js +47 -23
  418. package/dist/nodes/vendors/OpenAi/helpers/constants.js.map +1 -1
  419. package/dist/nodes/vendors/OpenAi/helpers/error-handling.js +42 -17
  420. package/dist/nodes/vendors/OpenAi/helpers/error-handling.js.map +1 -1
  421. package/dist/nodes/vendors/OpenAi/helpers/interfaces.js +15 -1
  422. package/dist/nodes/vendors/OpenAi/helpers/interfaces.js.map +1 -1
  423. package/dist/nodes/vendors/OpenAi/helpers/utils.js +56 -29
  424. package/dist/nodes/vendors/OpenAi/helpers/utils.js.map +1 -1
  425. package/dist/nodes/vendors/OpenAi/methods/index.js +39 -36
  426. package/dist/nodes/vendors/OpenAi/methods/index.js.map +1 -1
  427. package/dist/nodes/vendors/OpenAi/methods/listSearch.js +118 -95
  428. package/dist/nodes/vendors/OpenAi/methods/listSearch.js.map +1 -1
  429. package/dist/nodes/vendors/OpenAi/methods/loadOptions.js +36 -12
  430. package/dist/nodes/vendors/OpenAi/methods/loadOptions.js.map +1 -1
  431. package/dist/nodes/vendors/OpenAi/transport/index.js +44 -20
  432. package/dist/nodes/vendors/OpenAi/transport/index.js.map +1 -1
  433. package/dist/types/nodes.json +9 -6
  434. package/dist/types/types.js.map +1 -1
  435. package/dist/types/zod.types.js +15 -1
  436. package/dist/types/zod.types.js.map +1 -1
  437. package/dist/utils/N8nBinaryLoader.js +186 -142
  438. package/dist/utils/N8nBinaryLoader.js.map +1 -1
  439. package/dist/utils/N8nJsonLoader.js +82 -59
  440. package/dist/utils/N8nJsonLoader.js.map +1 -1
  441. package/dist/utils/N8nTool.js +95 -75
  442. package/dist/utils/N8nTool.js.map +1 -1
  443. package/dist/utils/descriptions.js +128 -92
  444. package/dist/utils/descriptions.js.map +1 -1
  445. package/dist/utils/helpers.js +153 -137
  446. package/dist/utils/helpers.js.map +1 -1
  447. package/dist/utils/logWrapper.js +328 -285
  448. package/dist/utils/logWrapper.js.map +1 -1
  449. package/dist/utils/output_parsers/N8nItemListOutputParser.js +57 -35
  450. package/dist/utils/output_parsers/N8nItemListOutputParser.js.map +1 -1
  451. package/dist/utils/output_parsers/N8nOutputFixingParser.js +94 -62
  452. package/dist/utils/output_parsers/N8nOutputFixingParser.js.map +1 -1
  453. package/dist/utils/output_parsers/N8nOutputParser.js +44 -15
  454. package/dist/utils/output_parsers/N8nOutputParser.js.map +1 -1
  455. package/dist/utils/output_parsers/N8nStructuredOutputParser.js +109 -79
  456. package/dist/utils/output_parsers/N8nStructuredOutputParser.js.map +1 -1
  457. package/dist/utils/output_parsers/prompt.js +48 -0
  458. package/dist/utils/output_parsers/prompt.js.map +1 -0
  459. package/dist/utils/schemaParsing.js +43 -14
  460. package/dist/utils/schemaParsing.js.map +1 -1
  461. package/dist/utils/sharedFields.js +130 -104
  462. package/dist/utils/sharedFields.js.map +1 -1
  463. package/dist/utils/tracing.js +37 -15
  464. package/dist/utils/tracing.js.map +1 -1
  465. package/package.json +14 -9
  466. package/dist/build.tsbuildinfo +0 -1
  467. package/dist/credentials/AnthropicApi.credentials.d.ts +0 -9
  468. package/dist/credentials/AzureOpenAiApi.credentials.d.ts +0 -8
  469. package/dist/credentials/CohereApi.credentials.d.ts +0 -9
  470. package/dist/credentials/DeepSeekApi.credentials.d.ts +0 -9
  471. package/dist/credentials/GooglePalmApi.credentials.d.ts +0 -9
  472. package/dist/credentials/GroqApi.credentials.d.ts +0 -9
  473. package/dist/credentials/HuggingFaceApi.credentials.d.ts +0 -9
  474. package/dist/credentials/MistralCloudApi.credentials.d.ts +0 -9
  475. package/dist/credentials/MotorheadApi.credentials.d.ts +0 -9
  476. package/dist/credentials/OllamaApi.credentials.d.ts +0 -8
  477. package/dist/credentials/OpenRouterApi.credentials.d.ts +0 -9
  478. package/dist/credentials/PineconeApi.credentials.d.ts +0 -9
  479. package/dist/credentials/QdrantApi.credentials.d.ts +0 -9
  480. package/dist/credentials/SerpApi.credentials.d.ts +0 -9
  481. package/dist/credentials/WolframAlphaApi.credentials.d.ts +0 -9
  482. package/dist/credentials/XAiApi.credentials.d.ts +0 -9
  483. package/dist/credentials/XataApi.credentials.d.ts +0 -9
  484. package/dist/credentials/ZepApi.credentials.d.ts +0 -9
  485. package/dist/nodes/agents/Agent/Agent.node.d.ts +0 -5
  486. package/dist/nodes/agents/Agent/agents/ConversationalAgent/description.d.ts +0 -2
  487. package/dist/nodes/agents/Agent/agents/ConversationalAgent/execute.d.ts +0 -2
  488. package/dist/nodes/agents/Agent/agents/ConversationalAgent/prompt.d.ts +0 -2
  489. package/dist/nodes/agents/Agent/agents/OpenAiFunctionsAgent/description.d.ts +0 -2
  490. package/dist/nodes/agents/Agent/agents/OpenAiFunctionsAgent/execute.d.ts +0 -2
  491. package/dist/nodes/agents/Agent/agents/OpenAiFunctionsAgent/prompt.d.ts +0 -1
  492. package/dist/nodes/agents/Agent/agents/PlanAndExecuteAgent/description.d.ts +0 -2
  493. package/dist/nodes/agents/Agent/agents/PlanAndExecuteAgent/execute.d.ts +0 -2
  494. package/dist/nodes/agents/Agent/agents/PlanAndExecuteAgent/prompt.d.ts +0 -1
  495. package/dist/nodes/agents/Agent/agents/ReActAgent/description.d.ts +0 -2
  496. package/dist/nodes/agents/Agent/agents/ReActAgent/execute.d.ts +0 -2
  497. package/dist/nodes/agents/Agent/agents/ReActAgent/prompt.d.ts +0 -4
  498. package/dist/nodes/agents/Agent/agents/SqlAgent/description.d.ts +0 -2
  499. package/dist/nodes/agents/Agent/agents/SqlAgent/execute.d.ts +0 -2
  500. package/dist/nodes/agents/Agent/agents/SqlAgent/other/handlers/mysql.d.ts +0 -3
  501. package/dist/nodes/agents/Agent/agents/SqlAgent/other/handlers/postgres.d.ts +0 -3
  502. package/dist/nodes/agents/Agent/agents/SqlAgent/other/handlers/sqlite.d.ts +0 -3
  503. package/dist/nodes/agents/Agent/agents/SqlAgent/other/prompts.d.ts +0 -2
  504. package/dist/nodes/agents/Agent/agents/ToolsAgent/description.d.ts +0 -2
  505. package/dist/nodes/agents/Agent/agents/ToolsAgent/execute.d.ts +0 -31
  506. package/dist/nodes/agents/Agent/agents/ToolsAgent/prompt.d.ts +0 -1
  507. package/dist/nodes/agents/Agent/agents/utils.d.ts +0 -8
  508. package/dist/nodes/agents/OpenAiAssistant/OpenAiAssistant.node.d.ts +0 -5
  509. package/dist/nodes/agents/OpenAiAssistant/utils.d.ts +0 -5
  510. package/dist/nodes/chains/ChainLLM/ChainLlm.node.d.ts +0 -5
  511. package/dist/nodes/chains/ChainLLM/methods/chainExecutor.d.ts +0 -19
  512. package/dist/nodes/chains/ChainLLM/methods/config.d.ts +0 -3
  513. package/dist/nodes/chains/ChainLLM/methods/imageUtils.d.ts +0 -12
  514. package/dist/nodes/chains/ChainLLM/methods/index.d.ts +0 -4
  515. package/dist/nodes/chains/ChainLLM/methods/promptUtils.d.ts +0 -3
  516. package/dist/nodes/chains/ChainLLM/methods/responseFormatter.d.ts +0 -2
  517. package/dist/nodes/chains/ChainLLM/methods/types.d.ts +0 -28
  518. package/dist/nodes/chains/ChainRetrievalQA/ChainRetrievalQa.node.d.ts +0 -5
  519. package/dist/nodes/chains/ChainSummarization/ChainSummarization.node.d.ts +0 -4
  520. package/dist/nodes/chains/ChainSummarization/V1/ChainSummarizationV1.node.d.ts +0 -6
  521. package/dist/nodes/chains/ChainSummarization/V2/ChainSummarizationV2.node.d.ts +0 -6
  522. package/dist/nodes/chains/ChainSummarization/helpers.d.ts +0 -9
  523. package/dist/nodes/chains/ChainSummarization/prompt.d.ts +0 -2
  524. package/dist/nodes/chains/InformationExtractor/InformationExtractor.node.d.ts +0 -5
  525. package/dist/nodes/chains/InformationExtractor/helpers.d.ts +0 -7
  526. package/dist/nodes/chains/InformationExtractor/types.d.ts +0 -6
  527. package/dist/nodes/chains/SentimentAnalysis/SentimentAnalysis.node.d.ts +0 -5
  528. package/dist/nodes/chains/TextClassifier/TextClassifier.node.d.ts +0 -5
  529. package/dist/nodes/code/Code.node.d.ts +0 -7
  530. package/dist/nodes/document_loaders/DocumentBinaryInputLoader/DocumentBinaryInputLoader.node.d.ts +0 -8
  531. package/dist/nodes/document_loaders/DocumentDefaultDataLoader/DocumentDefaultDataLoader.node.d.ts +0 -8
  532. package/dist/nodes/document_loaders/DocumentGithubLoader/DocumentGithubLoader.node.d.ts +0 -5
  533. package/dist/nodes/document_loaders/DocumentJSONInputLoader/DocumentJsonInputLoader.node.d.ts +0 -5
  534. package/dist/nodes/embeddings/EmbeddingsAwsBedrock/EmbeddingsAwsBedrock.node.d.ts +0 -5
  535. package/dist/nodes/embeddings/EmbeddingsAzureOpenAi/EmbeddingsAzureOpenAi.node.d.ts +0 -5
  536. package/dist/nodes/embeddings/EmbeddingsCohere/EmbeddingsCohere.node.d.ts +0 -5
  537. package/dist/nodes/embeddings/EmbeddingsGoogleGemini/EmbeddingsGoogleGemini.node.d.ts +0 -5
  538. package/dist/nodes/embeddings/EmbeddingsHuggingFaceInference/EmbeddingsHuggingFaceInference.node.d.ts +0 -5
  539. package/dist/nodes/embeddings/EmbeddingsMistralCloud/EmbeddingsMistralCloud.node.d.ts +0 -5
  540. package/dist/nodes/embeddings/EmbeddingsOllama/EmbeddingsOllama.node.d.ts +0 -5
  541. package/dist/nodes/embeddings/EmbeddingsOpenAI/EmbeddingsOpenAi.node.d.ts +0 -5
  542. package/dist/nodes/llms/LMChatAnthropic/LmChatAnthropic.node.d.ts +0 -11
  543. package/dist/nodes/llms/LMChatAnthropic/methods/searchModels.d.ts +0 -8
  544. package/dist/nodes/llms/LMChatOllama/LmChatOllama.node.d.ts +0 -5
  545. package/dist/nodes/llms/LMChatOpenAi/LmChatOpenAi.node.d.ts +0 -11
  546. package/dist/nodes/llms/LMChatOpenAi/methods/loadModels.d.ts +0 -2
  547. package/dist/nodes/llms/LMCohere/LmCohere.node.d.ts +0 -5
  548. package/dist/nodes/llms/LMOllama/LmOllama.node.d.ts +0 -5
  549. package/dist/nodes/llms/LMOllama/description.d.ts +0 -4
  550. package/dist/nodes/llms/LMOpenAi/LmOpenAi.node.d.ts +0 -15
  551. package/dist/nodes/llms/LMOpenHuggingFaceInference/LmOpenHuggingFaceInference.node.d.ts +0 -5
  552. package/dist/nodes/llms/LmChatAwsBedrock/LmChatAwsBedrock.node.d.ts +0 -5
  553. package/dist/nodes/llms/LmChatAzureOpenAi/LmChatAzureOpenAi.node.d.ts +0 -5
  554. package/dist/nodes/llms/LmChatDeepSeek/LmChatDeepSeek.node.d.ts +0 -5
  555. package/dist/nodes/llms/LmChatGoogleGemini/LmChatGoogleGemini.node.d.ts +0 -5
  556. package/dist/nodes/llms/LmChatGoogleVertex/LmChatGoogleVertex.node.d.ts +0 -15
  557. package/dist/nodes/llms/LmChatGoogleVertex/error-handling.d.ts +0 -8
  558. package/dist/nodes/llms/LmChatGroq/LmChatGroq.node.d.ts +0 -5
  559. package/dist/nodes/llms/LmChatMistralCloud/LmChatMistralCloud.node.d.ts +0 -5
  560. package/dist/nodes/llms/LmChatOpenRouter/LmChatOpenRouter.node.d.ts +0 -5
  561. package/dist/nodes/llms/LmChatXAiGrok/LmChatXAiGrok.node.d.ts +0 -5
  562. package/dist/nodes/llms/N8nLlmTracing.d.ts +0 -44
  563. package/dist/nodes/llms/gemini-common/additional-options.d.ts +0 -2
  564. package/dist/nodes/llms/gemini-common/safety-options.d.ts +0 -3
  565. package/dist/nodes/llms/n8nDefaultFailedAttemptHandler.d.ts +0 -1
  566. package/dist/nodes/llms/n8nLlmFailedAttemptHandler.d.ts +0 -3
  567. package/dist/nodes/memory/MemoryBufferWindow/MemoryBufferWindow.node.d.ts +0 -5
  568. package/dist/nodes/memory/MemoryChatRetriever/MemoryChatRetriever.node.d.ts +0 -5
  569. package/dist/nodes/memory/MemoryManager/MemoryManager.node.d.ts +0 -5
  570. package/dist/nodes/memory/MemoryMotorhead/MemoryMotorhead.node.d.ts +0 -5
  571. package/dist/nodes/memory/MemoryPostgresChat/MemoryPostgresChat.node.d.ts +0 -11
  572. package/dist/nodes/memory/MemoryRedisChat/MemoryRedisChat.node.d.ts +0 -5
  573. package/dist/nodes/memory/MemoryXata/MemoryXata.node.d.ts +0 -5
  574. package/dist/nodes/memory/MemoryZep/MemoryZep.node.d.ts +0 -5
  575. package/dist/nodes/memory/descriptions.d.ts +0 -5
  576. package/dist/nodes/output_parser/OutputParserAutofixing/OutputParserAutofixing.node.d.ts +0 -5
  577. package/dist/nodes/output_parser/OutputParserAutofixing/prompt.d.ts +0 -1
  578. package/dist/nodes/output_parser/OutputParserItemList/OutputParserItemList.node.d.ts +0 -5
  579. package/dist/nodes/output_parser/OutputParserStructured/OutputParserStructured.node.d.ts +0 -5
  580. package/dist/nodes/retrievers/RetrieverContextualCompression/RetrieverContextualCompression.node.d.ts +0 -5
  581. package/dist/nodes/retrievers/RetrieverMultiQuery/RetrieverMultiQuery.node.d.ts +0 -5
  582. package/dist/nodes/retrievers/RetrieverVectorStore/RetrieverVectorStore.node.d.ts +0 -5
  583. package/dist/nodes/retrievers/RetrieverWorkflow/RetrieverWorkflow.node.d.ts +0 -5
  584. package/dist/nodes/text_splitters/TextSplitterCharacterTextSplitter/TextSplitterCharacterTextSplitter.node.d.ts +0 -5
  585. package/dist/nodes/text_splitters/TextSplitterRecursiveCharacterTextSplitter/TextSplitterRecursiveCharacterTextSplitter.node.d.ts +0 -5
  586. package/dist/nodes/text_splitters/TextSplitterTokenSplitter/TextSplitterTokenSplitter.node.d.ts +0 -5
  587. package/dist/nodes/tools/ToolCalculator/ToolCalculator.node.d.ts +0 -5
  588. package/dist/nodes/tools/ToolCode/ToolCode.node.d.ts +0 -5
  589. package/dist/nodes/tools/ToolHttpRequest/ToolHttpRequest.node.d.ts +0 -5
  590. package/dist/nodes/tools/ToolHttpRequest/descriptions.d.ts +0 -7
  591. package/dist/nodes/tools/ToolHttpRequest/interfaces.d.ts +0 -20
  592. package/dist/nodes/tools/ToolHttpRequest/utils.d.ts +0 -25
  593. package/dist/nodes/tools/ToolSerpApi/ToolSerpApi.node.d.ts +0 -5
  594. package/dist/nodes/tools/ToolVectorStore/ToolVectorStore.node.d.ts +0 -5
  595. package/dist/nodes/tools/ToolWikipedia/ToolWikipedia.node.d.ts +0 -5
  596. package/dist/nodes/tools/ToolWolframAlpha/ToolWolframAlpha.node.d.ts +0 -5
  597. package/dist/nodes/tools/ToolWorkflow/ToolWorkflow.node.d.ts +0 -4
  598. package/dist/nodes/tools/ToolWorkflow/v1/ToolWorkflowV1.node.d.ts +0 -6
  599. package/dist/nodes/tools/ToolWorkflow/v1/versionDescription.d.ts +0 -2
  600. package/dist/nodes/tools/ToolWorkflow/v2/ToolWorkflowV2.node.d.ts +0 -10
  601. package/dist/nodes/tools/ToolWorkflow/v2/methods/index.d.ts +0 -1
  602. package/dist/nodes/tools/ToolWorkflow/v2/methods/localResourceMapping.d.ts +0 -2
  603. package/dist/nodes/tools/ToolWorkflow/v2/utils/WorkflowToolService.d.ts +0 -26
  604. package/dist/nodes/tools/ToolWorkflow/v2/versionDescription.d.ts +0 -2
  605. package/dist/nodes/trigger/ChatTrigger/ChatTrigger.node.d.ts +0 -7
  606. package/dist/nodes/trigger/ChatTrigger/GenericFunctions.d.ts +0 -2
  607. package/dist/nodes/trigger/ChatTrigger/constants.d.ts +0 -1
  608. package/dist/nodes/trigger/ChatTrigger/error.d.ts +0 -5
  609. package/dist/nodes/trigger/ChatTrigger/templates.d.ts +0 -16
  610. package/dist/nodes/trigger/ChatTrigger/types.d.ts +0 -2
  611. package/dist/nodes/trigger/ManualChatTrigger/ManualChatTrigger.node.d.ts +0 -5
  612. package/dist/nodes/vector_store/VectorStoreInMemory/VectorStoreInMemory.node.d.ts +0 -15
  613. package/dist/nodes/vector_store/VectorStoreInMemoryInsert/VectorStoreInMemoryInsert.node.d.ts +0 -5
  614. package/dist/nodes/vector_store/VectorStoreInMemoryLoad/VectorStoreInMemoryLoad.node.d.ts +0 -5
  615. package/dist/nodes/vector_store/VectorStoreMongoDBAtlas/VectorStoreMongoDBAtlas.node.d.ts +0 -16
  616. package/dist/nodes/vector_store/VectorStorePGVector/VectorStorePGVector.node.d.ts +0 -15
  617. package/dist/nodes/vector_store/VectorStorePinecone/VectorStorePinecone.node.d.ts +0 -15
  618. package/dist/nodes/vector_store/VectorStorePineconeInsert/VectorStorePineconeInsert.node.d.ts +0 -11
  619. package/dist/nodes/vector_store/VectorStorePineconeLoad/VectorStorePineconeLoad.node.d.ts +0 -11
  620. package/dist/nodes/vector_store/VectorStoreQdrant/VectorStoreQdrant.node.d.ts +0 -15
  621. package/dist/nodes/vector_store/VectorStoreSupabase/VectorStoreSupabase.node.d.ts +0 -15
  622. package/dist/nodes/vector_store/VectorStoreSupabaseInsert/VectorStoreSupabaseInsert.node.d.ts +0 -11
  623. package/dist/nodes/vector_store/VectorStoreSupabaseLoad/VectorStoreSupabaseLoad.node.d.ts +0 -11
  624. package/dist/nodes/vector_store/VectorStoreZep/VectorStoreZep.node.d.ts +0 -15
  625. package/dist/nodes/vector_store/VectorStoreZepInsert/VectorStoreZepInsert.node.d.ts +0 -5
  626. package/dist/nodes/vector_store/VectorStoreZepLoad/VectorStoreZepLoad.node.d.ts +0 -5
  627. package/dist/nodes/vector_store/shared/MemoryManager/MemoryCalculator.d.ts +0 -7
  628. package/dist/nodes/vector_store/shared/MemoryManager/MemoryVectorStoreManager.d.ts +0 -32
  629. package/dist/nodes/vector_store/shared/MemoryManager/StoreCleanupService.d.ts +0 -16
  630. package/dist/nodes/vector_store/shared/MemoryManager/config.d.ts +0 -4
  631. package/dist/nodes/vector_store/shared/MemoryManager/types.d.ts +0 -39
  632. package/dist/nodes/vector_store/shared/createVectorStoreNode/constants.d.ts +0 -4
  633. package/dist/nodes/vector_store/shared/createVectorStoreNode/createVectorStoreNode.d.ts +0 -15
  634. package/dist/nodes/vector_store/shared/createVectorStoreNode/methods/listSearch.d.ts +0 -19
  635. package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/index.d.ts +0 -5
  636. package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/insertOperation.d.ts +0 -5
  637. package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/loadOperation.d.ts +0 -5
  638. package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/retrieveAsToolOperation.d.ts +0 -5
  639. package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/retrieveOperation.d.ts +0 -5
  640. package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/updateOperation.d.ts +0 -5
  641. package/dist/nodes/vector_store/shared/createVectorStoreNode/types.d.ts +0 -31
  642. package/dist/nodes/vector_store/shared/createVectorStoreNode/utils.d.ts +0 -6
  643. package/dist/nodes/vector_store/shared/descriptions.d.ts +0 -4
  644. package/dist/nodes/vector_store/shared/processDocuments.d.ts +0 -25
  645. package/dist/nodes/vendors/OpenAi/OpenAi.node.d.ts +0 -10
  646. package/dist/nodes/vendors/OpenAi/actions/assistant/create.operation.d.ts +0 -26
  647. package/dist/nodes/vendors/OpenAi/actions/assistant/deleteAssistant.operation.d.ts +0 -26
  648. package/dist/nodes/vendors/OpenAi/actions/assistant/index.d.ts +0 -8
  649. package/dist/nodes/vendors/OpenAi/actions/assistant/list.operation.d.ts +0 -26
  650. package/dist/nodes/vendors/OpenAi/actions/assistant/message.operation.d.ts +0 -26
  651. package/dist/nodes/vendors/OpenAi/actions/assistant/update.operation.d.ts +0 -26
  652. package/dist/nodes/vendors/OpenAi/actions/audio/generate.operation.d.ts +0 -26
  653. package/dist/nodes/vendors/OpenAi/actions/audio/index.d.ts +0 -6
  654. package/dist/nodes/vendors/OpenAi/actions/audio/transcribe.operation.d.ts +0 -26
  655. package/dist/nodes/vendors/OpenAi/actions/audio/translate.operation.d.ts +0 -26
  656. package/dist/nodes/vendors/OpenAi/actions/descriptions.d.ts +0 -3
  657. package/dist/nodes/vendors/OpenAi/actions/file/deleteFile.operation.d.ts +0 -26
  658. package/dist/nodes/vendors/OpenAi/actions/file/index.d.ts +0 -6
  659. package/dist/nodes/vendors/OpenAi/actions/file/list.operation.d.ts +0 -26
  660. package/dist/nodes/vendors/OpenAi/actions/file/upload.operation.d.ts +0 -26
  661. package/dist/nodes/vendors/OpenAi/actions/image/analyze.operation.d.ts +0 -26
  662. package/dist/nodes/vendors/OpenAi/actions/image/generate.operation.d.ts +0 -26
  663. package/dist/nodes/vendors/OpenAi/actions/image/index.d.ts +0 -5
  664. package/dist/nodes/vendors/OpenAi/actions/node.type.d.ts +0 -10
  665. package/dist/nodes/vendors/OpenAi/actions/router.d.ts +0 -2
  666. package/dist/nodes/vendors/OpenAi/actions/text/classify.operation.d.ts +0 -26
  667. package/dist/nodes/vendors/OpenAi/actions/text/index.d.ts +0 -5
  668. package/dist/nodes/vendors/OpenAi/actions/text/message.operation.d.ts +0 -26
  669. package/dist/nodes/vendors/OpenAi/actions/versionDescription.d.ts +0 -2
  670. package/dist/nodes/vendors/OpenAi/helpers/constants.d.ts +0 -1
  671. package/dist/nodes/vendors/OpenAi/helpers/error-handling.d.ts +0 -4
  672. package/dist/nodes/vendors/OpenAi/helpers/interfaces.d.ts +0 -55
  673. package/dist/nodes/vendors/OpenAi/helpers/utils.d.ts +0 -8
  674. package/dist/nodes/vendors/OpenAi/methods/index.d.ts +0 -2
  675. package/dist/nodes/vendors/OpenAi/methods/listSearch.d.ts +0 -5
  676. package/dist/nodes/vendors/OpenAi/methods/loadOptions.d.ts +0 -2
  677. package/dist/nodes/vendors/OpenAi/transport/index.d.ts +0 -10
  678. package/dist/types/types.d.ts +0 -4
  679. package/dist/types/zod.types.d.ts +0 -2
  680. package/dist/utils/N8nBinaryLoader.d.ts +0 -18
  681. package/dist/utils/N8nJsonLoader.d.ts +0 -11
  682. package/dist/utils/N8nTool.d.ts +0 -10
  683. package/dist/utils/descriptions.d.ts +0 -13
  684. package/dist/utils/helpers.d.ts +0 -23
  685. package/dist/utils/logWrapper.d.ts +0 -27
  686. package/dist/utils/output_parsers/N8nItemListOutputParser.d.ts +0 -13
  687. package/dist/utils/output_parsers/N8nOutputFixingParser.d.ts +0 -18
  688. package/dist/utils/output_parsers/N8nOutputParser.d.ts +0 -7
  689. package/dist/utils/output_parsers/N8nStructuredOutputParser.d.ts +0 -12
  690. package/dist/utils/schemaParsing.d.ts +0 -6
  691. package/dist/utils/sharedFields.d.ts +0 -6
  692. package/dist/utils/tracing.d.ts +0 -7
@@ -1 +1 @@
1
- {"version":3,"file":"logWrapper.js","sourceRoot":"","sources":["../../utils/logWrapper.ts"],"names":[],"mappings":";;AAyBA,0CAwCC;AAED,wCA2BC;AAED,gCA2UC;AAvaD,2DAAwD;AAGxD,2DAA2D;AAE3D,+DAA2D;AAC3D,4DAAwD;AASxD,+CAA2F;AAE3F,uCAAoG;AACpG,uDAAoD;AACpD,mDAAgD;AAEzC,KAAK,UAAU,eAAe,CAEpC,UAMC;IAED,IAAI,CAAC;QACJ,OAAO,MAAM,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC;IACpE,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACZ,MAAM,aAAa,GAAG,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,CAAC;QAE5D,MAAM,KAAK,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K,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;wBAElF,OAAO,QAAQ,CAAC;oBACjB,CAAC,CAAC;gBACH,CAAC;YACF,CAAC;YAGD,OAAQ,MAAc,CAAC,IAAI,CAAC,CAAC;QAC9B,CAAC;KACD,CAAC,CAAC;AACJ,CAAC"}
1
+ {"version":3,"sources":["../../utils/logWrapper.ts"],"sourcesContent":["import type { BaseChatMemory } from '@langchain/community/memory/chat_memory';\nimport type { BaseCallbackConfig, Callbacks } from '@langchain/core/callbacks/manager';\nimport type { BaseChatMessageHistory } from '@langchain/core/chat_history';\nimport type { Document } from '@langchain/core/documents';\nimport { Embeddings } from '@langchain/core/embeddings';\nimport type { InputValues, MemoryVariables, OutputValues } from '@langchain/core/memory';\nimport type { BaseMessage } from '@langchain/core/messages';\nimport { BaseRetriever } from '@langchain/core/retrievers';\nimport type { Tool } from '@langchain/core/tools';\nimport { VectorStore } from '@langchain/core/vectorstores';\nimport { TextSplitter } from '@langchain/textsplitters';\nimport type { BaseDocumentLoader } from 'langchain/dist/document_loaders/base';\nimport type {\n\tIExecuteFunctions,\n\tINodeExecutionData,\n\tISupplyDataFunctions,\n\tITaskMetadata,\n\tNodeConnectionType,\n} from 'n8n-workflow';\nimport { NodeOperationError, NodeConnectionTypes, parseErrorMetadata } from 'n8n-workflow';\n\nimport { logAiEvent, isToolsInstance, isBaseChatMemory, isBaseChatMessageHistory } from './helpers';\nimport { N8nBinaryLoader } from './N8nBinaryLoader';\nimport { N8nJsonLoader } from './N8nJsonLoader';\n\nexport async function callMethodAsync<T>(\n\tthis: T,\n\tparameters: {\n\t\texecuteFunctions: IExecuteFunctions | ISupplyDataFunctions;\n\t\tconnectionType: NodeConnectionType;\n\t\tcurrentNodeRunIndex: number;\n\t\tmethod: (...args: any[]) => Promise<unknown>;\n\t\targuments: unknown[];\n\t},\n): Promise<unknown> {\n\ttry {\n\t\treturn await parameters.method.call(this, ...parameters.arguments);\n\t} catch (e) {\n\t\tconst connectedNode = parameters.executeFunctions.getNode();\n\n\t\tconst error = new NodeOperationError(connectedNode, e, {\n\t\t\tfunctionality: 'configuration-node',\n\t\t});\n\n\t\tconst metadata = parseErrorMetadata(error);\n\t\tparameters.executeFunctions.addOutputData(\n\t\t\tparameters.connectionType,\n\t\t\tparameters.currentNodeRunIndex,\n\t\t\terror,\n\t\t\tmetadata,\n\t\t);\n\n\t\tif (error.message) {\n\t\t\tif (!error.description) {\n\t\t\t\terror.description = error.message;\n\t\t\t}\n\t\t\tthrow error;\n\t\t}\n\n\t\tthrow new NodeOperationError(\n\t\t\tconnectedNode,\n\t\t\t`Error on node \"${connectedNode.name}\" which is connected via input \"${parameters.connectionType}\"`,\n\t\t\t{ functionality: 'configuration-node' },\n\t\t);\n\t}\n}\n\nexport function callMethodSync<T>(\n\tthis: T,\n\tparameters: {\n\t\texecuteFunctions: IExecuteFunctions;\n\t\tconnectionType: NodeConnectionType;\n\t\tcurrentNodeRunIndex: number;\n\t\tmethod: (...args: any[]) => T;\n\t\targuments: unknown[];\n\t},\n): unknown {\n\ttry {\n\t\treturn parameters.method.call(this, ...parameters.arguments);\n\t} catch (e) {\n\t\tconst connectedNode = parameters.executeFunctions.getNode();\n\t\tconst error = new NodeOperationError(connectedNode, e);\n\t\tparameters.executeFunctions.addOutputData(\n\t\t\tparameters.connectionType,\n\t\t\tparameters.currentNodeRunIndex,\n\t\t\terror,\n\t\t);\n\n\t\tthrow new NodeOperationError(\n\t\t\tconnectedNode,\n\t\t\t`Error on node \"${connectedNode.name}\" which is connected via input \"${parameters.connectionType}\"`,\n\t\t\t{ functionality: 'configuration-node' },\n\t\t);\n\t}\n}\n\nexport function logWrapper(\n\toriginalInstance:\n\t\t| Tool\n\t\t| BaseChatMemory\n\t\t| BaseChatMessageHistory\n\t\t| BaseRetriever\n\t\t| Embeddings\n\t\t| Document[]\n\t\t| Document\n\t\t| BaseDocumentLoader\n\t\t| TextSplitter\n\t\t| VectorStore\n\t\t| N8nBinaryLoader\n\t\t| N8nJsonLoader,\n\texecuteFunctions: IExecuteFunctions | ISupplyDataFunctions,\n) {\n\treturn new Proxy(originalInstance, {\n\t\tget: (target, prop) => {\n\t\t\tlet connectionType: NodeConnectionType | undefined;\n\t\t\t// ========== BaseChatMemory ==========\n\t\t\tif (isBaseChatMemory(originalInstance)) {\n\t\t\t\tif (prop === 'loadMemoryVariables' && 'loadMemoryVariables' in target) {\n\t\t\t\t\treturn async (values: InputValues): Promise<MemoryVariables> => {\n\t\t\t\t\t\tconnectionType = NodeConnectionTypes.AiMemory;\n\n\t\t\t\t\t\tconst { index } = executeFunctions.addInputData(connectionType, [\n\t\t\t\t\t\t\t[{ json: { action: 'loadMemoryVariables', values } }],\n\t\t\t\t\t\t]);\n\n\t\t\t\t\t\tconst response = (await callMethodAsync.call(target, {\n\t\t\t\t\t\t\texecuteFunctions,\n\t\t\t\t\t\t\tconnectionType,\n\t\t\t\t\t\t\tcurrentNodeRunIndex: index,\n\t\t\t\t\t\t\tmethod: target[prop],\n\t\t\t\t\t\t\targuments: [values],\n\t\t\t\t\t\t})) as MemoryVariables;\n\n\t\t\t\t\t\tconst chatHistory = (response?.chat_history as BaseMessage[]) ?? response;\n\n\t\t\t\t\t\texecuteFunctions.addOutputData(connectionType, index, [\n\t\t\t\t\t\t\t[{ json: { action: 'loadMemoryVariables', chatHistory } }],\n\t\t\t\t\t\t]);\n\t\t\t\t\t\treturn response;\n\t\t\t\t\t};\n\t\t\t\t} else if (prop === 'saveContext' && 'saveContext' in target) {\n\t\t\t\t\treturn async (input: InputValues, output: OutputValues): Promise<MemoryVariables> => {\n\t\t\t\t\t\tconnectionType = NodeConnectionTypes.AiMemory;\n\n\t\t\t\t\t\tconst { index } = executeFunctions.addInputData(connectionType, [\n\t\t\t\t\t\t\t[{ json: { action: 'saveContext', input, output } }],\n\t\t\t\t\t\t]);\n\n\t\t\t\t\t\tconst response = (await callMethodAsync.call(target, {\n\t\t\t\t\t\t\texecuteFunctions,\n\t\t\t\t\t\t\tconnectionType,\n\t\t\t\t\t\t\tcurrentNodeRunIndex: index,\n\t\t\t\t\t\t\tmethod: target[prop],\n\t\t\t\t\t\t\targuments: [input, output],\n\t\t\t\t\t\t})) as MemoryVariables;\n\n\t\t\t\t\t\tconst chatHistory = await target.chatHistory.getMessages();\n\n\t\t\t\t\t\texecuteFunctions.addOutputData(connectionType, index, [\n\t\t\t\t\t\t\t[{ json: { action: 'saveContext', chatHistory } }],\n\t\t\t\t\t\t]);\n\n\t\t\t\t\t\treturn response;\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// ========== BaseChatMessageHistory ==========\n\t\t\tif (isBaseChatMessageHistory(originalInstance)) {\n\t\t\t\tif (prop === 'getMessages' && 'getMessages' in target) {\n\t\t\t\t\treturn async (): Promise<BaseMessage[]> => {\n\t\t\t\t\t\tconnectionType = NodeConnectionTypes.AiMemory;\n\t\t\t\t\t\tconst { index } = executeFunctions.addInputData(connectionType, [\n\t\t\t\t\t\t\t[{ json: { action: 'getMessages' } }],\n\t\t\t\t\t\t]);\n\n\t\t\t\t\t\tconst response = (await callMethodAsync.call(target, {\n\t\t\t\t\t\t\texecuteFunctions,\n\t\t\t\t\t\t\tconnectionType,\n\t\t\t\t\t\t\tcurrentNodeRunIndex: index,\n\t\t\t\t\t\t\tmethod: target[prop],\n\t\t\t\t\t\t\targuments: [],\n\t\t\t\t\t\t})) as BaseMessage[];\n\n\t\t\t\t\t\tconst payload = { action: 'getMessages', response };\n\t\t\t\t\t\texecuteFunctions.addOutputData(connectionType, index, [[{ json: payload }]]);\n\n\t\t\t\t\t\tlogAiEvent(executeFunctions, 'ai-messages-retrieved-from-memory', { response });\n\t\t\t\t\t\treturn response;\n\t\t\t\t\t};\n\t\t\t\t} else if (prop === 'addMessage' && 'addMessage' in target) {\n\t\t\t\t\treturn async (message: BaseMessage): Promise<void> => {\n\t\t\t\t\t\tconnectionType = NodeConnectionTypes.AiMemory;\n\t\t\t\t\t\tconst payload = { action: 'addMessage', message };\n\t\t\t\t\t\tconst { index } = executeFunctions.addInputData(connectionType, [[{ json: payload }]]);\n\n\t\t\t\t\t\tawait callMethodAsync.call(target, {\n\t\t\t\t\t\t\texecuteFunctions,\n\t\t\t\t\t\t\tconnectionType,\n\t\t\t\t\t\t\tcurrentNodeRunIndex: index,\n\t\t\t\t\t\t\tmethod: target[prop],\n\t\t\t\t\t\t\targuments: [message],\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\tlogAiEvent(executeFunctions, 'ai-message-added-to-memory', { message });\n\t\t\t\t\t\texecuteFunctions.addOutputData(connectionType, index, [[{ json: payload }]]);\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// ========== BaseRetriever ==========\n\t\t\tif (originalInstance instanceof BaseRetriever) {\n\t\t\t\tif (prop === 'getRelevantDocuments' && 'getRelevantDocuments' in target) {\n\t\t\t\t\treturn async (\n\t\t\t\t\t\tquery: string,\n\t\t\t\t\t\tconfig?: Callbacks | BaseCallbackConfig,\n\t\t\t\t\t): Promise<Document[]> => {\n\t\t\t\t\t\tconnectionType = NodeConnectionTypes.AiRetriever;\n\t\t\t\t\t\tconst { index } = executeFunctions.addInputData(connectionType, [\n\t\t\t\t\t\t\t[{ json: { query, config } }],\n\t\t\t\t\t\t]);\n\n\t\t\t\t\t\tconst response = (await callMethodAsync.call(target, {\n\t\t\t\t\t\t\texecuteFunctions,\n\t\t\t\t\t\t\tconnectionType,\n\t\t\t\t\t\t\tcurrentNodeRunIndex: index,\n\t\t\t\t\t\t\tmethod: target[prop],\n\t\t\t\t\t\t\targuments: [query, config],\n\t\t\t\t\t\t})) as Array<Document<Record<string, any>>>;\n\n\t\t\t\t\t\tconst executionId: string | undefined = response[0]?.metadata?.executionId as string;\n\t\t\t\t\t\tconst workflowId: string | undefined = response[0]?.metadata?.workflowId as string;\n\n\t\t\t\t\t\tconst metadata: ITaskMetadata = {};\n\t\t\t\t\t\tif (executionId && workflowId) {\n\t\t\t\t\t\t\tmetadata.subExecution = {\n\t\t\t\t\t\t\t\texecutionId,\n\t\t\t\t\t\t\t\tworkflowId,\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tlogAiEvent(executeFunctions, 'ai-documents-retrieved', { query });\n\t\t\t\t\t\texecuteFunctions.addOutputData(\n\t\t\t\t\t\t\tconnectionType,\n\t\t\t\t\t\t\tindex,\n\t\t\t\t\t\t\t[[{ json: { response } }]],\n\t\t\t\t\t\t\tmetadata,\n\t\t\t\t\t\t);\n\t\t\t\t\t\treturn response;\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// ========== Embeddings ==========\n\t\t\tif (originalInstance instanceof Embeddings) {\n\t\t\t\t// Docs -> Embeddings\n\t\t\t\tif (prop === 'embedDocuments' && 'embedDocuments' in target) {\n\t\t\t\t\treturn async (documents: string[]): Promise<number[][]> => {\n\t\t\t\t\t\tconnectionType = NodeConnectionTypes.AiEmbedding;\n\t\t\t\t\t\tconst { index } = executeFunctions.addInputData(connectionType, [\n\t\t\t\t\t\t\t[{ json: { documents } }],\n\t\t\t\t\t\t]);\n\n\t\t\t\t\t\tconst response = (await callMethodAsync.call(target, {\n\t\t\t\t\t\t\texecuteFunctions,\n\t\t\t\t\t\t\tconnectionType,\n\t\t\t\t\t\t\tcurrentNodeRunIndex: index,\n\t\t\t\t\t\t\tmethod: target[prop],\n\t\t\t\t\t\t\targuments: [documents],\n\t\t\t\t\t\t})) as number[][];\n\n\t\t\t\t\t\tlogAiEvent(executeFunctions, 'ai-document-embedded');\n\t\t\t\t\t\texecuteFunctions.addOutputData(connectionType, index, [[{ json: { response } }]]);\n\t\t\t\t\t\treturn response;\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\t// Query -> Embeddings\n\t\t\t\tif (prop === 'embedQuery' && 'embedQuery' in target) {\n\t\t\t\t\treturn async (query: string): Promise<number[]> => {\n\t\t\t\t\t\tconnectionType = NodeConnectionTypes.AiEmbedding;\n\t\t\t\t\t\tconst { index } = executeFunctions.addInputData(connectionType, [\n\t\t\t\t\t\t\t[{ json: { query } }],\n\t\t\t\t\t\t]);\n\n\t\t\t\t\t\tconst response = (await callMethodAsync.call(target, {\n\t\t\t\t\t\t\texecuteFunctions,\n\t\t\t\t\t\t\tconnectionType,\n\t\t\t\t\t\t\tcurrentNodeRunIndex: index,\n\t\t\t\t\t\t\tmethod: target[prop],\n\t\t\t\t\t\t\targuments: [query],\n\t\t\t\t\t\t})) as number[];\n\t\t\t\t\t\tlogAiEvent(executeFunctions, 'ai-query-embedded');\n\t\t\t\t\t\texecuteFunctions.addOutputData(connectionType, index, [[{ json: { response } }]]);\n\t\t\t\t\t\treturn response;\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// ========== N8n Loaders Process All ==========\n\t\t\tif (\n\t\t\t\toriginalInstance instanceof N8nJsonLoader ||\n\t\t\t\toriginalInstance instanceof N8nBinaryLoader\n\t\t\t) {\n\t\t\t\t// Process All\n\t\t\t\tif (prop === 'processAll' && 'processAll' in target) {\n\t\t\t\t\treturn async (items: INodeExecutionData[]): Promise<number[]> => {\n\t\t\t\t\t\tconnectionType = NodeConnectionTypes.AiDocument;\n\t\t\t\t\t\tconst { index } = executeFunctions.addInputData(connectionType, [items]);\n\n\t\t\t\t\t\tconst response = (await callMethodAsync.call(target, {\n\t\t\t\t\t\t\texecuteFunctions,\n\t\t\t\t\t\t\tconnectionType,\n\t\t\t\t\t\t\tcurrentNodeRunIndex: index,\n\t\t\t\t\t\t\tmethod: target[prop],\n\t\t\t\t\t\t\targuments: [items],\n\t\t\t\t\t\t})) as number[];\n\n\t\t\t\t\t\texecuteFunctions.addOutputData(connectionType, index, [[{ json: { response } }]]);\n\t\t\t\t\t\treturn response;\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\t// Process Each\n\t\t\t\tif (prop === 'processItem' && 'processItem' in target) {\n\t\t\t\t\treturn async (item: INodeExecutionData, itemIndex: number): Promise<number[]> => {\n\t\t\t\t\t\tconnectionType = NodeConnectionTypes.AiDocument;\n\t\t\t\t\t\tconst { index } = executeFunctions.addInputData(connectionType, [[item]]);\n\n\t\t\t\t\t\tconst response = (await callMethodAsync.call(target, {\n\t\t\t\t\t\t\texecuteFunctions,\n\t\t\t\t\t\t\tconnectionType,\n\t\t\t\t\t\t\tcurrentNodeRunIndex: index,\n\t\t\t\t\t\t\tmethod: target[prop],\n\t\t\t\t\t\t\targuments: [item, itemIndex],\n\t\t\t\t\t\t})) as number[];\n\n\t\t\t\t\t\tlogAiEvent(executeFunctions, 'ai-document-processed');\n\t\t\t\t\t\texecuteFunctions.addOutputData(connectionType, index, [\n\t\t\t\t\t\t\t[{ json: { response }, pairedItem: { item: itemIndex } }],\n\t\t\t\t\t\t]);\n\t\t\t\t\t\treturn response;\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// ========== TextSplitter ==========\n\t\t\tif (originalInstance instanceof TextSplitter) {\n\t\t\t\tif (prop === 'splitText' && 'splitText' in target) {\n\t\t\t\t\treturn async (text: string): Promise<string[]> => {\n\t\t\t\t\t\tconnectionType = NodeConnectionTypes.AiTextSplitter;\n\t\t\t\t\t\tconst { index } = executeFunctions.addInputData(connectionType, [\n\t\t\t\t\t\t\t[{ json: { textSplitter: text } }],\n\t\t\t\t\t\t]);\n\n\t\t\t\t\t\tconst response = (await callMethodAsync.call(target, {\n\t\t\t\t\t\t\texecuteFunctions,\n\t\t\t\t\t\t\tconnectionType,\n\t\t\t\t\t\t\tcurrentNodeRunIndex: index,\n\t\t\t\t\t\t\tmethod: target[prop],\n\t\t\t\t\t\t\targuments: [text],\n\t\t\t\t\t\t})) as string[];\n\n\t\t\t\t\t\tlogAiEvent(executeFunctions, 'ai-text-split');\n\t\t\t\t\t\texecuteFunctions.addOutputData(connectionType, index, [[{ json: { response } }]]);\n\t\t\t\t\t\treturn response;\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// ========== Tool ==========\n\t\t\tif (isToolsInstance(originalInstance)) {\n\t\t\t\tif (prop === '_call' && '_call' in target) {\n\t\t\t\t\treturn async (query: string): Promise<string> => {\n\t\t\t\t\t\tconnectionType = NodeConnectionTypes.AiTool;\n\t\t\t\t\t\tconst { index } = executeFunctions.addInputData(connectionType, [\n\t\t\t\t\t\t\t[{ json: { query } }],\n\t\t\t\t\t\t]);\n\n\t\t\t\t\t\tconst response = (await callMethodAsync.call(target, {\n\t\t\t\t\t\t\texecuteFunctions,\n\t\t\t\t\t\t\tconnectionType,\n\t\t\t\t\t\t\tcurrentNodeRunIndex: index,\n\t\t\t\t\t\t\tmethod: target[prop],\n\t\t\t\t\t\t\targuments: [query],\n\t\t\t\t\t\t})) as string;\n\n\t\t\t\t\t\tlogAiEvent(executeFunctions, 'ai-tool-called', { query, response });\n\t\t\t\t\t\texecuteFunctions.addOutputData(connectionType, index, [[{ json: { response } }]]);\n\t\t\t\t\t\treturn response;\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// ========== VectorStore ==========\n\t\t\tif (originalInstance instanceof VectorStore) {\n\t\t\t\tif (prop === 'similaritySearch' && 'similaritySearch' in target) {\n\t\t\t\t\treturn async (\n\t\t\t\t\t\tquery: string,\n\t\t\t\t\t\tk?: number,\n\t\t\t\t\t\tfilter?: BiquadFilterType | undefined,\n\t\t\t\t\t\t_callbacks?: Callbacks | undefined,\n\t\t\t\t\t): Promise<Document[]> => {\n\t\t\t\t\t\tconnectionType = NodeConnectionTypes.AiVectorStore;\n\t\t\t\t\t\tconst { index } = executeFunctions.addInputData(connectionType, [\n\t\t\t\t\t\t\t[{ json: { query, k, filter } }],\n\t\t\t\t\t\t]);\n\n\t\t\t\t\t\tconst response = (await callMethodAsync.call(target, {\n\t\t\t\t\t\t\texecuteFunctions,\n\t\t\t\t\t\t\tconnectionType,\n\t\t\t\t\t\t\tcurrentNodeRunIndex: index,\n\t\t\t\t\t\t\tmethod: target[prop],\n\t\t\t\t\t\t\targuments: [query, k, filter, _callbacks],\n\t\t\t\t\t\t})) as Array<Document<Record<string, any>>>;\n\n\t\t\t\t\t\tlogAiEvent(executeFunctions, 'ai-vector-store-searched', { query });\n\t\t\t\t\t\texecuteFunctions.addOutputData(connectionType, index, [[{ json: { response } }]]);\n\n\t\t\t\t\t\treturn response;\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-return\n\t\t\treturn (target as any)[prop];\n\t\t},\n\t});\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAIA,wBAA2B;AAG3B,wBAA8B;AAE9B,0BAA4B;AAC5B,2BAA6B;AAS7B,0BAA4E;AAE5E,qBAAwF;AACxF,6BAAgC;AAChC,2BAA8B;AAE9B,eAAsB,gBAErB,YAOmB;AACnB,MAAI;AACH,WAAO,MAAM,WAAW,OAAO,KAAK,MAAM,GAAG,WAAW,SAAS;AAAA,EAClE,SAAS,GAAG;AACX,UAAM,gBAAgB,WAAW,iBAAiB,QAAQ;AAE1D,UAAM,QAAQ,IAAI,uCAAmB,eAAe,GAAG;AAAA,MACtD,eAAe;AAAA,IAChB,CAAC;AAED,UAAM,eAAW,wCAAmB,KAAK;AACzC,eAAW,iBAAiB;AAAA,MAC3B,WAAW;AAAA,MACX,WAAW;AAAA,MACX;AAAA,MACA;AAAA,IACD;AAEA,QAAI,MAAM,SAAS;AAClB,UAAI,CAAC,MAAM,aAAa;AACvB,cAAM,cAAc,MAAM;AAAA,MAC3B;AACA,YAAM;AAAA,IACP;AAEA,UAAM,IAAI;AAAA,MACT;AAAA,MACA,kBAAkB,cAAc,IAAI,mCAAmC,WAAW,cAAc;AAAA,MAChG,EAAE,eAAe,qBAAqB;AAAA,IACvC;AAAA,EACD;AACD;AAEO,SAAS,eAEf,YAOU;AACV,MAAI;AACH,W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D,CAAC,EAAE,MAAM,EAAE,OAAO,GAAG,OAAO,EAAE,CAAC;AAAA,YAChC,CAAC;AAED,kBAAM,WAAY,MAAM,gBAAgB,KAAK,QAAQ;AAAA,cACpD;AAAA,cACA;AAAA,cACA,qBAAqB;AAAA,cACrB,QAAQ,OAAO,IAAI;AAAA,cACnB,WAAW,CAAC,OAAO,GAAG,QAAQ,UAAU;AAAA,YACzC,CAAC;AAED,2CAAW,kBAAkB,4BAA4B,EAAE,MAAM,CAAC;AAClE,6BAAiB,cAAc,gBAAgB,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC;AAEhF,mBAAO;AAAA,UACR;AAAA,QACD;AAAA,MACD;AAGA,aAAQ,OAAe,IAAI;AAAA,IAC5B;AAAA,EACD,CAAC;AACF;","names":[]}
@@ -1,42 +1,64 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.N8nItemListOutputParser = void 0;
4
- const output_parsers_1 = require("@langchain/core/output_parsers");
5
- class N8nItemListOutputParser extends output_parsers_1.BaseOutputParser {
6
- constructor(options) {
7
- super();
8
- this.lc_namespace = ['n8n-nodes-langchain', 'output_parsers', 'list_items'];
9
- const { numberOfItems = 3, separator = '\n' } = options;
10
- if (numberOfItems && numberOfItems > 0) {
11
- this.numberOfItems = numberOfItems;
12
- }
13
- this.separator = separator;
14
- if (this.separator === '\\n') {
15
- this.separator = '\n';
16
- }
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var N8nItemListOutputParser_exports = {};
20
+ __export(N8nItemListOutputParser_exports, {
21
+ N8nItemListOutputParser: () => N8nItemListOutputParser
22
+ });
23
+ module.exports = __toCommonJS(N8nItemListOutputParser_exports);
24
+ var import_output_parsers = require("@langchain/core/output_parsers");
25
+ class N8nItemListOutputParser extends import_output_parsers.BaseOutputParser {
26
+ constructor(options) {
27
+ super();
28
+ this.lc_namespace = ["n8n-nodes-langchain", "output_parsers", "list_items"];
29
+ const { numberOfItems = 3, separator = "\n" } = options;
30
+ if (numberOfItems && numberOfItems > 0) {
31
+ this.numberOfItems = numberOfItems;
17
32
  }
18
- async parse(text) {
19
- const response = text
20
- .split(this.separator)
21
- .map((item) => item.trim())
22
- .filter((item) => item);
23
- if (this.numberOfItems && response.length < this.numberOfItems) {
24
- throw new output_parsers_1.OutputParserException(`Wrong number of items returned. Expected ${this.numberOfItems} items but got ${response.length} items instead.`);
25
- }
26
- return response.slice(0, this.numberOfItems);
33
+ this.separator = separator;
34
+ if (this.separator === "\\n") {
35
+ this.separator = "\n";
27
36
  }
28
- getFormatInstructions() {
29
- const instructions = `Your response should be a list of ${this.numberOfItems ? this.numberOfItems + ' ' : ''}items separated by`;
30
- const numberOfExamples = this.numberOfItems ?? 3;
31
- const examples = [];
32
- for (let i = 1; i <= numberOfExamples; i++) {
33
- examples.push(`item${i}`);
34
- }
35
- return `${instructions} "${this.separator}" (for example: "${examples.join(this.separator)}")`;
37
+ }
38
+ async parse(text) {
39
+ const response = text.split(this.separator).map((item) => item.trim()).filter((item) => item);
40
+ if (this.numberOfItems && response.length < this.numberOfItems) {
41
+ throw new import_output_parsers.OutputParserException(
42
+ `Wrong number of items returned. Expected ${this.numberOfItems} items but got ${response.length} items instead.`
43
+ );
36
44
  }
37
- getSchema() {
38
- return;
45
+ return response.slice(0, this.numberOfItems);
46
+ }
47
+ getFormatInstructions() {
48
+ const instructions = `Your response should be a list of ${this.numberOfItems ? this.numberOfItems + " " : ""}items separated by`;
49
+ const numberOfExamples = this.numberOfItems ?? 3;
50
+ const examples = [];
51
+ for (let i = 1; i <= numberOfExamples; i++) {
52
+ examples.push(`item${i}`);
39
53
  }
54
+ return `${instructions} "${this.separator}" (for example: "${examples.join(this.separator)}")`;
55
+ }
56
+ getSchema() {
57
+ return;
58
+ }
40
59
  }
41
- exports.N8nItemListOutputParser = N8nItemListOutputParser;
60
+ // Annotate the CommonJS export names for ESM import in node:
61
+ 0 && (module.exports = {
62
+ N8nItemListOutputParser
63
+ });
42
64
  //# sourceMappingURL=N8nItemListOutputParser.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"N8nItemListOutputParser.js","sourceRoot":"","sources":["../../../utils/output_parsers/N8nItemListOutputParser.ts"],"names":[],"mappings":";;;AAAA,mEAAyF;AAEzF,MAAa,uBAAwB,SAAQ,iCAA0B;IAOtE,YAAY,OAAuD;QAClE,KAAK,EAAE,CAAC;QAPT,iBAAY,GAAG,CAAC,qBAAqB,EAAE,gBAAgB,EAAE,YAAY,CAAC,CAAC;QAStE,MAAM,EAAE,aAAa,GAAG,CAAC,EAAE,SAAS,GAAG,IAAI,EAAE,GAAG,OAAO,CAAC;QAExD,IAAI,aAAa,IAAI,aAAa,GAAG,CAAC,EAAE,CAAC;YACxC,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACpC,CAAC;QAED,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAE3B,IAAI,IAAI,CAAC,SAAS,KAAK,KAAK,EAAE,CAAC;YAC9B,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;QACvB,CAAC;IACF,CAAC;IAED,KAAK,CAAC,KAAK,CAAC,IAAY;QACvB,MAAM,QAAQ,GAAG,IAAI;aACnB,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC;aACrB,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;aAC1B,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC;QAEzB,IAAI,IAAI,CAAC,aAAa,IAAI,QAAQ,CAAC,MAAM,GAAG,IAAI,CAAC,aAAa,EAAE,CAAC;YAEhE,MAAM,IAAI,sCAAqB,CAC9B,4CAA4C,IAAI,CAAC,aAAa,kBAAkB,QAAQ,CAAC,MAAM,iBAAiB,CAChH,CAAC;QACH,CAAC;QAED,OAAO,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;IAC9C,CAAC;IAED,qBAAqB;QACpB,MAAM,YAAY,GAAG,qCACpB,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,GAAG,GAAG,CAAC,CAAC,CAAC,EACjD,oBAAoB,CAAC;QAErB,MAAM,gBAAgB,GAAG,IAAI,CAAC,aAAa,IAAI,CAAC,CAAC;QAEjD,MAAM,QAAQ,GAAa,EAAE,CAAC;QAC9B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,gBAAgB,EAAE,CAAC,EAAE,EAAE,CAAC;YAC5C,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;QAC3B,CAAC;QAED,OAAO,GAAG,YAAY,KAAK,IAAI,CAAC,SAAS,oBAAoB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;IAChG,CAAC;IAED,SAAS;QACR,OAAO;IACR,CAAC;CACD;AAzDD,0DAyDC"}
1
+ {"version":3,"sources":["../../../utils/output_parsers/N8nItemListOutputParser.ts"],"sourcesContent":["import { BaseOutputParser, OutputParserException } from '@langchain/core/output_parsers';\n\nexport class N8nItemListOutputParser extends BaseOutputParser<string[]> {\n\tlc_namespace = ['n8n-nodes-langchain', 'output_parsers', 'list_items'];\n\n\tprivate numberOfItems: number | undefined;\n\n\tprivate separator: string;\n\n\tconstructor(options: { numberOfItems?: number; separator?: string }) {\n\t\tsuper();\n\n\t\tconst { numberOfItems = 3, separator = '\\n' } = options;\n\n\t\tif (numberOfItems && numberOfItems > 0) {\n\t\t\tthis.numberOfItems = numberOfItems;\n\t\t}\n\n\t\tthis.separator = separator;\n\n\t\tif (this.separator === '\\\\n') {\n\t\t\tthis.separator = '\\n';\n\t\t}\n\t}\n\n\tasync parse(text: string): Promise<string[]> {\n\t\tconst response = text\n\t\t\t.split(this.separator)\n\t\t\t.map((item) => item.trim())\n\t\t\t.filter((item) => item);\n\n\t\tif (this.numberOfItems && response.length < this.numberOfItems) {\n\t\t\t// Only error if to few items got returned, if there are to many we can autofix it\n\t\t\tthrow new OutputParserException(\n\t\t\t\t`Wrong number of items returned. Expected ${this.numberOfItems} items but got ${response.length} items instead.`,\n\t\t\t);\n\t\t}\n\n\t\treturn response.slice(0, this.numberOfItems);\n\t}\n\n\tgetFormatInstructions(): string {\n\t\tconst instructions = `Your response should be a list of ${\n\t\t\tthis.numberOfItems ? this.numberOfItems + ' ' : ''\n\t\t}items separated by`;\n\n\t\tconst numberOfExamples = this.numberOfItems ?? 3; // Default number of examples in case numberOfItems is not set\n\n\t\tconst examples: string[] = [];\n\t\tfor (let i = 1; i <= numberOfExamples; i++) {\n\t\t\texamples.push(`item${i}`);\n\t\t}\n\n\t\treturn `${instructions} \"${this.separator}\" (for example: \"${examples.join(this.separator)}\")`;\n\t}\n\n\tgetSchema() {\n\t\treturn;\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BAAwD;AAEjD,MAAM,gCAAgC,uCAA2B;AAAA,EAOvE,YAAY,SAAyD;AACpE,UAAM;AAPP,wBAAe,CAAC,uBAAuB,kBAAkB,YAAY;AASpE,UAAM,EAAE,gBAAgB,GAAG,YAAY,KAAK,IAAI;AAEhD,QAAI,iBAAiB,gBAAgB,GAAG;AACvC,WAAK,gBAAgB;AAAA,IACtB;AAEA,SAAK,YAAY;AAEjB,QAAI,KAAK,cAAc,OAAO;AAC7B,WAAK,YAAY;AAAA,IAClB;AAAA,EACD;AAAA,EAEA,MAAM,MAAM,MAAiC;AAC5C,UAAM,WAAW,KACf,MAAM,KAAK,SAAS,EACpB,IAAI,CAAC,SAAS,KAAK,KAAK,CAAC,EACzB,OAAO,CAAC,SAAS,IAAI;AAEvB,QAAI,KAAK,iBAAiB,SAAS,SAAS,KAAK,eAAe;AAE/D,YAAM,IAAI;AAAA,QACT,4CAA4C,KAAK,aAAa,kBAAkB,SAAS,MAAM;AAAA,MAChG;AAAA,IACD;AAEA,WAAO,SAAS,MAAM,GAAG,KAAK,aAAa;AAAA,EAC5C;AAAA,EAEA,wBAAgC;AAC/B,UAAM,eAAe,qCACpB,KAAK,gBAAgB,KAAK,gBAAgB,MAAM,EACjD;AAEA,UAAM,mBAAmB,KAAK,iBAAiB;AAE/C,UAAM,WAAqB,CAAC;AAC5B,aAAS,IAAI,GAAG,KAAK,kBAAkB,KAAK;AAC3C,eAAS,KAAK,OAAO,CAAC,EAAE;AAAA,IACzB;AAEA,WAAO,GAAG,YAAY,KAAK,KAAK,SAAS,oBAAoB,SAAS,KAAK,KAAK,SAAS,CAAC;AAAA,EAC3F;AAAA,EAEA,YAAY;AACX;AAAA,EACD;AACD;","names":[]}
@@ -1,67 +1,99 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.N8nOutputFixingParser = void 0;
4
- const output_parsers_1 = require("@langchain/core/output_parsers");
5
- const n8n_workflow_1 = require("n8n-workflow");
6
- const helpers_1 = require("../helpers");
7
- class N8nOutputFixingParser extends output_parsers_1.BaseOutputParser {
8
- constructor(context, model, outputParser, fixPromptTemplate) {
9
- super();
10
- this.context = context;
11
- this.model = model;
12
- this.outputParser = outputParser;
13
- this.fixPromptTemplate = fixPromptTemplate;
14
- this.lc_namespace = ['langchain', 'output_parsers', 'fix'];
15
- }
16
- getRetryChain() {
17
- return this.fixPromptTemplate.pipe(this.model);
18
- }
19
- async parse(completion, callbacks) {
20
- const { index } = this.context.addInputData(n8n_workflow_1.NodeConnectionTypes.AiOutputParser, [
21
- [{ json: { action: 'parse', text: completion } }],
22
- ]);
23
- try {
24
- const response = await this.outputParser.parse(completion, callbacks, (e) => {
25
- if (e instanceof output_parsers_1.OutputParserException) {
26
- return e;
27
- }
28
- return new output_parsers_1.OutputParserException(e.message, completion);
29
- });
30
- (0, helpers_1.logAiEvent)(this.context, 'ai-output-parsed', { text: completion, response });
31
- this.context.addOutputData(n8n_workflow_1.NodeConnectionTypes.AiOutputParser, index, [
32
- [{ json: { action: 'parse', response } }],
33
- ]);
34
- return response;
35
- }
36
- catch (error) {
37
- if (!(error instanceof output_parsers_1.OutputParserException)) {
38
- throw error;
39
- }
40
- try {
41
- const result = (await this.getRetryChain().invoke({
42
- completion,
43
- error: error.message,
44
- instructions: this.getFormatInstructions(),
45
- }));
46
- const resultText = result.content.toString();
47
- const parsed = await this.outputParser.parse(resultText, callbacks);
48
- this.context.addOutputData(n8n_workflow_1.NodeConnectionTypes.AiOutputParser, index, [
49
- [{ json: { action: 'parse', response: parsed } }],
50
- ]);
51
- return parsed;
52
- }
53
- catch (autoParseError) {
54
- this.context.addOutputData(n8n_workflow_1.NodeConnectionTypes.AiOutputParser, index, autoParseError);
55
- throw autoParseError;
56
- }
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var N8nOutputFixingParser_exports = {};
20
+ __export(N8nOutputFixingParser_exports, {
21
+ N8nOutputFixingParser: () => N8nOutputFixingParser
22
+ });
23
+ module.exports = __toCommonJS(N8nOutputFixingParser_exports);
24
+ var import_output_parsers = require("@langchain/core/output_parsers");
25
+ var import_n8n_workflow = require("n8n-workflow");
26
+ var import_helpers = require("../helpers");
27
+ class N8nOutputFixingParser extends import_output_parsers.BaseOutputParser {
28
+ constructor(context, model, outputParser, fixPromptTemplate) {
29
+ super();
30
+ this.context = context;
31
+ this.model = model;
32
+ this.outputParser = outputParser;
33
+ this.fixPromptTemplate = fixPromptTemplate;
34
+ this.lc_namespace = ["langchain", "output_parsers", "fix"];
35
+ }
36
+ getRetryChain() {
37
+ return this.fixPromptTemplate.pipe(this.model);
38
+ }
39
+ /**
40
+ * Attempts to parse the completion string using the output parser.
41
+ * If the initial parse fails, it tries to fix the output using a retry chain.
42
+ * @param completion The string to be parsed
43
+ * @returns The parsed response
44
+ * @throws Error if both parsing attempts fail
45
+ */
46
+ async parse(completion, callbacks) {
47
+ const { index } = this.context.addInputData(import_n8n_workflow.NodeConnectionTypes.AiOutputParser, [
48
+ [{ json: { action: "parse", text: completion } }]
49
+ ]);
50
+ try {
51
+ const response = await this.outputParser.parse(completion, callbacks, (e) => {
52
+ if (e instanceof import_output_parsers.OutputParserException) {
53
+ return e;
57
54
  }
55
+ return new import_output_parsers.OutputParserException(e.message, completion);
56
+ });
57
+ (0, import_helpers.logAiEvent)(this.context, "ai-output-parsed", { text: completion, response });
58
+ this.context.addOutputData(import_n8n_workflow.NodeConnectionTypes.AiOutputParser, index, [
59
+ [{ json: { action: "parse", response } }]
60
+ ]);
61
+ return response;
62
+ } catch (error) {
63
+ if (!(error instanceof import_output_parsers.OutputParserException)) {
64
+ throw error;
65
+ }
66
+ try {
67
+ const result = await this.getRetryChain().invoke({
68
+ completion,
69
+ error: error.message,
70
+ instructions: this.getFormatInstructions()
71
+ });
72
+ const resultText = result.content.toString();
73
+ const parsed = await this.outputParser.parse(resultText, callbacks);
74
+ this.context.addOutputData(import_n8n_workflow.NodeConnectionTypes.AiOutputParser, index, [
75
+ [{ json: { action: "parse", response: parsed } }]
76
+ ]);
77
+ return parsed;
78
+ } catch (autoParseError) {
79
+ this.context.addOutputData(import_n8n_workflow.NodeConnectionTypes.AiOutputParser, index, autoParseError);
80
+ throw autoParseError;
81
+ }
58
82
  }
59
- getFormatInstructions() {
60
- return this.outputParser.getFormatInstructions();
61
- }
62
- getSchema() {
63
- return this.outputParser.schema;
64
- }
83
+ }
84
+ /**
85
+ * Method to get the format instructions for the parser.
86
+ * @returns The format instructions for the parser.
87
+ */
88
+ getFormatInstructions() {
89
+ return this.outputParser.getFormatInstructions();
90
+ }
91
+ getSchema() {
92
+ return this.outputParser.schema;
93
+ }
65
94
  }
66
- exports.N8nOutputFixingParser = N8nOutputFixingParser;
95
+ // Annotate the CommonJS export names for ESM import in node:
96
+ 0 && (module.exports = {
97
+ N8nOutputFixingParser
98
+ });
67
99
  //# sourceMappingURL=N8nOutputFixingParser.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"N8nOutputFixingParser.js","sourceRoot":"","sources":["../../../utils/output_parsers/N8nOutputFixingParser.ts"],"names":[],"mappings":";;;AAGA,mEAAyF;AAGzF,+CAAmD;AAGnD,wCAAwC;AAExC,MAAa,qBAAsB,SAAQ,iCAAgB;IAG1D,YACS,OAA6B,EAC7B,KAAwB,EACxB,YAAuC,EACvC,iBAAiC;QAEzC,KAAK,EAAE,CAAC;QALA,YAAO,GAAP,OAAO,CAAsB;QAC7B,UAAK,GAAL,KAAK,CAAmB;QACxB,iBAAY,GAAZ,YAAY,CAA2B;QACvC,sBAAiB,GAAj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M,KAAK,CAAC;YACb,CAAC;YACD,IAAI,CAAC;gBAEJ,MAAM,MAAM,GAAG,CAAC,MAAM,IAAI,CAAC,aAAa,EAAE,CAAC,MAAM,CAAC;oBACjD,UAAU;oBACV,KAAK,EAAE,KAAK,CAAC,OAAO;oBACpB,YAAY,EAAE,IAAI,CAAC,qBAAqB,EAAE;iBAC1C,CAAC,CAAc,CAAC;gBAEjB,MAAM,UAAU,GAAG,MAAM,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC;gBAC7C,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC;gBAGpE,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,kCAAmB,CAAC,cAAc,EAAE,KAAK,EAAE;oBACrE,CAAC,EAAE,IAAI,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,CAAC;iBACjD,CAAC,CAAC;gBAEH,OAAO,MAAM,CAAC;YACf,CAAC;YAAC,OAAO,cAAc,EAAE,CAAC;gBAEzB,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,kCAAmB,CAAC,cAAc,EAAE,KAAK,EAAE,cAAc,CAAC,CAAC;gBACtF,MAAM,cAAc,CAAC;YACtB,CAAC;QACF,CAAC;IACF,CAAC;IAMD,qBAAqB;QACpB,OAAO,IAAI,CAAC,YAAY,CAAC,qBAAqB,EAAE,CAAC;IAClD,CAAC;IAED,SAAS;QACR,OAAO,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC;IACjC,CAAC;CACD;AAnFD,sDAmFC"}
1
+ {"version":3,"sources":["../../../utils/output_parsers/N8nOutputFixingParser.ts"],"sourcesContent":["import type { Callbacks } from '@langchain/core/callbacks/manager';\nimport type { BaseLanguageModel } from '@langchain/core/language_models/base';\nimport type { AIMessage } from '@langchain/core/messages';\nimport { BaseOutputParser, OutputParserException } from '@langchain/core/output_parsers';\nimport type { PromptTemplate } from '@langchain/core/prompts';\nimport type { ISupplyDataFunctions } from 'n8n-workflow';\nimport { NodeConnectionTypes } from 'n8n-workflow';\n\nimport type { N8nStructuredOutputParser } from './N8nStructuredOutputParser';\nimport { logAiEvent } from '../helpers';\n\nexport class N8nOutputFixingParser extends BaseOutputParser {\n\tlc_namespace = ['langchain', 'output_parsers', 'fix'];\n\n\tconstructor(\n\t\tprivate context: ISupplyDataFunctions,\n\t\tprivate model: BaseLanguageModel,\n\t\tprivate outputParser: N8nStructuredOutputParser,\n\t\tprivate fixPromptTemplate: PromptTemplate,\n\t) {\n\t\tsuper();\n\t}\n\n\tgetRetryChain() {\n\t\treturn this.fixPromptTemplate.pipe(this.model);\n\t}\n\n\t/**\n\t * Attempts to parse the completion string using the output parser.\n\t * If the initial parse fails, it tries to fix the output using a retry chain.\n\t * @param completion The string to be parsed\n\t * @returns The parsed response\n\t * @throws Error if both parsing attempts fail\n\t */\n\tasync parse(completion: string, callbacks?: Callbacks) {\n\t\tconst { index } = this.context.addInputData(NodeConnectionTypes.AiOutputParser, [\n\t\t\t[{ json: { action: 'parse', text: completion } }],\n\t\t]);\n\n\t\ttry {\n\t\t\t// First attempt to parse the completion\n\t\t\tconst response = await this.outputParser.parse(completion, callbacks, (e) => {\n\t\t\t\tif (e instanceof OutputParserException) {\n\t\t\t\t\treturn e;\n\t\t\t\t}\n\t\t\t\treturn new OutputParserException(e.message, completion);\n\t\t\t});\n\t\t\tlogAiEvent(this.context, 'ai-output-parsed', { text: completion, response });\n\n\t\t\tthis.context.addOutputData(NodeConnectionTypes.AiOutputParser, index, [\n\t\t\t\t[{ json: { action: 'parse', response } }],\n\t\t\t]);\n\n\t\t\treturn response;\n\t\t} catch (error) {\n\t\t\tif (!(error instanceof OutputParserException)) {\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t\ttry {\n\t\t\t\t// Second attempt: use retry chain to fix the output\n\t\t\t\tconst result = (await this.getRetryChain().invoke({\n\t\t\t\t\tcompletion,\n\t\t\t\t\terror: error.message,\n\t\t\t\t\tinstructions: this.getFormatInstructions(),\n\t\t\t\t})) as AIMessage;\n\n\t\t\t\tconst resultText = result.content.toString();\n\t\t\t\tconst parsed = await this.outputParser.parse(resultText, callbacks);\n\n\t\t\t\t// Add the successfully parsed output to the context\n\t\t\t\tthis.context.addOutputData(NodeConnectionTypes.AiOutputParser, index, [\n\t\t\t\t\t[{ json: { action: 'parse', response: parsed } }],\n\t\t\t\t]);\n\n\t\t\t\treturn parsed;\n\t\t\t} catch (autoParseError) {\n\t\t\t\t// If both attempts fail, add the error to the output and throw\n\t\t\t\tthis.context.addOutputData(NodeConnectionTypes.AiOutputParser, index, autoParseError);\n\t\t\t\tthrow autoParseError;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Method to get the format instructions for the parser.\n\t * @returns The format instructions for the parser.\n\t */\n\tgetFormatInstructions() {\n\t\treturn this.outputParser.getFormatInstructions();\n\t}\n\n\tgetSchema() {\n\t\treturn this.outputParser.schema;\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,4BAAwD;AAGxD,0BAAoC;AAGpC,qBAA2B;AAEpB,MAAM,8BAA8B,uCAAiB;AAAA,EAG3D,YACS,SACA,OACA,cACA,mBACP;AACD,UAAM;AALE;AACA;AACA;AACA;AANT,wBAAe,CAAC,aAAa,kBAAkB,KAAK;AAAA,EASpD;AAAA,EAEA,gBAAgB;AACf,WAAO,KAAK,kBAAkB,KAAK,KAAK,KAAK;AAAA,EAC9C;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASA,MAAM,MAAM,YAAoB,WAAuB;AACtD,UAAM,EAAE,MAAM,IAAI,KAAK,QAAQ,aAAa,wCAAoB,gBAAgB;AAAA,MAC/E,CAAC,EAAE,MAAM,EAAE,QAAQ,SAAS,MAAM,WAAW,EAAE,CAAC;AAAA,IACjD,CAAC;AAED,QAAI;AAEH,YAAM,WAAW,MAAM,KAAK,aAAa,MAAM,YAAY,WAAW,CAAC,MAAM;AAC5E,YAAI,aAAa,6CAAuB;AACvC,iBAAO;AAAA,QACR;AACA,eAAO,IAAI,4CAAsB,EAAE,SAAS,UAAU;AAAA,MACvD,CAAC;AACD,qCAAW,KAAK,SAAS,oBAAoB,EAAE,MAAM,YAAY,SAAS,CAAC;AAE3E,WAAK,QAAQ,cAAc,wCAAoB,gBAAgB,OAAO;AAAA,QACrE,CAAC,EAAE,MAAM,EAAE,QAAQ,SAAS,SAAS,EAAE,CAAC;AAAA,MACzC,CAAC;AAED,aAAO;AAAA,IACR,SAAS,OAAO;AACf,UAAI,EAAE,iBAAiB,8CAAwB;AAC9C,cAAM;AAAA,MACP;AACA,UAAI;AAEH,cAAM,SAAU,MAAM,KAAK,cAAc,EAAE,OAAO;AAAA,UACjD;AAAA,UACA,OAAO,MAAM;AAAA,UACb,cAAc,KAAK,sBAAsB;AAAA,QAC1C,CAAC;AAED,cAAM,aAAa,OAAO,QAAQ,SAAS;AAC3C,cAAM,SAAS,MAAM,KAAK,aAAa,MAAM,YAAY,SAAS;AAGlE,aAAK,QAAQ,cAAc,wCAAoB,gBAAgB,OAAO;AAAA,UACrE,CAAC,EAAE,MAAM,EAAE,QAAQ,SAAS,UAAU,OAAO,EAAE,CAAC;AAAA,QACjD,CAAC;AAED,eAAO;AAAA,MACR,SAAS,gBAAgB;AAExB,aAAK,QAAQ,cAAc,wCAAoB,gBAAgB,OAAO,cAAc;AACpF,cAAM;AAAA,MACP;AAAA,IACD;AAAA,EACD;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,wBAAwB;AACvB,WAAO,KAAK,aAAa,sBAAsB;AAAA,EAChD;AAAA,EAEA,YAAY;AACX,WAAO,KAAK,aAAa;AAAA,EAC1B;AACD;","names":[]}
@@ -1,19 +1,48 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.N8nStructuredOutputParser = exports.N8nItemListOutputParser = exports.N8nOutputFixingParser = void 0;
4
- exports.getOptionalOutputParser = getOptionalOutputParser;
5
- const n8n_workflow_1 = require("n8n-workflow");
6
- const N8nItemListOutputParser_1 = require("./N8nItemListOutputParser");
7
- Object.defineProperty(exports, "N8nItemListOutputParser", { enumerable: true, get: function () { return N8nItemListOutputParser_1.N8nItemListOutputParser; } });
8
- const N8nOutputFixingParser_1 = require("./N8nOutputFixingParser");
9
- Object.defineProperty(exports, "N8nOutputFixingParser", { enumerable: true, get: function () { return N8nOutputFixingParser_1.N8nOutputFixingParser; } });
10
- const N8nStructuredOutputParser_1 = require("./N8nStructuredOutputParser");
11
- Object.defineProperty(exports, "N8nStructuredOutputParser", { enumerable: true, get: function () { return N8nStructuredOutputParser_1.N8nStructuredOutputParser; } });
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var N8nOutputParser_exports = {};
20
+ __export(N8nOutputParser_exports, {
21
+ N8nItemListOutputParser: () => import_N8nItemListOutputParser.N8nItemListOutputParser,
22
+ N8nOutputFixingParser: () => import_N8nOutputFixingParser.N8nOutputFixingParser,
23
+ N8nStructuredOutputParser: () => import_N8nStructuredOutputParser.N8nStructuredOutputParser,
24
+ getOptionalOutputParser: () => getOptionalOutputParser
25
+ });
26
+ module.exports = __toCommonJS(N8nOutputParser_exports);
27
+ var import_n8n_workflow = require("n8n-workflow");
28
+ var import_N8nItemListOutputParser = require("./N8nItemListOutputParser");
29
+ var import_N8nOutputFixingParser = require("./N8nOutputFixingParser");
30
+ var import_N8nStructuredOutputParser = require("./N8nStructuredOutputParser");
12
31
  async function getOptionalOutputParser(ctx) {
13
- let outputParser;
14
- if (ctx.getNodeParameter('hasOutputParser', 0, true) === true) {
15
- outputParser = (await ctx.getInputConnectionData(n8n_workflow_1.NodeConnectionTypes.AiOutputParser, 0));
16
- }
17
- return outputParser;
32
+ let outputParser;
33
+ if (ctx.getNodeParameter("hasOutputParser", 0, true) === true) {
34
+ outputParser = await ctx.getInputConnectionData(
35
+ import_n8n_workflow.NodeConnectionTypes.AiOutputParser,
36
+ 0
37
+ );
38
+ }
39
+ return outputParser;
18
40
  }
41
+ // Annotate the CommonJS export names for ESM import in node:
42
+ 0 && (module.exports = {
43
+ N8nItemListOutputParser,
44
+ N8nOutputFixingParser,
45
+ N8nStructuredOutputParser,
46
+ getOptionalOutputParser
47
+ });
19
48
  //# sourceMappingURL=N8nOutputParser.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"N8nOutputParser.js","sourceRoot":"","sources":["../../../utils/output_parsers/N8nOutputParser.ts"],"names":[],"mappings":";;;AAcA,0DAaC;AA1BD,+CAAmD;AAEnD,uEAAoE;AASpC,wGATvB,iDAAuB,OASuB;AARvD,mEAAgE;AAQvD,sGARA,6CAAqB,OAQA;AAP9B,2EAAwE;AAOf,0GAPhD,qDAAyB,OAOgD;AAE3E,KAAK,UAAU,uBAAuB,CAC5C,GAAsB;IAEtB,IAAI,YAAyC,CAAC;IAE9C,IAAI,GAAG,CAAC,gBAAgB,CAAC,iBAAiB,EAAE,CAAC,EAAE,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC;QAC/D,YAAY,GAAG,CAAC,MAAM,GAAG,CAAC,sBAAsB,CAC/C,kCAAmB,CAAC,cAAc,EAClC,CAAC,CACD,CAAoB,CAAC;IACvB,CAAC;IAED,OAAO,YAAY,CAAC;AACrB,CAAC"}
1
+ {"version":3,"sources":["../../../utils/output_parsers/N8nOutputParser.ts"],"sourcesContent":["import type { IExecuteFunctions } from 'n8n-workflow';\nimport { NodeConnectionTypes } from 'n8n-workflow';\n\nimport { N8nItemListOutputParser } from './N8nItemListOutputParser';\nimport { N8nOutputFixingParser } from './N8nOutputFixingParser';\nimport { N8nStructuredOutputParser } from './N8nStructuredOutputParser';\n\nexport type N8nOutputParser =\n\t| N8nOutputFixingParser\n\t| N8nStructuredOutputParser\n\t| N8nItemListOutputParser;\n\nexport { N8nOutputFixingParser, N8nItemListOutputParser, N8nStructuredOutputParser };\n\nexport async function getOptionalOutputParser(\n\tctx: IExecuteFunctions,\n): Promise<N8nOutputParser | undefined> {\n\tlet outputParser: N8nOutputParser | undefined;\n\n\tif (ctx.getNodeParameter('hasOutputParser', 0, true) === true) {\n\t\toutputParser = (await ctx.getInputConnectionData(\n\t\t\tNodeConnectionTypes.AiOutputParser,\n\t\t\t0,\n\t\t)) as N8nOutputParser;\n\t}\n\n\treturn outputParser;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,0BAAoC;AAEpC,qCAAwC;AACxC,mCAAsC;AACtC,uCAA0C;AAS1C,eAAsB,wBACrB,KACuC;AACvC,MAAI;AAEJ,MAAI,IAAI,iBAAiB,mBAAmB,GAAG,IAAI,MAAM,MAAM;AAC9D,mBAAgB,MAAM,IAAI;AAAA,MACzB,wCAAoB;AAAA,MACpB;AAAA,IACD;AAAA,EACD;AAEA,SAAO;AACR;","names":[]}