@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":"utils.js","sourceRoot":"","sources":["../../../../nodes/tools/ToolHttpRequest/utils.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6zBA,kDAOC;AAp0BD,sDAAmD;AACnD,iDAAmC;AACnC,+CAAuC;AACvC,iCAA8B;AAC9B,qDAA6B;AAC7B,qDAA6B;AAC7B,yDAAiC;AACjC,6FAAuG;AASvG,+CAAkF;AAClF,6BAAwB;AAYxB,MAAM,wBAAwB,GAAG,KAAK,EAAE,GAAyB,EAAE,SAAiB,EAAE,EAAE;IACvF,MAAM,WAAW,GAAG,GAAG,CAAC,gBAAgB,CAAC,iBAAiB,EAAE,SAAS,CAAW,CAAC;IAEjF,IAAI,WAAW,KAAK,eAAe,IAAI,WAAW,KAAK,gBAAgB,EAAE,CAAC;QACz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AAC;IACrB,CAAC;SAAM,IAAI,SAAS,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;QACzC,MAAM,GAAG,OAAC,CAAC,OAAO,EAAE,CAAC;IACtB,CAAC;SAAM,IAAI,SAAS,CAAC,IAAI,KAAK,MAAM,EAAE,CAAC;QACtC,MAAM,GAAG,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,GAAG,EAAE,CAAC,CAAC;IAC5B,CAAC;SAAM,CAAC;QACP,MAAM,GAAG,OAAC,CAAC,MAAM,EAAE,CAAC;IACrB,CAAC;IAED,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC;QACzB,MAAM,GAAG,MAAM,CAAC,QAAQ,EAAE,CAAC;IAC5B,CAAC;IAED,IAAI,SAAS,CAAC,WAAW,EAAE,CAAC;QAC3B,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IACjD,CAAC;IAED,OAAO,MAAM,CAAC;AACf,CAAC;AAED,SAAgB,mBAAmB,CAAC,UAA2B;IAC9D,MAAM,aAAa,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC;QACnD,SAAS,CAAC,IAAI;QACd,sBAAsB,CAAC,SAAS,CAAC;KACjC,CAAC,CAAC;IAEH,OAAO,OAAC,CAAC,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC,CAAC;AACpD,CAAC"}
1
+ {"version":3,"sources":["../../../../nodes/tools/ToolHttpRequest/utils.ts"],"sourcesContent":["import { Readability } from '@mozilla/readability';\nimport * as cheerio from 'cheerio';\nimport { convert } from 'html-to-text';\nimport { JSDOM } from 'jsdom';\nimport get from 'lodash/get';\nimport set from 'lodash/set';\nimport unset from 'lodash/unset';\nimport { getOAuth2AdditionalParameters } from 'n8n-nodes-base/dist/nodes/HttpRequest/GenericFunctions';\nimport type {\n\tIDataObject,\n\tIHttpRequestOptions,\n\tIRequestOptionsSimplified,\n\tExecutionError,\n\tNodeApiError,\n\tISupplyDataFunctions,\n} from 'n8n-workflow';\nimport { NodeConnectionTypes, NodeOperationError, jsonParse } from 'n8n-workflow';\nimport { z } from 'zod';\n\nimport type {\n\tParameterInputType,\n\tParametersValues,\n\tPlaceholderDefinition,\n\tParametersValues as RawParametersValues,\n\tSendIn,\n\tToolParameter,\n} from './interfaces';\nimport type { DynamicZodObject } from '../../../types/zod.types';\n\nconst genericCredentialRequest = async (ctx: ISupplyDataFunctions, itemIndex: number) => {\n\tconst genericType = ctx.getNodeParameter('genericAuthType', itemIndex) as string;\n\n\tif (genericType === 'httpBasicAuth' || genericType === 'httpDigestAuth') {\n\t\tconst basicAuth = await ctx.getCredentials('httpBasicAuth', itemIndex);\n\t\tconst sendImmediately = genericType === 'httpDigestAuth' ? false : undefined;\n\n\t\treturn async (options: IHttpRequestOptions) => {\n\t\t\toptions.auth = {\n\t\t\t\tusername: basicAuth.user as string,\n\t\t\t\tpassword: basicAuth.password as string,\n\t\t\t\tsendImmediately,\n\t\t\t};\n\t\t\treturn await ctx.helpers.httpRequest(options);\n\t\t};\n\t}\n\n\tif (genericType === 'httpHeaderAuth') {\n\t\tconst headerAuth = await ctx.getCredentials('httpHeaderAuth', itemIndex);\n\n\t\treturn async (options: IHttpRequestOptions) => {\n\t\t\tif (!options.headers) options.headers = {};\n\t\t\toptions.headers[headerAuth.name as string] = headerAuth.value;\n\t\t\treturn await ctx.helpers.httpRequest(options);\n\t\t};\n\t}\n\n\tif (genericType === 'httpQueryAuth') {\n\t\tconst queryAuth = await ctx.getCredentials('httpQueryAuth', itemIndex);\n\n\t\treturn async (options: IHttpRequestOptions) => {\n\t\t\tif (!options.qs) options.qs = {};\n\t\t\toptions.qs[queryAuth.name as string] = queryAuth.value;\n\t\t\treturn await ctx.helpers.httpRequest(options);\n\t\t};\n\t}\n\n\tif (genericType === 'httpCustomAuth') {\n\t\tconst customAuth = await ctx.getCredentials('httpCustomAuth', itemIndex);\n\n\t\treturn async (options: IHttpRequestOptions) => {\n\t\t\tconst auth = jsonParse<IRequestOptionsSimplified>((customAuth.json as string) || '{}', {\n\t\t\t\terrorMessage: 'Invalid Custom Auth JSON',\n\t\t\t});\n\t\t\tif (auth.headers) {\n\t\t\t\toptions.headers = { ...options.headers, ...auth.headers };\n\t\t\t}\n\t\t\tif (auth.body) {\n\t\t\t\toptions.body = { ...(options.body as IDataObject), ...auth.body };\n\t\t\t}\n\t\t\tif (auth.qs) {\n\t\t\t\toptions.qs = { ...options.qs, ...auth.qs };\n\t\t\t}\n\t\t\treturn await ctx.helpers.httpRequest(options);\n\t\t};\n\t}\n\n\tif (genericType === 'oAuth1Api') {\n\t\treturn async (options: IHttpRequestOptions) => {\n\t\t\treturn await ctx.helpers.requestOAuth1.call(ctx, 'oAuth1Api', options);\n\t\t};\n\t}\n\n\tif (genericType === 'oAuth2Api') {\n\t\treturn async (options: IHttpRequestOptions) => {\n\t\t\treturn await ctx.helpers.requestOAuth2.call(ctx, 'oAuth2Api', options, {\n\t\t\t\ttokenType: 'Bearer',\n\t\t\t});\n\t\t};\n\t}\n\n\tthrow new NodeOperationError(ctx.getNode(), `The type ${genericType} is not supported`, {\n\t\titemIndex,\n\t});\n};\n\nconst predefinedCredentialRequest = async (ctx: ISupplyDataFunctions, itemIndex: number) => {\n\tconst predefinedType = ctx.getNodeParameter('nodeCredentialType', itemIndex) as string;\n\tconst additionalOptions = getOAuth2AdditionalParameters(predefinedType);\n\n\treturn async (options: IHttpRequestOptions) => {\n\t\treturn await ctx.helpers.httpRequestWithAuthentication.call(\n\t\t\tctx,\n\t\t\tpredefinedType,\n\t\t\toptions,\n\t\t\tadditionalOptions && { oauth2: additionalOptions },\n\t\t);\n\t};\n};\n\nexport const configureHttpRequestFunction = async (\n\tctx: ISupplyDataFunctions,\n\tcredentialsType: 'predefinedCredentialType' | 'genericCredentialType' | 'none',\n\titemIndex: number,\n) => {\n\tswitch (credentialsType) {\n\t\tcase 'genericCredentialType':\n\t\t\treturn await genericCredentialRequest(ctx, itemIndex);\n\t\tcase 'predefinedCredentialType':\n\t\t\treturn await predefinedCredentialRequest(ctx, itemIndex);\n\t\tdefault:\n\t\t\treturn async (options: IHttpRequestOptions) => {\n\t\t\t\treturn await ctx.helpers.httpRequest(options);\n\t\t\t};\n\t}\n};\n\nconst defaultOptimizer = <T>(response: T) => {\n\tif (typeof response === 'string') {\n\t\treturn response;\n\t}\n\tif (typeof response === 'object') {\n\t\treturn JSON.stringify(response, null, 2);\n\t}\n\n\treturn String(response);\n};\n\nfunction isBinary(data: unknown) {\n\t// Check if data is a Buffer\n\tif (Buffer.isBuffer(data)) {\n\t\treturn true;\n\t}\n\n\t// If data is a string, assume it's text unless it contains null characters.\n\tif (typeof data === 'string') {\n\t\t// If the string contains a null character, it's likely binary.\n\t\tif (data.includes('\\0')) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\t// For any other type, assume it's not binary.\n\treturn false;\n}\n\nconst htmlOptimizer = (ctx: ISupplyDataFunctions, itemIndex: number, maxLength: number) => {\n\tconst cssSelector = ctx.getNodeParameter('cssSelector', itemIndex, '') as string;\n\tconst onlyContent = ctx.getNodeParameter('onlyContent', itemIndex, false) as boolean;\n\tlet elementsToOmit: string[] = [];\n\n\tif (onlyContent) {\n\t\tconst elementsToOmitUi = ctx.getNodeParameter('elementsToOmit', itemIndex, '') as\n\t\t\t| string\n\t\t\t| string[];\n\n\t\tif (typeof elementsToOmitUi === 'string') {\n\t\t\telementsToOmit = elementsToOmitUi\n\t\t\t\t.split(',')\n\t\t\t\t.filter((s) => s)\n\t\t\t\t.map((s) => s.trim());\n\t\t}\n\t}\n\n\treturn <T>(response: T) => {\n\t\tif (typeof response !== 'string') {\n\t\t\tthrow new NodeOperationError(\n\t\t\t\tctx.getNode(),\n\t\t\t\t`The response type must be a string. Received: ${typeof response}`,\n\t\t\t\t{ itemIndex },\n\t\t\t);\n\t\t}\n\t\tconst returnData: string[] = [];\n\n\t\tconst html = cheerio.load(response);\n\t\tconst htmlElements = html(cssSelector);\n\n\t\thtmlElements.each((_, el) => {\n\t\t\tlet value = html(el).html() || '';\n\n\t\t\tif (onlyContent) {\n\t\t\t\tlet htmlToTextOptions;\n\n\t\t\t\tif (elementsToOmit?.length) {\n\t\t\t\t\thtmlToTextOptions = {\n\t\t\t\t\t\tselectors: elementsToOmit.map((selector) => ({\n\t\t\t\t\t\t\tselector,\n\t\t\t\t\t\t\tformat: 'skip',\n\t\t\t\t\t\t})),\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\tvalue = convert(value, htmlToTextOptions);\n\t\t\t}\n\n\t\t\tvalue = value\n\t\t\t\t.trim()\n\t\t\t\t.replace(/^\\s+|\\s+$/g, '')\n\t\t\t\t.replace(/(\\r\\n|\\n|\\r)/gm, '')\n\t\t\t\t.replace(/\\s+/g, ' ');\n\n\t\t\treturnData.push(value);\n\t\t});\n\n\t\tconst text = JSON.stringify(returnData, null, 2);\n\n\t\tif (maxLength > 0 && text.length > maxLength) {\n\t\t\treturn text.substring(0, maxLength);\n\t\t}\n\n\t\treturn text;\n\t};\n};\n\nconst textOptimizer = (ctx: ISupplyDataFunctions, itemIndex: number, maxLength: number) => {\n\treturn (response: string | IDataObject) => {\n\t\tif (typeof response === 'object') {\n\t\t\ttry {\n\t\t\t\tresponse = JSON.stringify(response, null, 2);\n\t\t\t} catch (error) {}\n\t\t}\n\n\t\tif (typeof response !== 'string') {\n\t\t\tthrow new NodeOperationError(\n\t\t\t\tctx.getNode(),\n\t\t\t\t`The response type must be a string. Received: ${typeof response}`,\n\t\t\t\t{ itemIndex },\n\t\t\t);\n\t\t}\n\n\t\tconst dom = new JSDOM(response);\n\t\tconst article = new Readability(dom.window.document, {\n\t\t\tkeepClasses: true,\n\t\t}).parse();\n\n\t\tconst text = article?.textContent || '';\n\n\t\tif (maxLength > 0 && text.length > maxLength) {\n\t\t\treturn text.substring(0, maxLength);\n\t\t}\n\n\t\treturn text;\n\t};\n};\n\nconst jsonOptimizer = (ctx: ISupplyDataFunctions, itemIndex: number) => {\n\treturn (response: string): string => {\n\t\tlet responseData: IDataObject | IDataObject[] | string = response;\n\n\t\tif (typeof responseData === 'string') {\n\t\t\tresponseData = jsonParse(response);\n\t\t}\n\n\t\tif (typeof responseData !== 'object' || !responseData) {\n\t\t\tthrow new NodeOperationError(\n\t\t\t\tctx.getNode(),\n\t\t\t\t'The response type must be an object or an array of objects',\n\t\t\t\t{ itemIndex },\n\t\t\t);\n\t\t}\n\n\t\tconst dataField = ctx.getNodeParameter('dataField', itemIndex, '') as string;\n\t\tlet returnData: IDataObject[] = [];\n\n\t\tif (!Array.isArray(responseData)) {\n\t\t\tif (dataField) {\n\t\t\t\tconst data = responseData[dataField] as IDataObject | IDataObject[];\n\t\t\t\tif (Array.isArray(data)) {\n\t\t\t\t\tresponseData = data;\n\t\t\t\t} else {\n\t\t\t\t\tresponseData = [data];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tresponseData = [responseData];\n\t\t\t}\n\t\t} else {\n\t\t\tif (dataField) {\n\t\t\t\tresponseData = responseData.map((data) => data[dataField]) as IDataObject[];\n\t\t\t}\n\t\t}\n\n\t\tconst fieldsToInclude = ctx.getNodeParameter('fieldsToInclude', itemIndex, 'all') as\n\t\t\t| 'all'\n\t\t\t| 'selected'\n\t\t\t| 'except';\n\n\t\tlet fields: string | string[] = [];\n\n\t\tif (fieldsToInclude !== 'all') {\n\t\t\tfields = ctx.getNodeParameter('fields', itemIndex, []) as string[] | string;\n\n\t\t\tif (typeof fields === 'string') {\n\t\t\t\tfields = fields.split(',').map((field) => field.trim());\n\t\t\t}\n\t\t} else {\n\t\t\treturnData = responseData;\n\t\t}\n\n\t\tif (fieldsToInclude === 'selected') {\n\t\t\tfor (const item of responseData) {\n\t\t\t\tconst newItem: IDataObject = {};\n\n\t\t\t\tfor (const field of fields) {\n\t\t\t\t\tset(newItem, field, get(item, field));\n\t\t\t\t}\n\n\t\t\t\treturnData.push(newItem);\n\t\t\t}\n\t\t}\n\n\t\tif (fieldsToInclude === 'except') {\n\t\t\tfor (const item of responseData) {\n\t\t\t\tfor (const field of fields) {\n\t\t\t\t\tunset(item, field);\n\t\t\t\t}\n\n\t\t\t\treturnData.push(item);\n\t\t\t}\n\t\t}\n\n\t\treturn JSON.stringify(returnData, null, 2);\n\t};\n};\n\nexport const configureResponseOptimizer = (ctx: ISupplyDataFunctions, itemIndex: number) => {\n\tconst optimizeResponse = ctx.getNodeParameter('optimizeResponse', itemIndex, false) as boolean;\n\n\tif (optimizeResponse) {\n\t\tconst responseType = ctx.getNodeParameter('responseType', itemIndex) as\n\t\t\t| 'json'\n\t\t\t| 'text'\n\t\t\t| 'html';\n\n\t\tlet maxLength = 0;\n\t\tconst truncateResponse = ctx.getNodeParameter('truncateResponse', itemIndex, false) as boolean;\n\n\t\tif (truncateResponse) {\n\t\t\tmaxLength = ctx.getNodeParameter('maxLength', itemIndex, 0) as number;\n\t\t}\n\n\t\tswitch (responseType) {\n\t\t\tcase 'html':\n\t\t\t\treturn htmlOptimizer(ctx, itemIndex, maxLength);\n\t\t\tcase 'text':\n\t\t\t\treturn textOptimizer(ctx, itemIndex, maxLength);\n\t\t\tcase 'json':\n\t\t\t\treturn jsonOptimizer(ctx, itemIndex);\n\t\t}\n\t}\n\n\treturn defaultOptimizer;\n};\n\nconst extractPlaceholders = (text: string): string[] => {\n\tconst placeholder = /(\\{[a-zA-Z0-9_-]+\\})/g;\n\tconst returnData: string[] = [];\n\n\tconst matches = text.matchAll(placeholder);\n\n\tfor (const match of matches) {\n\t\treturnData.push(match[0].replace(/{|}/g, ''));\n\t}\n\n\treturn returnData;\n};\n\nexport const extractParametersFromText = (\n\tplaceholders: PlaceholderDefinition[],\n\ttext: string,\n\tsendIn: SendIn,\n\tkey?: string,\n): ToolParameter[] => {\n\tif (typeof text !== 'string') return [];\n\n\tconst parameters = extractPlaceholders(text);\n\n\tif (parameters.length) {\n\t\t// eslint-disable-next-line @typescript-eslint/no-use-before-define\n\t\tconst inputParameters = prepareParameters(\n\t\t\tparameters.map((name) => ({\n\t\t\t\tname,\n\t\t\t\tvalueProvider: 'modelRequired',\n\t\t\t})),\n\t\t\tplaceholders,\n\t\t\t'keypair',\n\t\t\tsendIn,\n\t\t\t'',\n\t\t);\n\n\t\treturn key\n\t\t\t? inputParameters.parameters.map((p) => ({ ...p, key }))\n\t\t\t: inputParameters.parameters;\n\t}\n\n\treturn [];\n};\n\nfunction prepareParameters(\n\trawParameters: RawParametersValues,\n\tplaceholders: PlaceholderDefinition[],\n\tparametersInputType: 'model' | 'keypair' | 'json',\n\tsendIn: SendIn,\n\tmodelInputDescription: string,\n\tjsonWithPlaceholders?: string,\n): { parameters: ToolParameter[]; values: IDataObject } {\n\tconst parameters: ToolParameter[] = [];\n\tconst values: IDataObject = {};\n\n\tif (parametersInputType === 'model') {\n\t\treturn {\n\t\t\tparameters: [\n\t\t\t\t{\n\t\t\t\t\tname: sendIn,\n\t\t\t\t\trequired: true,\n\t\t\t\t\ttype: 'json',\n\t\t\t\t\tdescription: modelInputDescription,\n\t\t\t\t\tsendIn,\n\t\t\t\t},\n\t\t\t],\n\t\t\tvalues: {},\n\t\t};\n\t}\n\n\tif (parametersInputType === 'keypair') {\n\t\tfor (const entry of rawParameters) {\n\t\t\tif (entry.valueProvider.includes('model')) {\n\t\t\t\tconst placeholder = placeholders.find((p) => p.name === entry.name);\n\n\t\t\t\tconst parameter: ToolParameter = {\n\t\t\t\t\tname: entry.name,\n\t\t\t\t\trequired: entry.valueProvider === 'modelRequired',\n\t\t\t\t\tsendIn,\n\t\t\t\t};\n\n\t\t\t\tif (placeholder) {\n\t\t\t\t\tparameter.type = placeholder.type;\n\t\t\t\t\tparameter.description = placeholder.description;\n\t\t\t\t}\n\n\t\t\t\tparameters.push(parameter);\n\t\t\t} else if (entry.value) {\n\t\t\t\t// if value has placeholders push them to parameters\n\t\t\t\tparameters.push(\n\t\t\t\t\t...extractParametersFromText(placeholders, entry.value, sendIn, entry.name),\n\t\t\t\t);\n\t\t\t\tvalues[entry.name] = entry.value; //push to user provided values\n\t\t\t}\n\t\t}\n\t}\n\n\tif (parametersInputType === 'json' && jsonWithPlaceholders) {\n\t\tparameters.push(\n\t\t\t...extractParametersFromText(placeholders, jsonWithPlaceholders, sendIn, `${sendIn + 'Raw'}`),\n\t\t);\n\t}\n\n\treturn {\n\t\tparameters,\n\t\tvalues,\n\t};\n}\n\nconst MODEL_INPUT_DESCRIPTION = {\n\tqs: 'Query parameters for request as key value pairs',\n\theaders: 'Headers parameters for request as key value pairs',\n\tbody: 'Body parameters for request as key value pairs',\n};\n\nexport const updateParametersAndOptions = (options: {\n\tctx: ISupplyDataFunctions;\n\titemIndex: number;\n\ttoolParameters: ToolParameter[];\n\tplaceholdersDefinitions: PlaceholderDefinition[];\n\trequestOptions: IHttpRequestOptions;\n\trawRequestOptions: { [key: string]: string };\n\trequestOptionsProperty: 'headers' | 'qs' | 'body';\n\tinputTypePropertyName: string;\n\tjsonPropertyName: string;\n\tparametersPropertyName: string;\n}) => {\n\tconst {\n\t\tctx,\n\t\titemIndex,\n\t\ttoolParameters,\n\t\tplaceholdersDefinitions,\n\t\trequestOptions,\n\t\trawRequestOptions,\n\t\trequestOptionsProperty,\n\t\tinputTypePropertyName,\n\t\tjsonPropertyName,\n\t\tparametersPropertyName,\n\t} = options;\n\n\tconst inputType = ctx.getNodeParameter(\n\t\tinputTypePropertyName,\n\t\titemIndex,\n\t\t'keypair',\n\t) as ParameterInputType;\n\n\tlet parametersValues: ParametersValues = [];\n\n\tif (inputType === 'json') {\n\t\trawRequestOptions[requestOptionsProperty] = ctx.getNodeParameter(\n\t\t\tjsonPropertyName,\n\t\t\titemIndex,\n\t\t\t'',\n\t\t) as string;\n\t} else {\n\t\tparametersValues = ctx.getNodeParameter(\n\t\t\tparametersPropertyName,\n\t\t\titemIndex,\n\t\t\t[],\n\t\t) as ParametersValues;\n\t}\n\n\tconst inputParameters = prepareParameters(\n\t\tparametersValues,\n\t\tplaceholdersDefinitions,\n\t\tinputType,\n\t\trequestOptionsProperty,\n\t\tMODEL_INPUT_DESCRIPTION[requestOptionsProperty],\n\t\trawRequestOptions[requestOptionsProperty],\n\t);\n\n\ttoolParameters.push(...inputParameters.parameters);\n\n\trequestOptions[requestOptionsProperty] = {\n\t\t...(requestOptions[requestOptionsProperty] as IDataObject),\n\t\t...inputParameters.values,\n\t};\n};\n\nconst getParametersDescription = (parameters: ToolParameter[]) =>\n\tparameters\n\t\t.map(\n\t\t\t(p) =>\n\t\t\t\t`${p.name}: (description: ${p.description ?? ''}, type: ${p.type ?? 'string'}, required: ${!!p.required})`,\n\t\t)\n\t\t.join(',\\n ');\n\nexport const prepareToolDescription = (\n\ttoolDescription: string,\n\ttoolParameters: ToolParameter[],\n) => {\n\tlet description = `${toolDescription}`;\n\n\tif (toolParameters.length) {\n\t\tdescription += `\n\tTool expects valid stringified JSON object with ${toolParameters.length} properties.\n\tProperty names with description, type and required status:\n\t${getParametersDescription(toolParameters)}\n\tALL parameters marked as required must be provided`;\n\t}\n\n\treturn description;\n};\n\nexport const configureToolFunction = (\n\tctx: ISupplyDataFunctions,\n\titemIndex: number,\n\ttoolParameters: ToolParameter[],\n\trequestOptions: IHttpRequestOptions,\n\trawRequestOptions: { [key: string]: string },\n\thttpRequest: (options: IHttpRequestOptions) => Promise<any>,\n\toptimizeResponse: (response: string) => string,\n) => {\n\treturn async (query: string | IDataObject): Promise<string> => {\n\t\tconst { index } = ctx.addInputData(NodeConnectionTypes.AiTool, [[{ json: { query } }]]);\n\n\t\t// Clone options and rawRequestOptions to avoid mutating the original objects\n\t\tconst options: IHttpRequestOptions | null = structuredClone(requestOptions);\n\t\tconst clonedRawRequestOptions: { [key: string]: string } = structuredClone(rawRequestOptions);\n\t\tlet fullResponse: any;\n\t\tlet response: string = '';\n\t\tlet executionError: Error | undefined = undefined;\n\n\t\tif (!toolParameters.length) {\n\t\t\tquery = '{}';\n\t\t}\n\n\t\ttry {\n\t\t\tif (query) {\n\t\t\t\tlet dataFromModel;\n\n\t\t\t\tif (typeof query === 'string') {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tdataFromModel = jsonParse<IDataObject>(query);\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\tif (toolParameters.length === 1) {\n\t\t\t\t\t\t\tdataFromModel = { [toolParameters[0].name]: query };\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthrow new NodeOperationError(\n\t\t\t\t\t\t\t\tctx.getNode(),\n\t\t\t\t\t\t\t\t`Input is not a valid JSON: ${error.message}`,\n\t\t\t\t\t\t\t\t{ itemIndex },\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tdataFromModel = query;\n\t\t\t\t}\n\n\t\t\t\tfor (const parameter of toolParameters) {\n\t\t\t\t\tif (\n\t\t\t\t\t\tparameter.required &&\n\t\t\t\t\t\t(dataFromModel[parameter.name] === undefined || dataFromModel[parameter.name] === null)\n\t\t\t\t\t) {\n\t\t\t\t\t\tthrow new NodeOperationError(\n\t\t\t\t\t\t\tctx.getNode(),\n\t\t\t\t\t\t\t`Model did not provide parameter '${parameter.name}' which is required and must be present in the input`,\n\t\t\t\t\t\t\t{ itemIndex },\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tfor (const parameter of toolParameters) {\n\t\t\t\t\tlet argument = dataFromModel[parameter.name];\n\n\t\t\t\t\tif (\n\t\t\t\t\t\targument &&\n\t\t\t\t\t\tparameter.type === 'json' &&\n\t\t\t\t\t\t!['qsRaw', 'headersRaw', 'bodyRaw'].includes(parameter.key ?? '') &&\n\t\t\t\t\t\ttypeof argument !== 'object'\n\t\t\t\t\t) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\targument = jsonParse(String(argument));\n\t\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\t\tthrow new NodeOperationError(\n\t\t\t\t\t\t\t\tctx.getNode(),\n\t\t\t\t\t\t\t\t`Parameter ${parameter.name} is not a valid JSON: ${error.message}`,\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\titemIndex,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (parameter.sendIn === 'path') {\n\t\t\t\t\t\targument = String(argument);\n\n\t\t\t\t\t\t//remove \" or ' from start or end\n\t\t\t\t\t\targument = argument.replace(/^['\"]+|['\"]+$/g, '');\n\n\t\t\t\t\t\toptions.url = options.url.replace(`{${parameter.name}}`, argument);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (parameter.sendIn === parameter.name) {\n\t\t\t\t\t\tset(options, [parameter.sendIn], argument);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (['qsRaw', 'headersRaw', 'bodyRaw'].includes(parameter.key ?? '')) {\n\t\t\t\t\t\t//enclose string in quotes as user and model could omit them\n\t\t\t\t\t\tif (parameter.type === 'string') {\n\t\t\t\t\t\t\targument = String(argument);\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t!argument.startsWith('\"') &&\n\t\t\t\t\t\t\t\t!clonedRawRequestOptions[parameter.sendIn].includes(`\"{${parameter.name}}\"`)\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\targument = `\"${argument}\"`;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (typeof argument === 'object') {\n\t\t\t\t\t\t\targument = JSON.stringify(argument);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tclonedRawRequestOptions[parameter.sendIn] = clonedRawRequestOptions[\n\t\t\t\t\t\t\tparameter.sendIn\n\t\t\t\t\t\t].replace(`{${parameter.name}}`, String(argument));\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (parameter.key) {\n\t\t\t\t\t\tlet requestOptionsValue = get(options, [parameter.sendIn, parameter.key]);\n\n\t\t\t\t\t\tif (typeof requestOptionsValue === 'string') {\n\t\t\t\t\t\t\trequestOptionsValue = requestOptionsValue.replace(\n\t\t\t\t\t\t\t\t`{${parameter.name}}`,\n\t\t\t\t\t\t\t\tString(argument),\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tset(options, [parameter.sendIn, parameter.key], requestOptionsValue);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tset(options, [parameter.sendIn, parameter.name], argument);\n\t\t\t\t}\n\n\t\t\t\tfor (const [key, value] of Object.entries(clonedRawRequestOptions)) {\n\t\t\t\t\tif (value) {\n\t\t\t\t\t\tlet parsedValue;\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tparsedValue = jsonParse<IDataObject>(value);\n\t\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\t\tlet recoveredData = '';\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\trecoveredData = value\n\t\t\t\t\t\t\t\t\t.replace(/'/g, '\"') // Replace single quotes with double quotes\n\t\t\t\t\t\t\t\t\t.replace(/(['\"])?([a-zA-Z0-9_]+)(['\"])?:/g, '\"$2\":') // Wrap keys in double quotes\n\t\t\t\t\t\t\t\t\t.replace(/,\\s*([\\]}])/g, '$1') // Remove trailing commas from objects\n\t\t\t\t\t\t\t\t\t.replace(/,+$/, ''); // Remove trailing comma\n\t\t\t\t\t\t\t\tparsedValue = jsonParse<IDataObject>(recoveredData);\n\t\t\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t\t\tthrow new NodeOperationError(\n\t\t\t\t\t\t\t\t\tctx.getNode(),\n\t\t\t\t\t\t\t\t\t`Could not replace placeholders in ${key}: ${error.message}`,\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\toptions[key as 'qs' | 'headers' | 'body'] = parsedValue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (options) {\n\t\t\t\toptions.url = encodeURI(options.url);\n\n\t\t\t\tif (options.headers && !Object.keys(options.headers).length) {\n\t\t\t\t\tdelete options.headers;\n\t\t\t\t}\n\t\t\t\tif (options.qs && !Object.keys(options.qs).length) {\n\t\t\t\t\tdelete options.qs;\n\t\t\t\t}\n\t\t\t\tif (options.body && !Object.keys(options.body).length) {\n\t\t\t\t\tdelete options.body;\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tconst errorMessage = 'Input provided by model is not valid';\n\n\t\t\tif (error instanceof NodeOperationError) {\n\t\t\t\texecutionError = error;\n\t\t\t} else {\n\t\t\t\texecutionError = new NodeOperationError(ctx.getNode(), errorMessage, {\n\t\t\t\t\titemIndex,\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tresponse = errorMessage;\n\t\t}\n\n\t\tif (options) {\n\t\t\ttry {\n\t\t\t\tfullResponse = await httpRequest(options);\n\t\t\t} catch (error) {\n\t\t\t\tconst httpCode = (error as NodeApiError).httpCode;\n\t\t\t\tresponse = `${httpCode ? `HTTP ${httpCode} ` : ''}There was an error: \"${error.message}\"`;\n\t\t\t}\n\n\t\t\tif (!response) {\n\t\t\t\ttry {\n\t\t\t\t\t// Check if the response is binary data\n\t\t\t\t\tif (fullResponse.body && isBinary(fullResponse.body)) {\n\t\t\t\t\t\tthrow new NodeOperationError(ctx.getNode(), 'Binary data is not supported');\n\t\t\t\t\t}\n\n\t\t\t\t\tresponse = optimizeResponse(fullResponse.body ?? fullResponse);\n\t\t\t\t} catch (error) {\n\t\t\t\t\tresponse = `There was an error: \"${error.message}\"`;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (typeof response !== 'string') {\n\t\t\texecutionError = new NodeOperationError(ctx.getNode(), 'Wrong output type returned', {\n\t\t\t\tdescription: `The response property should be a string, but it is an ${typeof response}`,\n\t\t\t});\n\t\t\tresponse = `There was an error: \"${executionError.message}\"`;\n\t\t}\n\n\t\tif (executionError) {\n\t\t\tvoid ctx.addOutputData(NodeConnectionTypes.AiTool, index, executionError as ExecutionError);\n\t\t} else {\n\t\t\tvoid ctx.addOutputData(NodeConnectionTypes.AiTool, index, [[{ json: { response } }]]);\n\t\t}\n\n\t\treturn response;\n\t};\n};\n\nfunction makeParameterZodSchema(parameter: ToolParameter) {\n\tlet schema: z.ZodTypeAny;\n\n\tif (parameter.type === 'string') {\n\t\tschema = z.string();\n\t} else if (parameter.type === 'number') {\n\t\tschema = z.number();\n\t} else if (parameter.type === 'boolean') {\n\t\tschema = z.boolean();\n\t} else if (parameter.type === 'json') {\n\t\tschema = z.record(z.any());\n\t} else {\n\t\tschema = z.string();\n\t}\n\n\tif (!parameter.required) {\n\t\tschema = schema.optional();\n\t}\n\n\tif (parameter.description) {\n\t\tschema = schema.describe(parameter.description);\n\t}\n\n\treturn schema;\n}\n\nexport function makeToolInputSchema(parameters: ToolParameter[]): DynamicZodObject {\n\tconst schemaEntries = parameters.map((parameter) => [\n\t\tparameter.name,\n\t\tmakeParameterZodSchema(parameter),\n\t]);\n\n\treturn z.object(Object.fromEntries(schemaEntries));\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,yBAA4B;AAC5B,cAAyB;AACzB,0BAAwB;AACxB,mBAAsB;AACtB,iBAAgB;AAChB,iBAAgB;AAChB,mBAAkB;AAClB,8BAA8C;AAS9C,0BAAmE;AACnE,iBAAkB;AAYlB,MAAM,2BAA2B,OAAO,KAA2B,cAAsB;AACxF,QAAM,cAAc,IAAI,iBAAiB,mBAAmB,SAAS;AAErE,MAAI,gBAAgB,mBAAmB,gBAAgB,kBAAkB;AACxE,UAAM,YAAY,MAAM,IAAI,eAAe,iBAAiB,SAAS;AACrE,UAAM,kBAAkB,gBAAgB,mBAAmB,QAAQ;AAEnE,WAAO,OAAO,YAAiC;AAC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,EAC1B;AAEA,MAAI,UAAU,aAAa;AAC1B,aAAS,OAAO,SAAS,UAAU,WAAW;AAAA,EAC/C;AAEA,SAAO;AACR;AAEO,SAAS,oBAAoB,YAA+C;AAClF,QAAM,gBAAgB,WAAW,IAAI,CAAC,cAAc;AAAA,IACnD,UAAU;AAAA,IACV,uBAAuB,SAAS;AAAA,EACjC,CAAC;AAED,SAAO,aAAE,OAAO,OAAO,YAAY,aAAa,CAAC;AAClD;","names":["set","get","unset"]}
@@ -1,115 +1,140 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ToolSerpApi = void 0;
4
- const serpapi_1 = require("@langchain/community/tools/serpapi");
5
- const n8n_workflow_1 = require("n8n-workflow");
6
- const logWrapper_1 = require("../../../utils/logWrapper");
7
- const sharedFields_1 = require("../../../utils/sharedFields");
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 ToolSerpApi_node_exports = {};
20
+ __export(ToolSerpApi_node_exports, {
21
+ ToolSerpApi: () => ToolSerpApi
22
+ });
23
+ module.exports = __toCommonJS(ToolSerpApi_node_exports);
24
+ var import_serpapi = require("@langchain/community/tools/serpapi");
25
+ var import_n8n_workflow = require("n8n-workflow");
26
+ var import_logWrapper = require("../../../utils/logWrapper");
27
+ var import_sharedFields = require("../../../utils/sharedFields");
8
28
  class ToolSerpApi {
9
- constructor() {
10
- this.description = {
11
- displayName: 'SerpApi (Google Search)',
12
- name: 'toolSerpApi',
13
- icon: 'file:serpApi.svg',
14
- group: ['transform'],
15
- version: 1,
16
- description: 'Search in Google using SerpAPI',
17
- defaults: {
18
- name: 'SerpAPI',
29
+ constructor() {
30
+ this.description = {
31
+ displayName: "SerpApi (Google Search)",
32
+ name: "toolSerpApi",
33
+ icon: "file:serpApi.svg",
34
+ group: ["transform"],
35
+ version: 1,
36
+ description: "Search in Google using SerpAPI",
37
+ defaults: {
38
+ name: "SerpAPI"
39
+ },
40
+ codex: {
41
+ categories: ["AI"],
42
+ subcategories: {
43
+ AI: ["Tools"],
44
+ Tools: ["Other Tools"]
45
+ },
46
+ resources: {
47
+ primaryDocumentation: [
48
+ {
49
+ url: "https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.toolserpapi/"
50
+ }
51
+ ]
52
+ }
53
+ },
54
+ // eslint-disable-next-line n8n-nodes-base/node-class-description-inputs-wrong-regular-node
55
+ inputs: [],
56
+ // eslint-disable-next-line n8n-nodes-base/node-class-description-outputs-wrong
57
+ outputs: [import_n8n_workflow.NodeConnectionTypes.AiTool],
58
+ outputNames: ["Tool"],
59
+ credentials: [
60
+ {
61
+ name: "serpApi",
62
+ required: true
63
+ }
64
+ ],
65
+ properties: [
66
+ (0, import_sharedFields.getConnectionHintNoticeField)([import_n8n_workflow.NodeConnectionTypes.AiAgent]),
67
+ {
68
+ displayName: "Options",
69
+ name: "options",
70
+ type: "collection",
71
+ placeholder: "Add Option",
72
+ default: {},
73
+ options: [
74
+ {
75
+ displayName: "Country",
76
+ name: "gl",
77
+ type: "string",
78
+ default: "us",
79
+ description: 'Defines the country to use for search. Head to <a href="https://serpapi.com/google-countries">Google countries page</a> for a full list of supported countries.'
19
80
  },
20
- codex: {
21
- categories: ['AI'],
22
- subcategories: {
23
- AI: ['Tools'],
24
- Tools: ['Other Tools'],
25
- },
26
- resources: {
27
- primaryDocumentation: [
28
- {
29
- url: 'https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.toolserpapi/',
30
- },
31
- ],
32
- },
33
- },
34
- inputs: [],
35
- outputs: [n8n_workflow_1.NodeConnectionTypes.AiTool],
36
- outputNames: ['Tool'],
37
- credentials: [
81
+ {
82
+ displayName: "Device",
83
+ name: "device",
84
+ type: "options",
85
+ options: [
38
86
  {
39
- name: 'serpApi',
40
- required: true,
87
+ name: "Desktop",
88
+ value: "desktop"
41
89
  },
42
- ],
43
- properties: [
44
- (0, sharedFields_1.getConnectionHintNoticeField)([n8n_workflow_1.NodeConnectionTypes.AiAgent]),
45
90
  {
46
- displayName: 'Options',
47
- name: 'options',
48
- type: 'collection',
49
- placeholder: 'Add Option',
50
- default: {},
51
- options: [
52
- {
53
- displayName: 'Country',
54
- name: 'gl',
55
- type: 'string',
56
- default: 'us',
57
- description: 'Defines the country to use for search. Head to <a href="https://serpapi.com/google-countries">Google countries page</a> for a full list of supported countries.',
58
- },
59
- {
60
- displayName: 'Device',
61
- name: 'device',
62
- type: 'options',
63
- options: [
64
- {
65
- name: 'Desktop',
66
- value: 'desktop',
67
- },
68
- {
69
- name: 'Mobile',
70
- value: 'mobile',
71
- },
72
- {
73
- name: 'Tablet',
74
- value: 'tablet',
75
- },
76
- ],
77
- default: 'desktop',
78
- description: 'Device to use to get the results',
79
- },
80
- {
81
- displayName: 'Explicit Array',
82
- name: 'no_cache',
83
- type: 'boolean',
84
- default: false,
85
- description: 'Whether to force SerpApi to fetch the Google results even if a cached version is already present. Cache expires after 1h. Cached searches are free, and are not counted towards your searches per month.',
86
- },
87
- {
88
- displayName: 'Google Domain',
89
- name: 'google_domain',
90
- type: 'string',
91
- default: 'google.com',
92
- description: 'Defines the domain to use for search. Head to <a href="https://serpapi.com/google-domains">Google domains page</a> for a full list of supported domains.',
93
- },
94
- {
95
- displayName: 'Language',
96
- name: 'hl',
97
- type: 'string',
98
- default: 'en',
99
- description: 'Defines the language to use. It\'s a two-letter language code. (e.g., `en` for English, `es` for Spanish, or `fr` for French). Head to <a href="https://serpapi.com/google-languages">Google languages page</a> for a full list of supported languages.',
100
- },
101
- ],
91
+ name: "Mobile",
92
+ value: "mobile"
102
93
  },
103
- ],
104
- };
105
- }
106
- async supplyData(itemIndex) {
107
- const credentials = await this.getCredentials('serpApi');
108
- const options = this.getNodeParameter('options', itemIndex);
109
- return {
110
- response: (0, logWrapper_1.logWrapper)(new serpapi_1.SerpAPI(credentials.apiKey, options), this),
111
- };
112
- }
94
+ {
95
+ name: "Tablet",
96
+ value: "tablet"
97
+ }
98
+ ],
99
+ default: "desktop",
100
+ description: "Device to use to get the results"
101
+ },
102
+ {
103
+ displayName: "Explicit Array",
104
+ name: "no_cache",
105
+ type: "boolean",
106
+ default: false,
107
+ description: "Whether to force SerpApi to fetch the Google results even if a cached version is already present. Cache expires after 1h. Cached searches are free, and are not counted towards your searches per month."
108
+ },
109
+ {
110
+ displayName: "Google Domain",
111
+ name: "google_domain",
112
+ type: "string",
113
+ default: "google.com",
114
+ description: 'Defines the domain to use for search. Head to <a href="https://serpapi.com/google-domains">Google domains page</a> for a full list of supported domains.'
115
+ },
116
+ {
117
+ displayName: "Language",
118
+ name: "hl",
119
+ type: "string",
120
+ default: "en",
121
+ description: 'Defines the language to use. It\'s a two-letter language code. (e.g., `en` for English, `es` for Spanish, or `fr` for French). Head to <a href="https://serpapi.com/google-languages">Google languages page</a> for a full list of supported languages.'
122
+ }
123
+ ]
124
+ }
125
+ ]
126
+ };
127
+ }
128
+ async supplyData(itemIndex) {
129
+ const credentials = await this.getCredentials("serpApi");
130
+ const options = this.getNodeParameter("options", itemIndex);
131
+ return {
132
+ response: (0, import_logWrapper.logWrapper)(new import_serpapi.SerpAPI(credentials.apiKey, options), this)
133
+ };
134
+ }
113
135
  }
114
- exports.ToolSerpApi = ToolSerpApi;
136
+ // Annotate the CommonJS export names for ESM import in node:
137
+ 0 && (module.exports = {
138
+ ToolSerpApi
139
+ });
115
140
  //# sourceMappingURL=ToolSerpApi.node.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ToolSerpApi.node.js","sourceRoot":"","sources":["../../../../nodes/tools/ToolSerpApi/ToolSerpApi.node.ts"],"names":[],"mappings":";;;AACA,gEAA6D;AAC7D,+CAMsB;AAEtB,kDAA+C;AAC/C,sDAAmE;AAEnE,MAAa,WAAW;IAAxB;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,yBAAyB;YACtC,IAAI,EAAE,aAAa;YACnB,IAAI,EAAE,kBAAkB;YACxB,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC;YACV,WAAW,EAAE,gCAAgC;YAC7C,QAAQ,EAAE;gBACT,IAAI,EAAE,SAAS;aACf;YACD,KAAK,EAAE;gBACN,UAAU,EAAE,CAAC,IAAI,CAAC;gBAClB,aAAa,EAAE;oBACd,EAAE,EAAE,CAAC,OAAO,CAAC;oBACb,KAAK,EAAE,CAAC,aAAa,CAAC;iBACtB;gBACD,SAAS,EAAE;oBACV,oBAAoB,EAAE;wBACrB;4BACC,GAAG,EAAE,mGAAmG;yBACxG;qBACD;iBACD;aACD;YAED,MAAM,EAAE,EAAE;YAEV,OAAO,EAAE,CAAC,kCAAmB,CAAC,MAAM,CAAC;YACrC,WAAW,EAAE,CAAC,MAAM,CAAC;YACrB,WAAW,EAAE;gBACZ;oBACC,IAAI,EAAE,SAAS;oBACf,QAAQ,EAAE,IAAI;iBACd;aACD;YACD,UAAU,EAAE;gBACX,IAAA,2CAA4B,EAAC,CAAC,kCAAmB,CAAC,OAAO,CAAC,CAAC;gBAC3D;oBACC,WAAW,EAAE,SAAS;oBACtB,IAAI,EAAE,SAAS;oBACf,IAAI,EAAE,YAAY;oBAClB,WAAW,EAAE,YAAY;oBACzB,OAAO,EAAE,EAAE;oBACX,OAAO,EAAE;wBACR;4BACC,WAAW,EAA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AE,IAAI,CAAC;SAC9E,CAAC;IACH,CAAC;CACD;AAhHD,kCAgHC"}
1
+ {"version":3,"sources":["../../../../nodes/tools/ToolSerpApi/ToolSerpApi.node.ts"],"sourcesContent":["/* eslint-disable n8n-nodes-base/node-dirname-against-convention */\nimport { SerpAPI } from '@langchain/community/tools/serpapi';\nimport {\n\tNodeConnectionTypes,\n\ttype INodeType,\n\ttype INodeTypeDescription,\n\ttype ISupplyDataFunctions,\n\ttype SupplyData,\n} from 'n8n-workflow';\n\nimport { logWrapper } from '@utils/logWrapper';\nimport { getConnectionHintNoticeField } from '@utils/sharedFields';\n\nexport class ToolSerpApi implements INodeType {\n\tdescription: INodeTypeDescription = {\n\t\tdisplayName: 'SerpApi (Google Search)',\n\t\tname: 'toolSerpApi',\n\t\ticon: 'file:serpApi.svg',\n\t\tgroup: ['transform'],\n\t\tversion: 1,\n\t\tdescription: 'Search in Google using SerpAPI',\n\t\tdefaults: {\n\t\t\tname: 'SerpAPI',\n\t\t},\n\t\tcodex: {\n\t\t\tcategories: ['AI'],\n\t\t\tsubcategories: {\n\t\t\t\tAI: ['Tools'],\n\t\t\t\tTools: ['Other Tools'],\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/sub-nodes/n8n-nodes-langchain.toolserpapi/',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t},\n\t\t},\n\t\t// eslint-disable-next-line n8n-nodes-base/node-class-description-inputs-wrong-regular-node\n\t\tinputs: [],\n\t\t// eslint-disable-next-line n8n-nodes-base/node-class-description-outputs-wrong\n\t\toutputs: [NodeConnectionTypes.AiTool],\n\t\toutputNames: ['Tool'],\n\t\tcredentials: [\n\t\t\t{\n\t\t\t\tname: 'serpApi',\n\t\t\t\trequired: true,\n\t\t\t},\n\t\t],\n\t\tproperties: [\n\t\t\tgetConnectionHintNoticeField([NodeConnectionTypes.AiAgent]),\n\t\t\t{\n\t\t\t\tdisplayName: 'Options',\n\t\t\t\tname: 'options',\n\t\t\t\ttype: 'collection',\n\t\t\t\tplaceholder: 'Add Option',\n\t\t\t\tdefault: {},\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Country',\n\t\t\t\t\t\tname: 'gl',\n\t\t\t\t\t\ttype: 'string',\n\t\t\t\t\t\tdefault: 'us',\n\t\t\t\t\t\tdescription:\n\t\t\t\t\t\t\t'Defines the country to use for search. Head to <a href=\"https://serpapi.com/google-countries\">Google countries page</a> for a full list of supported countries.',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Device',\n\t\t\t\t\t\tname: 'device',\n\t\t\t\t\t\ttype: 'options',\n\t\t\t\t\t\toptions: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tname: 'Desktop',\n\t\t\t\t\t\t\t\tvalue: 'desktop',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tname: 'Mobile',\n\t\t\t\t\t\t\t\tvalue: 'mobile',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tname: 'Tablet',\n\t\t\t\t\t\t\t\tvalue: 'tablet',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t],\n\t\t\t\t\t\tdefault: 'desktop',\n\t\t\t\t\t\tdescription: 'Device to use to get the results',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Explicit Array',\n\t\t\t\t\t\tname: 'no_cache',\n\t\t\t\t\t\ttype: 'boolean',\n\t\t\t\t\t\tdefault: false,\n\t\t\t\t\t\tdescription:\n\t\t\t\t\t\t\t'Whether to force SerpApi to fetch the Google results even if a cached version is already present. Cache expires after 1h. Cached searches are free, and are not counted towards your searches per month.',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Google Domain',\n\t\t\t\t\t\tname: 'google_domain',\n\t\t\t\t\t\ttype: 'string',\n\t\t\t\t\t\tdefault: 'google.com',\n\t\t\t\t\t\tdescription:\n\t\t\t\t\t\t\t'Defines the domain to use for search. Head to <a href=\"https://serpapi.com/google-domains\">Google domains page</a> for a full list of supported domains.',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Language',\n\t\t\t\t\t\tname: 'hl',\n\t\t\t\t\t\ttype: 'string',\n\t\t\t\t\t\tdefault: 'en',\n\t\t\t\t\t\tdescription:\n\t\t\t\t\t\t\t'Defines the language to use. It\\'s a two-letter language code. (e.g., `en` for English, `es` for Spanish, or `fr` for French). Head to <a href=\"https://serpapi.com/google-languages\">Google languages page</a> for a full list of supported languages.',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t},\n\t\t],\n\t};\n\n\tasync supplyData(this: ISupplyDataFunctions, itemIndex: number): Promise<SupplyData> {\n\t\tconst credentials = await this.getCredentials('serpApi');\n\n\t\tconst options = this.getNodeParameter('options', itemIndex) as object;\n\n\t\treturn {\n\t\t\tresponse: logWrapper(new SerpAPI(credentials.apiKey as string, options), this),\n\t\t};\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,qBAAwB;AACxB,0BAMO;AAEP,wBAA2B;AAC3B,0BAA6C;AAEtC,MAAM,YAAiC;AAAA,EAAvC;AACN,uBAAoC;AAAA,MACnC,aAAa;AAAA,MACb,MAAM;AAAA,MACN,MAAM;AAAA,MACN,OAAO,CAAC,WAAW;AAAA,MACnB,SAAS;AAAA,MACT,aAAa;AAAA,MACb,UAAU;AAAA,QACT,MAAM;AAAA,MACP;AAAA,MACA,OAAO;AAAA,QACN,YAAY,CAAC,IAAI;AAAA,QACjB,eAAe;AAAA,UACd,IAAI,CAAC,OAAO;AAAA,UACZ,OAAO,CAAC,aAAa;AAAA,QACtB;AAAA,QACA,WAAW;AAAA,UACV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AAA;AAAA,EAEA,MAAM,WAAuC,WAAwC;AACpF,UAAM,cAAc,MAAM,KAAK,eAAe,SAAS;AAEvD,UAAM,UAAU,KAAK,iBAAiB,WAAW,SAAS;AAE1D,WAAO;AAAA,MACN,cAAU,8BAAW,IAAI,uBAAQ,YAAY,QAAkB,OAAO,GAAG,IAAI;AAAA,IAC9E;AAAA,EACD;AACD;","names":[]}
@@ -0,0 +1,94 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __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 ToolThink_node_exports = {};
20
+ __export(ToolThink_node_exports, {
21
+ ToolThink: () => ToolThink
22
+ });
23
+ module.exports = __toCommonJS(ToolThink_node_exports);
24
+ var import_tools = require("langchain/tools");
25
+ var import_n8n_workflow = require("n8n-workflow");
26
+ var import_logWrapper = require("../../../utils/logWrapper");
27
+ var import_sharedFields = require("../../../utils/sharedFields");
28
+ const defaultToolDescription = "Use the tool to think about something. It will not obtain new information or change the database, but just append the thought to the log. Use it when complex reasoning or some cache memory is needed.";
29
+ class ToolThink {
30
+ constructor() {
31
+ this.description = {
32
+ displayName: "Think Tool",
33
+ name: "toolThink",
34
+ icon: "fa:brain",
35
+ iconColor: "black",
36
+ group: ["transform"],
37
+ version: 1,
38
+ description: "Invite the AI agent to do some thinking",
39
+ defaults: {
40
+ name: "Think"
41
+ },
42
+ codex: {
43
+ categories: ["AI"],
44
+ subcategories: {
45
+ AI: ["Tools"],
46
+ Tools: ["Other Tools"]
47
+ },
48
+ resources: {
49
+ primaryDocumentation: [
50
+ {
51
+ url: "https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.toolthink/"
52
+ }
53
+ ]
54
+ }
55
+ },
56
+ inputs: [],
57
+ outputs: [import_n8n_workflow.NodeConnectionTypes.AiTool],
58
+ outputNames: ["Tool"],
59
+ properties: [
60
+ (0, import_sharedFields.getConnectionHintNoticeField)([import_n8n_workflow.NodeConnectionTypes.AiAgent]),
61
+ {
62
+ displayName: "Think Tool Description",
63
+ name: "description",
64
+ type: "string",
65
+ default: defaultToolDescription,
66
+ placeholder: "[Describe your thinking tool here, explaining how it will help the AI think]",
67
+ description: "The thinking tool's description",
68
+ typeOptions: {
69
+ rows: 3
70
+ },
71
+ required: true
72
+ }
73
+ ]
74
+ };
75
+ }
76
+ async supplyData(itemIndex) {
77
+ const description = this.getNodeParameter("description", itemIndex);
78
+ const tool = new import_tools.DynamicTool({
79
+ name: "thinking_tool",
80
+ description,
81
+ func: async (subject) => {
82
+ return subject;
83
+ }
84
+ });
85
+ return {
86
+ response: (0, import_logWrapper.logWrapper)(tool, this)
87
+ };
88
+ }
89
+ }
90
+ // Annotate the CommonJS export names for ESM import in node:
91
+ 0 && (module.exports = {
92
+ ToolThink
93
+ });
94
+ //# sourceMappingURL=ToolThink.node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../nodes/tools/ToolThink/ToolThink.node.ts"],"sourcesContent":["/* eslint-disable n8n-nodes-base/node-dirname-against-convention */\nimport { DynamicTool } from 'langchain/tools';\nimport {\n\tNodeConnectionTypes,\n\ttype INodeType,\n\ttype INodeTypeDescription,\n\ttype ISupplyDataFunctions,\n\ttype SupplyData,\n} from 'n8n-workflow';\n\nimport { logWrapper } from '@utils/logWrapper';\nimport { getConnectionHintNoticeField } from '@utils/sharedFields';\n\n// A thinking tool, see https://www.anthropic.com/engineering/claude-think-tool\n\nconst defaultToolDescription =\n\t'Use the tool to think about something. It will not obtain new information or change the database, but just append the thought to the log. Use it when complex reasoning or some cache memory is needed.';\n\nexport class ToolThink implements INodeType {\n\tdescription: INodeTypeDescription = {\n\t\tdisplayName: 'Think Tool',\n\t\tname: 'toolThink',\n\t\ticon: 'fa:brain',\n\t\ticonColor: 'black',\n\t\tgroup: ['transform'],\n\t\tversion: 1,\n\t\tdescription: 'Invite the AI agent to do some thinking',\n\t\tdefaults: {\n\t\t\tname: 'Think',\n\t\t},\n\t\tcodex: {\n\t\t\tcategories: ['AI'],\n\t\t\tsubcategories: {\n\t\t\t\tAI: ['Tools'],\n\t\t\t\tTools: ['Other Tools'],\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/sub-nodes/n8n-nodes-langchain.toolthink/',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t},\n\t\t},\n\t\tinputs: [],\n\t\toutputs: [NodeConnectionTypes.AiTool],\n\t\toutputNames: ['Tool'],\n\t\tproperties: [\n\t\t\tgetConnectionHintNoticeField([NodeConnectionTypes.AiAgent]),\n\t\t\t{\n\t\t\t\tdisplayName: 'Think Tool Description',\n\t\t\t\tname: 'description',\n\t\t\t\ttype: 'string',\n\t\t\t\tdefault: defaultToolDescription,\n\t\t\t\tplaceholder: '[Describe your thinking tool here, explaining how it will help the AI think]',\n\t\t\t\tdescription: \"The thinking tool's description\",\n\t\t\t\ttypeOptions: {\n\t\t\t\t\trows: 3,\n\t\t\t\t},\n\t\t\t\trequired: true,\n\t\t\t},\n\t\t],\n\t};\n\n\tasync supplyData(this: ISupplyDataFunctions, itemIndex: number): Promise<SupplyData> {\n\t\tconst description = this.getNodeParameter('description', itemIndex) as string;\n\t\tconst tool = new DynamicTool({\n\t\t\tname: 'thinking_tool',\n\t\t\tdescription,\n\t\t\tfunc: async (subject: string) => {\n\t\t\t\treturn subject;\n\t\t\t},\n\t\t});\n\n\t\treturn {\n\t\t\tresponse: logWrapper(tool, this),\n\t\t};\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,mBAA4B;AAC5B,0BAMO;AAEP,wBAA2B;AAC3B,0BAA6C;AAI7C,MAAM,yBACL;AAEM,MAAM,UAA+B;AAAA,EAArC;AACN,uBAAoC;AAAA,MACnC,aAAa;AAAA,MACb,MAAM;AAAA,MACN,MAAM;AAAA,MACN,WAAW;AAAA,MACX,OAAO,CAAC,WAAW;AAAA,MACnB,SAAS;AAAA,MACT,aAAa;AAAA,MACb,UAAU;AAAA,QACT,MAAM;AAAA,MACP;AAAA,MACA,OAAO;AAAA,QACN,YAAY,CAAC,IAAI;AAAA,QACjB,eAAe;AAAA,UACd,IAAI,CAAC,OAAO;AAAA,UACZ,OAAO,CAAC,aAAa;AAAA,QACtB;AAAA,QACA,WAAW;AAAA,UACV,sBAAsB;AAAA,YACrB;AAAA,cACC,KAAK;AAAA,YACN;AAAA,UACD;AAAA,QACD;AAAA,MACD;AAAA,MACA,QAAQ,CAAC;AAAA,MACT,SAAS,CAAC,wCAAoB,MAAM;AAAA,MACpC,aAAa,CAAC,MAAM;AAAA,MACpB,YAAY;AAAA,YACX,kDAA6B,CAAC,wCAAoB,OAAO,CAAC;AAAA,QAC1D;AAAA,UACC,aAAa;AAAA,UACb,MAAM;AAAA,UACN,MAAM;AAAA,UACN,SAAS;AAAA,UACT,aAAa;AAAA,UACb,aAAa;AAAA,UACb,aAAa;AAAA,YACZ,MAAM;AAAA,UACP;AAAA,UACA,UAAU;AAAA,QACX;AAAA,MACD;AAAA,IACD;AAAA;AAAA,EAEA,MAAM,WAAuC,WAAwC;AACpF,UAAM,cAAc,KAAK,iBAAiB,eAAe,SAAS;AAClE,UAAM,O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