@n8n/n8n-nodes-langchain 1.86.1 → 1.87.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (466) hide show
  1. package/dist/credentials/AnthropicApi.credentials.js +1 -0
  2. package/dist/credentials/AnthropicApi.credentials.js.map +1 -0
  3. package/dist/credentials/AzureOpenAiApi.credentials.js +1 -0
  4. package/dist/credentials/AzureOpenAiApi.credentials.js.map +1 -0
  5. package/dist/credentials/CohereApi.credentials.js +1 -0
  6. package/dist/credentials/CohereApi.credentials.js.map +1 -0
  7. package/dist/credentials/DeepSeekApi.credentials.js +1 -0
  8. package/dist/credentials/DeepSeekApi.credentials.js.map +1 -0
  9. package/dist/credentials/GooglePalmApi.credentials.js +1 -0
  10. package/dist/credentials/GooglePalmApi.credentials.js.map +1 -0
  11. package/dist/credentials/GroqApi.credentials.js +1 -0
  12. package/dist/credentials/GroqApi.credentials.js.map +1 -0
  13. package/dist/credentials/HuggingFaceApi.credentials.js +1 -0
  14. package/dist/credentials/HuggingFaceApi.credentials.js.map +1 -0
  15. package/dist/credentials/MistralCloudApi.credentials.js +1 -0
  16. package/dist/credentials/MistralCloudApi.credentials.js.map +1 -0
  17. package/dist/credentials/MotorheadApi.credentials.js +1 -0
  18. package/dist/credentials/MotorheadApi.credentials.js.map +1 -0
  19. package/dist/credentials/OllamaApi.credentials.js +1 -0
  20. package/dist/credentials/OllamaApi.credentials.js.map +1 -0
  21. package/dist/credentials/OpenRouterApi.credentials.js +1 -0
  22. package/dist/credentials/OpenRouterApi.credentials.js.map +1 -0
  23. package/dist/credentials/PineconeApi.credentials.js +1 -0
  24. package/dist/credentials/PineconeApi.credentials.js.map +1 -0
  25. package/dist/credentials/QdrantApi.credentials.js +1 -0
  26. package/dist/credentials/QdrantApi.credentials.js.map +1 -0
  27. package/dist/credentials/SerpApi.credentials.js +1 -0
  28. package/dist/credentials/SerpApi.credentials.js.map +1 -0
  29. package/dist/credentials/WolframAlphaApi.credentials.js +1 -0
  30. package/dist/credentials/WolframAlphaApi.credentials.js.map +1 -0
  31. package/dist/credentials/XAiApi.credentials.js +1 -0
  32. package/dist/credentials/XAiApi.credentials.js.map +1 -0
  33. package/dist/credentials/XataApi.credentials.js +1 -0
  34. package/dist/credentials/XataApi.credentials.js.map +1 -0
  35. package/dist/credentials/ZepApi.credentials.js +1 -0
  36. package/dist/credentials/ZepApi.credentials.js.map +1 -0
  37. package/dist/known/nodes.json +12 -0
  38. package/dist/nodes/agents/Agent/Agent.node.js +1 -0
  39. package/dist/nodes/agents/Agent/Agent.node.js.map +1 -0
  40. package/dist/nodes/agents/Agent/agents/ConversationalAgent/description.js +1 -0
  41. package/dist/nodes/agents/Agent/agents/ConversationalAgent/description.js.map +1 -0
  42. package/dist/nodes/agents/Agent/agents/ConversationalAgent/execute.js +1 -0
  43. package/dist/nodes/agents/Agent/agents/ConversationalAgent/execute.js.map +1 -0
  44. package/dist/nodes/agents/Agent/agents/ConversationalAgent/prompt.js +1 -0
  45. package/dist/nodes/agents/Agent/agents/ConversationalAgent/prompt.js.map +1 -0
  46. package/dist/nodes/agents/Agent/agents/OpenAiFunctionsAgent/description.js +1 -0
  47. package/dist/nodes/agents/Agent/agents/OpenAiFunctionsAgent/description.js.map +1 -0
  48. package/dist/nodes/agents/Agent/agents/OpenAiFunctionsAgent/execute.js +1 -0
  49. package/dist/nodes/agents/Agent/agents/OpenAiFunctionsAgent/execute.js.map +1 -0
  50. package/dist/nodes/agents/Agent/agents/OpenAiFunctionsAgent/prompt.js +1 -0
  51. package/dist/nodes/agents/Agent/agents/OpenAiFunctionsAgent/prompt.js.map +1 -0
  52. package/dist/nodes/agents/Agent/agents/PlanAndExecuteAgent/description.js +1 -0
  53. package/dist/nodes/agents/Agent/agents/PlanAndExecuteAgent/description.js.map +1 -0
  54. package/dist/nodes/agents/Agent/agents/PlanAndExecuteAgent/execute.js +1 -0
  55. package/dist/nodes/agents/Agent/agents/PlanAndExecuteAgent/execute.js.map +1 -0
  56. package/dist/nodes/agents/Agent/agents/PlanAndExecuteAgent/prompt.js +1 -0
  57. package/dist/nodes/agents/Agent/agents/PlanAndExecuteAgent/prompt.js.map +1 -0
  58. package/dist/nodes/agents/Agent/agents/ReActAgent/description.js +1 -0
  59. package/dist/nodes/agents/Agent/agents/ReActAgent/description.js.map +1 -0
  60. package/dist/nodes/agents/Agent/agents/ReActAgent/execute.js +1 -0
  61. package/dist/nodes/agents/Agent/agents/ReActAgent/execute.js.map +1 -0
  62. package/dist/nodes/agents/Agent/agents/ReActAgent/prompt.js +1 -0
  63. package/dist/nodes/agents/Agent/agents/ReActAgent/prompt.js.map +1 -0
  64. package/dist/nodes/agents/Agent/agents/SqlAgent/description.js +1 -0
  65. package/dist/nodes/agents/Agent/agents/SqlAgent/description.js.map +1 -0
  66. package/dist/nodes/agents/Agent/agents/SqlAgent/execute.js +1 -0
  67. package/dist/nodes/agents/Agent/agents/SqlAgent/execute.js.map +1 -0
  68. package/dist/nodes/agents/Agent/agents/SqlAgent/other/handlers/mysql.js +1 -0
  69. package/dist/nodes/agents/Agent/agents/SqlAgent/other/handlers/mysql.js.map +1 -0
  70. package/dist/nodes/agents/Agent/agents/SqlAgent/other/handlers/postgres.js +1 -0
  71. package/dist/nodes/agents/Agent/agents/SqlAgent/other/handlers/postgres.js.map +1 -0
  72. package/dist/nodes/agents/Agent/agents/SqlAgent/other/handlers/sqlite.js +1 -0
  73. package/dist/nodes/agents/Agent/agents/SqlAgent/other/handlers/sqlite.js.map +1 -0
  74. package/dist/nodes/agents/Agent/agents/SqlAgent/other/prompts.js +1 -0
  75. package/dist/nodes/agents/Agent/agents/SqlAgent/other/prompts.js.map +1 -0
  76. package/dist/nodes/agents/Agent/agents/ToolsAgent/description.js +1 -0
  77. package/dist/nodes/agents/Agent/agents/ToolsAgent/description.js.map +1 -0
  78. package/dist/nodes/agents/Agent/agents/ToolsAgent/execute.js +1 -0
  79. package/dist/nodes/agents/Agent/agents/ToolsAgent/execute.js.map +1 -0
  80. package/dist/nodes/agents/Agent/agents/ToolsAgent/prompt.js +1 -0
  81. package/dist/nodes/agents/Agent/agents/ToolsAgent/prompt.js.map +1 -0
  82. package/dist/nodes/agents/Agent/agents/utils.js +1 -0
  83. package/dist/nodes/agents/Agent/agents/utils.js.map +1 -0
  84. package/dist/nodes/agents/OpenAiAssistant/OpenAiAssistant.node.js +1 -0
  85. package/dist/nodes/agents/OpenAiAssistant/OpenAiAssistant.node.js.map +1 -0
  86. package/dist/nodes/agents/OpenAiAssistant/utils.js +1 -0
  87. package/dist/nodes/agents/OpenAiAssistant/utils.js.map +1 -0
  88. package/dist/nodes/chains/ChainLLM/ChainLlm.node.js +1 -0
  89. package/dist/nodes/chains/ChainLLM/ChainLlm.node.js.map +1 -0
  90. package/dist/nodes/chains/ChainLLM/methods/chainExecutor.js +1 -0
  91. package/dist/nodes/chains/ChainLLM/methods/chainExecutor.js.map +1 -0
  92. package/dist/nodes/chains/ChainLLM/methods/config.js +1 -0
  93. package/dist/nodes/chains/ChainLLM/methods/config.js.map +1 -0
  94. package/dist/nodes/chains/ChainLLM/methods/imageUtils.js +1 -0
  95. package/dist/nodes/chains/ChainLLM/methods/imageUtils.js.map +1 -0
  96. package/dist/nodes/chains/ChainLLM/methods/index.js +1 -0
  97. package/dist/nodes/chains/ChainLLM/methods/index.js.map +1 -0
  98. package/dist/nodes/chains/ChainLLM/methods/promptUtils.js +1 -0
  99. package/dist/nodes/chains/ChainLLM/methods/promptUtils.js.map +1 -0
  100. package/dist/nodes/chains/ChainLLM/methods/responseFormatter.js +1 -0
  101. package/dist/nodes/chains/ChainLLM/methods/responseFormatter.js.map +1 -0
  102. package/dist/nodes/chains/ChainLLM/methods/types.js +1 -0
  103. package/dist/nodes/chains/ChainLLM/methods/types.js.map +1 -0
  104. package/dist/nodes/chains/ChainRetrievalQA/ChainRetrievalQa.node.js +1 -0
  105. package/dist/nodes/chains/ChainRetrievalQA/ChainRetrievalQa.node.js.map +1 -0
  106. package/dist/nodes/chains/ChainSummarization/ChainSummarization.node.js +1 -0
  107. package/dist/nodes/chains/ChainSummarization/ChainSummarization.node.js.map +1 -0
  108. package/dist/nodes/chains/ChainSummarization/V1/ChainSummarizationV1.node.js +1 -0
  109. package/dist/nodes/chains/ChainSummarization/V1/ChainSummarizationV1.node.js.map +1 -0
  110. package/dist/nodes/chains/ChainSummarization/V2/ChainSummarizationV2.node.js +1 -0
  111. package/dist/nodes/chains/ChainSummarization/V2/ChainSummarizationV2.node.js.map +1 -0
  112. package/dist/nodes/chains/ChainSummarization/helpers.js +1 -0
  113. package/dist/nodes/chains/ChainSummarization/helpers.js.map +1 -0
  114. package/dist/nodes/chains/ChainSummarization/prompt.js +1 -0
  115. package/dist/nodes/chains/ChainSummarization/prompt.js.map +1 -0
  116. package/dist/nodes/chains/InformationExtractor/InformationExtractor.node.js +1 -0
  117. package/dist/nodes/chains/InformationExtractor/InformationExtractor.node.js.map +1 -0
  118. package/dist/nodes/chains/InformationExtractor/helpers.js +1 -0
  119. package/dist/nodes/chains/InformationExtractor/helpers.js.map +1 -0
  120. package/dist/nodes/chains/InformationExtractor/types.js +1 -0
  121. package/dist/nodes/chains/InformationExtractor/types.js.map +1 -0
  122. package/dist/nodes/chains/SentimentAnalysis/SentimentAnalysis.node.js +1 -0
  123. package/dist/nodes/chains/SentimentAnalysis/SentimentAnalysis.node.js.map +1 -0
  124. package/dist/nodes/chains/TextClassifier/TextClassifier.node.js +1 -0
  125. package/dist/nodes/chains/TextClassifier/TextClassifier.node.js.map +1 -0
  126. package/dist/nodes/code/Code.node.js +1 -0
  127. package/dist/nodes/code/Code.node.js.map +1 -0
  128. package/dist/nodes/document_loaders/DocumentBinaryInputLoader/DocumentBinaryInputLoader.node.js +1 -0
  129. package/dist/nodes/document_loaders/DocumentBinaryInputLoader/DocumentBinaryInputLoader.node.js.map +1 -0
  130. package/dist/nodes/document_loaders/DocumentDefaultDataLoader/DocumentDefaultDataLoader.node.js +1 -0
  131. package/dist/nodes/document_loaders/DocumentDefaultDataLoader/DocumentDefaultDataLoader.node.js.map +1 -0
  132. package/dist/nodes/document_loaders/DocumentGithubLoader/DocumentGithubLoader.node.js +1 -0
  133. package/dist/nodes/document_loaders/DocumentGithubLoader/DocumentGithubLoader.node.js.map +1 -0
  134. package/dist/nodes/document_loaders/DocumentJSONInputLoader/DocumentJsonInputLoader.node.js +1 -0
  135. package/dist/nodes/document_loaders/DocumentJSONInputLoader/DocumentJsonInputLoader.node.js.map +1 -0
  136. package/dist/nodes/embeddings/EmbeddingsAwsBedrock/EmbeddingsAwsBedrock.node.js +1 -0
  137. package/dist/nodes/embeddings/EmbeddingsAwsBedrock/EmbeddingsAwsBedrock.node.js.map +1 -0
  138. package/dist/nodes/embeddings/EmbeddingsAzureOpenAi/EmbeddingsAzureOpenAi.node.js +1 -0
  139. package/dist/nodes/embeddings/EmbeddingsAzureOpenAi/EmbeddingsAzureOpenAi.node.js.map +1 -0
  140. package/dist/nodes/embeddings/EmbeddingsCohere/EmbeddingsCohere.node.js +1 -0
  141. package/dist/nodes/embeddings/EmbeddingsCohere/EmbeddingsCohere.node.js.map +1 -0
  142. package/dist/nodes/embeddings/EmbeddingsGoogleGemini/EmbeddingsGoogleGemini.node.js +1 -0
  143. package/dist/nodes/embeddings/EmbeddingsGoogleGemini/EmbeddingsGoogleGemini.node.js.map +1 -0
  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 +1 -0
  148. package/dist/nodes/embeddings/EmbeddingsHuggingFaceInference/EmbeddingsHuggingFaceInference.node.js.map +1 -0
  149. package/dist/nodes/embeddings/EmbeddingsMistralCloud/EmbeddingsMistralCloud.node.js +1 -0
  150. package/dist/nodes/embeddings/EmbeddingsMistralCloud/EmbeddingsMistralCloud.node.js.map +1 -0
  151. package/dist/nodes/embeddings/EmbeddingsOllama/EmbeddingsOllama.node.js +1 -0
  152. package/dist/nodes/embeddings/EmbeddingsOllama/EmbeddingsOllama.node.js.map +1 -0
  153. package/dist/nodes/embeddings/EmbeddingsOpenAI/EmbeddingsOpenAi.node.js +1 -0
  154. package/dist/nodes/embeddings/EmbeddingsOpenAI/EmbeddingsOpenAi.node.js.map +1 -0
  155. package/dist/nodes/llms/LMChatAnthropic/LmChatAnthropic.node.js +1 -0
  156. package/dist/nodes/llms/LMChatAnthropic/LmChatAnthropic.node.js.map +1 -0
  157. package/dist/nodes/llms/LMChatAnthropic/methods/searchModels.js +1 -0
  158. package/dist/nodes/llms/LMChatAnthropic/methods/searchModels.js.map +1 -0
  159. package/dist/nodes/llms/LMChatOllama/LmChatOllama.node.js +1 -0
  160. package/dist/nodes/llms/LMChatOllama/LmChatOllama.node.js.map +1 -0
  161. package/dist/nodes/llms/LMChatOpenAi/LmChatOpenAi.node.js +1 -0
  162. package/dist/nodes/llms/LMChatOpenAi/LmChatOpenAi.node.js.map +1 -0
  163. package/dist/nodes/llms/LMChatOpenAi/methods/loadModels.js +1 -0
  164. package/dist/nodes/llms/LMChatOpenAi/methods/loadModels.js.map +1 -0
  165. package/dist/nodes/llms/LMCohere/LmCohere.node.js +1 -0
  166. package/dist/nodes/llms/LMCohere/LmCohere.node.js.map +1 -0
  167. package/dist/nodes/llms/LMOllama/LmOllama.node.js +1 -0
  168. package/dist/nodes/llms/LMOllama/LmOllama.node.js.map +1 -0
  169. package/dist/nodes/llms/LMOllama/description.js +1 -0
  170. package/dist/nodes/llms/LMOllama/description.js.map +1 -0
  171. package/dist/nodes/llms/LMOpenAi/LmOpenAi.node.js +1 -0
  172. package/dist/nodes/llms/LMOpenAi/LmOpenAi.node.js.map +1 -0
  173. package/dist/nodes/llms/LMOpenHuggingFaceInference/LmOpenHuggingFaceInference.node.js +1 -0
  174. package/dist/nodes/llms/LMOpenHuggingFaceInference/LmOpenHuggingFaceInference.node.js.map +1 -0
  175. package/dist/nodes/llms/LmChatAwsBedrock/LmChatAwsBedrock.node.js +1 -0
  176. package/dist/nodes/llms/LmChatAwsBedrock/LmChatAwsBedrock.node.js.map +1 -0
  177. package/dist/nodes/llms/LmChatAzureOpenAi/LmChatAzureOpenAi.node.js +1 -0
  178. package/dist/nodes/llms/LmChatAzureOpenAi/LmChatAzureOpenAi.node.js.map +1 -0
  179. package/dist/nodes/llms/LmChatDeepSeek/LmChatDeepSeek.node.js +1 -0
  180. package/dist/nodes/llms/LmChatDeepSeek/LmChatDeepSeek.node.js.map +1 -0
  181. package/dist/nodes/llms/LmChatGoogleGemini/LmChatGoogleGemini.node.js +1 -0
  182. package/dist/nodes/llms/LmChatGoogleGemini/LmChatGoogleGemini.node.js.map +1 -0
  183. package/dist/nodes/llms/LmChatGoogleVertex/LmChatGoogleVertex.node.js +1 -0
  184. package/dist/nodes/llms/LmChatGoogleVertex/LmChatGoogleVertex.node.js.map +1 -0
  185. package/dist/nodes/llms/LmChatGoogleVertex/error-handling.js +1 -0
  186. package/dist/nodes/llms/LmChatGoogleVertex/error-handling.js.map +1 -0
  187. package/dist/nodes/llms/LmChatGroq/LmChatGroq.node.js +1 -0
  188. package/dist/nodes/llms/LmChatGroq/LmChatGroq.node.js.map +1 -0
  189. package/dist/nodes/llms/LmChatMistralCloud/LmChatMistralCloud.node.js +1 -0
  190. package/dist/nodes/llms/LmChatMistralCloud/LmChatMistralCloud.node.js.map +1 -0
  191. package/dist/nodes/llms/LmChatOpenRouter/LmChatOpenRouter.node.js +1 -0
  192. package/dist/nodes/llms/LmChatOpenRouter/LmChatOpenRouter.node.js.map +1 -0
  193. package/dist/nodes/llms/LmChatXAiGrok/LmChatXAiGrok.node.js +1 -0
  194. package/dist/nodes/llms/LmChatXAiGrok/LmChatXAiGrok.node.js.map +1 -0
  195. package/dist/nodes/llms/N8nLlmTracing.js +1 -0
  196. package/dist/nodes/llms/N8nLlmTracing.js.map +1 -0
  197. package/dist/nodes/llms/gemini-common/additional-options.js +1 -0
  198. package/dist/nodes/llms/gemini-common/additional-options.js.map +1 -0
  199. package/dist/nodes/llms/gemini-common/safety-options.js +1 -0
  200. package/dist/nodes/llms/gemini-common/safety-options.js.map +1 -0
  201. package/dist/nodes/llms/n8nDefaultFailedAttemptHandler.js +1 -0
  202. package/dist/nodes/llms/n8nDefaultFailedAttemptHandler.js.map +1 -0
  203. package/dist/nodes/llms/n8nLlmFailedAttemptHandler.js +1 -0
  204. package/dist/nodes/llms/n8nLlmFailedAttemptHandler.js.map +1 -0
  205. package/dist/nodes/memory/MemoryBufferWindow/MemoryBufferWindow.node.js +1 -0
  206. package/dist/nodes/memory/MemoryBufferWindow/MemoryBufferWindow.node.js.map +1 -0
  207. package/dist/nodes/memory/MemoryChatRetriever/MemoryChatRetriever.node.js +1 -0
  208. package/dist/nodes/memory/MemoryChatRetriever/MemoryChatRetriever.node.js.map +1 -0
  209. package/dist/nodes/memory/MemoryManager/MemoryManager.node.js +1 -0
  210. package/dist/nodes/memory/MemoryManager/MemoryManager.node.js.map +1 -0
  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 +1 -0
  216. package/dist/nodes/memory/MemoryMotorhead/MemoryMotorhead.node.js.map +1 -0
  217. package/dist/nodes/memory/MemoryPostgresChat/MemoryPostgresChat.node.js +1 -0
  218. package/dist/nodes/memory/MemoryPostgresChat/MemoryPostgresChat.node.js.map +1 -0
  219. package/dist/nodes/memory/MemoryRedisChat/MemoryRedisChat.node.js +1 -0
  220. package/dist/nodes/memory/MemoryRedisChat/MemoryRedisChat.node.js.map +1 -0
  221. package/dist/nodes/memory/MemoryXata/MemoryXata.node.js +1 -0
  222. package/dist/nodes/memory/MemoryXata/MemoryXata.node.js.map +1 -0
  223. package/dist/nodes/memory/MemoryZep/MemoryZep.node.js +1 -0
  224. package/dist/nodes/memory/MemoryZep/MemoryZep.node.js.map +1 -0
  225. package/dist/nodes/memory/descriptions.js +1 -0
  226. package/dist/nodes/memory/descriptions.js.map +1 -0
  227. package/dist/nodes/output_parser/OutputParserAutofixing/OutputParserAutofixing.node.js +1 -0
  228. package/dist/nodes/output_parser/OutputParserAutofixing/OutputParserAutofixing.node.js.map +1 -0
  229. package/dist/nodes/output_parser/OutputParserAutofixing/prompt.js +1 -0
  230. package/dist/nodes/output_parser/OutputParserAutofixing/prompt.js.map +1 -0
  231. package/dist/nodes/output_parser/OutputParserItemList/OutputParserItemList.node.js +1 -0
  232. package/dist/nodes/output_parser/OutputParserItemList/OutputParserItemList.node.js.map +1 -0
  233. package/dist/nodes/output_parser/OutputParserStructured/OutputParserStructured.node.js +1 -0
  234. package/dist/nodes/output_parser/OutputParserStructured/OutputParserStructured.node.js.map +1 -0
  235. package/dist/nodes/retrievers/RetrieverContextualCompression/RetrieverContextualCompression.node.js +1 -0
  236. package/dist/nodes/retrievers/RetrieverContextualCompression/RetrieverContextualCompression.node.js.map +1 -0
  237. package/dist/nodes/retrievers/RetrieverMultiQuery/RetrieverMultiQuery.node.js +1 -0
  238. package/dist/nodes/retrievers/RetrieverMultiQuery/RetrieverMultiQuery.node.js.map +1 -0
  239. package/dist/nodes/retrievers/RetrieverVectorStore/RetrieverVectorStore.node.js +1 -0
  240. package/dist/nodes/retrievers/RetrieverVectorStore/RetrieverVectorStore.node.js.map +1 -0
  241. package/dist/nodes/retrievers/RetrieverWorkflow/RetrieverWorkflow.node.js +1 -0
  242. package/dist/nodes/retrievers/RetrieverWorkflow/RetrieverWorkflow.node.js.map +1 -0
  243. package/dist/nodes/text_splitters/TextSplitterCharacterTextSplitter/TextSplitterCharacterTextSplitter.node.js +1 -0
  244. package/dist/nodes/text_splitters/TextSplitterCharacterTextSplitter/TextSplitterCharacterTextSplitter.node.js.map +1 -0
  245. package/dist/nodes/text_splitters/TextSplitterRecursiveCharacterTextSplitter/TextSplitterRecursiveCharacterTextSplitter.node.js +1 -0
  246. package/dist/nodes/text_splitters/TextSplitterRecursiveCharacterTextSplitter/TextSplitterRecursiveCharacterTextSplitter.node.js.map +1 -0
  247. package/dist/nodes/text_splitters/TextSplitterTokenSplitter/TextSplitterTokenSplitter.node.js +1 -0
  248. package/dist/nodes/text_splitters/TextSplitterTokenSplitter/TextSplitterTokenSplitter.node.js.map +1 -0
  249. package/dist/nodes/tools/ToolCalculator/ToolCalculator.node.js +1 -0
  250. package/dist/nodes/tools/ToolCalculator/ToolCalculator.node.js.map +1 -0
  251. package/dist/nodes/tools/ToolCode/ToolCode.node.js +1 -0
  252. package/dist/nodes/tools/ToolCode/ToolCode.node.js.map +1 -0
  253. package/dist/nodes/tools/ToolHttpRequest/ToolHttpRequest.node.js +1 -0
  254. package/dist/nodes/tools/ToolHttpRequest/ToolHttpRequest.node.js.map +1 -0
  255. package/dist/nodes/tools/ToolHttpRequest/descriptions.js +1 -0
  256. package/dist/nodes/tools/ToolHttpRequest/descriptions.js.map +1 -0
  257. package/dist/nodes/tools/ToolHttpRequest/interfaces.js +1 -0
  258. package/dist/nodes/tools/ToolHttpRequest/interfaces.js.map +1 -0
  259. package/dist/nodes/tools/ToolHttpRequest/utils.js +3 -2
  260. package/dist/nodes/tools/ToolHttpRequest/utils.js.map +1 -0
  261. package/dist/nodes/tools/ToolSerpApi/ToolSerpApi.node.js +1 -0
  262. package/dist/nodes/tools/ToolSerpApi/ToolSerpApi.node.js.map +1 -0
  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 +1 -0
  266. package/dist/nodes/tools/ToolVectorStore/ToolVectorStore.node.js.map +1 -0
  267. package/dist/nodes/tools/ToolWikipedia/ToolWikipedia.node.js +1 -0
  268. package/dist/nodes/tools/ToolWikipedia/ToolWikipedia.node.js.map +1 -0
  269. package/dist/nodes/tools/ToolWolframAlpha/ToolWolframAlpha.node.js +1 -0
  270. package/dist/nodes/tools/ToolWolframAlpha/ToolWolframAlpha.node.js.map +1 -0
  271. package/dist/nodes/tools/ToolWorkflow/ToolWorkflow.node.js +1 -0
  272. package/dist/nodes/tools/ToolWorkflow/ToolWorkflow.node.js.map +1 -0
  273. package/dist/nodes/tools/ToolWorkflow/v1/ToolWorkflowV1.node.js +1 -0
  274. package/dist/nodes/tools/ToolWorkflow/v1/ToolWorkflowV1.node.js.map +1 -0
  275. package/dist/nodes/tools/ToolWorkflow/v1/versionDescription.js +1 -0
  276. package/dist/nodes/tools/ToolWorkflow/v1/versionDescription.js.map +1 -0
  277. package/dist/nodes/tools/ToolWorkflow/v2/ToolWorkflowV2.node.js +1 -0
  278. package/dist/nodes/tools/ToolWorkflow/v2/ToolWorkflowV2.node.js.map +1 -0
  279. package/dist/nodes/tools/ToolWorkflow/v2/methods/index.js +1 -0
  280. package/dist/nodes/tools/ToolWorkflow/v2/methods/index.js.map +1 -0
  281. package/dist/nodes/tools/ToolWorkflow/v2/methods/localResourceMapping.js +1 -0
  282. package/dist/nodes/tools/ToolWorkflow/v2/methods/localResourceMapping.js.map +1 -0
  283. package/dist/nodes/tools/ToolWorkflow/v2/utils/WorkflowToolService.js +1 -0
  284. package/dist/nodes/tools/ToolWorkflow/v2/utils/WorkflowToolService.js.map +1 -0
  285. package/dist/nodes/tools/ToolWorkflow/v2/versionDescription.js +1 -0
  286. package/dist/nodes/tools/ToolWorkflow/v2/versionDescription.js.map +1 -0
  287. package/dist/nodes/trigger/ChatTrigger/ChatTrigger.node.js +1 -0
  288. package/dist/nodes/trigger/ChatTrigger/ChatTrigger.node.js.map +1 -0
  289. package/dist/nodes/trigger/ChatTrigger/GenericFunctions.js +1 -0
  290. package/dist/nodes/trigger/ChatTrigger/GenericFunctions.js.map +1 -0
  291. package/dist/nodes/trigger/ChatTrigger/constants.js +1 -0
  292. package/dist/nodes/trigger/ChatTrigger/constants.js.map +1 -0
  293. package/dist/nodes/trigger/ChatTrigger/error.js +1 -0
  294. package/dist/nodes/trigger/ChatTrigger/error.js.map +1 -0
  295. package/dist/nodes/trigger/ChatTrigger/templates.js +1 -0
  296. package/dist/nodes/trigger/ChatTrigger/templates.js.map +1 -0
  297. package/dist/nodes/trigger/ChatTrigger/types.js +1 -0
  298. package/dist/nodes/trigger/ChatTrigger/types.js.map +1 -0
  299. package/dist/nodes/trigger/ManualChatTrigger/ManualChatTrigger.node.js +1 -0
  300. package/dist/nodes/trigger/ManualChatTrigger/ManualChatTrigger.node.js.map +1 -0
  301. package/dist/nodes/vector_store/VectorStoreInMemory/VectorStoreInMemory.node.js +1 -0
  302. package/dist/nodes/vector_store/VectorStoreInMemory/VectorStoreInMemory.node.js.map +1 -0
  303. package/dist/nodes/vector_store/VectorStoreInMemoryInsert/VectorStoreInMemoryInsert.node.js +1 -0
  304. package/dist/nodes/vector_store/VectorStoreInMemoryInsert/VectorStoreInMemoryInsert.node.js.map +1 -0
  305. package/dist/nodes/vector_store/VectorStoreInMemoryLoad/VectorStoreInMemoryLoad.node.js +1 -0
  306. package/dist/nodes/vector_store/VectorStoreInMemoryLoad/VectorStoreInMemoryLoad.node.js.map +1 -0
  307. package/dist/nodes/vector_store/VectorStoreMongoDBAtlas/VectorStoreMongoDBAtlas.node.js +1 -0
  308. package/dist/nodes/vector_store/VectorStoreMongoDBAtlas/VectorStoreMongoDBAtlas.node.js.map +1 -0
  309. package/dist/nodes/vector_store/VectorStorePGVector/VectorStorePGVector.node.js +1 -0
  310. package/dist/nodes/vector_store/VectorStorePGVector/VectorStorePGVector.node.js.map +1 -0
  311. package/dist/nodes/vector_store/VectorStorePinecone/VectorStorePinecone.node.js +1 -0
  312. package/dist/nodes/vector_store/VectorStorePinecone/VectorStorePinecone.node.js.map +1 -0
  313. package/dist/nodes/vector_store/VectorStorePineconeInsert/VectorStorePineconeInsert.node.js +1 -0
  314. package/dist/nodes/vector_store/VectorStorePineconeInsert/VectorStorePineconeInsert.node.js.map +1 -0
  315. package/dist/nodes/vector_store/VectorStorePineconeLoad/VectorStorePineconeLoad.node.js +1 -0
  316. package/dist/nodes/vector_store/VectorStorePineconeLoad/VectorStorePineconeLoad.node.js.map +1 -0
  317. package/dist/nodes/vector_store/VectorStoreQdrant/VectorStoreQdrant.node.js +1 -0
  318. package/dist/nodes/vector_store/VectorStoreQdrant/VectorStoreQdrant.node.js.map +1 -0
  319. package/dist/nodes/vector_store/VectorStoreSupabase/VectorStoreSupabase.node.js +1 -0
  320. package/dist/nodes/vector_store/VectorStoreSupabase/VectorStoreSupabase.node.js.map +1 -0
  321. package/dist/nodes/vector_store/VectorStoreSupabaseInsert/VectorStoreSupabaseInsert.node.js +1 -0
  322. package/dist/nodes/vector_store/VectorStoreSupabaseInsert/VectorStoreSupabaseInsert.node.js.map +1 -0
  323. package/dist/nodes/vector_store/VectorStoreSupabaseLoad/VectorStoreSupabaseLoad.node.js +1 -0
  324. package/dist/nodes/vector_store/VectorStoreSupabaseLoad/VectorStoreSupabaseLoad.node.js.map +1 -0
  325. package/dist/nodes/vector_store/VectorStoreZep/VectorStoreZep.node.js +1 -0
  326. package/dist/nodes/vector_store/VectorStoreZep/VectorStoreZep.node.js.map +1 -0
  327. package/dist/nodes/vector_store/VectorStoreZepInsert/VectorStoreZepInsert.node.js +1 -0
  328. package/dist/nodes/vector_store/VectorStoreZepInsert/VectorStoreZepInsert.node.js.map +1 -0
  329. package/dist/nodes/vector_store/VectorStoreZepLoad/VectorStoreZepLoad.node.js +1 -0
  330. package/dist/nodes/vector_store/VectorStoreZepLoad/VectorStoreZepLoad.node.js.map +1 -0
  331. package/dist/nodes/vector_store/shared/MemoryManager/MemoryCalculator.js +1 -0
  332. package/dist/nodes/vector_store/shared/MemoryManager/MemoryCalculator.js.map +1 -0
  333. package/dist/nodes/vector_store/shared/MemoryManager/MemoryVectorStoreManager.js +1 -0
  334. package/dist/nodes/vector_store/shared/MemoryManager/MemoryVectorStoreManager.js.map +1 -0
  335. package/dist/nodes/vector_store/shared/MemoryManager/StoreCleanupService.js +1 -0
  336. package/dist/nodes/vector_store/shared/MemoryManager/StoreCleanupService.js.map +1 -0
  337. package/dist/nodes/vector_store/shared/MemoryManager/config.js +1 -0
  338. package/dist/nodes/vector_store/shared/MemoryManager/config.js.map +1 -0
  339. package/dist/nodes/vector_store/shared/MemoryManager/types.js +1 -0
  340. package/dist/nodes/vector_store/shared/MemoryManager/types.js.map +1 -0
  341. package/dist/nodes/vector_store/shared/createVectorStoreNode/constants.js +1 -0
  342. package/dist/nodes/vector_store/shared/createVectorStoreNode/constants.js.map +1 -0
  343. package/dist/nodes/vector_store/shared/createVectorStoreNode/createVectorStoreNode.js +1 -0
  344. package/dist/nodes/vector_store/shared/createVectorStoreNode/createVectorStoreNode.js.map +1 -0
  345. package/dist/nodes/vector_store/shared/createVectorStoreNode/methods/listSearch.js +1 -0
  346. package/dist/nodes/vector_store/shared/createVectorStoreNode/methods/listSearch.js.map +1 -0
  347. package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/index.js +1 -0
  348. package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/index.js.map +1 -0
  349. package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/insertOperation.js +1 -0
  350. package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/insertOperation.js.map +1 -0
  351. package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/loadOperation.js +1 -0
  352. package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/loadOperation.js.map +1 -0
  353. package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/retrieveAsToolOperation.js +1 -0
  354. package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/retrieveAsToolOperation.js.map +1 -0
  355. package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/retrieveOperation.js +1 -0
  356. package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/retrieveOperation.js.map +1 -0
  357. package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/updateOperation.js +1 -0
  358. package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/updateOperation.js.map +1 -0
  359. package/dist/nodes/vector_store/shared/createVectorStoreNode/types.js +1 -0
  360. package/dist/nodes/vector_store/shared/createVectorStoreNode/types.js.map +1 -0
  361. package/dist/nodes/vector_store/shared/createVectorStoreNode/utils.js +1 -0
  362. package/dist/nodes/vector_store/shared/createVectorStoreNode/utils.js.map +1 -0
  363. package/dist/nodes/vector_store/shared/descriptions.js +1 -0
  364. package/dist/nodes/vector_store/shared/descriptions.js.map +1 -0
  365. package/dist/nodes/vector_store/shared/processDocuments.js +1 -0
  366. package/dist/nodes/vector_store/shared/processDocuments.js.map +1 -0
  367. package/dist/nodes/vendors/OpenAi/OpenAi.node.js +1 -0
  368. package/dist/nodes/vendors/OpenAi/OpenAi.node.js.map +1 -0
  369. package/dist/nodes/vendors/OpenAi/actions/assistant/create.operation.js +1 -0
  370. package/dist/nodes/vendors/OpenAi/actions/assistant/create.operation.js.map +1 -0
  371. package/dist/nodes/vendors/OpenAi/actions/assistant/deleteAssistant.operation.js +1 -0
  372. package/dist/nodes/vendors/OpenAi/actions/assistant/deleteAssistant.operation.js.map +1 -0
  373. package/dist/nodes/vendors/OpenAi/actions/assistant/index.js +1 -0
  374. package/dist/nodes/vendors/OpenAi/actions/assistant/index.js.map +1 -0
  375. package/dist/nodes/vendors/OpenAi/actions/assistant/list.operation.js +1 -0
  376. package/dist/nodes/vendors/OpenAi/actions/assistant/list.operation.js.map +1 -0
  377. package/dist/nodes/vendors/OpenAi/actions/assistant/message.operation.js +1 -0
  378. package/dist/nodes/vendors/OpenAi/actions/assistant/message.operation.js.map +1 -0
  379. package/dist/nodes/vendors/OpenAi/actions/assistant/update.operation.js +1 -0
  380. package/dist/nodes/vendors/OpenAi/actions/assistant/update.operation.js.map +1 -0
  381. package/dist/nodes/vendors/OpenAi/actions/audio/generate.operation.js +1 -0
  382. package/dist/nodes/vendors/OpenAi/actions/audio/generate.operation.js.map +1 -0
  383. package/dist/nodes/vendors/OpenAi/actions/audio/index.js +1 -0
  384. package/dist/nodes/vendors/OpenAi/actions/audio/index.js.map +1 -0
  385. package/dist/nodes/vendors/OpenAi/actions/audio/transcribe.operation.js +1 -0
  386. package/dist/nodes/vendors/OpenAi/actions/audio/transcribe.operation.js.map +1 -0
  387. package/dist/nodes/vendors/OpenAi/actions/audio/translate.operation.js +1 -0
  388. package/dist/nodes/vendors/OpenAi/actions/audio/translate.operation.js.map +1 -0
  389. package/dist/nodes/vendors/OpenAi/actions/descriptions.js +1 -0
  390. package/dist/nodes/vendors/OpenAi/actions/descriptions.js.map +1 -0
  391. package/dist/nodes/vendors/OpenAi/actions/file/deleteFile.operation.js +1 -0
  392. package/dist/nodes/vendors/OpenAi/actions/file/deleteFile.operation.js.map +1 -0
  393. package/dist/nodes/vendors/OpenAi/actions/file/index.js +1 -0
  394. package/dist/nodes/vendors/OpenAi/actions/file/index.js.map +1 -0
  395. package/dist/nodes/vendors/OpenAi/actions/file/list.operation.js +1 -0
  396. package/dist/nodes/vendors/OpenAi/actions/file/list.operation.js.map +1 -0
  397. package/dist/nodes/vendors/OpenAi/actions/file/upload.operation.js +1 -0
  398. package/dist/nodes/vendors/OpenAi/actions/file/upload.operation.js.map +1 -0
  399. package/dist/nodes/vendors/OpenAi/actions/image/analyze.operation.js +1 -0
  400. package/dist/nodes/vendors/OpenAi/actions/image/analyze.operation.js.map +1 -0
  401. package/dist/nodes/vendors/OpenAi/actions/image/generate.operation.js +1 -0
  402. package/dist/nodes/vendors/OpenAi/actions/image/generate.operation.js.map +1 -0
  403. package/dist/nodes/vendors/OpenAi/actions/image/index.js +1 -0
  404. package/dist/nodes/vendors/OpenAi/actions/image/index.js.map +1 -0
  405. package/dist/nodes/vendors/OpenAi/actions/node.type.js +1 -0
  406. package/dist/nodes/vendors/OpenAi/actions/node.type.js.map +1 -0
  407. package/dist/nodes/vendors/OpenAi/actions/router.js +1 -0
  408. package/dist/nodes/vendors/OpenAi/actions/router.js.map +1 -0
  409. package/dist/nodes/vendors/OpenAi/actions/text/classify.operation.js +1 -0
  410. package/dist/nodes/vendors/OpenAi/actions/text/classify.operation.js.map +1 -0
  411. package/dist/nodes/vendors/OpenAi/actions/text/index.js +1 -0
  412. package/dist/nodes/vendors/OpenAi/actions/text/index.js.map +1 -0
  413. package/dist/nodes/vendors/OpenAi/actions/text/message.operation.js +1 -0
  414. package/dist/nodes/vendors/OpenAi/actions/text/message.operation.js.map +1 -0
  415. package/dist/nodes/vendors/OpenAi/actions/versionDescription.js +1 -0
  416. package/dist/nodes/vendors/OpenAi/actions/versionDescription.js.map +1 -0
  417. package/dist/nodes/vendors/OpenAi/helpers/constants.js +1 -0
  418. package/dist/nodes/vendors/OpenAi/helpers/constants.js.map +1 -0
  419. package/dist/nodes/vendors/OpenAi/helpers/error-handling.js +1 -0
  420. package/dist/nodes/vendors/OpenAi/helpers/error-handling.js.map +1 -0
  421. package/dist/nodes/vendors/OpenAi/helpers/interfaces.js +1 -0
  422. package/dist/nodes/vendors/OpenAi/helpers/interfaces.js.map +1 -0
  423. package/dist/nodes/vendors/OpenAi/helpers/utils.js +1 -0
  424. package/dist/nodes/vendors/OpenAi/helpers/utils.js.map +1 -0
  425. package/dist/nodes/vendors/OpenAi/methods/index.js +1 -0
  426. package/dist/nodes/vendors/OpenAi/methods/index.js.map +1 -0
  427. package/dist/nodes/vendors/OpenAi/methods/listSearch.js +1 -0
  428. package/dist/nodes/vendors/OpenAi/methods/listSearch.js.map +1 -0
  429. package/dist/nodes/vendors/OpenAi/methods/loadOptions.js +1 -0
  430. package/dist/nodes/vendors/OpenAi/methods/loadOptions.js.map +1 -0
  431. package/dist/nodes/vendors/OpenAi/transport/index.js +1 -0
  432. package/dist/nodes/vendors/OpenAi/transport/index.js.map +1 -0
  433. package/dist/types/nodes.json +3 -0
  434. package/dist/types/types.js +1 -0
  435. package/dist/types/types.js.map +1 -0
  436. package/dist/types/zod.types.js +1 -0
  437. package/dist/types/zod.types.js.map +1 -0
  438. package/dist/utils/N8nBinaryLoader.js +1 -0
  439. package/dist/utils/N8nBinaryLoader.js.map +1 -0
  440. package/dist/utils/N8nJsonLoader.js +1 -0
  441. package/dist/utils/N8nJsonLoader.js.map +1 -0
  442. package/dist/utils/N8nTool.js +1 -0
  443. package/dist/utils/N8nTool.js.map +1 -0
  444. package/dist/utils/descriptions.js +1 -0
  445. package/dist/utils/descriptions.js.map +1 -0
  446. package/dist/utils/helpers.js +1 -0
  447. package/dist/utils/helpers.js.map +1 -0
  448. package/dist/utils/logWrapper.js +1 -0
  449. package/dist/utils/logWrapper.js.map +1 -0
  450. package/dist/utils/output_parsers/N8nItemListOutputParser.js +1 -0
  451. package/dist/utils/output_parsers/N8nItemListOutputParser.js.map +1 -0
  452. package/dist/utils/output_parsers/N8nOutputFixingParser.js +1 -0
  453. package/dist/utils/output_parsers/N8nOutputFixingParser.js.map +1 -0
  454. package/dist/utils/output_parsers/N8nOutputParser.js +1 -0
  455. package/dist/utils/output_parsers/N8nOutputParser.js.map +1 -0
  456. package/dist/utils/output_parsers/N8nStructuredOutputParser.js +1 -0
  457. package/dist/utils/output_parsers/N8nStructuredOutputParser.js.map +1 -0
  458. package/dist/utils/output_parsers/prompt.js +1 -0
  459. package/dist/utils/output_parsers/prompt.js.map +1 -0
  460. package/dist/utils/schemaParsing.js +1 -0
  461. package/dist/utils/schemaParsing.js.map +1 -0
  462. package/dist/utils/sharedFields.js +1 -0
  463. package/dist/utils/sharedFields.js.map +1 -0
  464. package/dist/utils/tracing.js +1 -0
  465. package/dist/utils/tracing.js.map +1 -0
  466. package/package.json +9 -6
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../nodes/tools/ToolWorkflow/v2/methods/index.ts"],"sourcesContent":["export * as localResourceMapping from './localResourceMapping';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,2BAAsC;","names":[]}
@@ -42,3 +42,4 @@ async function loadSubWorkflowInputs() {
42
42
  0 && (module.exports = {
43
43
  loadSubWorkflowInputs
44
44
  });
45
+ //# sourceMappingURL=localResourceMapping.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../nodes/tools/ToolWorkflow/v2/methods/localResourceMapping.ts"],"sourcesContent":["import { loadWorkflowInputMappings } from 'n8n-nodes-base/dist/utils/workflowInputsResourceMapping/GenericFunctions';\nimport type { ILocalLoadOptionsFunctions, ResourceMapperFields } from 'n8n-workflow';\n\nexport async function loadSubWorkflowInputs(\n\tthis: ILocalLoadOptionsFunctions,\n): Promise<ResourceMapperFields> {\n\tconst { fields, subworkflowInfo, dataMode } = await loadWorkflowInputMappings.bind(this)();\n\tlet emptyFieldsNotice: string | undefined;\n\tif (fields.length === 0) {\n\t\tconst subworkflowLink = subworkflowInfo?.id\n\t\t\t? `<a href=\"/workflow/${subworkflowInfo?.id}\" target=\"_blank\">sub-workflow’s trigger</a>`\n\t\t\t: 'sub-workflow’s trigger';\n\n\t\tswitch (dataMode) {\n\t\t\tcase 'passthrough':\n\t\t\t\temptyFieldsNotice = `This sub-workflow is set up to receive all input data, without specific inputs the Agent will not be able to pass data to this tool. You can define specific inputs in the ${subworkflowLink}.`;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\temptyFieldsNotice = `This sub-workflow will not receive any input when called by your AI node. Define your expected input in the ${subworkflowLink}.`;\n\t\t\t\tbreak;\n\t\t}\n\t}\n\treturn { fields, emptyFieldsNotice };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,8BAA0C;AAG1C,eAAsB,wBAEW;AAChC,QAAM,EAAE,QAAQ,iBAAiB,SAAS,IAAI,MAAM,kDAA0B,KAAK,IAAI,EAAE;AACzF,MAAI;AACJ,MAAI,OAAO,WAAW,GAAG;AACxB,UAAM,kBAAkB,iBAAiB,KACtC,sBAAsB,iBAAiB,EAAE,sDACzC;AAEH,YAAQ,UAAU;AAAA,MACjB,KAAK;AACJ,4BAAoB,8KAA8K,eAAe;AACjN;AAAA,MACD;AACC,4BAAoB,+GAA+G,eAAe;AAClJ;AAAA,IACF;AAAA,EACD;AACA,SAAO,EAAE,QAAQ,kBAAkB;AACpC;","names":[]}
@@ -273,3 +273,4 @@ class WorkflowToolService {
273
273
  0 && (module.exports = {
274
274
  WorkflowToolService
275
275
  });
276
+ //# sourceMappingURL=WorkflowToolService.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../nodes/tools/ToolWorkflow/v2/utils/WorkflowToolService.ts"],"sourcesContent":["import type { CallbackManagerForToolRun } from '@langchain/core/callbacks/manager';\nimport { DynamicStructuredTool, DynamicTool } from '@langchain/core/tools';\nimport { isArray, isObject } from 'lodash';\nimport type { SetField, SetNodeOptions } from 'n8n-nodes-base/dist/nodes/Set/v2/helpers/interfaces';\nimport * as manual from 'n8n-nodes-base/dist/nodes/Set/v2/manual.mode';\nimport { getCurrentWorkflowInputData } from 'n8n-nodes-base/dist/utils/workflowInputsResourceMapping/GenericFunctions';\nimport type {\n\tExecuteWorkflowData,\n\tExecutionError,\n\tFromAIArgument,\n\tIDataObject,\n\tIExecuteWorkflowInfo,\n\tINodeExecutionData,\n\tINodeParameterResourceLocator,\n\tISupplyDataFunctions,\n\tITaskMetadata,\n\tIWorkflowBase,\n\tIWorkflowDataProxyData,\n\tResourceMapperValue,\n} from 'n8n-workflow';\nimport {\n\tgenerateZodSchema,\n\tjsonParse,\n\tNodeConnectionTypes,\n\tNodeOperationError,\n\tparseErrorMetadata,\n\ttraverseNodeParameters,\n} from 'n8n-workflow';\nimport { z } from 'zod';\n\nfunction isNodeExecutionData(data: unknown): data is INodeExecutionData[] {\n\treturn isArray(data) && Boolean(data.length) && isObject(data[0]) && 'json' in data[0];\n}\n\n/**\n\tMain class for creating the Workflow tool\n\tProcesses the node parameters and creates AI Agent tool capable of executing n8n workflows\n*/\nexport class WorkflowToolService {\n\t// Determines if we should use input schema when creating the tool\n\tprivate useSchema: boolean;\n\n\t// Sub-workflow id, pulled from referenced sub-workflow\n\tprivate subWorkflowId: string | undefined;\n\n\t// Sub-workflow execution id, will be set after the sub-workflow is executed\n\tprivate subExecutionId: string | undefined;\n\n\tprivate returnAllItems: boolean = false;\n\n\tconstructor(\n\t\tprivate baseContext: ISupplyDataFunctions,\n\t\toptions?: { returnAllItems: boolean },\n\t) {\n\t\tconst subWorkflowInputs = this.baseContext.getNode().parameters\n\t\t\t.workflowInputs as ResourceMapperValue;\n\t\tthis.useSchema = (subWorkflowInputs?.schema ?? []).length > 0;\n\t\tthis.returnAllItems = options?.returnAllItems ?? false;\n\t}\n\n\t// Creates the tool based on the provided parameters\n\tasync createTool({\n\t\tname,\n\t\tdescription,\n\t\titemIndex,\n\t}: {\n\t\tname: string;\n\t\tdescription: string;\n\t\titemIndex: number;\n\t}): Promise<DynamicTool | DynamicStructuredTool> {\n\t\tlet runIndex = 0;\n\t\t// Handler for the tool execution, will be called when the tool is executed\n\t\t// This function will execute the sub-workflow and return the response\n\t\tconst toolHandler = async (\n\t\t\tquery: string | IDataObject,\n\t\t\trunManager?: CallbackManagerForToolRun,\n\t\t): Promise<IDataObject | IDataObject[] | string> => {\n\t\t\tconst localRunIndex = runIndex++;\n\t\t\t// We need to clone the context here to handle runIndex correctly\n\t\t\t// Otherwise the runIndex will be shared between different executions\n\t\t\t// Causing incorrect data to be passed to the sub-workflow and via $fromAI\n\t\t\tconst context = this.baseContext.cloneWith({\n\t\t\t\trunIndex: localRunIndex,\n\t\t\t\tinputData: [[{ json: { query } }]],\n\t\t\t});\n\n\t\t\ttry {\n\t\t\t\tconst response = await this.runFunction(context, query, itemIndex, runManager);\n\n\t\t\t\tconst processedResponse = this.handleToolResponse(response);\n\n\t\t\t\tlet responseData: INodeExecutionData[];\n\t\t\t\tif (isNodeExecutionData(response)) {\n\t\t\t\t\tresponseData = response;\n\t\t\t\t} else {\n\t\t\t\t\tconst reParsedData = jsonParse<IDataObject>(processedResponse, {\n\t\t\t\t\t\tfallbackValue: { response: processedResponse },\n\t\t\t\t\t});\n\n\t\t\t\t\tresponseData = [{ json: reParsedData }];\n\t\t\t\t}\n\n\t\t\t\t// Once the sub-workflow is executed, add the output data to the context\n\t\t\t\t// This will be used to link the sub-workflow execution in the parent workflow\n\t\t\t\tlet metadata: ITaskMetadata | undefined;\n\t\t\t\tif (this.subExecutionId && this.subWorkflowId) {\n\t\t\t\t\tmetadata = {\n\t\t\t\t\t\tsubExecution: {\n\t\t\t\t\t\t\texecutionId: this.subExecutionId,\n\t\t\t\t\t\t\tworkflowId: this.subWorkflowId,\n\t\t\t\t\t\t},\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\tvoid context.addOutputData(\n\t\t\t\t\tNodeConnectionTypes.AiTool,\n\t\t\t\t\tlocalRunIndex,\n\t\t\t\t\t[responseData],\n\t\t\t\t\tmetadata,\n\t\t\t\t);\n\n\t\t\t\treturn processedResponse;\n\t\t\t} catch (error) {\n\t\t\t\tconst executionError = error as ExecutionError;\n\t\t\t\tconst errorResponse = `There was an error: \"${executionError.message}\"`;\n\n\t\t\t\tconst metadata = parseErrorMetadata(error);\n\t\t\t\tvoid context.addOutputData(\n\t\t\t\t\tNodeConnectionTypes.AiTool,\n\t\t\t\t\tlocalRunIndex,\n\t\t\t\t\texecutionError,\n\t\t\t\t\tmetadata,\n\t\t\t\t);\n\t\t\t\treturn errorResponse;\n\t\t\t}\n\t\t};\n\n\t\t// Create structured tool if input schema is provided\n\t\treturn this.useSchema\n\t\t\t? await this.createStructuredTool(name, description, toolHandler)\n\t\t\t: new DynamicTool({ name, description, func: toolHandler });\n\t}\n\n\tprivate handleToolResponse(response: unknown): string {\n\t\tif (typeof response === 'number') {\n\t\t\treturn response.toString();\n\t\t}\n\n\t\tif (isNodeExecutionData(response)) {\n\t\t\treturn JSON.stringify(\n\t\t\t\tresponse.map((item) => item.json),\n\t\t\t\tnull,\n\t\t\t\t2,\n\t\t\t);\n\t\t}\n\n\t\tif (isObject(response)) {\n\t\t\treturn JSON.stringify(response, null, 2);\n\t\t}\n\n\t\tif (typeof response !== 'string') {\n\t\t\tthrow new NodeOperationError(this.baseContext.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}\n\n\t\treturn response;\n\t}\n\n\t/**\n\t * Executes specified sub-workflow with provided inputs\n\t */\n\tprivate async executeSubWorkflow(\n\t\tcontext: ISupplyDataFunctions,\n\t\tworkflowInfo: IExecuteWorkflowInfo,\n\t\titems: INodeExecutionData[],\n\t\tworkflowProxy: IWorkflowDataProxyData,\n\t\trunManager?: CallbackManagerForToolRun,\n\t): Promise<{ response: string | IDataObject | INodeExecutionData[]; subExecutionId: string }> {\n\t\tlet receivedData: ExecuteWorkflowData;\n\t\ttry {\n\t\t\treceivedData = await context.executeWorkflow(workflowInfo, items, runManager?.getChild(), {\n\t\t\t\tparentExecution: {\n\t\t\t\t\texecutionId: workflowProxy.$execution.id,\n\t\t\t\t\tworkflowId: workflowProxy.$workflow.id,\n\t\t\t\t},\n\t\t\t});\n\t\t\t// Set sub-workflow execution id so it can be used in other places\n\t\t\tthis.subExecutionId = receivedData.executionId;\n\t\t} catch (error) {\n\t\t\tthrow new NodeOperationError(context.getNode(), error as Error);\n\t\t}\n\n\t\tlet response: IDataObject | INodeExecutionData[] | undefined;\n\t\tif (this.returnAllItems) {\n\t\t\tresponse = receivedData?.data?.[0]?.length ? receivedData.data[0] : undefined;\n\t\t} else {\n\t\t\tresponse = receivedData?.data?.[0]?.[0]?.json;\n\t\t}\n\t\tif (response === undefined) {\n\t\t\tthrow new NodeOperationError(\n\t\t\t\tcontext.getNode(),\n\t\t\t\t'There was an error: \"The workflow did not return a response\"',\n\t\t\t);\n\t\t}\n\n\t\treturn { response, subExecutionId: receivedData.executionId };\n\t}\n\n\t/**\n\t * Gets the sub-workflow info based on the source and executes it.\n\t * This function will be called as part of the tool execution (from the toolHandler)\n\t */\n\tprivate async runFunction(\n\t\tcontext: ISupplyDataFunctions,\n\t\tquery: string | IDataObject,\n\t\titemIndex: number,\n\t\trunManager?: CallbackManagerForToolRun,\n\t): Promise<string | IDataObject | INodeExecutionData[]> {\n\t\tconst source = context.getNodeParameter('source', itemIndex) as string;\n\t\tconst workflowProxy = context.getWorkflowDataProxy(0);\n\n\t\tconst { workflowInfo } = await this.getSubWorkflowInfo(\n\t\t\tcontext,\n\t\t\tsource,\n\t\t\titemIndex,\n\t\t\tworkflowProxy,\n\t\t);\n\t\tconst rawData = this.prepareRawData(context, query, itemIndex);\n\t\tconst items = await this.prepareWorkflowItems(context, query, itemIndex, rawData);\n\n\t\tthis.subWorkflowId = workflowInfo.id;\n\n\t\tconst { response } = await this.executeSubWorkflow(\n\t\t\tcontext,\n\t\t\tworkflowInfo,\n\t\t\titems,\n\t\t\tworkflowProxy,\n\t\t\trunManager,\n\t\t);\n\t\treturn response;\n\t}\n\n\t/**\n\t * Gets the sub-workflow info based on the source (database or parameter)\n\t */\n\tprivate async getSubWorkflowInfo(\n\t\tcontext: ISupplyDataFunctions,\n\t\tsource: string,\n\t\titemIndex: number,\n\t\tworkflowProxy: IWorkflowDataProxyData,\n\t): Promise<{\n\t\tworkflowInfo: IExecuteWorkflowInfo;\n\t\tsubWorkflowId: string;\n\t}> {\n\t\tconst workflowInfo: IExecuteWorkflowInfo = {};\n\t\tlet subWorkflowId: string;\n\n\t\tif (source === 'database') {\n\t\t\tconst { value } = context.getNodeParameter(\n\t\t\t\t'workflowId',\n\t\t\t\titemIndex,\n\t\t\t\t{},\n\t\t\t) as INodeParameterResourceLocator;\n\t\t\tworkflowInfo.id = value as string;\n\t\t\tsubWorkflowId = workflowInfo.id;\n\t\t} else if (source === 'parameter') {\n\t\t\tconst workflowJson = context.getNodeParameter('workflowJson', itemIndex) as string;\n\t\t\ttry {\n\t\t\t\tworkflowInfo.code = JSON.parse(workflowJson) as IWorkflowBase;\n\t\t\t\t// subworkflow is same as parent workflow\n\t\t\t\tsubWorkflowId = workflowProxy.$workflow.id;\n\t\t\t} catch (error) {\n\t\t\t\tthrow new NodeOperationError(\n\t\t\t\t\tcontext.getNode(),\n\t\t\t\t\t`The provided workflow is not valid JSON: \"${(error as Error).message}\"`,\n\t\t\t\t\t{ itemIndex },\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\treturn { workflowInfo, subWorkflowId: subWorkflowId! };\n\t}\n\n\tprivate prepareRawData(\n\t\tcontext: ISupplyDataFunctions,\n\t\tquery: string | IDataObject,\n\t\titemIndex: number,\n\t): IDataObject {\n\t\tconst rawData: IDataObject = { query };\n\t\tconst workflowFieldsJson = context.getNodeParameter('fields.values', itemIndex, [], {\n\t\t\trawExpressions: true,\n\t\t}) as SetField[];\n\n\t\t// Copied from Set Node v2\n\t\tfor (const entry of workflowFieldsJson) {\n\t\t\tif (entry.type === 'objectValue' && (entry.objectValue as string).startsWith('=')) {\n\t\t\t\trawData[entry.name] = (entry.objectValue as string).replace(/^=+/, '');\n\t\t\t}\n\t\t}\n\n\t\treturn rawData;\n\t}\n\n\t/**\n\t * Prepares the sub-workflow items for execution\n\t */\n\tprivate async prepareWorkflowItems(\n\t\tcontext: ISupplyDataFunctions,\n\t\tquery: string | IDataObject,\n\t\titemIndex: number,\n\t\trawData: IDataObject,\n\t): Promise<INodeExecutionData[]> {\n\t\tconst options: SetNodeOptions = { include: 'all' };\n\t\tlet jsonData = typeof query === 'object' ? query : { query };\n\n\t\tif (this.useSchema) {\n\t\t\tconst currentWorkflowInputs = getCurrentWorkflowInputData.call(context);\n\t\t\tjsonData = currentWorkflowInputs[itemIndex].json;\n\t\t}\n\n\t\tconst newItem = await manual.execute.call(\n\t\t\tcontext,\n\t\t\t{ json: jsonData },\n\t\t\titemIndex,\n\t\t\toptions,\n\t\t\trawData,\n\t\t\tcontext.getNode(),\n\t\t);\n\n\t\treturn [newItem] as INodeExecutionData[];\n\t}\n\n\t/**\n\t * Create structured tool by parsing the sub-workflow input schema\n\t */\n\tprivate async createStructuredTool(\n\t\tname: string,\n\t\tdescription: string,\n\t\tfunc: (\n\t\t\tquery: string | IDataObject,\n\t\t\trunManager?: CallbackManagerForToolRun,\n\t\t) => Promise<string | IDataObject | IDataObject[]>,\n\t): Promise<DynamicStructuredTool | DynamicTool> {\n\t\tconst collectedArguments = await this.extractFromAIParameters();\n\n\t\t// If there are no `fromAI` arguments, fallback to creating a simple tool\n\t\tif (collectedArguments.length === 0) {\n\t\t\treturn new DynamicTool({ name, description, func });\n\t\t}\n\n\t\t// Otherwise, prepare Zod schema and create a structured tool\n\t\tconst schema = this.createZodSchema(collectedArguments);\n\t\treturn new DynamicStructuredTool({ schema, name, description, func });\n\t}\n\n\tprivate async extractFromAIParameters(): Promise<FromAIArgument[]> {\n\t\tconst collectedArguments: FromAIArgument[] = [];\n\t\ttraverseNodeParameters(this.baseContext.getNode().parameters, collectedArguments);\n\n\t\tconst uniqueArgsMap = new Map<string, FromAIArgument>();\n\t\tfor (const arg of collectedArguments) {\n\t\t\tuniqueArgsMap.set(arg.key, arg);\n\t\t}\n\n\t\treturn Array.from(uniqueArgsMap.values());\n\t}\n\n\tprivate createZodSchema(args: FromAIArgument[]): z.ZodObject<any> {\n\t\tconst schemaObj = args.reduce((acc: Record<string, z.ZodTypeAny>, placeholder) => {\n\t\t\tacc[placeholder.key] = generateZodSchema(placeholder);\n\t\t\treturn acc;\n\t\t}, {});\n\n\t\treturn z.object(schemaObj).required();\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,mBAAmD;AACnD,oBAAkC;AAElC,aAAwB;AACxB,8BAA4C;AAe5C,0BAOO;AACP,iBAAkB;AA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G9D,QAAI,mBAAmB,WAAW,GAAG;AACpC,aAAO,IAAI,yBAAY,EAAE,MAAM,aAAa,KAAK,CAAC;AAAA,IACnD;AAGA,UAAM,SAAS,KAAK,gBAAgB,kBAAkB;AACtD,WAAO,IAAI,mCAAsB,EAAE,QAAQ,MAAM,aAAa,KAAK,CAAC;AAAA,EACrE;AAAA,EAEA,MAAc,0BAAqD;AAClE,UAAM,qBAAuC,CAAC;AAC9C,oDAAuB,KAAK,YAAY,QAAQ,EAAE,YAAY,kBAAkB;AAEhF,UAAM,gBAAgB,oBAAI,IAA4B;AACtD,eAAW,OAAO,oBAAoB;AACrC,oBAAc,IAAI,IAAI,KAAK,GAAG;AAAA,IAC/B;AAEA,WAAO,MAAM,KAAK,cAAc,OAAO,CAAC;AAAA,EACzC;AAAA,EAEQ,gBAAgB,MAA0C;AACjE,UAAM,YAAY,KAAK,OAAO,CAAC,KAAmC,gBAAgB;AACjF,UAAI,YAAY,GAAG,QAAI,uCAAkB,WAAW;AACpD,aAAO;AAAA,IACR,GAAG,CAAC,CAAC;AAEL,WAAO,aAAE,OAAO,SAAS,EAAE,SAAS;AAAA,EACrC;AACD;","names":[]}
@@ -164,3 +164,4 @@ const versionDescription = {
164
164
  0 && (module.exports = {
165
165
  versionDescription
166
166
  });
167
+ //# sourceMappingURL=versionDescription.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../nodes/tools/ToolWorkflow/v2/versionDescription.ts"],"sourcesContent":["/* eslint-disable n8n-nodes-base/node-filename-against-convention */\n/* eslint-disable n8n-nodes-base/node-dirname-against-convention */\nimport { NodeConnectionTypes, type INodeTypeDescription } from 'n8n-workflow';\n\nimport { getConnectionHintNoticeField } from '../../../../utils/sharedFields';\n\nexport const versionDescription: INodeTypeDescription = {\n\tdisplayName: 'Call n8n Workflow Tool',\n\tname: 'toolWorkflow',\n\tgroup: ['transform'],\n\tdescription: 'Uses another n8n workflow as a tool. Allows packaging any n8n node(s) as a tool.',\n\tdefaults: {\n\t\tname: 'Call n8n Workflow Tool',\n\t},\n\tversion: [2, 2.1],\n\tinputs: [],\n\toutputs: [NodeConnectionTypes.AiTool],\n\toutputNames: ['Tool'],\n\tproperties: [\n\t\tgetConnectionHintNoticeField([NodeConnectionTypes.AiAgent]),\n\t\t{\n\t\t\tdisplayName:\n\t\t\t\t'See an example of a workflow to suggest meeting slots using AI <a href=\"/templates/1953\" target=\"_blank\">here</a>.',\n\t\t\tname: 'noticeTemplateExample',\n\t\t\ttype: 'notice',\n\t\t\tdefault: '',\n\t\t},\n\t\t{\n\t\t\tdisplayName: 'Name',\n\t\t\tname: 'name',\n\t\t\ttype: 'string',\n\t\t\tdefault: '',\n\t\t\tplaceholder: 'e.g. My_Color_Tool',\n\t\t\tvalidateType: 'string-alphanumeric',\n\t\t\tdescription:\n\t\t\t\t'The name of the function to be called, could contain letters, numbers, and underscores only',\n\t\t},\n\t\t{\n\t\t\tdisplayName: 'Description',\n\t\t\tname: 'description',\n\t\t\ttype: 'string',\n\t\t\tdefault: '',\n\t\t\tplaceholder:\n\t\t\t\t'Call this tool to get a random color. The input should be a string with comma separated names of colors to exclude.',\n\t\t\ttypeOptions: {\n\t\t\t\trows: 3,\n\t\t\t},\n\t\t},\n\n\t\t{\n\t\t\tdisplayName:\n\t\t\t\t'This tool will call the workflow you define below, and look in the last node for the response. The workflow needs to start with an Execute Workflow trigger',\n\t\t\tname: 'executeNotice',\n\t\t\ttype: 'notice',\n\t\t\tdefault: '',\n\t\t},\n\n\t\t{\n\t\t\tdisplayName: 'Source',\n\t\t\tname: 'source',\n\t\t\ttype: 'options',\n\t\t\toptions: [\n\t\t\t\t{\n\t\t\t\t\tname: 'Database',\n\t\t\t\t\tvalue: 'database',\n\t\t\t\t\tdescription: 'Load the workflow from the database by ID',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: 'Define Below',\n\t\t\t\t\tvalue: 'parameter',\n\t\t\t\t\tdescription: 'Pass the JSON code of a workflow',\n\t\t\t\t},\n\t\t\t],\n\t\t\tdefault: 'database',\n\t\t\tdescription: 'Where to get the workflow to execute from',\n\t\t},\n\n\t\t// ----------------------------------\n\t\t// source:database\n\t\t// ----------------------------------\n\t\t{\n\t\t\tdisplayName: 'Workflow',\n\t\t\tname: 'workflowId',\n\t\t\ttype: 'workflowSelector',\n\t\t\tdisplayOptions: {\n\t\t\t\tshow: {\n\t\t\t\t\tsource: ['database'],\n\t\t\t\t},\n\t\t\t},\n\t\t\tdefault: '',\n\t\t\trequired: true,\n\t\t},\n\t\t// -----------------------------------------------\n\t\t// Resource mapper for workflow inputs\n\t\t// -----------------------------------------------\n\t\t{\n\t\t\tdisplayName: 'Workflow Inputs',\n\t\t\tname: 'workflowInputs',\n\t\t\ttype: 'resourceMapper',\n\t\t\tnoDataExpression: true,\n\t\t\tdefault: {\n\t\t\t\tmappingMode: 'defineBelow',\n\t\t\t\tvalue: null,\n\t\t\t},\n\t\t\trequired: true,\n\t\t\ttypeOptions: {\n\t\t\t\tloadOptionsDependsOn: ['workflowId.value'],\n\t\t\t\tresourceMapper: {\n\t\t\t\t\tlocalResourceMapperMethod: 'loadSubWorkflowInputs',\n\t\t\t\t\tvaluesLabel: 'Workflow Inputs',\n\t\t\t\t\tmode: 'map',\n\t\t\t\t\tfieldWords: {\n\t\t\t\t\t\tsingular: 'workflow input',\n\t\t\t\t\t\tplural: 'workflow inputs',\n\t\t\t\t\t},\n\t\t\t\t\taddAllFields: true,\n\t\t\t\t\tmultiKeyMatch: false,\n\t\t\t\t\tsupportAutoMap: false,\n\t\t\t\t},\n\t\t\t},\n\t\t\tdisplayOptions: {\n\t\t\t\tshow: {\n\t\t\t\t\tsource: ['database'],\n\t\t\t\t},\n\t\t\t\thide: {\n\t\t\t\t\tworkflowId: [''],\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\t// ----------------------------------\n\t\t// source:parameter\n\t\t// ----------------------------------\n\t\t{\n\t\t\tdisplayName: 'Workflow JSON',\n\t\t\tname: 'workflowJson',\n\t\t\ttype: 'json',\n\t\t\ttypeOptions: {\n\t\t\t\trows: 10,\n\t\t\t},\n\t\t\tdisplayOptions: {\n\t\t\t\tshow: {\n\t\t\t\t\tsource: ['parameter'],\n\t\t\t\t},\n\t\t\t},\n\t\t\tdefault: '\\n\\n\\n\\n\\n\\n\\n\\n\\n',\n\t\t\trequired: true,\n\t\t\tdescription: 'The workflow JSON code to execute',\n\t\t},\n\t],\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,0BAA+D;AAE/D,0BAA6C;AAEtC,MAAM,qBAA2C;AAAA,EACvD,aAAa;AAAA,EACb,MAAM;AAAA,EACN,OAAO,CAAC,WAAW;AAAA,EACnB,aAAa;AAAA,EACb,UAAU;AAAA,IACT,MAAM;AAAA,EACP;AAAA,EACA,SAAS,CAAC,GAAG,GAAG;AAAA,EAChB,QAAQ,CAAC;AAAA,EACT,SAAS,CAAC,wCAAoB,MAAM;AAAA,EACpC,aAAa,CAAC,MAAM;AAAA,EACpB,YAAY;AAAA,QACX,kDAA6B,CAAC,wCAAoB,OAAO,CAAC;AAAA,IAC1D;AAAA,MACC,aACC;AAAA,MACD,MAAM;AAAA,MACN,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA,IACA;AAAA,MACC,aAAa;AAAA,MACb,MAAM;AAAA,MACN,MAAM;AAAA,MACN,SAAS;AAAA,MACT,aAAa;AAAA,MACb,cAAc;AAAA,MACd,aACC;AAAA,IACF;AAAA,IACA;AAAA,MACC,aAAa;AAAA,MACb,MAAM;AAAA,MACN,MAAM;AAAA,MACN,SAAS;AAAA,MACT,aACC;AAAA,MACD,aAAa;AAAA,QACZ,MAAM;AAAA,MACP;AAAA,IACD;AAAA,IAEA;AAAA,MACC,aACC;AAAA,MACD,MAAM;AAAA,MACN,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA,IAEA;AAAA,MACC,aAAa;AAAA,MACb,MAAM;AAAA,MACN,MAAM;AAA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B;AAAA,MACD;AAAA,MACA,SAAS;AAAA,MACT,UAAU;AAAA,MACV,aAAa;AAAA,IACd;AAAA,EACD;AACD;","names":[]}
@@ -553,3 +553,4 @@ ${import_constants.cssVariables}
553
553
  0 && (module.exports = {
554
554
  ChatTrigger
555
555
  });
556
+ //# sourceMappingURL=ChatTrigger.node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../nodes/trigger/ChatTrigger/ChatTrigger.node.ts"],"sourcesContent":["import type { BaseChatMemory } from '@langchain/community/memory/chat_memory';\nimport { pick } from 'lodash';\nimport { Node, NodeConnectionTypes } from 'n8n-workflow';\nimport type {\n\tIDataObject,\n\tIWebhookFunctions,\n\tIWebhookResponseData,\n\tINodeTypeDescription,\n\tMultiPartFormData,\n\tINodeExecutionData,\n\tIBinaryData,\n\tINodeProperties,\n} from 'n8n-workflow';\n\nimport { cssVariables } from './constants';\nimport { validateAuth } from './GenericFunctions';\nimport { createPage } from './templates';\nimport type { LoadPreviousSessionChatOption } from './types';\n\nconst CHAT_TRIGGER_PATH_IDENTIFIER = 'chat';\nconst allowFileUploadsOption: INodeProperties = {\n\tdisplayName: 'Allow File Uploads',\n\tname: 'allowFileUploads',\n\ttype: 'boolean',\n\tdefault: false,\n\tdescription: 'Whether to allow file uploads in the chat',\n};\nconst allowedFileMimeTypeOption: INodeProperties = {\n\tdisplayName: 'Allowed File Mime Types',\n\tname: 'allowedFilesMimeTypes',\n\ttype: 'string',\n\tdefault: '*',\n\tplaceholder: 'e.g. image/*, text/*, application/pdf',\n\tdescription:\n\t\t'Allowed file types for upload. Comma-separated list of <a href=\"https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types\" target=\"_blank\">MIME types</a>.',\n};\n\nexport class ChatTrigger extends Node {\n\tdescription: INodeTypeDescription = {\n\t\tdisplayName: 'Chat Trigger',\n\t\tname: 'chatTrigger',\n\t\ticon: 'fa:comments',\n\t\ticonColor: 'black',\n\t\tgroup: ['trigger'],\n\t\tversion: [1, 1.1],\n\t\tdescription: 'Runs the workflow when an n8n generated webchat is submitted',\n\t\tdefaults: {\n\t\t\tname: 'When chat message received',\n\t\t},\n\t\tcodex: {\n\t\t\tcategories: ['Core Nodes'],\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/core-nodes/n8n-nodes-langchain.chattrigger/',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t},\n\t\t},\n\t\tmaxNodes: 1,\n\t\tinputs: `={{ (() => {\n\t\t\tif (!['hostedChat', 'webhook'].includes($parameter.mode)) {\n\t\t\t\treturn [];\n\t\t\t}\n\t\t\tif ($parameter.options?.loadPreviousSession !== 'memory') {\n\t\t\t\treturn [];\n\t\t\t}\n\n\t\t\treturn [\n\t\t\t\t{\n\t\t\t\t\tdisplayName: 'Memory',\n\t\t\t\t\tmaxConnections: 1,\n\t\t\t\t\ttype: '${NodeConnectionTypes.AiMemory}',\n\t\t\t\t\trequired: true,\n\t\t\t\t}\n\t\t\t];\n\t\t })() }}`,\n\t\toutputs: [NodeConnectionTypes.Main],\n\t\tcredentials: [\n\t\t\t{\n\t\t\t\t// eslint-disable-next-line n8n-nodes-base/node-class-description-credentials-name-unsuffixed\n\t\t\t\tname: 'httpBasicAuth',\n\t\t\t\trequired: true,\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\tauthentication: ['basicAuth'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t],\n\t\twebhooks: [\n\t\t\t{\n\t\t\t\tname: 'setup',\n\t\t\t\thttpMethod: 'GET',\n\t\t\t\tresponseMode: 'onReceived',\n\t\t\t\tpath: CHAT_TRIGGER_PATH_IDENTIFIER,\n\t\t\t\tndvHideUrl: true,\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: 'default',\n\t\t\t\thttpMethod: 'POST',\n\t\t\t\tresponseMode: '={{$parameter.options?.[\"responseMode\"] || \"lastNode\" }}',\n\t\t\t\tpath: CHAT_TRIGGER_PATH_IDENTIFIER,\n\t\t\t\tndvHideMethod: true,\n\t\t\t\tndvHideUrl: '={{ !$parameter.public }}',\n\t\t\t},\n\t\t],\n\t\teventTriggerDescription: 'Waiting for you to submit the chat',\n\t\tactivationMessage: 'You can now make calls to your production chat URL.',\n\t\ttriggerPanel: false,\n\t\tproperties: [\n\t\t\t/**\n\t\t\t * @note If we change this property, also update it in ChatEmbedModal.vue\n\t\t\t */\n\t\t\t{\n\t\t\t\tdisplayName: 'Make Chat Publicly Available',\n\t\t\t\tname: 'public',\n\t\t\t\ttype: 'boolean',\n\t\t\t\tdefault: false,\n\t\t\t\tdescription:\n\t\t\t\t\t'Whether the chat should be publicly available or only accessible through the manual chat interface',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Mode',\n\t\t\t\tname: 'mode',\n\t\t\t\ttype: 'options',\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Hosted Chat',\n\t\t\t\t\t\tvalue: 'hostedChat',\n\t\t\t\t\t\tdescription: 'Chat on a page served by n8n',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Embedded Chat',\n\t\t\t\t\t\tvalue: 'webhook',\n\t\t\t\t\t\tdescription: 'Chat through a widget embedded in another page, or by calling a webhook',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\tdefault: 'hostedChat',\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\tpublic: [true],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName:\n\t\t\t\t\t'Chat will be live at the URL above once you activate this workflow. Live executions will show up in the ‘executions’ tab',\n\t\t\t\tname: 'hostedChatNotice',\n\t\t\t\ttype: 'notice',\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\tmode: ['hostedChat'],\n\t\t\t\t\t\tpublic: [true],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tdefault: '',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName:\n\t\t\t\t\t'Follow the instructions <a href=\"https://www.npmjs.com/package/@n8n/chat\" target=\"_blank\">here</a> to embed chat in a webpage (or just call the webhook URL at the top of this section). Chat will be live once you activate this workflow',\n\t\t\t\tname: 'embeddedChatNotice',\n\t\t\t\ttype: 'notice',\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\tmode: ['webhook'],\n\t\t\t\t\t\tpublic: [true],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tdefault: '',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Authentication',\n\t\t\t\tname: 'authentication',\n\t\t\t\ttype: 'options',\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\tpublic: [true],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Basic Auth',\n\t\t\t\t\t\tvalue: 'basicAuth',\n\t\t\t\t\t\tdescription: 'Simple username and password (the same one for all users)',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t// eslint-disable-next-line n8n-nodes-base/node-param-display-name-miscased\n\t\t\t\t\t\tname: 'n8n User Auth',\n\t\t\t\t\t\tvalue: 'n8nUserAuth',\n\t\t\t\t\t\tdescription: 'Require user to be logged in with their n8n account',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'None',\n\t\t\t\t\t\tvalue: 'none',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\tdefault: 'none',\n\t\t\t\tdescription: 'The way to authenticate',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Initial Message(s)',\n\t\t\t\tname: 'initialMessages',\n\t\t\t\ttype: 'string',\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\tmode: ['hostedChat'],\n\t\t\t\t\t\tpublic: [true],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\ttypeOptions: {\n\t\t\t\t\trows: 3,\n\t\t\t\t},\n\t\t\t\tdefault: 'Hi there! 👋\\nMy name is Nathan. How can I assist you today?',\n\t\t\t\tdescription: 'Default messages shown at the start of the chat, one per line',\n\t\t\t},\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\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\tpublic: [false],\n\t\t\t\t\t\t'@version': [{ _cnd: { gte: 1.1 } }],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tplaceholder: 'Add Field',\n\t\t\t\tdefault: {},\n\t\t\t\toptions: [allowFileUploadsOption, allowedFileMimeTypeOption],\n\t\t\t},\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\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\tmode: ['hostedChat', 'webhook'],\n\t\t\t\t\t\tpublic: [true],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tplaceholder: 'Add Field',\n\t\t\t\tdefault: {},\n\t\t\t\toptions: [\n\t\t\t\t\t// CORS parameters are only valid for when chat is used in hosted or webhook mode\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Allowed Origins (CORS)',\n\t\t\t\t\t\tname: 'allowedOrigins',\n\t\t\t\t\t\ttype: 'string',\n\t\t\t\t\t\tdefault: '*',\n\t\t\t\t\t\tdescription:\n\t\t\t\t\t\t\t'Comma-separated list of URLs allowed for cross-origin non-preflight requests. Use * (default) to allow all origins.',\n\t\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\t\t'/mode': ['hostedChat', 'webhook'],\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\t{\n\t\t\t\t\t\t...allowFileUploadsOption,\n\t\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\t\t'/mode': ['hostedChat'],\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\t{\n\t\t\t\t\t\t...allowedFileMimeTypeOption,\n\t\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\t\t'/mode': ['hostedChat'],\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\t{\n\t\t\t\t\t\tdisplayName: 'Input Placeholder',\n\t\t\t\t\t\tname: 'inputPlaceholder',\n\t\t\t\t\t\ttype: 'string',\n\t\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\t\t'/mode': ['hostedChat'],\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\tdefault: 'Type your question..',\n\t\t\t\t\t\tplaceholder: 'e.g. Type your message here',\n\t\t\t\t\t\tdescription: 'Shown as placeholder text in the chat input field',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Load Previous Session',\n\t\t\t\t\t\tname: 'loadPreviousSession',\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: 'Off',\n\t\t\t\t\t\t\t\tvalue: 'notSupported',\n\t\t\t\t\t\t\t\tdescription: 'Loading messages of previous session is turned off',\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: 'From Memory',\n\t\t\t\t\t\t\t\tvalue: 'memory',\n\t\t\t\t\t\t\t\tdescription: 'Load session messages from memory',\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: 'Manually',\n\t\t\t\t\t\t\t\tvalue: 'manually',\n\t\t\t\t\t\t\t\tdescription: 'Manually return messages of session',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t],\n\t\t\t\t\t\tdefault: 'notSupported',\n\t\t\t\t\t\tdescription: 'If loading messages of a previous session should be enabled',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Response Mode',\n\t\t\t\t\t\tname: 'responseMode',\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: 'When Last Node Finishes',\n\t\t\t\t\t\t\t\tvalue: 'lastNode',\n\t\t\t\t\t\t\t\tdescription: 'Returns data of the last-executed node',\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: \"Using 'Respond to Webhook' Node\",\n\t\t\t\t\t\t\t\tvalue: 'responseNode',\n\t\t\t\t\t\t\t\tdescription: 'Response defined in that node',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t],\n\t\t\t\t\t\tdefault: 'lastNode',\n\t\t\t\t\t\tdescription: 'When and how to respond to the webhook',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Require Button Click to Start Chat',\n\t\t\t\t\t\tname: 'showWelcomeScreen',\n\t\t\t\t\t\ttype: 'boolean',\n\t\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\t\t'/mode': ['hostedChat'],\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\tdefault: false,\n\t\t\t\t\t\tdescription: 'Whether to show the welcome screen at the start of the chat',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Start Conversation Button Text',\n\t\t\t\t\t\tname: 'getStarted',\n\t\t\t\t\t\ttype: 'string',\n\t\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\t\tshowWelcomeScreen: [true],\n\t\t\t\t\t\t\t\t'/mode': ['hostedChat'],\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\tdefault: 'New Conversation',\n\t\t\t\t\t\tplaceholder: 'e.g. New Conversation',\n\t\t\t\t\t\tdescription: 'Shown as part of the welcome screen, in the middle of the chat window',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Subtitle',\n\t\t\t\t\t\tname: 'subtitle',\n\t\t\t\t\t\ttype: 'string',\n\t\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\t\t'/mode': ['hostedChat'],\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\tdefault: \"Start a chat. We're here to help you 24/7.\",\n\t\t\t\t\t\tplaceholder: \"e.g. We're here for you\",\n\t\t\t\t\t\tdescription: 'Shown at the top of the chat, under the title',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Title',\n\t\t\t\t\t\tname: 'title',\n\t\t\t\t\t\ttype: 'string',\n\t\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\t\t'/mode': ['hostedChat'],\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\tdefault: 'Hi there! 👋',\n\t\t\t\t\t\tplaceholder: 'e.g. Welcome',\n\t\t\t\t\t\tdescription: 'Shown at the top of the chat',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Custom Chat Styling',\n\t\t\t\t\t\tname: 'customCss',\n\t\t\t\t\t\ttype: 'string',\n\t\t\t\t\t\ttypeOptions: {\n\t\t\t\t\t\t\trows: 10,\n\t\t\t\t\t\t\teditor: 'cssEditor',\n\t\t\t\t\t\t},\n\t\t\t\t\t\tdisplayOptions: {\n\t\t\t\t\t\t\tshow: {\n\t\t\t\t\t\t\t\t'/mode': ['hostedChat'],\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\tdefault: `\n${cssVariables}\n\n/* You can override any class styles, too. Right-click inspect in Chat UI to find class to override. */\n.chat-message {\n\tmax-width: 50%;\n}\n`.trim(),\n\t\t\t\t\t\tdescription: 'Override default styling of the public chat interface with CSS',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t},\n\t\t],\n\t};\n\n\tprivate async handleFormData(context: IWebhookFunctions) {\n\t\tconst req = context.getRequestObject() as MultiPartFormData.Request;\n\t\tconst options = context.getNodeParameter('options', {}) as IDataObject;\n\t\tconst { data, files } = req.body;\n\n\t\tconst returnItem: INodeExecutionData = {\n\t\t\tjson: data,\n\t\t};\n\n\t\tif (files && Object.keys(files).length) {\n\t\t\treturnItem.json.files = [] as Array<Omit<IBinaryData, 'data'>>;\n\t\t\treturnItem.binary = {};\n\n\t\t\tconst count = 0;\n\t\t\tfor (const fileKey of Object.keys(files)) {\n\t\t\t\tconst processedFiles: MultiPartFormData.File[] = [];\n\t\t\t\tif (Array.isArray(files[fileKey])) {\n\t\t\t\t\tprocessedFiles.push(...files[fileKey]);\n\t\t\t\t} else {\n\t\t\t\t\tprocessedFiles.push(files[fileKey]);\n\t\t\t\t}\n\n\t\t\t\tlet fileIndex = 0;\n\t\t\t\tfor (const file of processedFiles) {\n\t\t\t\t\tlet binaryPropertyName = 'data';\n\n\t\t\t\t\t// Remove the '[]' suffix from the binaryPropertyName if it exists\n\t\t\t\t\tif (binaryPropertyName.endsWith('[]')) {\n\t\t\t\t\t\tbinaryPropertyName = binaryPropertyName.slice(0, -2);\n\t\t\t\t\t}\n\t\t\t\t\tif (options.binaryPropertyName) {\n\t\t\t\t\t\tbinaryPropertyName = `${options.binaryPropertyName.toString()}${count}`;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst binaryFile = await context.nodeHelpers.copyBinaryFile(\n\t\t\t\t\t\tfile.filepath,\n\t\t\t\t\t\tfile.originalFilename ?? file.newFilename,\n\t\t\t\t\t\tfile.mimetype,\n\t\t\t\t\t);\n\n\t\t\t\t\tconst binaryKey = `${binaryPropertyName}${fileIndex}`;\n\n\t\t\t\t\tconst binaryInfo = {\n\t\t\t\t\t\t...pick(binaryFile, ['fileName', 'fileSize', 'fileType', 'mimeType', 'fileExtension']),\n\t\t\t\t\t\tbinaryKey,\n\t\t\t\t\t};\n\n\t\t\t\t\treturnItem.binary = Object.assign(returnItem.binary ?? {}, {\n\t\t\t\t\t\t[`${binaryKey}`]: binaryFile,\n\t\t\t\t\t});\n\t\t\t\t\treturnItem.json.files = [\n\t\t\t\t\t\t...(returnItem.json.files as Array<Omit<IBinaryData, 'data'>>),\n\t\t\t\t\t\tbinaryInfo,\n\t\t\t\t\t];\n\t\t\t\t\tfileIndex += 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn returnItem;\n\t}\n\n\tasync webhook(ctx: IWebhookFunctions): Promise<IWebhookResponseData> {\n\t\tconst res = ctx.getResponseObject();\n\n\t\tconst isPublic = ctx.getNodeParameter('public', false) as boolean;\n\t\tconst nodeMode = ctx.getNodeParameter('mode', 'hostedChat') as string;\n\t\tif (!isPublic) {\n\t\t\tres.status(404).end();\n\t\t\treturn {\n\t\t\t\tnoWebhookResponse: true,\n\t\t\t};\n\t\t}\n\n\t\tconst options = ctx.getNodeParameter('options', {}) as {\n\t\t\tgetStarted?: string;\n\t\t\tinputPlaceholder?: string;\n\t\t\tloadPreviousSession?: LoadPreviousSessionChatOption;\n\t\t\tshowWelcomeScreen?: boolean;\n\t\t\tsubtitle?: string;\n\t\t\ttitle?: string;\n\t\t\tallowFileUploads?: boolean;\n\t\t\tallowedFilesMimeTypes?: string;\n\t\t\tcustomCss?: string;\n\t\t};\n\n\t\tconst req = ctx.getRequestObject();\n\t\tconst webhookName = ctx.getWebhookName();\n\t\tconst mode = ctx.getMode() === 'manual' ? 'test' : 'production';\n\t\tconst bodyData = ctx.getBodyData() ?? {};\n\n\t\ttry {\n\t\t\tawait validateAuth(ctx);\n\t\t} catch (error) {\n\t\t\tif (error) {\n\t\t\t\tres.writeHead((error as IDataObject).responseCode as number, {\n\t\t\t\t\t'www-authenticate': 'Basic realm=\"Webhook\"',\n\t\t\t\t});\n\t\t\t\tres.end((error as IDataObject).message as string);\n\t\t\t\treturn { noWebhookResponse: true };\n\t\t\t}\n\t\t\tthrow error;\n\t\t}\n\t\tif (nodeMode === 'hostedChat') {\n\t\t\t// Show the chat on GET request\n\t\t\tif (webhookName === 'setup') {\n\t\t\t\tconst webhookUrlRaw = ctx.getNodeWebhookUrl('default') as string;\n\t\t\t\tconst webhookUrl =\n\t\t\t\t\tmode === 'test' ? webhookUrlRaw.replace('/webhook', '/webhook-test') : webhookUrlRaw;\n\t\t\t\tconst authentication = ctx.getNodeParameter('authentication') as\n\t\t\t\t\t| 'none'\n\t\t\t\t\t| 'basicAuth'\n\t\t\t\t\t| 'n8nUserAuth';\n\t\t\t\tconst initialMessagesRaw = ctx.getNodeParameter('initialMessages', '') as string;\n\t\t\t\tconst initialMessages = initialMessagesRaw\n\t\t\t\t\t.split('\\n')\n\t\t\t\t\t.filter((line) => line)\n\t\t\t\t\t.map((line) => line.trim());\n\t\t\t\tconst instanceId = ctx.getInstanceId();\n\n\t\t\t\tconst i18nConfig = pick(options, ['getStarted', 'inputPlaceholder', 'subtitle', 'title']);\n\n\t\t\t\tconst page = createPage({\n\t\t\t\t\ti18n: {\n\t\t\t\t\t\ten: i18nConfig,\n\t\t\t\t\t},\n\t\t\t\t\tshowWelcomeScreen: options.showWelcomeScreen,\n\t\t\t\t\tloadPreviousSession: options.loadPreviousSession,\n\t\t\t\t\tinitialMessages,\n\t\t\t\t\twebhookUrl,\n\t\t\t\t\tmode,\n\t\t\t\t\tinstanceId,\n\t\t\t\t\tauthentication,\n\t\t\t\t\tallowFileUploads: options.allowFileUploads,\n\t\t\t\t\tallowedFilesMimeTypes: options.allowedFilesMimeTypes,\n\t\t\t\t\tcustomCss: options.customCss,\n\t\t\t\t});\n\n\t\t\t\tres.status(200).send(page).end();\n\t\t\t\treturn {\n\t\t\t\t\tnoWebhookResponse: true,\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\n\t\tif (bodyData.action === 'loadPreviousSession') {\n\t\t\tif (options?.loadPreviousSession === 'memory') {\n\t\t\t\tconst memory = (await ctx.getInputConnectionData(NodeConnectionTypes.AiMemory, 0)) as\n\t\t\t\t\t| BaseChatMemory\n\t\t\t\t\t| undefined;\n\t\t\t\tconst messages = ((await memory?.chatHistory.getMessages()) ?? [])\n\t\t\t\t\t.filter((message) => !message?.additional_kwargs?.hideFromUI)\n\t\t\t\t\t.map((message) => message?.toJSON());\n\t\t\t\treturn {\n\t\t\t\t\twebhookResponse: { data: messages },\n\t\t\t\t};\n\t\t\t} else if (options?.loadPreviousSession === 'notSupported') {\n\t\t\t\t// If messages of a previous session should not be loaded, simply return an empty array\n\t\t\t\treturn {\n\t\t\t\t\twebhookResponse: { data: [] },\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\n\t\tlet returnData: INodeExecutionData[];\n\t\tconst webhookResponse: IDataObject = { status: 200 };\n\t\tif (req.contentType === 'multipart/form-data') {\n\t\t\treturnData = [await this.handleFormData(ctx)];\n\t\t\treturn {\n\t\t\t\twebhookResponse,\n\t\t\t\tworkflowData: [returnData],\n\t\t\t};\n\t\t} else {\n\t\t\treturnData = [{ json: bodyData }];\n\t\t}\n\n\t\treturn {\n\t\t\twebhookResponse,\n\t\t\tworkflowData: [ctx.helpers.returnJsonArray(returnData)],\n\t\t};\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,oBAAqB;AACrB,0BAA0C;AAY1C,uBAA6B;AAC7B,8BAA6B;AAC7B,uBAA2B;AA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,gBAAgB,UAAU,CAAC;AAAA,IACvD;AAAA,EACD;AACD;","names":[]}
@@ -75,3 +75,4 @@ async function validateAuth(context) {
75
75
  0 && (module.exports = {
76
76
  validateAuth
77
77
  });
78
+ //# sourceMappingURL=GenericFunctions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../nodes/trigger/ChatTrigger/GenericFunctions.ts"],"sourcesContent":["import basicAuth from 'basic-auth';\nimport type { ICredentialDataDecryptedObject, IWebhookFunctions } from 'n8n-workflow';\n\nimport { ChatTriggerAuthorizationError } from './error';\nimport type { AuthenticationChatOption } from './types';\n\nexport async function validateAuth(context: IWebhookFunctions) {\n\tconst authentication = context.getNodeParameter('authentication') as AuthenticationChatOption;\n\tconst req = context.getRequestObject();\n\tconst headers = context.getHeaderData();\n\n\tif (authentication === 'none') {\n\t\treturn;\n\t} else if (authentication === 'basicAuth') {\n\t\t// Basic authorization is needed to call webhook\n\t\tlet expectedAuth: ICredentialDataDecryptedObject | undefined;\n\t\ttry {\n\t\t\texpectedAuth = await context.getCredentials<ICredentialDataDecryptedObject>('httpBasicAuth');\n\t\t} catch {}\n\n\t\tif (expectedAuth === undefined || !expectedAuth.user || !expectedAuth.password) {\n\t\t\t// Data is not defined on node so can not authenticate\n\t\t\tthrow new ChatTriggerAuthorizationError(500, 'No authentication data defined on node!');\n\t\t}\n\n\t\tconst providedAuth = basicAuth(req);\n\t\t// Authorization data is missing\n\t\tif (!providedAuth) throw new ChatTriggerAuthorizationError(401);\n\n\t\tif (providedAuth.name !== expectedAuth.user || providedAuth.pass !== expectedAuth.password) {\n\t\t\t// Provided authentication data is wrong\n\t\t\tthrow new ChatTriggerAuthorizationError(403);\n\t\t}\n\t} else if (authentication === 'n8nUserAuth') {\n\t\tconst webhookName = context.getWebhookName();\n\n\t\tfunction getCookie(name: string) {\n\t\t\tconst value = `; ${headers.cookie}`;\n\t\t\tconst parts = value.split(`; ${name}=`);\n\n\t\t\tif (parts.length === 2) {\n\t\t\t\treturn parts.pop()?.split(';').shift();\n\t\t\t}\n\t\t\treturn '';\n\t\t}\n\n\t\tconst authCookie = getCookie('n8n-auth');\n\t\tif (!authCookie && webhookName !== 'setup') {\n\t\t\t// Data is not defined on node so can not authenticate\n\t\t\tthrow new ChatTriggerAuthorizationError(500, 'User not authenticated!');\n\t\t}\n\t}\n\n\treturn;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAAsB;AAGtB,mBAA8C;AAG9C,eAAsB,aAAa,SAA4B;AAC9D,QAAM,iBAAiB,QAAQ,iBAAiB,gBAAgB;AAChE,QAAM,MAAM,QAAQ,iBAAiB;AACrC,QAAM,UAAU,QAAQ,cAAc;AAEtC,MAAI,mBAAmB,QAAQ;AAC9B;AAAA,EACD,WAAW,mBAAmB,aAAa;AAE1C,QAAI;AACJ,QAAI;AACH,qBAAe,MAAM,QAAQ,eAA+C,eAAe;AAAA,IAC5F,QAAQ;AAAA,IAAC;AAET,QAAI,iBAAiB,UAAa,CAAC,aAAa,QAAQ,CAAC,aAAa,UAAU;AAE/E,YAAM,IAAI,2CAA8B,KAAK,yCAAyC;AAAA,IACvF;AAEA,UAAM,mBAAe,kBAAAA,SAAU,GAAG;AAElC,QAAI,CAAC,aAAc,OAAM,IAAI,2CAA8B,GAAG;AAE9D,QAAI,aAAa,SAAS,aAAa,QAAQ,aAAa,SAAS,aAAa,UAAU;AAE3F,YAAM,IAAI,2CAA8B,GAAG;AAAA,IAC5C;AAAA,EACD,WAAW,mBAAmB,eAAe;AAG5C,QAASC,aAAT,SAAmB,MAAc;AAChC,YAAM,QAAQ,KAAK,QAAQ,MAAM;AACjC,YAAM,QAAQ,MAAM,MAAM,KAAK,IAAI,GAAG;AAEtC,UAAI,MAAM,WAAW,GAAG;AACvB,eAAO,MAAM,IAAI,GAAG,MAAM,GAAG,EAAE,MAAM;AAAA,MACtC;AACA,aAAO;AAAA,IACR;AARS,oBAAAA;AAFT,UAAM,cAAc,QAAQ,eAAe;AAY3C,UAAM,aAAaA,WAAU,UAAU;AACvC,QAAI,CAAC,cAAc,gBAAgB,SAAS;AAE3C,YAAM,IAAI,2CAA8B,KAAK,yBAAyB;AAAA,IACvE;AAAA,EACD;AAEA;AACD;","names":["basicAuth","getCookie"]}
@@ -146,3 +146,4 @@ const cssVariables = `
146
146
  0 && (module.exports = {
147
147
  cssVariables
148
148
  });
149
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../nodes/trigger/ChatTrigger/constants.ts"],"sourcesContent":["// CSS Variables are defined in `@n8n/chat/src/css/_tokens.scss`\nexport const cssVariables = `\n:root {\n /* Colors */\n --chat--color-primary: #e74266;\n --chat--color-primary-shade-50: #db4061;\n --chat--color-primary-shade-100: #cf3c5c;\n --chat--color-secondary: #20b69e;\n --chat--color-secondary-shade-50: #1ca08a;\n --chat--color-white: #ffffff;\n --chat--color-light: #f2f4f8;\n --chat--color-light-shade-50: #e6e9f1;\n --chat--color-light-shade-100: #c2c5cc;\n --chat--color-medium: #d2d4d9;\n --chat--color-dark: #101330;\n --chat--color-disabled: #777980;\n --chat--color-typing: #404040;\n\n /* Base Layout */\n --chat--spacing: 1rem;\n --chat--border-radius: 0.25rem;\n --chat--transition-duration: 0.15s;\n --chat--font-family: (\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n Roboto,\n Oxygen-Sans,\n Ubuntu,\n Cantarell,\n 'Helvetica Neue',\n sans-serif\n );\n\n /* Window Dimensions */\n --chat--window--width: 400px;\n --chat--window--height: 600px;\n --chat--window--bottom: var(--chat--spacing);\n --chat--window--right: var(--chat--spacing);\n --chat--window--z-index: 9999;\n --chat--window--border: 1px solid var(--chat--color-light-shade-50);\n --chat--window--border-radius: var(--chat--border-radius);\n --chat--window--margin-bottom: var(--chat--spacing);\n\n /* Header Styles */\n --chat--header-height: auto;\n --chat--header--padding: var(--chat--spacing);\n --chat--header--background: var(--chat--color-dark);\n --chat--header--color: var(--chat--color-light);\n --chat--header--border-top: none;\n --chat--header--border-bottom: none;\n --chat--header--border-left: none;\n --chat--header--border-right: none;\n --chat--heading--font-size: 2em;\n --chat--subtitle--font-size: inherit;\n --chat--subtitle--line-height: 1.8;\n\n /* Message Styles */\n --chat--message--font-size: 1rem;\n --chat--message--padding: var(--chat--spacing);\n --chat--message--border-radius: var(--chat--border-radius);\n --chat--message-line-height: 1.5;\n --chat--message--margin-bottom: calc(var(--chat--spacing) * 1);\n --chat--message--bot--background: var(--chat--color-white);\n --chat--message--bot--color: var(--chat--color-dark);\n --chat--message--bot--border: none;\n --chat--message--user--background: var(--chat--color-secondary);\n --chat--message--user--color: var(--chat--color-white);\n --chat--message--user--border: none;\n --chat--message--pre--background: rgba(0, 0, 0, 0.05);\n --chat--messages-list--padding: var(--chat--spacing);\n\n /* Toggle Button */\n --chat--toggle--size: 64px;\n --chat--toggle--width: var(--chat--toggle--size);\n --chat--toggle--height: var(--chat--toggle--size);\n --chat--toggle--border-radius: 50%;\n --chat--toggle--background: var(--chat--color-primary);\n --chat--toggle--hover--background: var(--chat--color-primary-shade-50);\n --chat--toggle--active--background: var(--chat--color-primary-shade-100);\n --chat--toggle--color: var(--chat--color-white);\n\n /* Input Area */\n --chat--textarea--height: 50px;\n --chat--textarea--max-height: 30rem;\n --chat--input--font-size: inherit;\n --chat--input--border: 0;\n --chat--input--border-radius: 0;\n --chat--input--padding: 0.8rem;\n --chat--input--background: var(--chat--color-white);\n --chat--input--text-color: initial;\n --chat--input--line-height: 1.5;\n --chat--input--placeholder--font-size: var(--chat--input--font-size);\n --chat--input--border-active: 0;\n --chat--input--left--panel--width: 2rem;\n\n /* Button Styles */\n --chat--button--color: var(--chat--color-light);\n --chat--button--background: var(--chat--color-primary);\n --chat--button--padding: calc(var(--chat--spacing) * 1 / 2) var(--chat--spacing);\n --chat--button--border-radius: var(--chat--border-radius);\n --chat--button--hover--color: var(--chat--color-light);\n --chat--button--hover--background: var(--chat--color-primary-shade-50);\n --chat--close--button--color-hover: var(--chat--color-primary);\n\n /* Send and File Buttons */\n --chat--input--send--button--background: var(--chat--color-white);\n --chat--input--send--button--color: var(--chat--color-light);\n --chat--input--send--button--background-hover: var(--chat--color-primary-shade-50);\n --chat--input--send--button--color-hover: var(--chat--color-secondary-shade-50);\n --chat--input--file--button--background: var(--chat--color-white);\n --chat--input--file--button--color: var(--chat--color-secondary);\n --chat--input--file--button--background-hover: var(--chat--input--file--button--background);\n --chat--input--file--button--color-hover: var(--chat--color-secondary-shade-50);\n --chat--files-spacing: 0.25rem;\n\n /* Body and Footer */\n --chat--body--background: var(--chat--color-light);\n --chat--footer--background: var(--chat--color-light);\n --chat--footer--color: var(--chat--color-dark);\n}\n`;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACO,MAAM,eAAe;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;","names":[]}
@@ -40,3 +40,4 @@ class ChatTriggerAuthorizationError extends import_n8n_workflow.ApplicationError
40
40
  0 && (module.exports = {
41
41
  ChatTriggerAuthorizationError
42
42
  });
43
+ //# sourceMappingURL=error.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../nodes/trigger/ChatTrigger/error.ts"],"sourcesContent":["import { ApplicationError } from 'n8n-workflow';\n\nexport class ChatTriggerAuthorizationError extends ApplicationError {\n\tconstructor(\n\t\treadonly responseCode: number,\n\t\tmessage?: string,\n\t) {\n\t\tif (message === undefined) {\n\t\t\tmessage = 'Authorization problem!';\n\t\t\tif (responseCode === 401) {\n\t\t\t\tmessage = 'Authorization is required!';\n\t\t\t} else if (responseCode === 403) {\n\t\t\t\tmessage = 'Authorization data is wrong!';\n\t\t\t}\n\t\t}\n\t\tsuper(message);\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAAiC;AAE1B,MAAM,sCAAsC,qCAAiB;AAAA,EACnE,YACU,cACT,SACC;AACD,QAAI,YAAY,QAAW;AAC1B,gBAAU;AACV,UAAI,iBAAiB,KAAK;AACzB,kBAAU;AAAA,MACX,WAAW,iBAAiB,KAAK;AAChC,kBAAU;AAAA,MACX;AAAA,IACD;AACA,UAAM,OAAO;AAXJ;AAAA,EAYV;AACD;","names":[]}
@@ -144,3 +144,4 @@ function createPage({
144
144
  0 && (module.exports = {
145
145
  createPage
146
146
  });
147
+ //# sourceMappingURL=templates.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../nodes/trigger/ChatTrigger/templates.ts"],"sourcesContent":["import sanitizeHtml from 'sanitize-html';\n\nimport type { AuthenticationChatOption, LoadPreviousSessionChatOption } from './types';\nexport function createPage({\n\tinstanceId,\n\twebhookUrl,\n\tshowWelcomeScreen,\n\tloadPreviousSession,\n\ti18n: { en },\n\tinitialMessages,\n\tauthentication,\n\tallowFileUploads,\n\tallowedFilesMimeTypes,\n\tcustomCss,\n}: {\n\tinstanceId: string;\n\twebhookUrl?: string;\n\tshowWelcomeScreen?: boolean;\n\tloadPreviousSession?: LoadPreviousSessionChatOption;\n\ti18n: {\n\t\ten: Record<string, string>;\n\t};\n\tinitialMessages: string[];\n\tmode: 'test' | 'production';\n\tauthentication: AuthenticationChatOption;\n\tallowFileUploads?: boolean;\n\tallowedFilesMimeTypes?: string;\n\tcustomCss?: string;\n}) {\n\tconst validAuthenticationOptions: AuthenticationChatOption[] = [\n\t\t'none',\n\t\t'basicAuth',\n\t\t'n8nUserAuth',\n\t];\n\tconst validLoadPreviousSessionOptions: LoadPreviousSessionChatOption[] = [\n\t\t'manually',\n\t\t'memory',\n\t\t'notSupported',\n\t];\n\n\tconst sanitizedAuthentication = validAuthenticationOptions.includes(authentication)\n\t\t? authentication\n\t\t: 'none';\n\tconst sanitizedShowWelcomeScreen = !!showWelcomeScreen;\n\tconst sanitizedAllowFileUploads = !!allowFileUploads;\n\tconst sanitizedAllowedFilesMimeTypes = allowedFilesMimeTypes?.toString() ?? '';\n\tconst sanitizedCustomCss = sanitizeHtml(`<style>${customCss?.toString() ?? ''}</style>`, {\n\t\tallowedTags: ['style'],\n\t\tallowedAttributes: false,\n\t});\n\n\tconst sanitizedLoadPreviousSession = validLoadPreviousSessionOptions.includes(\n\t\tloadPreviousSession as LoadPreviousSessionChatOption,\n\t)\n\t\t? loadPreviousSession\n\t\t: 'notSupported';\n\n\treturn `<!doctype html>\n\t<html lang=\"en\">\n\t\t<head>\n\t\t\t<meta charset=\"utf-8\">\n\t\t\t<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n\t\t\t<title>Chat</title>\n\t\t\t<link href=\"https://cdn.jsdelivr.net/npm/normalize.css@8.0.1/normalize.min.css\" rel=\"stylesheet\" />\n\t\t\t<link href=\"https://cdn.jsdelivr.net/npm/@n8n/chat/dist/style.css\" rel=\"stylesheet\" />\n\t\t\t<style>\n\t\t\t\thtml,\n\t\t\t\tbody,\n\t\t\t\t#n8n-chat {\n\t\t\t\t\twidth: 100%;\n\t\t\t\t\theight: 100%;\n\t\t\t\t}\n\t\t\t</style>\n\t\t\t${sanitizedCustomCss}\n\t\t</head>\n\t\t<body>\n\t\t\t<script type=\"module\">\n\t\t\t\timport { createChat } from 'https://cdn.jsdelivr.net/npm/@n8n/chat/dist/chat.bundle.es.js';\n\n\t\t\t\t(async function () {\n\t\t\t\t\tconst authentication = '${sanitizedAuthentication}';\n\t\t\t\t\tlet metadata;\n\t\t\t\t\tif (authentication === 'n8nUserAuth') {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tconst response = await fetch('/rest/login', {\n\t\t\t\t\t\t\t\t\tmethod: 'GET',\n\t\t\t\t\t\t\t\t\theaders: { 'browser-id': localStorage.getItem('n8n-browserId') }\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\tif (response.status !== 200) {\n\t\t\t\t\t\t\t\tthrow new Error('Not logged in');\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tconst responseData = await response.json();\n\t\t\t\t\t\t\tmetadata = {\n\t\t\t\t\t\t\t\tuser: {\n\t\t\t\t\t\t\t\t\tid: responseData.data.id,\n\t\t\t\t\t\t\t\t\tfirstName: responseData.data.firstName,\n\t\t\t\t\t\t\t\t\tlastName: responseData.data.lastName,\n\t\t\t\t\t\t\t\t\temail: responseData.data.email,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\t\twindow.location.href = '/signin?redirect=' + window.location.href;\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tcreateChat({\n\t\t\t\t\t\tmode: 'fullscreen',\n\t\t\t\t\t\twebhookUrl: '${webhookUrl}',\n\t\t\t\t\t\tshowWelcomeScreen: ${sanitizedShowWelcomeScreen},\n\t\t\t\t\t\tloadPreviousSession: ${sanitizedLoadPreviousSession !== 'notSupported'},\n\t\t\t\t\t\tmetadata: metadata,\n\t\t\t\t\t\twebhookConfig: {\n\t\t\t\t\t\t\theaders: {\n\t\t\t\t\t\t\t\t'Content-Type': 'application/json',\n\t\t\t\t\t\t\t\t'X-Instance-Id': '${instanceId}',\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t\tallowFileUploads: ${sanitizedAllowFileUploads},\n\t\t\t\t\t\tallowedFilesMimeTypes: '${sanitizedAllowedFilesMimeTypes}',\n\t\t\t\t\t\ti18n: {\n\t\t\t\t\t\t\t${en ? `en: ${JSON.stringify(en)},` : ''}\n\t\t\t\t\t\t},\n\t\t\t\t\t\t${initialMessages.length ? `initialMessages: ${JSON.stringify(initialMessages)},` : ''}\n\t\t\t\t\t});\n\t\t\t\t})();\n\t\t\t</script>\n\t\t</body>\n\t</html>`;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,2BAAyB;AAGlB,SAAS,WAAW;AAAA,EAC1B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,MAAM,EAAE,GAAG;AAAA,EACX;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,GAcG;AACF,QAAM,6BAAyD;AAAA,IAC9D;AAAA,IACA;AAAA,IACA;AAAA,EACD;AACA,QAAM,kCAAmE;AAAA,IACxE;AAAA,IACA;AAAA,IACA;AAAA,EACD;AAEA,QAAM,0BAA0B,2BAA2B,SAAS,cAAc,IAC/E,iBACA;AACH,QAAM,6BAA6B,CAAC,CAAC;AACrC,QAAM,4BAA4B,CAAC,CAAC;AACpC,QAAM,iCAAiC,uBAAuB,SAAS,KAAK;AAC5E,QAAM,yBAAqB,qBAAAA,SAAa,UAAU,WAAW,SAAS,KAAK,EAAE,YAAY;AAAA,IACxF,aAAa,CAAC,OAAO;AAAA,IACrB,mBAAmB;AAAA,EACpB,CAAC;AAED,QAAM,+BAA+B,gCAAgC;AAAA,IACpE;AAAA,EACD,IACG,sBACA;AAEH,SAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KAgBH,kBAAkB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,+BAOQ,uBAAuB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBA8BjC,UAAU;AAAA,2BACJ,0BAA0B;AAAA,6BACxB,iCAAiC,cAAc;AAAA;AAAA;AAAA;AAAA;AAAA,4BAKhD,UAAU;AAAA;AAAA;AAAA,0BAGZ,yBAAyB;AAAA,gCACnB,8BAA8B;AAAA;AAAA,SAErD,KAAK,OAAO,KAAK,UAAU,EAAE,CAAC,MAAM,EAAE;AAAA;AAAA,QAEvC,gBAAgB,SAAS,oBAAoB,KAAK,UAAU,eAAe,CAAC,MAAM,EAAE;AAAA;AAAA;AAAA;AAAA;AAAA;AAM5F;","names":["sanitizeHtml"]}
@@ -14,3 +14,4 @@ var __copyProps = (to, from, except, desc) => {
14
14
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
15
  var types_exports = {};
16
16
  module.exports = __toCommonJS(types_exports);
17
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../nodes/trigger/ChatTrigger/types.ts"],"sourcesContent":["export type AuthenticationChatOption = 'none' | 'basicAuth' | 'n8nUserAuth';\nexport type LoadPreviousSessionChatOption = 'manually' | 'memory' | 'notSupported';\n"],"mappings":";;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
@@ -88,3 +88,4 @@ class ManualChatTrigger {
88
88
  0 && (module.exports = {
89
89
  ManualChatTrigger
90
90
  });
91
+ //# sourceMappingURL=ManualChatTrigger.node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../nodes/trigger/ManualChatTrigger/ManualChatTrigger.node.ts"],"sourcesContent":["import {\n\ttype ITriggerFunctions,\n\ttype INodeType,\n\ttype INodeTypeDescription,\n\ttype ITriggerResponse,\n\tNodeConnectionTypes,\n} from 'n8n-workflow';\n\nexport class ManualChatTrigger implements INodeType {\n\tdescription: INodeTypeDescription = {\n\t\tdisplayName: 'Manual Chat Trigger',\n\t\tname: 'manualChatTrigger',\n\t\ticon: 'fa:comments',\n\t\tgroup: ['trigger'],\n\t\tversion: [1, 1.1],\n\t\tdescription: 'Runs the flow on new manual chat message',\n\t\teventTriggerDescription: '',\n\t\tmaxNodes: 1,\n\t\thidden: true,\n\t\tdefaults: {\n\t\t\tname: 'When chat message received',\n\t\t\tcolor: '#909298',\n\t\t},\n\t\tcodex: {\n\t\t\tcategories: ['Core Nodes'],\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/core-nodes/n8n-nodes-langchain.chattrigger/',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t},\n\t\t\tsubcategories: {\n\t\t\t\t'Core Nodes': ['Other Trigger Nodes'],\n\t\t\t},\n\t\t},\n\t\tinputs: [],\n\t\toutputs: [NodeConnectionTypes.Main],\n\t\tproperties: [\n\t\t\t{\n\t\t\t\tdisplayName:\n\t\t\t\t\t'This node is where a manual chat workflow execution starts. To make one, go back to the canvas and click ‘Chat’',\n\t\t\t\tname: 'notice',\n\t\t\t\ttype: 'notice',\n\t\t\t\tdefault: '',\n\t\t\t},\n\t\t\t{\n\t\t\t\t// eslint-disable-next-line n8n-nodes-base/node-param-display-name-miscased\n\t\t\t\tdisplayName: 'Chat and execute workflow',\n\t\t\t\tname: 'openChat',\n\t\t\t\ttype: 'button',\n\t\t\t\ttypeOptions: {\n\t\t\t\t\tbuttonConfig: {\n\t\t\t\t\t\taction: 'openChat',\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tdefault: '',\n\t\t\t},\n\t\t],\n\t};\n\n\tasync trigger(this: ITriggerFunctions): Promise<ITriggerResponse> {\n\t\tconst manualTriggerFunction = async () => {\n\t\t\tthis.emit([this.helpers.returnJsonArray([{}])]);\n\t\t};\n\n\t\treturn {\n\t\t\tmanualTriggerFunction,\n\t\t};\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAMO;AAEA,MAAM,kBAAuC;AAAA,EAA7C;AACN,uBAAoC;AAAA,MACnC,aAAa;AAAA,MACb,MAAM;AAAA,MACN,MAAM;AAAA,MACN,OAAO,CAAC,SAAS;AAAA,MACjB,SAAS,CAAC,GAAG,GAAG;AAAA,MAChB,aAAa;AAAA,MACb,yBAAyB;AAAA,MACzB,UAAU;AAAA,MACV,QAAQ;AAAA,MACR,UAAU;AAAA,QACT,MAAM;AAAA,QACN,OAAO;AAAA,MACR;AAAA,MACA,OAAO;AAAA,QACN,YAAY,CAAC,YAAY;AAAA,QACzB,WAAW;AAAA,UACV,sBAAsB;AAAA,YACrB;AAAA,cACC,KAAK;AAAA,YACN;AAAA,UACD;AAAA,QACD;AAAA,QACA,eAAe;AAAA,UACd,cAAc,CAAC,qBAAqB;AAAA,QACrC;AAAA,MACD;AAAA,MACA,QAAQ,CAAC;AAAA,MACT,SAAS,CAAC,wCAAoB,IAAI;AAAA,MAClC,YAAY;AAAA,QACX;AAAA,UACC,aACC;AAAA,UACD,MAAM;AAAA,UACN,MAAM;AAAA,UACN,SAAS;AAAA,QACV;AAAA,QACA;AAAA;AAAA,UAEC,aAAa;AAAA,UACb,MAAM;AAAA,UACN,MAAM;AAAA,UACN,aAAa;AAAA,YACZ,cAAc;AAAA,cACb,QAAQ;AAAA,YACT;AAAA,UACD;AAAA,UACA,SAAS;AAAA,QACV;AAAA,MACD;AAAA,IACD;AAAA;AAAA,EAEA,MAAM,UAA4D;AACjE,UAAM,wBAAwB,YAAY;AACzC,WAAK,KAAK,CAAC,KAAK,QAAQ,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAAA,IAC/C;AAEA,WAAO;AAAA,MACN;AAAA,IACD;AAAA,EACD;AACD;","names":[]}
@@ -78,3 +78,4 @@ class VectorStoreInMemory extends (0, import_createVectorStoreNode.createVectorS
78
78
  0 && (module.exports = {
79
79
  VectorStoreInMemory
80
80
  });
81
+ //# sourceMappingURL=VectorStoreInMemory.node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../nodes/vector_store/VectorStoreInMemory/VectorStoreInMemory.node.ts"],"sourcesContent":["import type { MemoryVectorStore } from 'langchain/vectorstores/memory';\nimport type { INodeProperties } from 'n8n-workflow';\n\nimport { createVectorStoreNode } from '../shared/createVectorStoreNode/createVectorStoreNode';\nimport { MemoryVectorStoreManager } from '../shared/MemoryManager/MemoryVectorStoreManager';\n\nconst insertFields: INodeProperties[] = [\n\t{\n\t\tdisplayName:\n\t\t\t'<strong>For experimental use only</strong>: Data is stored in memory and will be lost if n8n restarts. Data may also be cleared if available memory gets low. <a href=\"https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.vectorstoreinmemory/\">More info</a>',\n\t\tname: 'notice',\n\t\ttype: 'notice',\n\t\tdefault: '',\n\t},\n\t{\n\t\tdisplayName: 'Clear Store',\n\t\tname: 'clearStore',\n\t\ttype: 'boolean',\n\t\tdefault: false,\n\t\tdescription: 'Whether to clear the store before inserting new data',\n\t},\n];\n\nexport class VectorStoreInMemory extends createVectorStoreNode<MemoryVectorStore>({\n\tmeta: {\n\t\tdisplayName: 'Simple Vector Store',\n\t\tname: 'vectorStoreInMemory',\n\t\tdescription:\n\t\t\t\"Work with your data in a Simple Vector Store. Don't use this for production usage.\",\n\t\ticon: 'fa:database',\n\t\ticonColor: 'black',\n\t\tdocsUrl:\n\t\t\t'https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.vectorstoreinmemory/',\n\t},\n\tsharedFields: [\n\t\t{\n\t\t\tdisplayName: 'Memory Key',\n\t\t\tname: 'memoryKey',\n\t\t\ttype: 'string',\n\t\t\tdefault: 'vector_store_key',\n\t\t\tdescription:\n\t\t\t\t'The key to use to store the vector memory in the workflow data. The key will be prefixed with the workflow ID to avoid collisions.',\n\t\t},\n\t],\n\tinsertFields,\n\tloadFields: [],\n\tretrieveFields: [],\n\tasync getVectorStoreClient(context, _filter, embeddings, itemIndex) {\n\t\tconst workflowId = context.getWorkflow().id;\n\t\tconst memoryKey = context.getNodeParameter('memoryKey', itemIndex) as string;\n\t\tconst vectorStoreSingleton = MemoryVectorStoreManager.getInstance(embeddings, context.logger);\n\n\t\treturn await vectorStoreSingleton.getVectorStore(`${workflowId}__${memoryKey}`);\n\t},\n\tasync populateVectorStore(context, embeddings, documents, itemIndex) {\n\t\tconst memoryKey = context.getNodeParameter('memoryKey', itemIndex) as string;\n\t\tconst clearStore = context.getNodeParameter('clearStore', itemIndex) as boolean;\n\t\tconst workflowId = context.getWorkflow().id;\n\t\tconst vectorStoreInstance = MemoryVectorStoreManager.getInstance(embeddings, context.logger);\n\n\t\tawait vectorStoreInstance.addDocuments(`${workflowId}__${memoryKey}`, documents, clearStore);\n\t},\n}) {}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,mCAAsC;AACtC,sCAAyC;AAEzC,MAAM,eAAkC;AAAA,EACvC;AAAA,IACC,aACC;AAAA,IACD,MAAM;AAAA,IACN,MAAM;AAAA,IACN,SAAS;AAAA,EACV;AAAA,EACA;AAAA,IACC,aAAa;AAAA,IACb,MAAM;AAAA,IACN,MAAM;AAAA,IACN,SAAS;AAAA,IACT,aAAa;AAAA,EACd;AACD;AAEO,MAAM,gCAA4B,oDAAyC;AAAA,EACjF,MAAM;AAAA,IACL,aAAa;AAAA,IACb,MAAM;AAAA,IACN,aACC;AAAA,IACD,MAAM;AAAA,IACN,WAAW;AAAA,IACX,SACC;AAAA,EACF;AAAA,EACA,cAAc;AAAA,IACb;AAAA,MACC,aAAa;AAAA,MACb,MAAM;AAAA,MACN,MAAM;AAAA,MACN,SAAS;AAAA,MACT,aACC;AAAA,IACF;AAAA,EACD;AAAA,EACA;AAAA,EACA,YAAY,CAAC;AAAA,EACb,gBAAgB,CAAC;AAAA,EACjB,MAAM,qBAAqB,SAAS,SAAS,YAAY,WAAW;AACnE,UAAM,aAAa,QAAQ,YAAY,EAAE;AACzC,UAAM,YAAY,QAAQ,iBAAiB,aAAa,SAAS;AACjE,UAAM,uBAAuB,yDAAyB,YAAY,YAAY,QAAQ,MAAM;AAE5F,WAAO,MAAM,qBAAqB,eAAe,GAAG,UAAU,KAAK,SAAS,EAAE;AAAA,EAC/E;AAAA,EACA,MAAM,oBAAoB,SAAS,YAAY,WAAW,WAAW;AACpE,UAAM,YAAY,QAAQ,iBAAiB,aAAa,SAAS;AACjE,UAAM,aAAa,QAAQ,iBAAiB,cAAc,SAAS;AACnE,UAAM,aAAa,QAAQ,YAAY,EAAE;AACzC,UAAM,sBAAsB,yDAAyB,YAAY,YAAY,QAAQ,MAAM;AAE3F,UAAM,oBAAoB,aAAa,GAAG,UAAU,KAAK,SAAS,IAAI,WAAW,UAAU;AAAA,EAC5F;AACD,CAAC,EAAE;AAAC;","names":[]}
@@ -118,3 +118,4 @@ class VectorStoreInMemoryInsert {
118
118
  0 && (module.exports = {
119
119
  VectorStoreInMemoryInsert
120
120
  });
121
+ //# sourceMappingURL=VectorStoreInMemoryInsert.node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../nodes/vector_store/VectorStoreInMemoryInsert/VectorStoreInMemoryInsert.node.ts"],"sourcesContent":["/* eslint-disable n8n-nodes-base/node-dirname-against-convention */\nimport type { Embeddings } from '@langchain/core/embeddings';\nimport type { Document } from 'langchain/document';\nimport {\n\tNodeConnectionTypes,\n\ttype INodeExecutionData,\n\ttype IExecuteFunctions,\n\ttype INodeType,\n\ttype INodeTypeDescription,\n} from 'n8n-workflow';\n\nimport type { N8nJsonLoader } from '@utils/N8nJsonLoader';\n\nimport { MemoryVectorStoreManager } from '../shared/MemoryManager/MemoryVectorStoreManager';\nimport { processDocuments } from '../shared/processDocuments';\n\n// This node is deprecated. Use VectorStoreInMemory instead.\nexport class VectorStoreInMemoryInsert implements INodeType {\n\tdescription: INodeTypeDescription = {\n\t\tdisplayName: 'In Memory Vector Store Insert',\n\t\tname: 'vectorStoreInMemoryInsert',\n\t\ticon: 'fa:database',\n\t\tgroup: ['transform'],\n\t\tversion: 1,\n\t\thidden: true,\n\t\tdescription: 'Insert data into an in-memory vector store',\n\t\tdefaults: {\n\t\t\tname: 'In Memory Vector Store Insert',\n\t\t},\n\t\tcodex: {\n\t\t\tcategories: ['AI'],\n\t\t\tsubcategories: {\n\t\t\t\tAI: ['Vector Stores'],\n\t\t\t},\n\t\t\tresources: {\n\t\t\t\tprimaryDocumentation: [\n\t\t\t\t\t{\n\t\t\t\t\t\turl: 'https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.vectorstoreinmemory/',\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\tNodeConnectionTypes.Main,\n\t\t\t{\n\t\t\t\tdisplayName: 'Document',\n\t\t\t\tmaxConnections: 1,\n\t\t\t\ttype: NodeConnectionTypes.AiDocument,\n\t\t\t\trequired: true,\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Embedding',\n\t\t\t\tmaxConnections: 1,\n\t\t\t\ttype: NodeConnectionTypes.AiEmbedding,\n\t\t\t\trequired: true,\n\t\t\t},\n\t\t],\n\t\toutputs: [NodeConnectionTypes.Main],\n\t\tproperties: [\n\t\t\t{\n\t\t\t\tdisplayName:\n\t\t\t\t\t'The embbded data are stored in the server memory, so they will be lost when the server is restarted. Additionally, if the amount of data is too large, it may cause the server to crash due to insufficient memory.',\n\t\t\t\tname: 'notice',\n\t\t\t\ttype: 'notice',\n\t\t\t\tdefault: '',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Clear Store',\n\t\t\t\tname: 'clearStore',\n\t\t\t\ttype: 'boolean',\n\t\t\t\tdefault: false,\n\t\t\t\tdescription: 'Whether to clear the store before inserting new data',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Memory Key',\n\t\t\t\tname: 'memoryKey',\n\t\t\t\ttype: 'string',\n\t\t\t\tdefault: 'vector_store_key',\n\t\t\t\tdescription:\n\t\t\t\t\t'The key to use to store the vector memory in the workflow data. The key will be prefixed with the workflow ID to avoid collisions.',\n\t\t\t},\n\t\t],\n\t};\n\n\tasync execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {\n\t\tconst items = this.getInputData(0);\n\t\tconst embeddings = (await this.getInputConnectionData(\n\t\t\tNodeConnectionTypes.AiEmbedding,\n\t\t\t0,\n\t\t)) as Embeddings;\n\n\t\tconst memoryKey = this.getNodeParameter('memoryKey', 0) as string;\n\t\tconst clearStore = this.getNodeParameter('clearStore', 0) as boolean;\n\t\tconst documentInput = (await this.getInputConnectionData(NodeConnectionTypes.AiDocument, 0)) as\n\t\t\t| N8nJsonLoader\n\t\t\t| Array<Document<Record<string, unknown>>>;\n\n\t\tconst { processedDocuments, serializedDocuments } = await processDocuments(\n\t\t\tdocumentInput,\n\t\t\titems,\n\t\t);\n\n\t\tconst workflowId = this.getWorkflow().id;\n\n\t\tconst vectorStoreInstance = MemoryVectorStoreManager.getInstance(embeddings, this.logger);\n\t\tawait vectorStoreInstance.addDocuments(\n\t\t\t`${workflowId}__${memoryKey}`,\n\t\t\tprocessedDocuments,\n\t\t\tclearStore,\n\t\t);\n\n\t\treturn [serializedDocuments];\n\t}\n}\n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AK,aAAa,CAAC;AACjC,UAAM,aAAc,MAAM,KAAK;AAAA,MAC9B,wCAAoB;AAAA,MACpB;AAAA,IACD;AAEA,UAAM,YAAY,KAAK,iBAAiB,aAAa,CAAC;AACtD,UAAM,aAAa,KAAK,iBAAiB,cAAc,CAAC;AACxD,UAAM,gBAAiB,MAAM,KAAK,uBAAuB,wCAAoB,YAAY,CAAC;AAI1F,UAAM,EAAE,oBAAoB,oBAAoB,IAAI,UAAM;AAAA,MACzD;AAAA,MACA;AAAA,IACD;AAEA,UAAM,aAAa,KAAK,YAAY,EAAE;AAEtC,UAAM,sBAAsB,yDAAyB,YAAY,YAAY,KAAK,MAAM;AACxF,UAAM,oBAAoB;AAAA,MACzB,GAAG,UAAU,KAAK,SAAS;AAAA,MAC3B;AAAA,MACA;AAAA,IACD;AAEA,WAAO,CAAC,mBAAmB;AAAA,EAC5B;AACD;","names":[]}
@@ -92,3 +92,4 @@ class VectorStoreInMemoryLoad {
92
92
  0 && (module.exports = {
93
93
  VectorStoreInMemoryLoad
94
94
  });
95
+ //# sourceMappingURL=VectorStoreInMemoryLoad.node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../nodes/vector_store/VectorStoreInMemoryLoad/VectorStoreInMemoryLoad.node.ts"],"sourcesContent":["/* eslint-disable n8n-nodes-base/node-dirname-against-convention */\nimport type { Embeddings } from '@langchain/core/embeddings';\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';\n\nimport { MemoryVectorStoreManager } from '../shared/MemoryManager/MemoryVectorStoreManager';\n\n// This node is deprecated. Use VectorStoreInMemory instead.\nexport class VectorStoreInMemoryLoad implements INodeType {\n\tdescription: INodeTypeDescription = {\n\t\tdisplayName: 'In Memory Vector Store Load',\n\t\tname: 'vectorStoreInMemoryLoad',\n\t\ticon: 'fa:database',\n\t\tgroup: ['transform'],\n\t\tversion: 1,\n\t\thidden: true,\n\t\tdescription: 'Load embedded data from an in-memory vector store',\n\t\tdefaults: {\n\t\t\tname: 'In Memory Vector Store Load',\n\t\t},\n\t\tcodex: {\n\t\t\tcategories: ['AI'],\n\t\t\tsubcategories: {\n\t\t\t\tAI: ['Vector Stores'],\n\t\t\t},\n\t\t\tresources: {\n\t\t\t\tprimaryDocumentation: [\n\t\t\t\t\t{\n\t\t\t\t\t\turl: 'https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.vectorstoreinmemory/',\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\t{\n\t\t\t\tdisplayName: 'Embedding',\n\t\t\t\tmaxConnections: 1,\n\t\t\t\ttype: NodeConnectionTypes.AiEmbedding,\n\t\t\t\trequired: true,\n\t\t\t},\n\t\t],\n\t\toutputs: [NodeConnectionTypes.AiVectorStore],\n\t\toutputNames: ['Vector Store'],\n\t\tproperties: [\n\t\t\t{\n\t\t\t\tdisplayName: 'Memory Key',\n\t\t\t\tname: 'memoryKey',\n\t\t\t\ttype: 'string',\n\t\t\t\tdefault: 'vector_store_key',\n\t\t\t\tdescription:\n\t\t\t\t\t'The key to use to store the vector memory in the workflow data. The key will be prefixed with the workflow ID to avoid collisions.',\n\t\t\t},\n\t\t],\n\t};\n\n\tasync supplyData(this: ISupplyDataFunctions, itemIndex: number): Promise<SupplyData> {\n\t\tconst embeddings = (await this.getInputConnectionData(\n\t\t\tNodeConnectionTypes.AiEmbedding,\n\t\t\titemIndex,\n\t\t)) as Embeddings;\n\n\t\tconst workflowId = this.getWorkflow().id;\n\t\tconst memoryKey = this.getNodeParameter('memoryKey', 0) as string;\n\n\t\tconst vectorStoreSingleton = MemoryVectorStoreManager.getInstance(embeddings, this.logger);\n\t\tconst vectorStoreInstance = await vectorStoreSingleton.getVectorStore(\n\t\t\t`${workflowId}__${memoryKey}`,\n\t\t);\n\n\t\treturn {\n\t\t\tresponse: logWrapper(vectorStoreInstance, this),\n\t\t};\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,0BAMO;AAEP,wBAA2B;AAE3B,sCAAyC;AAGlC,MAAM,wBAA6C;AAAA,EAAnD;AACN,uBAAoC;AAAA,MACnC,aAAa;AAAA,MACb,MAAM;AAAA,MACN,MAAM;AAAA,MACN,OAAO,CAAC,WAAW;AAAA,MACnB,SAAS;AAAA,MACT,QAAQ;AAAA,MACR,aAAa;AAAA,MACb,UAAU;AAAA,QACT,MAAM;AAAA,MACP;AAAA,MACA,OAAO;AAAA,QACN,YAAY,CAAC,IAAI;AAAA,QACjB,eAAe;AAAA,UACd,IAAI,CAAC,eAAe;AAAA,QACrB;AAAA,QACA,WAAW;AAAA,UACV,sBAAsB;AAAA,YACrB;AAAA,cACC,KAAK;AAAA,YACN;AAAA,UACD;AAAA,QACD;AAAA,MACD;AAAA;AAAA,MAEA,QAAQ;AAAA,QACP;AAAA,UACC,aAAa;AAAA,UACb,gBAAgB;AAAA,UAChB,MAAM,wCAAoB;AAAA,UAC1B,UAAU;AAAA,QACX;AAAA,MACD;AAAA,MACA,SAAS,CAAC,wCAAoB,aAAa;AAAA,MAC3C,aAAa,CAAC,cAAc;AAAA,MAC5B,YAAY;AAAA,QACX;AAAA,UACC,aAAa;AAAA,UACb,MAAM;AAAA,UACN,MAAM;AAAA,UACN,SAAS;AAAA,UACT,aACC;AAAA,QACF;AAAA,MACD;AAAA,IACD;AAAA;AAAA,EAEA,MAAM,WAAuC,WAAwC;AACpF,UAAM,aAAc,MAAM,KAAK;AAAA,MAC9B,wCAAoB;AAAA,MACpB;AAAA,IACD;AAEA,UAAM,aAAa,KAAK,YAAY,EAAE;AACtC,UAAM,YAAY,KAAK,iBAAiB,aAAa,CAAC;AAEtD,UAAM,uBAAuB,yDAAyB,YAAY,YAAY,KAAK,MAAM;AACzF,UAAM,sBAAsB,MAAM,qBAAqB;AAAA,MACtD,GAAG,UAAU,KAAK,SAAS;AAAA,IAC5B;AAEA,WAAO;AAAA,MACN,cAAU,8BAAW,qBAAqB,IAAI;AAAA,IAC/C;AAAA,EACD;AACD;","names":[]}
@@ -268,3 +268,4 @@ class VectorStoreMongoDBAtlas extends (0, import_createVectorStoreNode.createVec
268
268
  0 && (module.exports = {
269
269
  VectorStoreMongoDBAtlas
270
270
  });
271
+ //# sourceMappingURL=VectorStoreMongoDBAtlas.node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../nodes/vector_store/VectorStoreMongoDBAtlas/VectorStoreMongoDBAtlas.node.ts"],"sourcesContent":["import { MongoDBAtlasVectorSearch } from '@langchain/mongodb';\nimport { MongoClient } from 'mongodb';\nimport { type ILoadOptionsFunctions, NodeOperationError, type INodeProperties } from 'n8n-workflow';\n\nimport { metadataFilterField } from '@utils/sharedFields';\n\nimport { createVectorStoreNode } from '../shared/createVectorStoreNode/createVectorStoreNode';\n\nconst mongoCollectionRLC: INodeProperties = {\n\tdisplayName: 'MongoDB Collection',\n\tname: 'mongoCollection',\n\ttype: 'resourceLocator',\n\tdefault: { mode: 'list', value: '' },\n\trequired: true,\n\tmodes: [\n\t\t{\n\t\t\tdisplayName: 'From List',\n\t\t\tname: 'list',\n\t\t\ttype: 'list',\n\t\t\ttypeOptions: {\n\t\t\t\tsearchListMethod: 'mongoCollectionSearch', // Method to fetch collections\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tdisplayName: 'Name',\n\t\t\tname: 'name',\n\t\t\ttype: 'string',\n\t\t\tplaceholder: 'e.g. my_collection',\n\t\t},\n\t],\n};\n\nconst vectorIndexName: INodeProperties = {\n\tdisplayName: 'Vector Index Name',\n\tname: 'vectorIndexName',\n\ttype: 'string',\n\tdefault: '',\n\tdescription: 'The name of the vector index',\n\trequired: true,\n};\n\nconst embeddingField: INodeProperties = {\n\tdisplayName: 'Embedding',\n\tname: 'embedding',\n\ttype: 'string',\n\tdefault: 'embedding',\n\tdescription: 'The field with the embedding array',\n\trequired: true,\n};\n\nconst metadataField: INodeProperties = {\n\tdisplayName: 'Metadata Field',\n\tname: 'metadata_field',\n\ttype: 'string',\n\tdefault: 'text',\n\tdescription: 'The text field of the raw data',\n\trequired: true,\n};\n\nconst sharedFields: INodeProperties[] = [\n\tmongoCollectionRLC,\n\tembeddingField,\n\tmetadataField,\n\tvectorIndexName,\n];\n\nconst mongoNamespaceField: INodeProperties = {\n\tdisplayName: 'Namespace',\n\tname: 'namespace',\n\ttype: 'string',\n\tdescription: 'Logical partition for documents. Uses metadata.namespace field for filtering.',\n\tdefault: '',\n};\n\nconst retrieveFields: INodeProperties[] = [\n\t{\n\t\tdisplayName: 'Options',\n\t\tname: 'options',\n\t\ttype: 'collection',\n\t\tplaceholder: 'Add Option',\n\t\tdefault: {},\n\t\toptions: [mongoNamespaceField, metadataFilterField],\n\t},\n];\n\nconst insertFields: INodeProperties[] = [\n\t{\n\t\tdisplayName: 'Options',\n\t\tname: 'options',\n\t\ttype: 'collection',\n\t\tplaceholder: 'Add Option',\n\t\tdefault: {},\n\t\toptions: [\n\t\t\t{\n\t\t\t\tdisplayName: 'Clear Namespace',\n\t\t\t\tname: 'clearNamespace',\n\t\t\t\ttype: 'boolean',\n\t\t\t\tdefault: false,\n\t\t\t\tdescription: 'Whether to clear documents in the namespace before inserting new data',\n\t\t\t},\n\t\t\tmongoNamespaceField,\n\t\t],\n\t},\n];\n\nlet mongoClient: MongoClient | null = null;\n\nasync function getMongoClient(context: any) {\n\tif (!mongoClient) {\n\t\tconst credentials = await context.getCredentials('mongoDb');\n\t\tmongoClient = new MongoClient(credentials.connectionString as string, {\n\t\t\tappName: 'devrel.integration.n8n_vector_integ',\n\t\t});\n\t\tawait mongoClient.connect();\n\t}\n\treturn mongoClient;\n}\n\nasync function mongoClientAndDatabase(context: any) {\n\tconst client = await getMongoClient(context);\n\tconst credentials = await context.getCredentials('mongoDb');\n\tconst db = client.db(credentials.database as string);\n\treturn { client, db };\n}\n\nasync function mongoCollectionSearch(this: ILoadOptionsFunctions) {\n\tconst { db } = await mongoClientAndDatabase(this);\n\ttry {\n\t\tconst collections = await db.listCollections().toArray();\n\t\tconst results = collections.map((collection) => ({\n\t\t\tname: collection.name,\n\t\t\tvalue: collection.name,\n\t\t}));\n\n\t\treturn { results };\n\t} catch (error) {\n\t\tthrow new NodeOperationError(this.getNode(), `Error: ${error.message}`);\n\t}\n}\nexport class VectorStoreMongoDBAtlas extends createVectorStoreNode({\n\tmeta: {\n\t\tdisplayName: 'MongoDB Atlas Vector Store',\n\t\tname: 'vectorStoreMongoDBAtlas',\n\t\tdescription: 'Work with your data in MongoDB Atlas Vector Store',\n\t\ticon: { light: 'file:mongodb.svg', dark: 'file:mongodb.dark.svg' },\n\t\tdocsUrl:\n\t\t\t'https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.vectorstoremongodbatlas/',\n\t\tcredentials: [\n\t\t\t{\n\t\t\t\tname: 'mongoDb',\n\t\t\t\trequired: true,\n\t\t\t},\n\t\t],\n\t\toperationModes: ['load', 'insert', 'retrieve', 'update', 'retrieve-as-tool'],\n\t},\n\tmethods: { listSearch: { mongoCollectionSearch } },\n\tretrieveFields,\n\tloadFields: retrieveFields,\n\tinsertFields,\n\tsharedFields,\n\tasync getVectorStoreClient(context, _filter, embeddings, itemIndex) {\n\t\ttry {\n\t\t\tconst { db } = await mongoClientAndDatabase(context);\n\t\t\ttry {\n\t\t\t\tconst collectionName = context.getNodeParameter('mongoCollection', itemIndex, '', {\n\t\t\t\t\textractValue: true,\n\t\t\t\t}) as string;\n\n\t\t\t\tconst mongoVectorIndexName = context.getNodeParameter('vectorIndexName', itemIndex, '', {\n\t\t\t\t\textractValue: true,\n\t\t\t\t}) as string;\n\n\t\t\t\tconst embeddingFieldName = context.getNodeParameter('embedding', itemIndex, '', {\n\t\t\t\t\textractValue: true,\n\t\t\t\t}) as string;\n\n\t\t\t\tconst metadataFieldName = context.getNodeParameter('metadata_field', itemIndex, '', {\n\t\t\t\t\textractValue: true,\n\t\t\t\t}) as string;\n\n\t\t\t\tconst collection = db.collection(collectionName);\n\n\t\t\t\t// test index exists\n\t\t\t\tconst indexes = await collection.listSearchIndexes().toArray();\n\n\t\t\t\tconst indexExists = indexes.some((index) => index.name === mongoVectorIndexName);\n\n\t\t\t\tif (!indexExists) {\n\t\t\t\t\tthrow new NodeOperationError(\n\t\t\t\t\t\tcontext.getNode(),\n\t\t\t\t\t\t`Index ${mongoVectorIndexName} not found`,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\titemIndex,\n\t\t\t\t\t\t\tdescription: 'Please check that the index exists in your collection',\n\t\t\t\t\t\t},\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\treturn new MongoDBAtlasVectorSearch(embeddings, {\n\t\t\t\t\tcollection,\n\t\t\t\t\tindexName: mongoVectorIndexName, // Default index name\n\t\t\t\t\ttextKey: metadataFieldName, // Field containing raw text\n\t\t\t\t\tembeddingKey: embeddingFieldName, // Field containing embeddings\n\t\t\t\t});\n\t\t\t} catch (error) {\n\t\t\t\tthrow new NodeOperationError(context.getNode(), `Error: ${error.message}`, {\n\t\t\t\t\titemIndex,\n\t\t\t\t\tdescription: 'Please check your MongoDB Atlas connection details',\n\t\t\t\t});\n\t\t\t} finally {\n\t\t\t\t// Don't close the client here to maintain connection pooling\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tthrow new NodeOperationError(context.getNode(), `Error: ${error.message}`, {\n\t\t\t\titemIndex,\n\t\t\t\tdescription: 'Please check your MongoDB Atlas connection details',\n\t\t\t});\n\t\t}\n\t},\n\tasync populateVectorStore(context, embeddings, documents, itemIndex) {\n\t\ttry {\n\t\t\tconst { db } = await mongoClientAndDatabase(context);\n\t\t\ttry {\n\t\t\t\tconst mongoCollectionName = context.getNodeParameter('mongoCollection', itemIndex, '', {\n\t\t\t\t\textractValue: true,\n\t\t\t\t}) as string;\n\t\t\t\tconst embeddingFieldName = context.getNodeParameter('embedding', itemIndex, '', {\n\t\t\t\t\textractValue: true,\n\t\t\t\t}) as string;\n\n\t\t\t\tconst metadataFieldName = context.getNodeParameter('metadata_field', itemIndex, '', {\n\t\t\t\t\textractValue: true,\n\t\t\t\t}) as string;\n\n\t\t\t\tconst mongoDBAtlasVectorIndex = context.getNodeParameter('vectorIndexName', itemIndex, '', {\n\t\t\t\t\textractValue: true,\n\t\t\t\t}) as string;\n\n\t\t\t\t// Check if collection exists\n\t\t\t\tconst collections = await db.listCollections({ name: mongoCollectionName }).toArray();\n\t\t\t\tif (collections.length === 0) {\n\t\t\t\t\tawait db.createCollection(mongoCollectionName);\n\t\t\t\t}\n\t\t\t\tconst collection = db.collection(mongoCollectionName);\n\t\t\t\tawait MongoDBAtlasVectorSearch.fromDocuments(documents, embeddings, {\n\t\t\t\t\tcollection,\n\t\t\t\t\tindexName: mongoDBAtlasVectorIndex, // Default index name\n\t\t\t\t\ttextKey: metadataFieldName, // Field containing raw text\n\t\t\t\t\tembeddingKey: embeddingFieldName, // Field containing embeddings\n\t\t\t\t});\n\t\t\t} catch (error) {\n\t\t\t\tthrow new NodeOperationError(context.getNode(), `Error: ${error.message}`, {\n\t\t\t\t\titemIndex,\n\t\t\t\t\tdescription: 'Please check your MongoDB Atlas connection details',\n\t\t\t\t});\n\t\t\t} finally {\n\t\t\t\t// Don't close the client here to maintain connection pooling\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tthrow new NodeOperationError(context.getNode(), `Error: ${error.message}`, {\n\t\t\t\titemIndex,\n\t\t\t\tdescription: 'Please check your MongoDB Atlas connection details',\n\t\t\t});\n\t\t}\n\t},\n}) {}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAAyC;AACzC,IAAAA,kBAA4B;AAC5B,0BAAqF;AAErF,0BAAoC;AAEpC,mCAAsC;AAEtC,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,uCAAmB,QAAQ,QAAQ,GAAG,UAAU,MAAM,OAAO,IAAI;AAAA,QAC1E;AAAA,QACA,aAAa;AAAA,MACd,CAAC;AAAA,IACF;AAAA,EACD;AACD,CAAC,EAAE;AAAC;","names":["import_mongodb"]}
@@ -280,3 +280,4 @@ class VectorStorePGVector extends (0, import_createVectorStoreNode.createVectorS
280
280
  0 && (module.exports = {
281
281
  VectorStorePGVector
282
282
  });
283
+ //# sourceMappingURL=VectorStorePGVector.node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../nodes/vector_store/VectorStorePGVector/VectorStorePGVector.node.ts"],"sourcesContent":["import {\n\tPGVectorStore,\n\ttype DistanceStrategy,\n\ttype PGVectorStoreArgs,\n} from '@langchain/community/vectorstores/pgvector';\nimport type { EmbeddingsInterface } from '@langchain/core/embeddings';\nimport { configurePostgres } from 'n8n-nodes-base/dist/nodes/Postgres/transport/index';\nimport type { PostgresNodeCredentials } from 'n8n-nodes-base/dist/nodes/Postgres/v2/helpers/interfaces';\nimport type { INodeProperties } from 'n8n-workflow';\nimport type pg from 'pg';\n\nimport { metadataFilterField } from '@utils/sharedFields';\n\nimport { createVectorStoreNode } from '../shared/createVectorStoreNode/createVectorStoreNode';\n\ntype CollectionOptions = {\n\tuseCollection?: boolean;\n\tcollectionName?: string;\n\tcollectionTableName?: string;\n};\n\ntype ColumnOptions = {\n\tidColumnName: string;\n\tvectorColumnName: string;\n\tcontentColumnName: string;\n\tmetadataColumnName: string;\n};\n\nconst sharedFields: INodeProperties[] = [\n\t{\n\t\tdisplayName: 'Table Name',\n\t\tname: 'tableName',\n\t\ttype: 'string',\n\t\tdefault: 'n8n_vectors',\n\t\tdescription:\n\t\t\t'The table name to store the vectors in. If table does not exist, it will be created.',\n\t},\n];\n\nconst collectionField: INodeProperties = {\n\tdisplayName: 'Collection',\n\tname: 'collection',\n\ttype: 'fixedCollection',\n\tdescription: 'Collection of vectors',\n\tdefault: {\n\t\tvalues: {\n\t\t\tuseCollection: false,\n\t\t\tcollectionName: 'n8n',\n\t\t\tcollectionTable: 'n8n_vector_collections',\n\t\t},\n\t},\n\ttypeOptions: {},\n\tplaceholder: 'Add Collection Settings',\n\toptions: [\n\t\t{\n\t\t\tname: 'values',\n\t\t\tdisplayName: 'Collection Settings',\n\t\t\tvalues: [\n\t\t\t\t{\n\t\t\t\t\tdisplayName: 'Use Collection',\n\t\t\t\t\tname: 'useCollection',\n\t\t\t\t\ttype: 'boolean',\n\t\t\t\t\tdefault: false,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tdisplayName: 'Collection Name',\n\t\t\t\t\tname: 'collectionName',\n\t\t\t\t\ttype: 'string',\n\t\t\t\t\tdefault: 'n8n',\n\t\t\t\t\trequired: true,\n\t\t\t\t\tdisplayOptions: { show: { useCollection: [true] } },\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tdisplayName: 'Collection Table Name',\n\t\t\t\t\tname: 'collectionTableName',\n\t\t\t\t\ttype: 'string',\n\t\t\t\t\tdefault: 'n8n_vector_collections',\n\t\t\t\t\trequired: true,\n\t\t\t\t\tdisplayOptions: { show: { useCollection: [true] } },\n\t\t\t\t},\n\t\t\t],\n\t\t},\n\t],\n};\n\nconst columnNamesField: INodeProperties = {\n\tdisplayName: 'Column Names',\n\tname: 'columnNames',\n\ttype: 'fixedCollection',\n\tdescription: 'The names of the columns in the PGVector table',\n\tdefault: {\n\t\tvalues: {\n\t\t\tidColumnName: 'id',\n\t\t\tvectorColumnName: 'embedding',\n\t\t\tcontentColumnName: 'text',\n\t\t\tmetadataColumnName: 'metadata',\n\t\t},\n\t},\n\ttypeOptions: {},\n\tplaceholder: 'Set Column Names',\n\toptions: [\n\t\t{\n\t\t\tname: 'values',\n\t\t\tdisplayName: 'Column Name Settings',\n\t\t\tvalues: [\n\t\t\t\t{\n\t\t\t\t\tdisplayName: 'ID Column Name',\n\t\t\t\t\tname: 'idColumnName',\n\t\t\t\t\ttype: 'string',\n\t\t\t\t\tdefault: 'id',\n\t\t\t\t\trequired: true,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tdisplayName: 'Vector Column Name',\n\t\t\t\t\tname: 'vectorColumnName',\n\t\t\t\t\ttype: 'string',\n\t\t\t\t\tdefault: 'embedding',\n\t\t\t\t\trequired: true,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tdisplayName: 'Content Column Name',\n\t\t\t\t\tname: 'contentColumnName',\n\t\t\t\t\ttype: 'string',\n\t\t\t\t\tdefault: 'text',\n\t\t\t\t\trequired: true,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tdisplayName: 'Metadata Column Name',\n\t\t\t\t\tname: 'metadataColumnName',\n\t\t\t\t\ttype: 'string',\n\t\t\t\t\tdefault: 'metadata',\n\t\t\t\t\trequired: true,\n\t\t\t\t},\n\t\t\t],\n\t\t},\n\t],\n};\n\nconst distanceStrategyField: INodeProperties = {\n\tdisplayName: 'Distance Strategy',\n\tname: 'distanceStrategy',\n\ttype: 'options',\n\tdefault: 'cosine',\n\tdescription: 'The method to calculate the distance between two vectors',\n\toptions: [\n\t\t{\n\t\t\tname: 'Cosine',\n\t\t\tvalue: 'cosine',\n\t\t},\n\t\t{\n\t\t\tname: 'Inner Product',\n\t\t\tvalue: 'innerProduct',\n\t\t},\n\t\t{\n\t\t\tname: 'Euclidean',\n\t\t\tvalue: 'euclidean',\n\t\t},\n\t],\n};\n\nconst insertFields: INodeProperties[] = [\n\t{\n\t\tdisplayName: 'Options',\n\t\tname: 'options',\n\t\ttype: 'collection',\n\t\tplaceholder: 'Add Option',\n\t\tdefault: {},\n\t\toptions: [collectionField, columnNamesField],\n\t},\n];\n\nconst retrieveFields: INodeProperties[] = [\n\t{\n\t\tdisplayName: 'Options',\n\t\tname: 'options',\n\t\ttype: 'collection',\n\t\tplaceholder: 'Add Option',\n\t\tdefault: {},\n\t\toptions: [distanceStrategyField, collectionField, columnNamesField, metadataFilterField],\n\t},\n];\n\n/**\n * Extended PGVectorStore class to handle custom filtering.\n * This wrapper is necessary because when used as a retriever,\n * similaritySearchVectorWithScore should use this.filter instead of\n * expecting it from the parameter\n */\nclass ExtendedPGVectorStore extends PGVectorStore {\n\tstatic async initialize(\n\t\tembeddings: EmbeddingsInterface,\n\t\targs: PGVectorStoreArgs & { dimensions?: number },\n\t): Promise<ExtendedPGVectorStore> {\n\t\tconst { dimensions, ...rest } = args;\n\t\tconst postgresqlVectorStore = new this(embeddings, rest);\n\n\t\tawait postgresqlVectorStore._initializeClient();\n\t\tawait postgresqlVectorStore.ensureTableInDatabase(dimensions);\n\t\tif (postgresqlVectorStore.collectionTableName) {\n\t\t\tawait postgresqlVectorStore.ensureCollectionTableInDatabase();\n\t\t}\n\n\t\treturn postgresqlVectorStore;\n\t}\n\n\tasync similaritySearchVectorWithScore(\n\t\tquery: number[],\n\t\tk: number,\n\t\tfilter?: PGVectorStore['FilterType'],\n\t) {\n\t\tconst mergedFilter = { ...this.filter, ...filter };\n\t\treturn await super.similaritySearchVectorWithScore(query, k, mergedFilter);\n\t}\n}\n\nexport class VectorStorePGVector extends createVectorStoreNode<ExtendedPGVectorStore>({\n\tmeta: {\n\t\tdescription: 'Work with your data in Postgresql with the PGVector extension',\n\t\ticon: 'file:postgres.svg',\n\t\tdisplayName: 'Postgres PGVector Store',\n\t\tdocsUrl:\n\t\t\t'https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.vectorstorepgvector/',\n\t\tname: 'vectorStorePGVector',\n\t\tcredentials: [\n\t\t\t{\n\t\t\t\tname: 'postgres',\n\t\t\t\trequired: true,\n\t\t\t\ttestedBy: 'postgresConnectionTest',\n\t\t\t},\n\t\t],\n\t\toperationModes: ['load', 'insert', 'retrieve', 'retrieve-as-tool'],\n\t},\n\tsharedFields,\n\tinsertFields,\n\tloadFields: retrieveFields,\n\tretrieveFields,\n\tasync getVectorStoreClient(context, filter, embeddings, itemIndex) {\n\t\tconst tableName = context.getNodeParameter('tableName', itemIndex, '', {\n\t\t\textractValue: true,\n\t\t}) as string;\n\t\tconst credentials = await context.getCredentials('postgres');\n\t\tconst pgConf = await configurePostgres.call(context, credentials as PostgresNodeCredentials);\n\t\tconst pool = pgConf.db.$pool as unknown as pg.Pool;\n\n\t\tconst config: PGVectorStoreArgs = {\n\t\t\tpool,\n\t\t\ttableName,\n\t\t\tfilter,\n\t\t};\n\n\t\tconst collectionOptions = context.getNodeParameter(\n\t\t\t'options.collection.values',\n\t\t\t0,\n\t\t\t{},\n\t\t) as CollectionOptions;\n\n\t\tif (collectionOptions && collectionOptions.useCollection) {\n\t\t\tconfig.collectionName = collectionOptions.collectionName;\n\t\t\tconfig.collectionTableName = collectionOptions.collectionTableName;\n\t\t}\n\n\t\tconfig.columns = context.getNodeParameter('options.columnNames.values', 0, {\n\t\t\tidColumnName: 'id',\n\t\t\tvectorColumnName: 'embedding',\n\t\t\tcontentColumnName: 'text',\n\t\t\tmetadataColumnName: 'metadata',\n\t\t}) as ColumnOptions;\n\n\t\tconfig.distanceStrategy = context.getNodeParameter(\n\t\t\t'options.distanceStrategy',\n\t\t\t0,\n\t\t\t'cosine',\n\t\t) as DistanceStrategy;\n\n\t\treturn await ExtendedPGVectorStore.initialize(embeddings, config);\n\t},\n\n\tasync populateVectorStore(context, embeddings, documents, itemIndex) {\n\t\t// NOTE: if you are to create the HNSW index before use, you need to consider moving the distanceStrategy field to\n\t\t// shared fields, because you need that strategy when creating the index.\n\t\tconst tableName = context.getNodeParameter('tableName', itemIndex, '', {\n\t\t\textractValue: true,\n\t\t}) as string;\n\t\tconst credentials = await context.getCredentials('postgres');\n\t\tconst pgConf = await configurePostgres.call(context, credentials as PostgresNodeCredentials);\n\t\tconst pool = pgConf.db.$pool as unknown as pg.Pool;\n\n\t\tconst config: PGVectorStoreArgs = {\n\t\t\tpool,\n\t\t\ttableName,\n\t\t};\n\n\t\tconst collectionOptions = context.getNodeParameter(\n\t\t\t'options.collection.values',\n\t\t\t0,\n\t\t\t{},\n\t\t) as CollectionOptions;\n\n\t\tif (collectionOptions && collectionOptions.useCollection) {\n\t\t\tconfig.collectionName = collectionOptions.collectionName;\n\t\t\tconfig.collectionTableName = collectionOptions.collectionTableName;\n\t\t}\n\n\t\tconfig.columns = context.getNodeParameter('options.columnNames.values', 0, {\n\t\t\tidColumnName: 'id',\n\t\t\tvectorColumnName: 'embedding',\n\t\t\tcontentColumnName: 'text',\n\t\t\tmetadataColumnName: 'metadata',\n\t\t}) as ColumnOptions;\n\n\t\tconst vectorStore = await PGVectorStore.fromDocuments(documents, embeddings, config);\n\t\tvectorStore.client?.release();\n\t},\n\n\treleaseVectorStoreClient(vectorStore) {\n\t\tvectorStore.client?.release();\n\t},\n}) {}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAIO;AAEP,uBAAkC;AAKlC,0BAAoC;AAEpC,mCAAsC;AAetC,MAAM,eAAkC;AAAA,EACvC;AAAA,IACC,aAAa;AAAA,IACb,MAAM;AAAA,IACN,MAAM;AAAA,IACN,SAAS;AAAA,IACT,aACC;AAAA,EACF;AACD;AAEA,MAAM,kBAAmC;AAAA,EACxC,aAAa;AAAA,EACb,MAAM;AAAA,EACN,MAAM;AAAA,EACN,aAAa;AAAA,EACb,SAAS;AAAA,IACR,QAAQ;AAAA,MACP,eAAe;AAAA,MACf,gBAAgB;AAAA,MAChB,iBAAiB;AAAA,IAClB;AAAA,EACD;AAAA,EACA,aAAa,CAAC;AAAA,EACd,aAAa;AAAA,EACb,SAAS;AAAA,IACR;AAAA,MACC,MAAM;AAAA,MACN,aAAa;AAAA,MACb,QAAQ;AAAA,QACP;AAAA,UACC,aAAa;AAAA,UACb,MAAM;AAAA,UACN,MAAM;AAAA,UACN,SAAS;AAAA,QACV;AAAA,QACA;AAAA,UACC,aAAa;AAAA,UACb,MAAM;AAAA,UACN,MAAM;AAAA,UACN,SAAS;AAAA,UACT,UAAU;AAAA,UACV,gBAAgB,EAAE,MAAM,EAAE,e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ACjC;AAAA,MACA;AAAA,MACA,CAAC;AAAA,IACF;AAEA,QAAI,qBAAqB,kBAAkB,eAAe;AACzD,aAAO,iBAAiB,kBAAkB;AAC1C,aAAO,sBAAsB,kBAAkB;AAAA,IAChD;AAEA,WAAO,UAAU,QAAQ,iBAAiB,8BAA8B,GAAG;AAAA,MAC1E,cAAc;AAAA,MACd,kBAAkB;AAAA,MAClB,mBAAmB;AAAA,MACnB,oBAAoB;AAAA,IACrB,CAAC;AAED,UAAM,cAAc,MAAM,8BAAc,cAAc,WAAW,YAAY,MAAM;AACnF,gBAAY,QAAQ,QAAQ;AAAA,EAC7B;AAAA,EAEA,yBAAyB,aAAa;AACrC,gBAAY,QAAQ,QAAQ;AAAA,EAC7B;AACD,CAAC,EAAE;AAAC;","names":[]}
@@ -138,3 +138,4 @@ class VectorStorePinecone extends (0, import_createVectorStoreNode.createVectorS
138
138
  0 && (module.exports = {
139
139
  VectorStorePinecone
140
140
  });
141
+ //# sourceMappingURL=VectorStorePinecone.node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../nodes/vector_store/VectorStorePinecone/VectorStorePinecone.node.ts"],"sourcesContent":["import type { PineconeStoreParams } from '@langchain/pinecone';\nimport { PineconeStore } from '@langchain/pinecone';\nimport { Pinecone } from '@pinecone-database/pinecone';\nimport { NodeOperationError, type INodeProperties } from 'n8n-workflow';\n\nimport { metadataFilterField } from '@utils/sharedFields';\n\nimport { createVectorStoreNode } from '../shared/createVectorStoreNode/createVectorStoreNode';\nimport { pineconeIndexSearch } from '../shared/createVectorStoreNode/methods/listSearch';\nimport { pineconeIndexRLC } from '../shared/descriptions';\n\nconst sharedFields: INodeProperties[] = [pineconeIndexRLC];\n\nconst pineconeNamespaceField: INodeProperties = {\n\tdisplayName: 'Pinecone Namespace',\n\tname: 'pineconeNamespace',\n\ttype: 'string',\n\tdescription:\n\t\t'Partition the records in an index into namespaces. Queries and other operations are then limited to one namespace, so different requests can search different subsets of your index.',\n\tdefault: '',\n};\n\nconst retrieveFields: INodeProperties[] = [\n\t{\n\t\tdisplayName: 'Options',\n\t\tname: 'options',\n\t\ttype: 'collection',\n\t\tplaceholder: 'Add Option',\n\t\tdefault: {},\n\t\toptions: [pineconeNamespaceField, metadataFilterField],\n\t},\n];\n\nconst insertFields: INodeProperties[] = [\n\t{\n\t\tdisplayName: 'Options',\n\t\tname: 'options',\n\t\ttype: 'collection',\n\t\tplaceholder: 'Add Option',\n\t\tdefault: {},\n\t\toptions: [\n\t\t\t{\n\t\t\t\tdisplayName: 'Clear Namespace',\n\t\t\t\tname: 'clearNamespace',\n\t\t\t\ttype: 'boolean',\n\t\t\t\tdefault: false,\n\t\t\t\tdescription: 'Whether to clear the namespace before inserting new data',\n\t\t\t},\n\t\t\tpineconeNamespaceField,\n\t\t],\n\t},\n];\n\nexport class VectorStorePinecone extends createVectorStoreNode<PineconeStore>({\n\tmeta: {\n\t\tdisplayName: 'Pinecone Vector Store',\n\t\tname: 'vectorStorePinecone',\n\t\tdescription: 'Work with your data in Pinecone Vector Store',\n\t\ticon: { light: 'file:pinecone.svg', dark: 'file:pinecone.dark.svg' },\n\t\tdocsUrl:\n\t\t\t'https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.vectorstorepinecone/',\n\t\tcredentials: [\n\t\t\t{\n\t\t\t\tname: 'pineconeApi',\n\t\t\t\trequired: true,\n\t\t\t},\n\t\t],\n\t\toperationModes: ['load', 'insert', 'retrieve', 'update', 'retrieve-as-tool'],\n\t},\n\tmethods: { listSearch: { pineconeIndexSearch } },\n\tretrieveFields,\n\tloadFields: retrieveFields,\n\tinsertFields,\n\tsharedFields,\n\tasync getVectorStoreClient(context, filter, embeddings, itemIndex) {\n\t\tconst index = context.getNodeParameter('pineconeIndex', itemIndex, '', {\n\t\t\textractValue: true,\n\t\t}) as string;\n\t\tconst options = context.getNodeParameter('options', itemIndex, {}) as {\n\t\t\tpineconeNamespace?: string;\n\t\t};\n\t\tconst credentials = await context.getCredentials('pineconeApi');\n\n\t\tconst client = new Pinecone({\n\t\t\tapiKey: credentials.apiKey as string,\n\t\t});\n\n\t\tconst pineconeIndex = client.Index(index);\n\t\tconst config: PineconeStoreParams = {\n\t\t\tnamespace: options.pineconeNamespace ?? undefined,\n\t\t\tpineconeIndex,\n\t\t\tfilter,\n\t\t};\n\n\t\treturn await PineconeStore.fromExistingIndex(embeddings, config);\n\t},\n\tasync populateVectorStore(context, embeddings, documents, itemIndex) {\n\t\tconst index = context.getNodeParameter('pineconeIndex', itemIndex, '', {\n\t\t\textractValue: true,\n\t\t}) as string;\n\t\tconst options = context.getNodeParameter('options', itemIndex, {}) as {\n\t\t\tpineconeNamespace?: string;\n\t\t\tclearNamespace?: boolean;\n\t\t};\n\t\tconst credentials = await context.getCredentials('pineconeApi');\n\n\t\tconst client = new Pinecone({\n\t\t\tapiKey: credentials.apiKey as string,\n\t\t});\n\n\t\tconst indexes = ((await client.listIndexes()).indexes ?? []).map((i) => i.name);\n\n\t\tif (!indexes.includes(index)) {\n\t\t\tthrow new NodeOperationError(context.getNode(), `Index ${index} not found`, {\n\t\t\t\titemIndex,\n\t\t\t\tdescription: 'Please check that the index exists in your vector store',\n\t\t\t});\n\t\t}\n\n\t\tconst pineconeIndex = client.Index(index);\n\n\t\tif (options.pineconeNamespace && options.clearNamespace) {\n\t\t\tconst namespace = pineconeIndex.namespace(options.pineconeNamespace);\n\t\t\ttry {\n\t\t\t\tawait namespace.deleteAll();\n\t\t\t} catch (error) {\n\t\t\t\t// Namespace doesn't exist yet\n\t\t\t\tcontext.logger.info(`Namespace ${options.pineconeNamespace} does not exist yet`);\n\t\t\t}\n\t\t}\n\n\t\tawait PineconeStore.fromDocuments(documents, embeddings, {\n\t\t\tnamespace: options.pineconeNamespace ?? undefined,\n\t\t\tpineconeIndex,\n\t\t});\n\t},\n}) {}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,sBAA8B;AAC9B,IAA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AEA,UAAM,8BAAc,cAAc,WAAW,YAAY;AAAA,MACxD,WAAW,QAAQ,qBAAqB;AAAA,MACxC;AAAA,IACD,CAAC;AAAA,EACF;AACD,CAAC,EAAE;AAAC;","names":["import_pinecone"]}
@@ -140,3 +140,4 @@ class VectorStorePineconeInsert {
140
140
  0 && (module.exports = {
141
141
  VectorStorePineconeInsert
142
142
  });
143
+ //# sourceMappingURL=VectorStorePineconeInsert.node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../nodes/vector_store/VectorStorePineconeInsert/VectorStorePineconeInsert.node.ts"],"sourcesContent":["import type { Document } from '@langchain/core/documents';\nimport type { Embeddings } from '@langchain/core/embeddings';\nimport { PineconeStore } from '@langchain/pinecone';\nimport { Pinecone } from '@pinecone-database/pinecone';\nimport {\n\ttype IExecuteFunctions,\n\ttype INodeType,\n\ttype INodeTypeDescription,\n\ttype INodeExecutionData,\n\tNodeConnectionTypes,\n} from 'n8n-workflow';\n\nimport type { N8nJsonLoader } from '@utils/N8nJsonLoader';\n\nimport { pineconeIndexSearch } from '../shared/createVectorStoreNode/methods/listSearch';\nimport { pineconeIndexRLC } from '../shared/descriptions';\nimport { processDocuments } from '../shared/processDocuments';\n\n// This node is deprecated. Use VectorStorePinecone instead.\nexport class VectorStorePineconeInsert implements INodeType {\n\tdescription: INodeTypeDescription = {\n\t\tdisplayName: 'Pinecone: Insert',\n\t\thidden: true,\n\t\tname: 'vectorStorePineconeInsert',\n\t\ticon: 'file:pinecone.svg',\n\t\tgroup: ['transform'],\n\t\tversion: 1,\n\t\tdescription: 'Insert data into Pinecone Vector Store index',\n\t\tdefaults: {\n\t\t\tname: 'Pinecone: Insert',\n\t\t\t// eslint-disable-next-line n8n-nodes-base/node-class-description-non-core-color-present\n\t\t\tcolor: '#1321A7',\n\t\t},\n\t\tcodex: {\n\t\t\tcategories: ['AI'],\n\t\t\tsubcategories: {\n\t\t\t\tAI: ['Vector Stores'],\n\t\t\t},\n\t\t\tresources: {\n\t\t\t\tprimaryDocumentation: [\n\t\t\t\t\t{\n\t\t\t\t\t\turl: 'https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.vectorstorepinecone/',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t},\n\t\t},\n\t\tcredentials: [\n\t\t\t{\n\t\t\t\tname: 'pineconeApi',\n\t\t\t\trequired: true,\n\t\t\t},\n\t\t],\n\t\tinputs: [\n\t\t\tNodeConnectionTypes.Main,\n\t\t\t{\n\t\t\t\tdisplayName: 'Document',\n\t\t\t\tmaxConnections: 1,\n\t\t\t\ttype: NodeConnectionTypes.AiDocument,\n\t\t\t\trequired: true,\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Embedding',\n\t\t\t\tmaxConnections: 1,\n\t\t\t\ttype: NodeConnectionTypes.AiEmbedding,\n\t\t\t\trequired: true,\n\t\t\t},\n\t\t],\n\t\toutputs: [NodeConnectionTypes.Main],\n\t\tproperties: [\n\t\t\tpineconeIndexRLC,\n\t\t\t{\n\t\t\t\tdisplayName: 'Pinecone Namespace',\n\t\t\t\tname: 'pineconeNamespace',\n\t\t\t\ttype: 'string',\n\t\t\t\tdefault: '',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Specify the document to load in the document loader sub-node',\n\t\t\t\tname: 'notice',\n\t\t\t\ttype: 'notice',\n\t\t\t\tdefault: '',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Clear Namespace',\n\t\t\t\tname: 'clearNamespace',\n\t\t\t\ttype: 'boolean',\n\t\t\t\tdefault: false,\n\t\t\t\tdescription: 'Whether to clear the namespace before inserting new data',\n\t\t\t},\n\t\t],\n\t};\n\n\tmethods = {\n\t\tlistSearch: {\n\t\t\tpineconeIndexSearch,\n\t\t},\n\t};\n\n\tasync execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {\n\t\tconst items = this.getInputData(0);\n\t\tthis.logger.debug('Executing data for Pinecone Insert Vector Store');\n\n\t\tconst namespace = this.getNodeParameter('pineconeNamespace', 0) as string;\n\t\tconst index = this.getNodeParameter('pineconeIndex', 0, '', { extractValue: true }) as string;\n\t\tconst clearNamespace = this.getNodeParameter('clearNamespace', 0) as boolean;\n\n\t\tconst credentials = await this.getCredentials('pineconeApi');\n\n\t\tconst documentInput = (await this.getInputConnectionData(NodeConnectionTypes.AiDocument, 0)) as\n\t\t\t| N8nJsonLoader\n\t\t\t| Array<Document<Record<string, unknown>>>;\n\n\t\tconst embeddings = (await this.getInputConnectionData(\n\t\t\tNodeConnectionTypes.AiEmbedding,\n\t\t\t0,\n\t\t)) as Embeddings;\n\n\t\tconst client = new Pinecone({\n\t\t\tapiKey: credentials.apiKey as string,\n\t\t});\n\n\t\tconst pineconeIndex = client.Index(index);\n\n\t\tif (namespace && clearNamespace) {\n\t\t\tawait pineconeIndex.namespace(namespace).deleteAll();\n\t\t}\n\n\t\tconst { processedDocuments, serializedDocuments } = await processDocuments(\n\t\t\tdocumentInput,\n\t\t\titems,\n\t\t);\n\n\t\tawait PineconeStore.fromDocuments(processedDocuments, embeddings, {\n\t\t\tnamespace: namespace || undefined,\n\t\t\tpineconeIndex,\n\t\t});\n\n\t\treturn [serializedDocuments];\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,sBAA8B;AAC9B,IAAAA,mBAAyB;AACzB,0BAMO;AAIP,wBAAoC;AACpC,0BAAiC;AACjC,8BAAiC;AAG1B,MAAM,0BAA+C;AAAA,EAArD;AACN,uBAAoC;AAAA,MACnC,aAAa;AAAA,MACb,QAAQ;AAAA,MACR,MAAM;AAAA,MACN,MAAM;AAAA,MACN,OAAO,CAAC,WAAW;AAAA,MACnB,SAAS;AAAA,MACT,aAAa;AAAA,MACb,UAAU;AAAA,QACT,MAAM;AAAA;AAAA,QAEN,OAAO;AAAA,MACR;AAAA,MACA,OAAO;AAAA,QACN,YAAY,CAAC,IAAI;AAAA,QACjB,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,KAAK,eAAe,aAAa;AAE3D,UAAM,gBAAiB,MAAM,KAAK,uBAAuB,wCAAoB,YAAY,CAAC;AAI1F,UAAM,aAAc,MAAM,KAAK;AAAA,MAC9B,wCAAoB;AAAA,MACpB;AAAA,IACD;AAEA,UAAM,SAAS,IAAI,0BAAS;AAAA,MAC3B,QAAQ,YAAY;AAAA,IACrB,CAAC;AAED,UAAM,gBAAgB,OAAO,MAAM,KAAK;AAExC,QAAI,aAAa,gBAAgB;AAChC,YAAM,cAAc,UAAU,SAAS,EAAE,UAAU;AAAA,IACpD;AAEA,UAAM,EAAE,oBAAoB,oBAAoB,IAAI,UAAM;AAAA,MACzD;AAAA,MACA;AAAA,IACD;AAEA,UAAM,8BAAc,cAAc,oBAAoB,YAAY;AAAA,MACjE,WAAW,aAAa;AAAA,MACxB;AAAA,IACD,CAAC;AAED,WAAO,CAAC,mBAAmB;AAAA,EAC5B;AACD;","names":["import_pinecone"]}
@@ -126,3 +126,4 @@ class VectorStorePineconeLoad {
126
126
  0 && (module.exports = {
127
127
  VectorStorePineconeLoad
128
128
  });
129
+ //# sourceMappingURL=VectorStorePineconeLoad.node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../nodes/vector_store/VectorStorePineconeLoad/VectorStorePineconeLoad.node.ts"],"sourcesContent":["import type { Embeddings } from '@langchain/core/embeddings';\nimport type { PineconeStoreParams } from '@langchain/pinecone';\nimport { PineconeStore } from '@langchain/pinecone';\nimport { Pinecone } from '@pinecone-database/pinecone';\nimport {\n\tNodeConnectionTypes,\n\ttype INodeType,\n\ttype INodeTypeDescription,\n\ttype ISupplyDataFunctions,\n\ttype SupplyData,\n} from 'n8n-workflow';\n\nimport { getMetadataFiltersValues } from '@utils/helpers';\nimport { logWrapper } from '@utils/logWrapper';\nimport { metadataFilterField } from '@utils/sharedFields';\n\nimport { pineconeIndexSearch } from '../shared/createVectorStoreNode/methods/listSearch';\nimport { pineconeIndexRLC } from '../shared/descriptions';\n\n// This node is deprecated. Use VectorStorePinecone instead.\nexport class VectorStorePineconeLoad implements INodeType {\n\tdescription: INodeTypeDescription = {\n\t\tdisplayName: 'Pinecone: Load',\n\t\t// Vector Store nodes got merged into a single node\n\t\thidden: true,\n\t\tname: 'vectorStorePineconeLoad',\n\t\ticon: 'file:pinecone.svg',\n\t\tgroup: ['transform'],\n\t\tversion: 1,\n\t\tdescription: 'Load data from Pinecone Vector Store index',\n\t\tdefaults: {\n\t\t\tname: 'Pinecone: Load',\n\t\t},\n\t\tcodex: {\n\t\t\tcategories: ['AI'],\n\t\t\tsubcategories: {\n\t\t\t\tAI: ['Vector Stores'],\n\t\t\t},\n\t\t\tresources: {\n\t\t\t\tprimaryDocumentation: [\n\t\t\t\t\t{\n\t\t\t\t\t\turl: 'https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.vectorstorepinecone/',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t},\n\t\t},\n\t\tcredentials: [\n\t\t\t{\n\t\t\t\tname: 'pineconeApi',\n\t\t\t\trequired: true,\n\t\t\t},\n\t\t],\n\t\tinputs: [\n\t\t\t{\n\t\t\t\tdisplayName: 'Embedding',\n\t\t\t\tmaxConnections: 1,\n\t\t\t\ttype: NodeConnectionTypes.AiEmbedding,\n\t\t\t\trequired: true,\n\t\t\t},\n\t\t],\n\t\toutputs: [NodeConnectionTypes.AiVectorStore],\n\t\toutputNames: ['Vector Store'],\n\t\tproperties: [\n\t\t\tpineconeIndexRLC,\n\t\t\t{\n\t\t\t\tdisplayName: 'Pinecone Namespace',\n\t\t\t\tname: 'pineconeNamespace',\n\t\t\t\ttype: 'string',\n\t\t\t\tdefault: '',\n\t\t\t},\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: [metadataFilterField],\n\t\t\t},\n\t\t],\n\t};\n\n\tmethods = {\n\t\tlistSearch: {\n\t\t\tpineconeIndexSearch,\n\t\t},\n\t};\n\n\tasync supplyData(this: ISupplyDataFunctions, itemIndex: number): Promise<SupplyData> {\n\t\tthis.logger.debug('Supplying data for Pinecone Load Vector Store');\n\n\t\tconst namespace = this.getNodeParameter('pineconeNamespace', itemIndex) as string;\n\t\tconst index = this.getNodeParameter('pineconeIndex', itemIndex, '', {\n\t\t\textractValue: true,\n\t\t}) as string;\n\n\t\tconst credentials = await this.getCredentials('pineconeApi');\n\t\tconst embeddings = (await this.getInputConnectionData(\n\t\t\tNodeConnectionTypes.AiEmbedding,\n\t\t\titemIndex,\n\t\t)) as Embeddings;\n\n\t\tconst client = new Pinecone({\n\t\t\tapiKey: credentials.apiKey as string,\n\t\t});\n\n\t\tconst pineconeIndex = client.Index(index);\n\t\tconst config: PineconeStoreParams = {\n\t\t\tnamespace: namespace || undefined,\n\t\t\tpineconeIndex,\n\t\t\tfilter: getMetadataFiltersValues(this, itemIndex),\n\t\t};\n\n\t\tconst vectorStore = await PineconeStore.fromExistingIndex(embeddings, config);\n\n\t\treturn {\n\t\t\tresponse: logWrapper(vectorStore, this),\n\t\t};\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,sBAA8B;AAC9B,IAAAA,mBAAyB;AACzB,0BAMO;AAEP,qBAAyC;AACzC,wBAA2B;AAC3B,0BAAoC;AAEpC,wBAAoC;AACpC,0BAAiC;AAG1B,MAAM,wBAA6C;AAAA,EAAnD;AACN,uBAAoC;AAAA,MACnC,aAAa;AAAA;AAAA,MAEb,QAAQ;AAAA,MACR,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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ACnC,WAAW,aAAa;AAAA,MACxB;AAAA,MACA,YAAQ,yCAAyB,MAAM,SAAS;AAAA,IACjD;AAEA,UAAM,cAAc,MAAM,8BAAc,kBAAkB,YAAY,MAAM;AAE5E,WAAO;AAAA,MACN,cAAU,8BAAW,aAAa,IAAI;AAAA,IACvC;AAAA,EACD;AACD;","names":["import_pinecone"]}
@@ -129,3 +129,4 @@ class VectorStoreQdrant extends (0, import_createVectorStoreNode.createVectorSto
129
129
  0 && (module.exports = {
130
130
  VectorStoreQdrant
131
131
  });
132
+ //# sourceMappingURL=VectorStoreQdrant.node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../nodes/vector_store/VectorStoreQdrant/VectorStoreQdrant.node.ts"],"sourcesContent":["import type { Callbacks } from '@langchain/core/callbacks/manager';\nimport type { Embeddings } from '@langchain/core/embeddings';\nimport type { QdrantLibArgs } from '@langchain/qdrant';\nimport { QdrantVectorStore } from '@langchain/qdrant';\nimport type { Schemas as QdrantSchemas } from '@qdrant/js-client-rest';\nimport type { IDataObject, INodeProperties } from 'n8n-workflow';\n\nimport { createVectorStoreNode } from '../shared/createVectorStoreNode/createVectorStoreNode';\nimport { qdrantCollectionsSearch } from '../shared/createVectorStoreNode/methods/listSearch';\nimport { qdrantCollectionRLC } from '../shared/descriptions';\n\nclass ExtendedQdrantVectorStore extends QdrantVectorStore {\n\tprivate static defaultFilter: IDataObject = {};\n\n\tstatic async fromExistingCollection(\n\t\tembeddings: Embeddings,\n\t\targs: QdrantLibArgs,\n\t\tdefaultFilter: IDataObject = {},\n\t): Promise<QdrantVectorStore> {\n\t\tExtendedQdrantVectorStore.defaultFilter = defaultFilter;\n\t\treturn await super.fromExistingCollection(embeddings, args);\n\t}\n\n\tasync similaritySearch(\n\t\tquery: string,\n\t\tk: number,\n\t\tfilter?: IDataObject,\n\t\tcallbacks?: Callbacks | undefined,\n\t) {\n\t\tconst mergedFilter = { ...ExtendedQdrantVectorStore.defaultFilter, ...filter };\n\t\treturn await super.similaritySearch(query, k, mergedFilter, callbacks);\n\t}\n}\n\nconst sharedFields: INodeProperties[] = [qdrantCollectionRLC];\n\nconst insertFields: INodeProperties[] = [\n\t{\n\t\tdisplayName: 'Options',\n\t\tname: 'options',\n\t\ttype: 'collection',\n\t\tplaceholder: 'Add Option',\n\t\tdefault: {},\n\t\toptions: [\n\t\t\t{\n\t\t\t\tdisplayName: 'Collection Config',\n\t\t\t\tname: 'collectionConfig',\n\t\t\t\ttype: 'json',\n\t\t\t\tdefault: '',\n\t\t\t\tdescription:\n\t\t\t\t\t'JSON options for creating a collection. <a href=\"https://qdrant.tech/documentation/concepts/collections\">Learn more</a>.',\n\t\t\t},\n\t\t],\n\t},\n];\n\nconst retrieveFields: INodeProperties[] = [\n\t{\n\t\tdisplayName: 'Options',\n\t\tname: 'options',\n\t\ttype: 'collection',\n\t\tplaceholder: 'Add Option',\n\t\tdefault: {},\n\t\toptions: [\n\t\t\t{\n\t\t\t\tdisplayName: 'Search Filter',\n\t\t\t\tname: 'searchFilterJson',\n\t\t\t\ttype: 'json',\n\t\t\t\ttypeOptions: {\n\t\t\t\t\trows: 5,\n\t\t\t\t},\n\t\t\t\tdefault:\n\t\t\t\t\t'{\\n \"should\": [\\n {\\n \"key\": \"metadata.batch\",\\n \"match\": {\\n \"value\": 12345\\n }\\n }\\n ]\\n}',\n\t\t\t\tvalidateType: 'object',\n\t\t\t\tdescription:\n\t\t\t\t\t'Filter pageContent or metadata using this <a href=\"https://qdrant.tech/documentation/concepts/filtering/\" target=\"_blank\">filtering syntax</a>',\n\t\t\t},\n\t\t],\n\t},\n];\n\nexport class VectorStoreQdrant extends createVectorStoreNode<ExtendedQdrantVectorStore>({\n\tmeta: {\n\t\tdisplayName: 'Qdrant Vector Store',\n\t\tname: 'vectorStoreQdrant',\n\t\tdescription: 'Work with your data in a Qdrant collection',\n\t\ticon: 'file:qdrant.svg',\n\t\tdocsUrl:\n\t\t\t'https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.vectorstoreqdrant/',\n\t\tcredentials: [\n\t\t\t{\n\t\t\t\tname: 'qdrantApi',\n\t\t\t\trequired: true,\n\t\t\t},\n\t\t],\n\t},\n\tmethods: { listSearch: { qdrantCollectionsSearch } },\n\tloadFields: retrieveFields,\n\tinsertFields,\n\tsharedFields,\n\tretrieveFields,\n\tasync getVectorStoreClient(context, filter, embeddings, itemIndex) {\n\t\tconst collection = context.getNodeParameter('qdrantCollection', itemIndex, '', {\n\t\t\textractValue: true,\n\t\t}) as string;\n\n\t\tconst credentials = await context.getCredentials('qdrantApi');\n\n\t\tconst config: QdrantLibArgs = {\n\t\t\turl: credentials.qdrantUrl as string,\n\t\t\tapiKey: credentials.apiKey as string,\n\t\t\tcollectionName: collection,\n\t\t};\n\n\t\treturn await ExtendedQdrantVectorStore.fromExistingCollection(embeddings, config, filter);\n\t},\n\tasync populateVectorStore(context, embeddings, documents, itemIndex) {\n\t\tconst collectionName = context.getNodeParameter('qdrantCollection', itemIndex, '', {\n\t\t\textractValue: true,\n\t\t}) as string;\n\n\t\t// If collection config is not provided, the collection will be created with default settings\n\t\t// i.e. with the size of the passed embeddings and \"Cosine\" distance metric\n\t\tconst { collectionConfig } = context.getNodeParameter('options', itemIndex, {}) as {\n\t\t\tcollectionConfig?: QdrantSchemas['CreateCollection'];\n\t\t};\n\t\tconst credentials = await context.getCredentials('qdrantApi');\n\n\t\tconst config: QdrantLibArgs = {\n\t\t\turl: credentials.qdrantUrl as string,\n\t\t\tapiKey: credentials.apiKey as string,\n\t\t\tcollectionName,\n\t\t\tcollectionConfig,\n\t\t};\n\n\t\tawait QdrantVectorStore.fromDocuments(documents, embeddings, config);\n\t},\n}) {}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,oBAAkC;AAIlC,mCAAsC;AACtC,wBAAwC;AACxC,0BAAoC;AAEpC,MAAM,6BAAN,MAAM,mCAAkC,gCAAkB;AAAA,EAGzD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YAAY,EAAE,mEAAwB,EAAE;AAAA,EACnD,YAAY;AAAA,EACZ;AAAA,EACA;AAAA,EACA;AAAA,EACA,MAAM,qBAAqB,SAAS,QAAQ,YAAY,WAAW;AAClE,UAAM,aAAa,QAAQ,iBAAiB,oBAAoB,WAAW,IAAI;AAAA,MAC9E,cAAc;AAAA,IACf,CAAC;AAED,UAAM,cAAc,MAAM,QAAQ,eAAe,WAAW;AAE5D,UAAM,SAAwB;AAAA,MAC7B,KAAK,YAAY;AAAA,MACjB,QAAQ,YAAY;AAAA,MACpB,gBAAgB;AAAA,IACjB;AAEA,WAAO,MAAM,0BAA0B,uBAAuB,YAAY,QAAQ,MAAM;AAAA,EACzF;AAAA,EACA,MAAM,oBAAoB,SAAS,YAAY,WAAW,WAAW;AACpE,UAAM,iBAAiB,QAAQ,iBAAiB,oBAAoB,WAAW,IAAI;AAAA,MAClF,cAAc;AAAA,IACf,CAAC;AAID,UAAM,EAAE,iBAAiB,IAAI,QAAQ,iBAAiB,WAAW,WAAW,CAAC,CAAC;AAG9E,UAAM,cAAc,MAAM,QAAQ,eAAe,WAAW;AAE5D,UAAM,SAAwB;AAAA,MAC7B,KAAK,YAAY;AAAA,MACjB,QAAQ,YAAY;AAAA,MACpB;AAAA,MACA;AAAA,IACD;AAEA,UAAM,gCAAkB,cAAc,WAAW,YAAY,MAAM;AAAA,EACpE;AACD,CAAC,EAAE;AAAC;","names":[]}
@@ -126,3 +126,4 @@ class VectorStoreSupabase extends (0, import_createVectorStoreNode.createVectorS
126
126
  0 && (module.exports = {
127
127
  VectorStoreSupabase
128
128
  });
129
+ //# sourceMappingURL=VectorStoreSupabase.node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../nodes/vector_store/VectorStoreSupabase/VectorStoreSupabase.node.ts"],"sourcesContent":["import { SupabaseVectorStore } from '@langchain/community/vectorstores/supabase';\nimport { createClient } from '@supabase/supabase-js';\nimport { NodeOperationError, type INodeProperties } from 'n8n-workflow';\n\nimport { metadataFilterField } from '@utils/sharedFields';\n\nimport { createVectorStoreNode } from '../shared/createVectorStoreNode/createVectorStoreNode';\nimport { supabaseTableNameSearch } from '../shared/createVectorStoreNode/methods/listSearch';\nimport { supabaseTableNameRLC } from '../shared/descriptions';\n\nconst queryNameField: INodeProperties = {\n\tdisplayName: 'Query Name',\n\tname: 'queryName',\n\ttype: 'string',\n\tdefault: 'match_documents',\n\tdescription: 'Name of the query to use for matching documents',\n};\n\nconst sharedFields: INodeProperties[] = [supabaseTableNameRLC];\nconst insertFields: INodeProperties[] = [\n\t{\n\t\tdisplayName: 'Options',\n\t\tname: 'options',\n\t\ttype: 'collection',\n\t\tplaceholder: 'Add Option',\n\t\tdefault: {},\n\t\toptions: [queryNameField],\n\t},\n];\n\nconst retrieveFields: INodeProperties[] = [\n\t{\n\t\tdisplayName: 'Options',\n\t\tname: 'options',\n\t\ttype: 'collection',\n\t\tplaceholder: 'Add Option',\n\t\tdefault: {},\n\t\toptions: [queryNameField, metadataFilterField],\n\t},\n];\n\nconst updateFields: INodeProperties[] = [...insertFields];\n\nexport class VectorStoreSupabase extends createVectorStoreNode<SupabaseVectorStore>({\n\tmeta: {\n\t\tdescription: 'Work with your data in Supabase Vector Store',\n\t\ticon: 'file:supabase.svg',\n\t\tdisplayName: 'Supabase Vector Store',\n\t\tdocsUrl:\n\t\t\t'https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.vectorstoresupabase/',\n\t\tname: 'vectorStoreSupabase',\n\t\tcredentials: [\n\t\t\t{\n\t\t\t\tname: 'supabaseApi',\n\t\t\t\trequired: true,\n\t\t\t},\n\t\t],\n\t\toperationModes: ['load', 'insert', 'retrieve', 'update', 'retrieve-as-tool'],\n\t},\n\tmethods: {\n\t\tlistSearch: { supabaseTableNameSearch },\n\t},\n\tsharedFields,\n\tinsertFields,\n\tloadFields: retrieveFields,\n\tretrieveFields,\n\tupdateFields,\n\tasync getVectorStoreClient(context, filter, embeddings, itemIndex) {\n\t\tconst tableName = context.getNodeParameter('tableName', itemIndex, '', {\n\t\t\textractValue: true,\n\t\t}) as string;\n\t\tconst options = context.getNodeParameter('options', itemIndex, {}) as {\n\t\t\tqueryName: string;\n\t\t};\n\t\tconst credentials = await context.getCredentials('supabaseApi');\n\t\tconst client = createClient(credentials.host as string, credentials.serviceRole as string);\n\n\t\treturn await SupabaseVectorStore.fromExistingIndex(embeddings, {\n\t\t\tclient,\n\t\t\ttableName,\n\t\t\tqueryName: options.queryName ?? 'match_documents',\n\t\t\tfilter,\n\t\t});\n\t},\n\tasync populateVectorStore(context, embeddings, documents, itemIndex) {\n\t\tconst tableName = context.getNodeParameter('tableName', itemIndex, '', {\n\t\t\textractValue: true,\n\t\t}) as string;\n\t\tconst options = context.getNodeParameter('options', itemIndex, {}) as {\n\t\t\tqueryName: string;\n\t\t};\n\t\tconst credentials = await context.getCredentials('supabaseApi');\n\t\tconst client = createClient(credentials.host as string, credentials.serviceRole as string);\n\n\t\ttry {\n\t\t\tawait SupabaseVectorStore.fromDocuments(documents, embeddings, {\n\t\t\t\tclient,\n\t\t\t\ttableName,\n\t\t\t\tqueryName: options.queryName ?? 'match_documents',\n\t\t\t});\n\t\t} catch (error) {\n\t\t\tif ((error as Error).message === 'Error inserting: undefined 404 Not Found') {\n\t\t\t\tthrow new NodeOperationError(context.getNode(), `Table ${tableName} not found`, {\n\t\t\t\t\titemIndex,\n\t\t\t\t\tdescription: 'Please check that the table exists in your vector store',\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tthrow new NodeOperationError(context.getNode(), error as Error, {\n\t\t\t\t\titemIndex,\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t},\n}) {}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAAoC;AACpC,yBAA6B;AAC7B,0BAAyD;AAEzD,0BAAoC;AAEpC,mCAAsC;AACtC,wBAAwC;AACxC,0BAAqC;AAErC,MAAM,iBAAkC;AAAA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,kBAAkB,YAAY;AAAA,MAC9D;AAAA,MACA;AAAA,MACA,WAAW,QAAQ,aAAa;AAAA,MAChC;AAAA,IACD,CAAC;AAAA,EACF;AAAA,EACA,MAAM,oBAAoB,SAAS,YAAY,WAAW,WAAW;AACpE,UAAM,YAAY,QAAQ,iBAAiB,aAAa,WAAW,IAAI;AAAA,MACtE,cAAc;AAAA,IACf,CAAC;AACD,UAAM,UAAU,QAAQ,iBAAiB,WAAW,WAAW,CAAC,CAAC;AAGjE,UAAM,cAAc,MAAM,QAAQ,eAAe,aAAa;AAC9D,UAAM,aAAS,iCAAa,YAAY,MAAgB,YAAY,WAAqB;AAEzF,QAAI;AACH,YAAM,oCAAoB,cAAc,WAAW,YAAY;AAAA,QAC9D;AAAA,QACA;AAAA,QACA,WAAW,QAAQ,aAAa;AAAA,MACjC,CAAC;AAAA,IACF,SAAS,OAAO;AACf,UAAK,MAAgB,YAAY,4CAA4C;AAC5E,cAAM,IAAI,uCAAmB,QAAQ,QAAQ,GAAG,SAAS,SAAS,cAAc;AAAA,UAC/E;AAAA,UACA,aAAa;AAAA,QACd,CAAC;AAAA,MACF,OAAO;AACN,cAAM,IAAI,uCAAmB,QAAQ,QAAQ,GAAG,OAAgB;AAAA,UAC/D;AAAA,QACD,CAAC;AAAA,MACF;AAAA,IACD;AAAA,EACD;AACD,CAAC,EAAE;AAAC;","names":[]}
@@ -130,3 +130,4 @@ class VectorStoreSupabaseInsert {
130
130
  0 && (module.exports = {
131
131
  VectorStoreSupabaseInsert
132
132
  });
133
+ //# sourceMappingURL=VectorStoreSupabaseInsert.node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../nodes/vector_store/VectorStoreSupabaseInsert/VectorStoreSupabaseInsert.node.ts"],"sourcesContent":["import { SupabaseVectorStore } from '@langchain/community/vectorstores/supabase';\nimport type { Document } from '@langchain/core/documents';\nimport type { Embeddings } from '@langchain/core/embeddings';\nimport { createClient } from '@supabase/supabase-js';\nimport {\n\ttype IExecuteFunctions,\n\ttype INodeType,\n\ttype INodeTypeDescription,\n\ttype INodeExecutionData,\n\tNodeConnectionTypes,\n} from 'n8n-workflow';\n\nimport type { N8nJsonLoader } from '@utils/N8nJsonLoader';\n\nimport { supabaseTableNameSearch } from '../shared/createVectorStoreNode/methods/listSearch';\nimport { supabaseTableNameRLC } from '../shared/descriptions';\nimport { processDocuments } from '../shared/processDocuments';\n\n// This node is deprecated. Use VectorStoreSupabase instead.\nexport class VectorStoreSupabaseInsert implements INodeType {\n\tdescription: INodeTypeDescription = {\n\t\tdisplayName: 'Supabase: Insert',\n\t\t// Vector Store nodes got merged into a single node\n\t\thidden: true,\n\t\tname: 'vectorStoreSupabaseInsert',\n\t\ticon: 'file:supabase.svg',\n\t\tgroup: ['transform'],\n\t\tversion: 1,\n\t\tdescription:\n\t\t\t'Insert data into Supabase Vector Store index [https://supabase.com/docs/guides/ai/langchain]',\n\t\tdefaults: {\n\t\t\tname: 'Supabase: Insert',\n\t\t},\n\t\tcodex: {\n\t\t\tcategories: ['AI'],\n\t\t\tsubcategories: {\n\t\t\t\tAI: ['Vector Stores'],\n\t\t\t},\n\t\t\tresources: {\n\t\t\t\tprimaryDocumentation: [\n\t\t\t\t\t{\n\t\t\t\t\t\turl: 'https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.vectorstoresupabase/',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t},\n\t\t},\n\t\tcredentials: [\n\t\t\t{\n\t\t\t\tname: 'supabaseApi',\n\t\t\t\trequired: true,\n\t\t\t},\n\t\t],\n\t\tinputs: [\n\t\t\tNodeConnectionTypes.Main,\n\t\t\t{\n\t\t\t\tdisplayName: 'Document',\n\t\t\t\tmaxConnections: 1,\n\t\t\t\ttype: NodeConnectionTypes.AiDocument,\n\t\t\t\trequired: true,\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Embedding',\n\t\t\t\tmaxConnections: 1,\n\t\t\t\ttype: NodeConnectionTypes.AiEmbedding,\n\t\t\t\trequired: true,\n\t\t\t},\n\t\t],\n\t\toutputs: [NodeConnectionTypes.Main],\n\t\tproperties: [\n\t\t\t{\n\t\t\t\tdisplayName:\n\t\t\t\t\t'Please refer to the <a href=\"https://supabase.com/docs/guides/ai/langchain\" target=\"_blank\">Supabase documentation</a> for more information on how to setup your database as a Vector Store.',\n\t\t\t\tname: 'setupNotice',\n\t\t\t\ttype: 'notice',\n\t\t\t\tdefault: '',\n\t\t\t},\n\t\t\tsupabaseTableNameRLC,\n\t\t\t{\n\t\t\t\tdisplayName: 'Query Name',\n\t\t\t\tname: 'queryName',\n\t\t\t\ttype: 'string',\n\t\t\t\tdefault: 'match_documents',\n\t\t\t\trequired: true,\n\t\t\t\tdescription: 'Name of the query to use for matching documents',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Specify the document to load in the document loader sub-node',\n\t\t\t\tname: 'notice',\n\t\t\t\ttype: 'notice',\n\t\t\t\tdefault: '',\n\t\t\t},\n\t\t],\n\t};\n\n\tmethods = { listSearch: { supabaseTableNameSearch } };\n\n\tasync execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {\n\t\tthis.logger.debug('Executing data for Supabase Insert Vector Store');\n\n\t\tconst items = this.getInputData(0);\n\t\tconst tableName = this.getNodeParameter('tableName', 0, '', { extractValue: true }) as string;\n\t\tconst queryName = this.getNodeParameter('queryName', 0) as string;\n\t\tconst credentials = await this.getCredentials('supabaseApi');\n\n\t\tconst documentInput = (await this.getInputConnectionData(NodeConnectionTypes.AiDocument, 0)) as\n\t\t\t| N8nJsonLoader\n\t\t\t| Array<Document<Record<string, unknown>>>;\n\n\t\tconst embeddings = (await this.getInputConnectionData(\n\t\t\tNodeConnectionTypes.AiEmbedding,\n\t\t\t0,\n\t\t)) as Embeddings;\n\t\tconst client = createClient(credentials.host as string, credentials.serviceRole as string);\n\n\t\tconst { processedDocuments, serializedDocuments } = await processDocuments(\n\t\t\tdocumentInput,\n\t\t\titems,\n\t\t);\n\n\t\tawait SupabaseVectorStore.fromDocuments(processedDocuments, embeddings, {\n\t\t\tclient,\n\t\t\ttableName,\n\t\t\tqueryName,\n\t\t});\n\n\t\treturn [serializedDocuments];\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAAoC;AAGpC,yBAA6B;AAC7B,0BAMO;AAIP,wBAAwC;AACxC,0BAAqC;AACrC,8BAAiC;AAG1B,MAAM,0BAA+C;AAAA,EAArD;AACN,uBAAoC;AAAA,MACnC,aAAa;AAAA;AAAA,MAEb,QAAQ;AAAA,MACR,MAAM;AAAA,MACN,MAAM;AAAA,MACN,OAAO,CAAC,WAAW;AAAA,MACnB,SAAS;AAAA,MACT,aACC;AAAA,MACD,UAAU;AAAA,QACT,MAAM;AAAA,MACP;AAAA,MACA,OAAO;AAAA,QACN,YAAY,CAAC,IAAI;AAAA,QACjB,eAAe;AAAA,UACd,IAAI,CAAC,eAAe;AAAA,QACrB;AAAA,QACA,WAAW;AAAA,UACV,sBAAsB;AAAA,YACrB;AAAA,cACC,KAAK;AAAA,YACN;AAAA,UACD;AAAA,QACD;AAAA,MACD;AAAA,MACA,aAAa;AAAA,QACZ;AAAA,UACC,MAAM;AAAA,UACN,UAAU;AAAA,QACX;AAAA,MACD;AAAA,MACA,QAAQ;AAAA,QACP,wCAAoB;AAAA,QACpB;AAAA,UACC,aAAa;AAAA,UACb,gBAAgB;AAAA,UAChB,MAAM,wCAAoB;AAAA,UAC1B,UAAU;AAAA,QACX;AAAA,QACA;AAAA,UACC,aAAa;AAAA,UACb,gBAAgB;AAAA,UAChB,MAAM,wCAAoB;AAAA,UAC1B,UAAU;AAAA,QACX;AAAA,MACD;AAAA,MACA,SAAS,CAAC,wCAAoB,IAAI;AAAA,MAClC,YAAY;AAAA,QACX;AAAA,UACC,aACC;AAAA,UACD,MAAM;AAAA,UACN,MAAM;AAAA,UACN,SAAS;AAAA,QACV;AAAA,QACA;AAAA,QACA;AAAA,UACC,aAAa;AAAA,UACb,MAAM;AAAA,UACN,MAAM;AAAA,UACN,SAAS;AAAA,UACT,UAAU;AAAA,UACV,aAAa;AAAA,QACd;AAAA,QACA;AAAA,UACC,aAAa;AAAA,UACb,MAAM;AAAA,UACN,MAAM;AAAA,UACN,SAAS;AAAA,QACV;AAAA,MACD;AAAA,IACD;AAEA,mBAAU,EAAE,YAAY,EAAE,mEAAwB,EAAE;AAAA;AAAA,EAEpD,MAAM,UAAkE;AACvE,SAAK,OAAO,MAAM,iDAAiD;AAEnE,UAAM,QAAQ,KAAK,aAAa,CAAC;AACjC,UAAM,YAAY,KAAK,iBAAiB,aAAa,GAAG,IAAI,EAAE,cAAc,KAAK,CAAC;AAClF,UAAM,YAAY,KAAK,iBAAiB,aAAa,CAAC;AACtD,UAAM,cAAc,MAAM,KAAK,eAAe,aAAa;AAE3D,UAAM,gBAAiB,MAAM,KAAK,uBAAuB,wCAAoB,YAAY,CAAC;AAI1F,UAAM,aAAc,MAAM,KAAK;AAAA,MAC9B,wCAAoB;AAAA,MACpB;AAAA,IACD;AACA,UAAM,aAAS,iCAAa,YAAY,MAAgB,YAAY,WAAqB;AAEzF,UAAM,EAAE,oBAAoB,oBAAoB,IAAI,UAAM;AAAA,MACzD;AAAA,MACA;AAAA,IACD;AAEA,UAAM,oCAAoB,cAAc,oBAAoB,YAAY;AAAA,MACvE;AAAA,MACA;AAAA,MACA;AAAA,IACD,CAAC;AAED,WAAO,CAAC,mBAAmB;AAAA,EAC5B;AACD;","names":[]}
@@ -122,3 +122,4 @@ class VectorStoreSupabaseLoad {
122
122
  0 && (module.exports = {
123
123
  VectorStoreSupabaseLoad
124
124
  });
125
+ //# sourceMappingURL=VectorStoreSupabaseLoad.node.js.map