@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":"Agent.node.js","sourceRoot":"","sources":["../../../../nodes/agents/Agent/Agent.node.ts"],"names":[],"mappings":";;;AAAA,+CAAuE;AAYvE,sDAAyF;AAEzF,0EAAyF;AACzF,kEAAkF;AAClF,2EAA2F;AAC3F,mEAAoF;AACpF,0EAAyF;AACzF,kEAAkF;AAClF,iEAA4E;AAC5E,yDAAqE;AACrE,+DAAwE;AACxE,uDAAiE;AACjE,iEAAuE;AACvE,yDAAgE;AAIhE,SAAS,SAAS,CACjB,KAMa,EACb,eAAyB;IAQzB,MAAM,YAAY,GAAG,CACpB,MAAsB,EACgC,EAAE;QACxD,MAAM,YAAY,GAA8B;YAC/C,gBAAgB,EAAE,OAAO;YACzB,SAAS,EAAE,QAAQ;YACnB,OAAO,EAAE,MAAM;YACf,eAAe,EAAE,eAAe;SAChC,CAAC;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AAU,EAAE,CAAC;YACrC,OAAO,MAAM,8BAAoB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC9C,CAAC;aAAM,IAAI,SAAS,KAAK,qBAAqB,EAAE,CAAC;YAChD,OAAO,MAAM,oCAA0B,CAAC,IAAI,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;QACjE,CAAC;QAED,MAAM,IAAI,iCAAkB,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,mBAAmB,SAAS,oBAAoB,CAAC,CAAC;IAChG,CAAC;CACD;AAxND,sBAwNC"}
1
+ {"version":3,"sources":["../../../../nodes/agents/Agent/Agent.node.ts"],"sourcesContent":["import { NodeConnectionTypes, NodeOperationError } from 'n8n-workflow';\nimport type {\n\tINodeInputConfiguration,\n\tINodeInputFilter,\n\tIExecuteFunctions,\n\tINodeExecutionData,\n\tINodeType,\n\tINodeTypeDescription,\n\tINodeProperties,\n\tNodeConnectionType,\n} from 'n8n-workflow';\n\nimport { promptTypeOptions, textFromPreviousNode, textInput } from '@utils/descriptions';\n\nimport { conversationalAgentProperties } from './agents/ConversationalAgent/description';\nimport { conversationalAgentExecute } from './agents/ConversationalAgent/execute';\nimport { openAiFunctionsAgentProperties } from './agents/OpenAiFunctionsAgent/description';\nimport { openAiFunctionsAgentExecute } from './agents/OpenAiFunctionsAgent/execute';\nimport { planAndExecuteAgentProperties } from './agents/PlanAndExecuteAgent/description';\nimport { planAndExecuteAgentExecute } from './agents/PlanAndExecuteAgent/execute';\nimport { reActAgentAgentProperties } from './agents/ReActAgent/description';\nimport { reActAgentAgentExecute } from './agents/ReActAgent/execute';\nimport { sqlAgentAgentProperties } from './agents/SqlAgent/description';\nimport { sqlAgentAgentExecute } from './agents/SqlAgent/execute';\nimport { toolsAgentProperties } from './agents/ToolsAgent/description';\nimport { toolsAgentExecute } from './agents/ToolsAgent/execute';\n\n// Function used in the inputs expression to figure out which inputs to\n// display based on the agent type\nfunction getInputs(\n\tagent:\n\t\t| 'toolsAgent'\n\t\t| 'conversationalAgent'\n\t\t| 'openAiFunctionsAgent'\n\t\t| 'planAndExecuteAgent'\n\t\t| 'reActAgent'\n\t\t| 'sqlAgent',\n\thasOutputParser?: boolean,\n): Array<NodeConnectionType | INodeInputConfiguration> {\n\tinterface SpecialInput {\n\t\ttype: NodeConnectionType;\n\t\tfilter?: INodeInputFilter;\n\t\trequired?: boolean;\n\t}\n\n\tconst getInputData = (\n\t\tinputs: SpecialInput[],\n\t): Array<NodeConnectionType | INodeInputConfiguration> => {\n\t\tconst displayNames: { [key: string]: string } = {\n\t\t\tai_languageModel: 'Model',\n\t\t\tai_memory: 'Memory',\n\t\t\tai_tool: 'Tool',\n\t\t\tai_outputParser: 'Output Parser',\n\t\t};\n\n\t\treturn inputs.map(({ type, filter }) => {\n\t\t\tconst isModelType = type === ('ai_languageModel' as NodeConnectionType);\n\t\t\tlet displayName = type in displayNames ? displayNames[type] : undefined;\n\t\t\tif (\n\t\t\t\tisModelType &&\n\t\t\t\t['openAiFunctionsAgent', 'toolsAgent', 'conversationalAgent'].includes(agent)\n\t\t\t) {\n\t\t\t\tdisplayName = 'Chat Model';\n\t\t\t}\n\t\t\tconst input: INodeInputConfiguration = {\n\t\t\t\ttype,\n\t\t\t\tdisplayName,\n\t\t\t\trequired: isModelType,\n\t\t\t\tmaxConnections: ['ai_languageModel', 'ai_memory', 'ai_outputParser'].includes(\n\t\t\t\t\ttype as NodeConnectionType,\n\t\t\t\t)\n\t\t\t\t\t? 1\n\t\t\t\t\t: undefined,\n\t\t\t};\n\n\t\t\tif (filter) {\n\t\t\t\tinput.filter = filter;\n\t\t\t}\n\n\t\t\treturn input;\n\t\t});\n\t};\n\n\tlet specialInputs: SpecialInput[] = [];\n\n\tif (agent === 'conversationalAgent') {\n\t\tspecialInputs = [\n\t\t\t{\n\t\t\t\ttype: 'ai_languageModel',\n\t\t\t\tfilter: {\n\t\t\t\t\tnodes: [\n\t\t\t\t\t\t'@n8n/n8n-nodes-langchain.lmChatAnthropic',\n\t\t\t\t\t\t'@n8n/n8n-nodes-langchain.lmChatAwsBedrock',\n\t\t\t\t\t\t'@n8n/n8n-nodes-langchain.lmChatGroq',\n\t\t\t\t\t\t'@n8n/n8n-nodes-langchain.lmChatOllama',\n\t\t\t\t\t\t'@n8n/n8n-nodes-langchain.lmChatOpenAi',\n\t\t\t\t\t\t'@n8n/n8n-nodes-langchain.lmChatGoogleGemini',\n\t\t\t\t\t\t'@n8n/n8n-nodes-langchain.lmChatGoogleVertex',\n\t\t\t\t\t\t'@n8n/n8n-nodes-langchain.lmChatMistralCloud',\n\t\t\t\t\t\t'@n8n/n8n-nodes-langchain.lmChatAzureOpenAi',\n\t\t\t\t\t\t'@n8n/n8n-nodes-langchain.lmChatDeepSeek',\n\t\t\t\t\t\t'@n8n/n8n-nodes-langchain.lmChatOpenRouter',\n\t\t\t\t\t\t'@n8n/n8n-nodes-langchain.lmChatXAiGrok',\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: 'ai_memory',\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: 'ai_tool',\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: 'ai_outputParser',\n\t\t\t},\n\t\t];\n\t} else if (agent === 'toolsAgent') {\n\t\tspecialInputs = [\n\t\t\t{\n\t\t\t\ttype: 'ai_languageModel',\n\t\t\t\tfilter: {\n\t\t\t\t\tnodes: [\n\t\t\t\t\t\t'@n8n/n8n-nodes-langchain.lmChatAnthropic',\n\t\t\t\t\t\t'@n8n/n8n-nodes-langchain.lmChatAzureOpenAi',\n\t\t\t\t\t\t'@n8n/n8n-nodes-langchain.lmChatAwsBedrock',\n\t\t\t\t\t\t'@n8n/n8n-nodes-langchain.lmChatMistralCloud',\n\t\t\t\t\t\t'@n8n/n8n-nodes-langchain.lmChatOllama',\n\t\t\t\t\t\t'@n8n/n8n-nodes-langchain.lmChatOpenAi',\n\t\t\t\t\t\t'@n8n/n8n-nodes-langchain.lmChatGroq',\n\t\t\t\t\t\t'@n8n/n8n-nodes-langchain.lmChatGoogleVertex',\n\t\t\t\t\t\t'@n8n/n8n-nodes-langchain.lmChatGoogleGemini',\n\t\t\t\t\t\t'@n8n/n8n-nodes-langchain.lmChatDeepSeek',\n\t\t\t\t\t\t'@n8n/n8n-nodes-langchain.lmChatOpenRouter',\n\t\t\t\t\t\t'@n8n/n8n-nodes-langchain.lmChatXAiGrok',\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: 'ai_memory',\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: 'ai_tool',\n\t\t\t\trequired: true,\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: 'ai_outputParser',\n\t\t\t},\n\t\t];\n\t} else if (agent === 'openAiFunctionsAgent') {\n\t\tspecialInputs = [\n\t\t\t{\n\t\t\t\ttype: 'ai_languageModel',\n\t\t\t\tfilter: {\n\t\t\t\t\tnodes: [\n\t\t\t\t\t\t'@n8n/n8n-nodes-langchain.lmChatOpenAi',\n\t\t\t\t\t\t'@n8n/n8n-nodes-langchain.lmChatAzureOpenAi',\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: 'ai_memory',\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: 'ai_tool',\n\t\t\t\trequired: true,\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: 'ai_outputParser',\n\t\t\t},\n\t\t];\n\t} else if (agent === 'reActAgent') {\n\t\tspecialInputs = [\n\t\t\t{\n\t\t\t\ttype: 'ai_languageModel',\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: 'ai_tool',\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: 'ai_outputParser',\n\t\t\t},\n\t\t];\n\t} else if (agent === 'sqlAgent') {\n\t\tspecialInputs = [\n\t\t\t{\n\t\t\t\ttype: 'ai_languageModel',\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: 'ai_memory',\n\t\t\t},\n\t\t];\n\t} else if (agent === 'planAndExecuteAgent') {\n\t\tspecialInputs = [\n\t\t\t{\n\t\t\t\ttype: 'ai_languageModel',\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: 'ai_tool',\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: 'ai_outputParser',\n\t\t\t},\n\t\t];\n\t}\n\n\tif (hasOutputParser === false) {\n\t\tspecialInputs = specialInputs.filter((input) => input.type !== 'ai_outputParser');\n\t}\n\treturn ['main', ...getInputData(specialInputs)];\n}\n\nconst agentTypeProperty: INodeProperties = {\n\tdisplayName: 'Agent',\n\tname: 'agent',\n\ttype: 'options',\n\tnoDataExpression: true,\n\t// eslint-disable-next-line n8n-nodes-base/node-param-options-type-unsorted-items\n\toptions: [\n\t\t{\n\t\t\tname: 'Tools Agent',\n\t\t\tvalue: 'toolsAgent',\n\t\t\tdescription:\n\t\t\t\t'Utilizes structured tool schemas for precise and reliable tool selection and execution. Recommended for complex tasks requiring accurate and consistent tool usage, but only usable with models that support tool calling.',\n\t\t},\n\t\t{\n\t\t\tname: 'Conversational Agent',\n\t\t\tvalue: 'conversationalAgent',\n\t\t\tdescription:\n\t\t\t\t'Describes tools in the system prompt and parses JSON responses for tool calls. More flexible but potentially less reliable than the Tools Agent. Suitable for simpler interactions or with models not supporting structured schemas.',\n\t\t},\n\t\t{\n\t\t\tname: 'OpenAI Functions Agent',\n\t\t\tvalue: 'openAiFunctionsAgent',\n\t\t\tdescription:\n\t\t\t\t\"Leverages OpenAI's function calling capabilities to precisely select and execute tools. Excellent for tasks requiring structured outputs when working with OpenAI models.\",\n\t\t},\n\t\t{\n\t\t\tname: 'Plan and Execute Agent',\n\t\t\tvalue: 'planAndExecuteAgent',\n\t\t\tdescription:\n\t\t\t\t'Creates a high-level plan for complex tasks and then executes each step. Suitable for multi-stage problems or when a strategic approach is needed.',\n\t\t},\n\t\t{\n\t\t\tname: 'ReAct Agent',\n\t\t\tvalue: 'reActAgent',\n\t\t\tdescription:\n\t\t\t\t'Combines reasoning and action in an iterative process. Effective for tasks that require careful analysis and step-by-step problem-solving.',\n\t\t},\n\t\t{\n\t\t\tname: 'SQL Agent',\n\t\t\tvalue: 'sqlAgent',\n\t\t\tdescription:\n\t\t\t\t'Specializes in interacting with SQL databases. Ideal for data analysis tasks, generating queries, or extracting insights from structured data.',\n\t\t},\n\t],\n\tdefault: '',\n};\n\nexport class Agent implements INodeType {\n\tdescription: INodeTypeDescription = {\n\t\tdisplayName: 'AI Agent',\n\t\tname: 'agent',\n\t\ticon: 'fa:robot',\n\t\ticonColor: 'black',\n\t\tgroup: ['transform'],\n\t\tversion: [1, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8],\n\t\tdescription: 'Generates an action plan and executes it. Can use external tools.',\n\t\tsubtitle:\n\t\t\t\"={{ {\ttoolsAgent: 'Tools Agent', conversationalAgent: 'Conversational Agent', openAiFunctionsAgent: 'OpenAI Functions Agent', reActAgent: 'ReAct Agent', sqlAgent: 'SQL Agent', planAndExecuteAgent: 'Plan and Execute Agent' }[$parameter.agent] }}\",\n\t\tdefaults: {\n\t\t\tname: 'AI Agent',\n\t\t\tcolor: '#404040',\n\t\t},\n\t\tcodex: {\n\t\t\talias: ['LangChain', 'Chat', 'Conversational', 'Plan and Execute', 'ReAct', 'Tools'],\n\t\t\tcategories: ['AI'],\n\t\t\tsubcategories: {\n\t\t\t\tAI: ['Agents', 'Root Nodes'],\n\t\t\t},\n\t\t\tresources: {\n\t\t\t\tprimaryDocumentation: [\n\t\t\t\t\t{\n\t\t\t\t\t\turl: 'https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.agent/',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t},\n\t\t},\n\t\tinputs: `={{\n\t\t\t((agent, hasOutputParser) => {\n\t\t\t\t${getInputs.toString()};\n\t\t\t\treturn getInputs(agent, hasOutputParser)\n\t\t\t})($parameter.agent, $parameter.hasOutputParser === undefined || $parameter.hasOutputParser === true)\n\t\t}}`,\n\t\toutputs: [NodeConnectionTypes.Main],\n\t\tcredentials: [\n\t\t\t{\n\t\t\t\t// eslint-disable-next-line n8n-nodes-base/node-class-description-credentials-name-unsuffixed\n\t\t\t\tname: 'mySql',\n\t\t\t\trequired: true,\n\t\t\t\ttestedBy: 'mysqlConnectionTest',\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\tagent: ['sqlAgent'],\n\t\t\t\t\t\t'/dataSource': ['mysql'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: 'postgres',\n\t\t\t\trequired: true,\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\tagent: ['sqlAgent'],\n\t\t\t\t\t\t'/dataSource': ['postgres'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t],\n\t\tproperties: [\n\t\t\t{\n\t\t\t\tdisplayName:\n\t\t\t\t\t'Tip: Get a feel for agents with our quick <a href=\"https://docs.n8n.io/advanced-ai/intro-tutorial/\" target=\"_blank\">tutorial</a> or see an <a href=\"/templates/1954\" target=\"_blank\">example</a> of how this node works',\n\t\t\t\tname: 'notice_tip',\n\t\t\t\ttype: 'notice',\n\t\t\t\tdefault: '',\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\tagent: ['conversationalAgent', 'toolsAgent'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName:\n\t\t\t\t\t\"This node is using Agent that has been deprecated. Please switch to using 'Tools Agent' instead.\",\n\t\t\t\tname: 'deprecated',\n\t\t\t\ttype: 'notice',\n\t\t\t\tdefault: '',\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\tagent: [\n\t\t\t\t\t\t\t'conversationalAgent',\n\t\t\t\t\t\t\t'openAiFunctionsAgent',\n\t\t\t\t\t\t\t'planAndExecuteAgent',\n\t\t\t\t\t\t\t'reActAgent',\n\t\t\t\t\t\t\t'sqlAgent',\n\t\t\t\t\t\t],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\t// Make Conversational Agent the default agent for versions 1.5 and below\n\t\t\t{\n\t\t\t\t...agentTypeProperty,\n\t\t\t\toptions: agentTypeProperty?.options?.filter(\n\t\t\t\t\t(o) => 'value' in o && o.value !== 'toolsAgent',\n\t\t\t\t),\n\t\t\t\tdisplayOptions: { show: { '@version': [{ _cnd: { lte: 1.5 } }] } },\n\t\t\t\tdefault: 'conversationalAgent',\n\t\t\t},\n\t\t\t// Make Tools Agent the default agent for versions 1.6 and 1.7\n\t\t\t{\n\t\t\t\t...agentTypeProperty,\n\t\t\t\tdisplayOptions: { show: { '@version': [{ _cnd: { between: { from: 1.6, to: 1.7 } } }] } },\n\t\t\t\tdefault: 'toolsAgent',\n\t\t\t},\n\t\t\t// Make Tools Agent the only agent option for versions 1.8 and above\n\t\t\t{\n\t\t\t\t...agentTypeProperty,\n\t\t\t\ttype: 'hidden',\n\t\t\t\tdisplayOptions: { show: { '@version': [{ _cnd: { gte: 1.8 } }] } },\n\t\t\t\tdefault: 'toolsAgent',\n\t\t\t},\n\t\t\t{\n\t\t\t\t...promptTypeOptions,\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\thide: {\n\t\t\t\t\t\t'@version': [{ _cnd: { lte: 1.2 } }],\n\t\t\t\t\t\tagent: ['sqlAgent'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\t...textFromPreviousNode,\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: { promptType: ['auto'], '@version': [{ _cnd: { gte: 1.7 } }] },\n\t\t\t\t\t// SQL Agent has data source and credentials parameters so we need to include this input there manually\n\t\t\t\t\t// to preserve the order\n\t\t\t\t\thide: {\n\t\t\t\t\t\tagent: ['sqlAgent'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\t...textInput,\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\tpromptType: ['define'],\n\t\t\t\t\t},\n\t\t\t\t\thide: {\n\t\t\t\t\t\tagent: ['sqlAgent'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'For more reliable structured output parsing, consider using the Tools agent',\n\t\t\t\tname: 'notice',\n\t\t\t\ttype: 'notice',\n\t\t\t\tdefault: '',\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\thasOutputParser: [true],\n\t\t\t\t\t\tagent: [\n\t\t\t\t\t\t\t'conversationalAgent',\n\t\t\t\t\t\t\t'reActAgent',\n\t\t\t\t\t\t\t'planAndExecuteAgent',\n\t\t\t\t\t\t\t'openAiFunctionsAgent',\n\t\t\t\t\t\t],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Require Specific Output Format',\n\t\t\t\tname: 'hasOutputParser',\n\t\t\t\ttype: 'boolean',\n\t\t\t\tdefault: false,\n\t\t\t\tnoDataExpression: true,\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\thide: {\n\t\t\t\t\t\t'@version': [{ _cnd: { lte: 1.2 } }],\n\t\t\t\t\t\tagent: ['sqlAgent'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: `Connect an <a data-action='openSelectiveNodeCreator' data-action-parameter-connectiontype='${NodeConnectionTypes.AiOutputParser}'>output parser</a> on the canvas to specify the output format you require`,\n\t\t\t\tname: 'notice',\n\t\t\t\ttype: 'notice',\n\t\t\t\tdefault: '',\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\thasOutputParser: [true],\n\t\t\t\t\t\tagent: ['toolsAgent'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\n\t\t\t...toolsAgentProperties,\n\t\t\t...conversationalAgentProperties,\n\t\t\t...openAiFunctionsAgentProperties,\n\t\t\t...reActAgentAgentProperties,\n\t\t\t...sqlAgentAgentProperties,\n\t\t\t...planAndExecuteAgentProperties,\n\t\t],\n\t};\n\n\tasync execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {\n\t\tconst agentType = this.getNodeParameter('agent', 0, '') as string;\n\t\tconst nodeVersion = this.getNode().typeVersion;\n\n\t\tif (agentType === 'conversationalAgent') {\n\t\t\treturn await conversationalAgentExecute.call(this, nodeVersion);\n\t\t} else if (agentType === 'toolsAgent') {\n\t\t\treturn await toolsAgentExecute.call(this);\n\t\t} else if (agentType === 'openAiFunctionsAgent') {\n\t\t\treturn await openAiFunctionsAgentExecute.call(this, nodeVersion);\n\t\t} else if (agentType === 'reActAgent') {\n\t\t\treturn await reActAgentAgentExecute.call(this, nodeVersion);\n\t\t} else if (agentType === 'sqlAgent') {\n\t\t\treturn await sqlAgentAgentExecute.call(this);\n\t\t} else if (agentType === 'planAndExecuteAgent') {\n\t\t\treturn await planAndExecuteAgentExecute.call(this, nodeVersion);\n\t\t}\n\n\t\tthrow new NodeOperationError(this.getNode(), `The agent type \"${agentType}\" is not supported`);\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAAwD;AAYxD,0BAAmE;AAEnE,yBAA8C;AAC9C,qBAA2C;AAC3C,IAAAA,sBAA+C;AAC/C,IAAAC,kBAA4C;AAC5C,IAAAD,sBAA8C;AAC9C,IAAAC,kBAA2C;AAC3C,IAAAD,sBAA0C;AAC1C,IAAAC,kBAAuC;AACvC,IAAAD,sBAAwC;AACxC,IAAAC,kBAAqC;AACrC,IAAAD,sBAAqC;AACrC,IAAAC,kBAAkC;AAIlC,SAAS,UACR,OAOA,iBACsD;AAOtD,QAAM,eAAe,CACpB,WACyD;AACzD,UAA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AAE,KAAK,IAAI,EAAE,CAAC;AAAA,cACnC,OAAO,CAAC,UAAU;AAAA,YACnB;AAAA,UACD;AAAA,QACD;AAAA,QACA;AAAA,UACC,aAAa,8FAA8F,wCAAoB,cAAc;AAAA,UAC7I,MAAM;AAAA,UACN,MAAM;AAAA,UACN,SAAS;AAAA,UACT,gBAAgB;AAAA,YACf,MAAM;AAAA,cACL,iBAAiB,CAAC,IAAI;AAAA,cACtB,OAAO,CAAC,YAAY;AAAA,YACrB;AAAA,UACD;AAAA,QACD;AAAA,QAEA,GAAG;AAAA,QACH,GAAG;AAAA,QACH,GAAG;AAAA,QACH,GAAG;AAAA,QACH,GAAG;AAAA,QACH,GAAG;AAAA,MACJ;AAAA,IACD;AAAA;AAAA,EAEA,MAAM,UAAkE;AACvE,UAAM,YAAY,KAAK,iBAAiB,SAAS,GAAG,EAAE;AACtD,UAAM,cAAc,KAAK,QAAQ,EAAE;AAEnC,QAAI,cAAc,uBAAuB;AACxC,aAAO,MAAM,0CAA2B,KAAK,MAAM,WAAW;AAAA,IAC/D,WAAW,cAAc,cAAc;AACtC,aAAO,MAAM,kCAAkB,KAAK,IAAI;AAAA,IACzC,WAAW,cAAc,wBAAwB;AAChD,aAAO,MAAM,4CAA4B,KAAK,MAAM,WAAW;AAAA,IAChE,WAAW,cAAc,cAAc;AACtC,aAAO,MAAM,uCAAuB,KAAK,MAAM,WAAW;AAAA,IAC3D,WAAW,cAAc,YAAY;AACpC,aAAO,MAAM,qCAAqB,KAAK,IAAI;AAAA,IAC5C,WAAW,cAAc,uBAAuB;AAC/C,aAAO,MAAM,2CAA2B,KAAK,MAAM,WAAW;AAAA,IAC/D;AAEA,UAAM,IAAI,uCAAmB,KAAK,QAAQ,GAAG,mBAAmB,SAAS,oBAAoB;AAAA,EAC9F;AACD;","names":["import_description","import_execute"]}
@@ -1,94 +1,118 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.conversationalAgentProperties = void 0;
4
- const prompt_1 = require("./prompt");
5
- exports.conversationalAgentProperties = [
6
- {
7
- displayName: 'Text',
8
- name: 'text',
9
- type: 'string',
10
- required: true,
11
- displayOptions: {
12
- show: {
13
- agent: ['conversationalAgent'],
14
- '@version': [1],
15
- },
16
- },
17
- default: '={{ $json.input }}',
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 description_exports = {};
20
+ __export(description_exports, {
21
+ conversationalAgentProperties: () => conversationalAgentProperties
22
+ });
23
+ module.exports = __toCommonJS(description_exports);
24
+ var import_prompt = require("./prompt");
25
+ const conversationalAgentProperties = [
26
+ {
27
+ displayName: "Text",
28
+ name: "text",
29
+ type: "string",
30
+ required: true,
31
+ displayOptions: {
32
+ show: {
33
+ agent: ["conversationalAgent"],
34
+ "@version": [1]
35
+ }
18
36
  },
19
- {
20
- displayName: 'Text',
21
- name: 'text',
22
- type: 'string',
23
- required: true,
24
- displayOptions: {
25
- show: {
26
- agent: ['conversationalAgent'],
27
- '@version': [1.1],
28
- },
29
- },
30
- default: '={{ $json.chat_input }}',
37
+ default: "={{ $json.input }}"
38
+ },
39
+ {
40
+ displayName: "Text",
41
+ name: "text",
42
+ type: "string",
43
+ required: true,
44
+ displayOptions: {
45
+ show: {
46
+ agent: ["conversationalAgent"],
47
+ "@version": [1.1]
48
+ }
31
49
  },
32
- {
33
- displayName: 'Text',
34
- name: 'text',
35
- type: 'string',
36
- required: true,
37
- displayOptions: {
38
- show: {
39
- agent: ['conversationalAgent'],
40
- '@version': [1.2],
41
- },
42
- },
43
- default: '={{ $json.chatInput }}',
50
+ default: "={{ $json.chat_input }}"
51
+ },
52
+ {
53
+ displayName: "Text",
54
+ name: "text",
55
+ type: "string",
56
+ required: true,
57
+ displayOptions: {
58
+ show: {
59
+ agent: ["conversationalAgent"],
60
+ "@version": [1.2]
61
+ }
44
62
  },
45
- {
46
- displayName: 'Options',
47
- name: 'options',
48
- type: 'collection',
49
- displayOptions: {
50
- show: {
51
- agent: ['conversationalAgent'],
52
- },
53
- },
54
- default: {},
55
- placeholder: 'Add Option',
56
- options: [
57
- {
58
- displayName: 'Human Message',
59
- name: 'humanMessage',
60
- type: 'string',
61
- default: prompt_1.HUMAN_MESSAGE,
62
- description: 'The message that will provide the agent with a list of tools to use',
63
- typeOptions: {
64
- rows: 6,
65
- },
66
- },
67
- {
68
- displayName: 'System Message',
69
- name: 'systemMessage',
70
- type: 'string',
71
- default: prompt_1.SYSTEM_MESSAGE,
72
- description: 'The message that will be sent to the agent before the conversation starts',
73
- typeOptions: {
74
- rows: 6,
75
- },
76
- },
77
- {
78
- displayName: 'Max Iterations',
79
- name: 'maxIterations',
80
- type: 'number',
81
- default: 10,
82
- description: 'The maximum number of iterations the agent will run before stopping',
83
- },
84
- {
85
- displayName: 'Return Intermediate Steps',
86
- name: 'returnIntermediateSteps',
87
- type: 'boolean',
88
- default: false,
89
- description: 'Whether or not the output should include intermediate steps the agent took',
90
- },
91
- ],
63
+ default: "={{ $json.chatInput }}"
64
+ },
65
+ {
66
+ displayName: "Options",
67
+ name: "options",
68
+ type: "collection",
69
+ displayOptions: {
70
+ show: {
71
+ agent: ["conversationalAgent"]
72
+ }
92
73
  },
74
+ default: {},
75
+ placeholder: "Add Option",
76
+ options: [
77
+ {
78
+ displayName: "Human Message",
79
+ name: "humanMessage",
80
+ type: "string",
81
+ default: import_prompt.HUMAN_MESSAGE,
82
+ description: "The message that will provide the agent with a list of tools to use",
83
+ typeOptions: {
84
+ rows: 6
85
+ }
86
+ },
87
+ {
88
+ displayName: "System Message",
89
+ name: "systemMessage",
90
+ type: "string",
91
+ default: import_prompt.SYSTEM_MESSAGE,
92
+ description: "The message that will be sent to the agent before the conversation starts",
93
+ typeOptions: {
94
+ rows: 6
95
+ }
96
+ },
97
+ {
98
+ displayName: "Max Iterations",
99
+ name: "maxIterations",
100
+ type: "number",
101
+ default: 10,
102
+ description: "The maximum number of iterations the agent will run before stopping"
103
+ },
104
+ {
105
+ displayName: "Return Intermediate Steps",
106
+ name: "returnIntermediateSteps",
107
+ type: "boolean",
108
+ default: false,
109
+ description: "Whether or not the output should include intermediate steps the agent took"
110
+ }
111
+ ]
112
+ }
93
113
  ];
114
+ // Annotate the CommonJS export names for ESM import in node:
115
+ 0 && (module.exports = {
116
+ conversationalAgentProperties
117
+ });
94
118
  //# sourceMappingURL=description.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"description.js","sourceRoot":"","sources":["../../../../../../nodes/agents/Agent/agents/ConversationalAgent/description.ts"],"names":[],"mappings":";;;AAEA,qCAAyD;AAE5C,QAAA,6BAA6B,GAAsB;IAC/D;QACC,WAAW,EAAE,MAAM;QACnB,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;QACd,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,KAAK,EAAE,CAAC,qBAAqB,CAAC;gBAC9B,UAAU,EAAE,CAAC,CAAC,CAAC;aACf;SACD;QACD,OAAO,EAAE,oBAAoB;KAC7B;IACD;QACC,WAAW,EAAE,MAAM;QACnB,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;QACd,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,KAAK,EAAE,CAAC,qBAAqB,CAAC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D;CACD,CAAC"}
1
+ {"version":3,"sources":["../../../../../../nodes/agents/Agent/agents/ConversationalAgent/description.ts"],"sourcesContent":["import type { INodeProperties } from 'n8n-workflow';\n\nimport { SYSTEM_MESSAGE, HUMAN_MESSAGE } from './prompt';\n\nexport const conversationalAgentProperties: INodeProperties[] = [\n\t{\n\t\tdisplayName: 'Text',\n\t\tname: 'text',\n\t\ttype: 'string',\n\t\trequired: true,\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\tagent: ['conversationalAgent'],\n\t\t\t\t'@version': [1],\n\t\t\t},\n\t\t},\n\t\tdefault: '={{ $json.input }}',\n\t},\n\t{\n\t\tdisplayName: 'Text',\n\t\tname: 'text',\n\t\ttype: 'string',\n\t\trequired: true,\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\tagent: ['conversationalAgent'],\n\t\t\t\t'@version': [1.1],\n\t\t\t},\n\t\t},\n\t\tdefault: '={{ $json.chat_input }}',\n\t},\n\t{\n\t\tdisplayName: 'Text',\n\t\tname: 'text',\n\t\ttype: 'string',\n\t\trequired: true,\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\tagent: ['conversationalAgent'],\n\t\t\t\t'@version': [1.2],\n\t\t\t},\n\t\t},\n\t\tdefault: '={{ $json.chatInput }}',\n\t},\n\t{\n\t\tdisplayName: 'Options',\n\t\tname: 'options',\n\t\ttype: 'collection',\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\tagent: ['conversationalAgent'],\n\t\t\t},\n\t\t},\n\t\tdefault: {},\n\t\tplaceholder: 'Add Option',\n\t\toptions: [\n\t\t\t{\n\t\t\t\tdisplayName: 'Human Message',\n\t\t\t\tname: 'humanMessage',\n\t\t\t\ttype: 'string',\n\t\t\t\tdefault: HUMAN_MESSAGE,\n\t\t\t\tdescription: 'The message that will provide the agent with a list of tools to use',\n\t\t\t\ttypeOptions: {\n\t\t\t\t\trows: 6,\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'System Message',\n\t\t\t\tname: 'systemMessage',\n\t\t\t\ttype: 'string',\n\t\t\t\tdefault: SYSTEM_MESSAGE,\n\t\t\t\tdescription: 'The message that will be sent to the agent before the conversation starts',\n\t\t\t\ttypeOptions: {\n\t\t\t\t\trows: 6,\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Max Iterations',\n\t\t\t\tname: 'maxIterations',\n\t\t\t\ttype: 'number',\n\t\t\t\tdefault: 10,\n\t\t\t\tdescription: 'The maximum number of iterations the agent will run before stopping',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Return Intermediate Steps',\n\t\t\t\tname: 'returnIntermediateSteps',\n\t\t\t\ttype: 'boolean',\n\t\t\t\tdefault: false,\n\t\t\t\tdescription: 'Whether or not the output should include intermediate steps the agent took',\n\t\t\t},\n\t\t],\n\t},\n];\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,oBAA8C;AAEvC,MAAM,gCAAmD;AAAA,EAC/D;AAAA,IACC,aAAa;AAAA,IACb,MAAM;AAAA,IACN,MAAM;AAAA,IACN,UAAU;AAAA,IACV,gBAAgB;AAAA,MACf,MAAM;AAAA,QACL,OAAO,CAAC,qBAAqB;AAAA,QAC7B,YAAY,CAAC,CAAC;AAAA,MACf;AAAA,IACD;AAAA,IACA,SAAS;AAAA,EACV;AAAA,EACA;AAAA,IACC,aAAa;AAAA,IACb,MAAM;AAAA,IACN,MAAM;AAAA,IACN,UAAU;AAAA,IACV,gBAAgB;AAAA,MACf,MAAM;AAAA,QACL,OAAO,CAAC,qBAAqB;AAAA,QAC7B,YAAY,CAAC,GAAG;AAAA,MACjB;AAAA,IACD;AAAA,IACA,SAAS;AAAA,EACV;AAAA,EACA;AAAA,IACC,aAAa;AAAA,IACb,MAAM;AAAA,IACN,MAAM;AAAA,IACN,UAAU;AAAA,IACV,gBAAgB;AAAA,MACf,MAAM;AAAA,QACL,OAAO,CAAC,qBAAqB;AAAA,QAC7B,YAAY,CAAC,GAAG;AAAA,MACjB;AAAA,IACD;AAAA,IACA,SAAS;AAAA,EACV;AAAA,EACA;AAAA,IACC,aAAa;AAAA,IACb,MAAM;AAAA,IACN,MAAM;AAAA,IACN,gBAAgB;AAAA,MACf,MAAM;AAAA,QACL,OAAO,CAAC,qBAAqB;AAAA,MAC9B;AAAA,IACD;AAAA,IACA,SAAS,CAAC;AAAA,IACV,aAAa;AAAA,IACb,SAAS;AAAA,MACR;AAAA,QACC,aAAa;AAAA,QACb,MAAM;AAAA,QACN,MAAM;AAAA,QACN,SAAS;AAAA,QACT,aAAa;AAAA,QACb,aAAa;AAAA,UACZ,MAAM;AAAA,QACP;AAAA,MACD;AAAA,MACA;AAAA,QACC,aAAa;AAAA,QACb,MAAM;AAAA,QACN,MAAM;AAAA,QACN,SAAS;AAAA,QACT,aAAa;AAAA,QACb,aAAa;AAAA,UACZ,MAAM;AAAA,QACP;AAAA,MACD;AAAA,MACA;AAAA,QACC,aAAa;AAAA,QACb,MAAM;AAAA,QACN,MAAM;AAAA,QACN,SAAS;AAAA,QACT,aAAa;AAAA,MACd;AAAA,MACA;AAAA,QACC,aAAa;AAAA,QACb,MAAM;AAAA,QACN,MAAM;AAAA,QACN,SAAS;AAAA,QACT,aAAa;AAAA,MACd;AAAA,IACD;AAAA,EACD;AACD;","names":[]}
@@ -1,83 +1,107 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.conversationalAgentExecute = conversationalAgentExecute;
4
- const prompts_1 = require("@langchain/core/prompts");
5
- const agents_1 = require("langchain/agents");
6
- const n8n_workflow_1 = require("n8n-workflow");
7
- const helpers_1 = require("../../../../../utils/helpers");
8
- const N8nOutputParser_1 = require("../../../../../utils/output_parsers/N8nOutputParser");
9
- const schemaParsing_1 = require("../../../../../utils/schemaParsing");
10
- const tracing_1 = require("../../../../../utils/tracing");
11
- const utils_1 = require("../utils");
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 execute_exports = {};
20
+ __export(execute_exports, {
21
+ conversationalAgentExecute: () => conversationalAgentExecute
22
+ });
23
+ module.exports = __toCommonJS(execute_exports);
24
+ var import_prompts = require("@langchain/core/prompts");
25
+ var import_agents = require("langchain/agents");
26
+ var import_n8n_workflow = require("n8n-workflow");
27
+ var import_helpers = require("../../../../../utils/helpers");
28
+ var import_N8nOutputParser = require("../../../../../utils/output_parsers/N8nOutputParser");
29
+ var import_schemaParsing = require("../../../../../utils/schemaParsing");
30
+ var import_tracing = require("../../../../../utils/tracing");
31
+ var import_utils = require("../utils");
12
32
  async function conversationalAgentExecute(nodeVersion) {
13
- this.logger.debug('Executing Conversational Agent');
14
- const model = await this.getInputConnectionData(n8n_workflow_1.NodeConnectionTypes.AiLanguageModel, 0);
15
- if (!(0, helpers_1.isChatInstance)(model)) {
16
- throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Conversational Agent requires Chat Model');
33
+ this.logger.debug("Executing Conversational Agent");
34
+ const model = await this.getInputConnectionData(import_n8n_workflow.NodeConnectionTypes.AiLanguageModel, 0);
35
+ if (!(0, import_helpers.isChatInstance)(model)) {
36
+ throw new import_n8n_workflow.NodeOperationError(this.getNode(), "Conversational Agent requires Chat Model");
37
+ }
38
+ const memory = await this.getInputConnectionData(import_n8n_workflow.NodeConnectionTypes.AiMemory, 0);
39
+ const tools = await (0, import_helpers.getConnectedTools)(this, nodeVersion >= 1.5, true, true);
40
+ const outputParser = await (0, import_N8nOutputParser.getOptionalOutputParser)(this);
41
+ await (0, import_utils.checkForStructuredTools)(tools, this.getNode(), "Conversational Agent");
42
+ const options = this.getNodeParameter("options", 0, {});
43
+ const agentExecutor = await (0, import_agents.initializeAgentExecutorWithOptions)(tools, model, {
44
+ // Passing "chat-conversational-react-description" as the agent type
45
+ // automatically creates and uses BufferMemory with the executor.
46
+ // If you would like to override this, you can pass in a custom
47
+ // memory option, but the memoryKey set on it must be "chat_history".
48
+ agentType: "chat-conversational-react-description",
49
+ memory,
50
+ returnIntermediateSteps: options?.returnIntermediateSteps === true,
51
+ maxIterations: options.maxIterations ?? 10,
52
+ agentArgs: {
53
+ systemMessage: options.systemMessage,
54
+ humanMessage: options.humanMessage
17
55
  }
18
- const memory = (await this.getInputConnectionData(n8n_workflow_1.NodeConnectionTypes.AiMemory, 0));
19
- const tools = await (0, helpers_1.getConnectedTools)(this, nodeVersion >= 1.5, true, true);
20
- const outputParser = await (0, N8nOutputParser_1.getOptionalOutputParser)(this);
21
- await (0, utils_1.checkForStructuredTools)(tools, this.getNode(), 'Conversational Agent');
22
- const options = this.getNodeParameter('options', 0, {});
23
- const agentExecutor = await (0, agents_1.initializeAgentExecutorWithOptions)(tools, model, {
24
- agentType: 'chat-conversational-react-description',
25
- memory,
26
- returnIntermediateSteps: options?.returnIntermediateSteps === true,
27
- maxIterations: options.maxIterations ?? 10,
28
- agentArgs: {
29
- systemMessage: options.systemMessage,
30
- humanMessage: options.humanMessage,
31
- },
56
+ });
57
+ const returnData = [];
58
+ let prompt;
59
+ if (outputParser) {
60
+ const formatInstructions = outputParser.getFormatInstructions();
61
+ prompt = new import_prompts.PromptTemplate({
62
+ template: "{input}\n{formatInstructions}",
63
+ inputVariables: ["input"],
64
+ partialVariables: { formatInstructions }
32
65
  });
33
- const returnData = [];
34
- let prompt;
35
- if (outputParser) {
36
- const formatInstructions = outputParser.getFormatInstructions();
37
- prompt = new prompts_1.PromptTemplate({
38
- template: '{input}\n{formatInstructions}',
39
- inputVariables: ['input'],
40
- partialVariables: { formatInstructions },
66
+ }
67
+ const items = this.getInputData();
68
+ for (let itemIndex = 0; itemIndex < items.length; itemIndex++) {
69
+ try {
70
+ let input;
71
+ if (this.getNode().typeVersion <= 1.2) {
72
+ input = this.getNodeParameter("text", itemIndex);
73
+ } else {
74
+ input = (0, import_helpers.getPromptInputByType)({
75
+ ctx: this,
76
+ i: itemIndex,
77
+ inputKey: "text",
78
+ promptTypeKey: "promptType"
41
79
  });
80
+ }
81
+ if (input === void 0) {
82
+ throw new import_n8n_workflow.NodeOperationError(this.getNode(), "The \u2018text parameter is empty.");
83
+ }
84
+ if (prompt) {
85
+ input = (await prompt.invoke({ input })).value;
86
+ }
87
+ const response = await agentExecutor.withConfig((0, import_tracing.getTracingConfig)(this)).invoke({ input, outputParser });
88
+ if (outputParser) {
89
+ response.output = await (0, import_utils.extractParsedOutput)(this, outputParser, response.output);
90
+ }
91
+ returnData.push({ json: response });
92
+ } catch (error) {
93
+ (0, import_schemaParsing.throwIfToolSchema)(this, error);
94
+ if (this.continueOnFail()) {
95
+ returnData.push({ json: { error: error.message }, pairedItem: { item: itemIndex } });
96
+ continue;
97
+ }
98
+ throw error;
42
99
  }
43
- const items = this.getInputData();
44
- for (let itemIndex = 0; itemIndex < items.length; itemIndex++) {
45
- try {
46
- let input;
47
- if (this.getNode().typeVersion <= 1.2) {
48
- input = this.getNodeParameter('text', itemIndex);
49
- }
50
- else {
51
- input = (0, helpers_1.getPromptInputByType)({
52
- ctx: this,
53
- i: itemIndex,
54
- inputKey: 'text',
55
- promptTypeKey: 'promptType',
56
- });
57
- }
58
- if (input === undefined) {
59
- throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'The ‘text parameter is empty.');
60
- }
61
- if (prompt) {
62
- input = (await prompt.invoke({ input })).value;
63
- }
64
- const response = await agentExecutor
65
- .withConfig((0, tracing_1.getTracingConfig)(this))
66
- .invoke({ input, outputParser });
67
- if (outputParser) {
68
- response.output = await (0, utils_1.extractParsedOutput)(this, outputParser, response.output);
69
- }
70
- returnData.push({ json: response });
71
- }
72
- catch (error) {
73
- (0, schemaParsing_1.throwIfToolSchema)(this, error);
74
- if (this.continueOnFail()) {
75
- returnData.push({ json: { error: error.message }, pairedItem: { item: itemIndex } });
76
- continue;
77
- }
78
- throw error;
79
- }
80
- }
81
- return [returnData];
100
+ }
101
+ return [returnData];
82
102
  }
103
+ // Annotate the CommonJS export names for ESM import in node:
104
+ 0 && (module.exports = {
105
+ conversationalAgentExecute
106
+ });
83
107
  //# sourceMappingURL=execute.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"execute.js","sourceRoot":"","sources":["../../../../../../nodes/agents/Agent/agents/ConversationalAgent/execute.ts"],"names":[],"mappings":";;AAaA,gEAsGC;AAlHD,qDAAyD;AACzD,6CAAsE;AAEtE,+CAAuE;AAEvE,4CAAyF;AACzF,2EAAgF;AAChF,wDAAyD;AACzD,4CAAkD;AAElD,oCAAwE;AAEjE,KAAK,UAAU,0BAA0B,CAE/C,WAAmB;IAEnB,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,gCAAgC,CAAC,CAAC;IACpD,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,sBAAsB,CAAC,kCAAmB,CAAC,eAAe,EAAE,CAAC,CAAC,CAAC;IAExF,IAAI,CAAC,IAAA,wBAAc,EAAC,KAAK,CAAC,EAAE,CAAC;QAC5B,MAAM,IAAI,iCAAkB,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,0CAA0C,CAAC,CAAC;IAC1F,CAAC;IAED,MAAM,MAAM,GAAG,CAAC,MAAM,IAAI,CAAC,sBAAsB,CAAC,kCAAmB,CAAC,QAAQ,EAAE,CAAC,CAAC,CAEtE,CAAC;IAE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K,CAAC,OAAO,EAAE,EAAE,UAAU,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,CAAC,CAAC;gBACrF,SAAS;YACV,CAAC;YAED,MAAM,KAAK,CAAC;QACb,CAAC;IACF,CAAC;IAED,OAAO,CAAC,UAAU,CAAC,CAAC;AACrB,CAAC"}
1
+ {"version":3,"sources":["../../../../../../nodes/agents/Agent/agents/ConversationalAgent/execute.ts"],"sourcesContent":["import type { BaseChatMemory } from '@langchain/community/memory/chat_memory';\nimport { PromptTemplate } from '@langchain/core/prompts';\nimport { initializeAgentExecutorWithOptions } from 'langchain/agents';\nimport type { IExecuteFunctions, INodeExecutionData } from 'n8n-workflow';\nimport { NodeConnectionTypes, NodeOperationError } from 'n8n-workflow';\n\nimport { isChatInstance, getPromptInputByType, getConnectedTools } from '@utils/helpers';\nimport { getOptionalOutputParser } from '@utils/output_parsers/N8nOutputParser';\nimport { throwIfToolSchema } from '@utils/schemaParsing';\nimport { getTracingConfig } from '@utils/tracing';\n\nimport { checkForStructuredTools, extractParsedOutput } from '../utils';\n\nexport async function conversationalAgentExecute(\n\tthis: IExecuteFunctions,\n\tnodeVersion: number,\n): Promise<INodeExecutionData[][]> {\n\tthis.logger.debug('Executing Conversational Agent');\n\tconst model = await this.getInputConnectionData(NodeConnectionTypes.AiLanguageModel, 0);\n\n\tif (!isChatInstance(model)) {\n\t\tthrow new NodeOperationError(this.getNode(), 'Conversational Agent requires Chat Model');\n\t}\n\n\tconst memory = (await this.getInputConnectionData(NodeConnectionTypes.AiMemory, 0)) as\n\t\t| BaseChatMemory\n\t\t| undefined;\n\n\tconst tools = await getConnectedTools(this, nodeVersion >= 1.5, true, true);\n\tconst outputParser = await getOptionalOutputParser(this);\n\n\tawait checkForStructuredTools(tools, this.getNode(), 'Conversational Agent');\n\n\t// TODO: Make it possible in the future to use values for other items than just 0\n\tconst options = this.getNodeParameter('options', 0, {}) as {\n\t\tsystemMessage?: string;\n\t\thumanMessage?: string;\n\t\tmaxIterations?: number;\n\t\treturnIntermediateSteps?: boolean;\n\t};\n\n\tconst agentExecutor = await initializeAgentExecutorWithOptions(tools, model, {\n\t\t// Passing \"chat-conversational-react-description\" as the agent type\n\t\t// automatically creates and uses BufferMemory with the executor.\n\t\t// If you would like to override this, you can pass in a custom\n\t\t// memory option, but the memoryKey set on it must be \"chat_history\".\n\t\tagentType: 'chat-conversational-react-description',\n\t\tmemory,\n\t\treturnIntermediateSteps: options?.returnIntermediateSteps === true,\n\t\tmaxIterations: options.maxIterations ?? 10,\n\t\tagentArgs: {\n\t\t\tsystemMessage: options.systemMessage,\n\t\t\thumanMessage: options.humanMessage,\n\t\t},\n\t});\n\n\tconst returnData: INodeExecutionData[] = [];\n\n\tlet prompt: PromptTemplate | undefined;\n\tif (outputParser) {\n\t\tconst formatInstructions = outputParser.getFormatInstructions();\n\n\t\tprompt = new PromptTemplate({\n\t\t\ttemplate: '{input}\\n{formatInstructions}',\n\t\t\tinputVariables: ['input'],\n\t\t\tpartialVariables: { formatInstructions },\n\t\t});\n\t}\n\n\tconst items = this.getInputData();\n\tfor (let itemIndex = 0; itemIndex < items.length; itemIndex++) {\n\t\ttry {\n\t\t\tlet input;\n\n\t\t\tif (this.getNode().typeVersion <= 1.2) {\n\t\t\t\tinput = this.getNodeParameter('text', itemIndex) as string;\n\t\t\t} else {\n\t\t\t\tinput = getPromptInputByType({\n\t\t\t\t\tctx: this,\n\t\t\t\t\ti: itemIndex,\n\t\t\t\t\tinputKey: 'text',\n\t\t\t\t\tpromptTypeKey: 'promptType',\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (input === undefined) {\n\t\t\t\tthrow new NodeOperationError(this.getNode(), 'The ‘text parameter is empty.');\n\t\t\t}\n\n\t\t\tif (prompt) {\n\t\t\t\tinput = (await prompt.invoke({ input })).value;\n\t\t\t}\n\n\t\t\tconst response = await agentExecutor\n\t\t\t\t.withConfig(getTracingConfig(this))\n\t\t\t\t.invoke({ input, outputParser });\n\n\t\t\tif (outputParser) {\n\t\t\t\tresponse.output = await extractParsedOutput(this, outputParser, response.output as string);\n\t\t\t}\n\n\t\t\treturnData.push({ json: response });\n\t\t} catch (error) {\n\t\t\tthrowIfToolSchema(this, error);\n\n\t\t\tif (this.continueOnFail()) {\n\t\t\t\treturnData.push({ json: { error: error.message }, pairedItem: { item: itemIndex } });\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tthrow error;\n\t\t}\n\t}\n\n\treturn [returnData];\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,qBAA+B;AAC/B,oBAAmD;AAEnD,0BAAwD;AAExD,qBAAwE;AACxE,6BAAwC;AACxC,2BAAkC;AAClC,qBAAiC;AAEjC,mBAA6D;AAE7D,eAAsB,2BAErB,aACkC;AAClC,OAAK,OAAO,MAAM,gCAAgC;AAClD,QAAM,QAAQ,MAAM,KAAK,uBAAuB,wCAAoB,iBAAiB,CAAC;AAEtF,MAAI,KAAC,+BAAe,KAAK,GAAG;AAC3B,UAAM,IAAI,uCAAmB,KAAK,QAAQ,GAAG,0CAA0C;AAAA,EACxF;AAEA,QAAM,SAAU,MAAM,KAAK,uBAAuB,wCAAoB,UAAU,CAAC;AAIjF,QAAM,QAAQ,UAAM,kCAAkB,MAAM,eAAe,KAAK,MAAM,IAAI;AAC1E,QAAM,eAAe,UAAM,gDAAwB,IAAI;AAEvD,YAAM,sCAAwB,OAAO,KAAK,QAAQ,GAAG,sBAAsB;AAG3E,QAAM,UAAU,KAAK,iBAAiB,WAAW,GAAG,CAAC,CAAC;AAOtD,QAAM,gBAAgB,UAAM,kDAAmC,OAAO,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA,IAK5E,WAAW;AAAA,IACX;AAAA,IACA,yBAAyB,SAAS,4BAA4B;AAAA,IAC9D,eAAe,QAAQ,iBAAiB;AAAA,IACxC,WAAW;AAAA,MACV,eAAe,QAAQ;AAAA,MACvB,cAAc,QAAQ;AAAA,IACvB;AAAA,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AACnB;","names":[]}
@@ -1,14 +1,35 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.HUMAN_MESSAGE = exports.SYSTEM_MESSAGE = void 0;
4
- exports.SYSTEM_MESSAGE = `Assistant is a large language model trained by OpenAI.
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 prompt_exports = {};
20
+ __export(prompt_exports, {
21
+ HUMAN_MESSAGE: () => HUMAN_MESSAGE,
22
+ SYSTEM_MESSAGE: () => SYSTEM_MESSAGE
23
+ });
24
+ module.exports = __toCommonJS(prompt_exports);
25
+ const SYSTEM_MESSAGE = `Assistant is a large language model trained by OpenAI.
5
26
 
6
27
  Assistant is designed to be able to assist with a wide range of tasks, from answering simple questions to providing in-depth explanations and discussions on a wide range of topics. As a language model, Assistant is able to generate human-like text based on the input it receives, allowing it to engage in natural-sounding conversations and provide responses that are coherent and relevant to the topic at hand.
7
28
 
8
29
  Assistant is constantly learning and improving, and its capabilities are constantly evolving. It is able to process and understand large amounts of text, and can use this knowledge to provide accurate and informative responses to a wide range of questions. Additionally, Assistant is able to generate its own text based on the input it receives, allowing it to engage in discussions and provide explanations and descriptions on a wide range of topics.
9
30
 
10
31
  Overall, Assistant is a powerful system that can help with a wide range of tasks and provide valuable insights and information on a wide range of topics. Whether you need help with a specific question or just want to have a conversation about a particular topic, Assistant is here to assist.`;
11
- exports.HUMAN_MESSAGE = `TOOLS
32
+ const HUMAN_MESSAGE = `TOOLS
12
33
  ------
13
34
  Assistant can ask the user to use tools to look up information that may be helpful in answering the users original question. The tools the human can use are:
14
35
 
@@ -21,4 +42,9 @@ USER'S INPUT
21
42
  Here is the user's input (remember to respond with a markdown code snippet of a json blob with a single action, and NOTHING else):
22
43
 
23
44
  {{input}}`;
45
+ // Annotate the CommonJS export names for ESM import in node:
46
+ 0 && (module.exports = {
47
+ HUMAN_MESSAGE,
48
+ SYSTEM_MESSAGE
49
+ });
24
50
  //# sourceMappingURL=prompt.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"prompt.js","sourceRoot":"","sources":["../../../../../../nodes/agents/Agent/agents/ConversationalAgent/prompt.ts"],"names":[],"mappings":";;;AAAa,QAAA,cAAc,GAAG;;;;;;oSAMsQ,CAAC;AAExR,QAAA,aAAa,GAAG;;;;;;;;;;;;UAYnB,CAAC"}
1
+ {"version":3,"sources":["../../../../../../nodes/agents/Agent/agents/ConversationalAgent/prompt.ts"],"sourcesContent":["export const SYSTEM_MESSAGE = `Assistant is a large language model trained by OpenAI.\n\nAssistant is designed to be able to assist with a wide range of tasks, from answering simple questions to providing in-depth explanations and discussions on a wide range of topics. As a language model, Assistant is able to generate human-like text based on the input it receives, allowing it to engage in natural-sounding conversations and provide responses that are coherent and relevant to the topic at hand.\n\nAssistant is constantly learning and improving, and its capabilities are constantly evolving. It is able to process and understand large amounts of text, and can use this knowledge to provide accurate and informative responses to a wide range of questions. Additionally, Assistant is able to generate its own text based on the input it receives, allowing it to engage in discussions and provide explanations and descriptions on a wide range of topics.\n\nOverall, Assistant is a powerful system that can help with a wide range of tasks and provide valuable insights and information on a wide range of topics. Whether you need help with a specific question or just want to have a conversation about a particular topic, Assistant is here to assist.`;\n\nexport const HUMAN_MESSAGE = `TOOLS\n------\nAssistant can ask the user to use tools to look up information that may be helpful in answering the users original question. The tools the human can use are:\n\n{tools}\n\n{format_instructions}\n\nUSER'S INPUT\n--------------------\nHere is the user's input (remember to respond with a markdown code snippet of a json blob with a single action, and NOTHING else):\n\n{{input}}`;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,MAAM,iBAAiB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQvB,MAAM,gBAAgB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;","names":[]}