@n8n/n8n-nodes-langchain 0.2.1 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (207) hide show
  1. package/dist/build.tsbuildinfo +1 -1
  2. package/dist/credentials/PineconeApi.credentials.d.ts +2 -1
  3. package/dist/credentials/PineconeApi.credentials.js +8 -0
  4. package/dist/credentials/PineconeApi.credentials.js.map +1 -1
  5. package/dist/known/credentials.json +13 -11
  6. package/dist/known/nodes.json +28 -0
  7. package/dist/nodes/agents/Agent/Agent.node.js +45 -12
  8. package/dist/nodes/agents/Agent/Agent.node.js.map +1 -1
  9. package/dist/nodes/agents/Agent/agents/ConversationalAgent/description.js +21 -0
  10. package/dist/nodes/agents/Agent/agents/ConversationalAgent/description.js.map +1 -1
  11. package/dist/nodes/agents/Agent/agents/ConversationalAgent/execute.js +11 -7
  12. package/dist/nodes/agents/Agent/agents/ConversationalAgent/execute.js.map +1 -1
  13. package/dist/nodes/agents/Agent/agents/OpenAiFunctionsAgent/description.js +21 -0
  14. package/dist/nodes/agents/Agent/agents/OpenAiFunctionsAgent/description.js.map +1 -1
  15. package/dist/nodes/agents/Agent/agents/OpenAiFunctionsAgent/execute.js +3 -1
  16. package/dist/nodes/agents/Agent/agents/OpenAiFunctionsAgent/execute.js.map +1 -1
  17. package/dist/nodes/agents/Agent/agents/PlanAndExecuteAgent/description.d.ts +2 -0
  18. package/dist/nodes/agents/Agent/agents/PlanAndExecuteAgent/description.js +57 -0
  19. package/dist/nodes/agents/Agent/agents/PlanAndExecuteAgent/description.js.map +1 -0
  20. package/dist/nodes/agents/Agent/agents/PlanAndExecuteAgent/execute.d.ts +2 -0
  21. package/dist/nodes/agents/Agent/agents/PlanAndExecuteAgent/execute.js +50 -0
  22. package/dist/nodes/agents/Agent/agents/PlanAndExecuteAgent/execute.js.map +1 -0
  23. package/dist/nodes/agents/Agent/agents/PlanAndExecuteAgent/prompt.d.ts +1 -0
  24. package/dist/nodes/agents/Agent/agents/PlanAndExecuteAgent/prompt.js +11 -0
  25. package/dist/nodes/agents/Agent/agents/PlanAndExecuteAgent/prompt.js.map +1 -0
  26. package/dist/nodes/agents/Agent/agents/ReActAgent/description.js +14 -0
  27. package/dist/nodes/agents/Agent/agents/ReActAgent/description.js.map +1 -1
  28. package/dist/nodes/agents/Agent/agents/ReActAgent/execute.js +1 -1
  29. package/dist/nodes/agents/Agent/agents/ReActAgent/execute.js.map +1 -1
  30. package/dist/nodes/agents/Agent/agents/SqlAgent/description.js +2 -2
  31. package/dist/nodes/agents/Agent/agents/SqlAgent/description.js.map +1 -1
  32. package/dist/nodes/agents/Agent/agents/SqlAgent/execute.js +2 -2
  33. package/dist/nodes/agents/Agent/agents/SqlAgent/execute.js.map +1 -1
  34. package/dist/nodes/agents/Agent/agents/SqlAgent/other/handlers/postgres.js.map +1 -1
  35. package/dist/nodes/agents/Agent/agents/SqlAgent/other/handlers/sqlite.js.map +1 -1
  36. package/dist/nodes/agents/OpenAiAssistant/OpenAiAssistant.node.d.ts +5 -0
  37. package/dist/nodes/agents/OpenAiAssistant/OpenAiAssistant.node.js +328 -0
  38. package/dist/nodes/agents/OpenAiAssistant/OpenAiAssistant.node.js.map +1 -0
  39. package/dist/nodes/agents/OpenAiAssistant/utils.d.ts +5 -0
  40. package/dist/nodes/agents/OpenAiAssistant/utils.js +36 -0
  41. package/dist/nodes/agents/OpenAiAssistant/utils.js.map +1 -0
  42. package/dist/nodes/chains/ChainLLM/ChainLlm.node.d.ts +1 -1
  43. package/dist/nodes/chains/ChainLLM/ChainLlm.node.js +240 -18
  44. package/dist/nodes/chains/ChainLLM/ChainLlm.node.js.map +1 -1
  45. package/dist/nodes/chains/ChainRetrievalQA/ChainRetrievalQa.node.js +24 -5
  46. package/dist/nodes/chains/ChainRetrievalQA/ChainRetrievalQa.node.js.map +1 -1
  47. package/dist/nodes/chains/ChainSummarization/ChainSummarization.node.js +29 -15
  48. package/dist/nodes/chains/ChainSummarization/ChainSummarization.node.js.map +1 -1
  49. package/dist/nodes/code/Code.node.js +2 -1
  50. package/dist/nodes/code/Code.node.js.map +1 -1
  51. package/dist/nodes/document_loaders/DocumentBinaryInputLoader/DocumentBinaryInputLoader.node.d.ts +3 -0
  52. package/dist/nodes/document_loaders/DocumentBinaryInputLoader/DocumentBinaryInputLoader.node.js +21 -0
  53. package/dist/nodes/document_loaders/DocumentBinaryInputLoader/DocumentBinaryInputLoader.node.js.map +1 -1
  54. package/dist/nodes/document_loaders/DocumentDefaultDataLoader/DocumentDefaultDataLoader.node.d.ts +8 -0
  55. package/dist/nodes/document_loaders/DocumentDefaultDataLoader/DocumentDefaultDataLoader.node.js +253 -0
  56. package/dist/nodes/document_loaders/DocumentDefaultDataLoader/DocumentDefaultDataLoader.node.js.map +1 -0
  57. package/dist/nodes/document_loaders/DocumentDefaultDataLoader/binary.svg +3 -0
  58. package/dist/nodes/document_loaders/DocumentGithubLoader/DocumentGithubLoader.node.js +2 -0
  59. package/dist/nodes/document_loaders/DocumentGithubLoader/DocumentGithubLoader.node.js.map +1 -1
  60. package/dist/nodes/document_loaders/DocumentJSONInputLoader/DocumentJsonInputLoader.node.js +18 -0
  61. package/dist/nodes/document_loaders/DocumentJSONInputLoader/DocumentJsonInputLoader.node.js.map +1 -1
  62. package/dist/nodes/embeddings/EmbeddingsAwsBedrock/EmbeddingsAwsBedrock.node.d.ts +5 -0
  63. package/dist/nodes/embeddings/EmbeddingsAwsBedrock/EmbeddingsAwsBedrock.node.js +122 -0
  64. package/dist/nodes/embeddings/EmbeddingsAwsBedrock/EmbeddingsAwsBedrock.node.js.map +1 -0
  65. package/dist/nodes/embeddings/EmbeddingsAwsBedrock/bedrock.svg +18 -0
  66. package/dist/nodes/embeddings/EmbeddingsCohere/EmbeddingsCohere.node.js +2 -0
  67. package/dist/nodes/embeddings/EmbeddingsCohere/EmbeddingsCohere.node.js.map +1 -1
  68. package/dist/nodes/embeddings/EmbeddingsGooglePalm/EmbeddingsGooglePalm.node.js +2 -0
  69. package/dist/nodes/embeddings/EmbeddingsGooglePalm/EmbeddingsGooglePalm.node.js.map +1 -1
  70. package/dist/nodes/embeddings/EmbeddingsHuggingFaceInference/EmbeddingsHuggingFaceInference.node.js +21 -0
  71. package/dist/nodes/embeddings/EmbeddingsHuggingFaceInference/EmbeddingsHuggingFaceInference.node.js.map +1 -1
  72. package/dist/nodes/embeddings/EmbeddingsOpenAI/EmbeddingsOpenAi.node.js +2 -0
  73. package/dist/nodes/embeddings/EmbeddingsOpenAI/EmbeddingsOpenAi.node.js.map +1 -1
  74. package/dist/nodes/embeddings/EmbeddingsTensorFlow/EmbeddingsTensorFlow.node.js +2 -0
  75. package/dist/nodes/embeddings/EmbeddingsTensorFlow/EmbeddingsTensorFlow.node.js.map +1 -1
  76. package/dist/nodes/llms/LMChatAnthropic/LmChatAnthropic.node.js +12 -2
  77. package/dist/nodes/llms/LMChatAnthropic/LmChatAnthropic.node.js.map +1 -1
  78. package/dist/nodes/llms/LMChatOllama/LmChatOllama.node.js +2 -0
  79. package/dist/nodes/llms/LMChatOllama/LmChatOllama.node.js.map +1 -1
  80. package/dist/nodes/llms/LMChatOpenAi/LmChatOpenAi.node.js +48 -2
  81. package/dist/nodes/llms/LMChatOpenAi/LmChatOpenAi.node.js.map +1 -1
  82. package/dist/nodes/llms/LMCohere/LmCohere.node.js +2 -0
  83. package/dist/nodes/llms/LMCohere/LmCohere.node.js.map +1 -1
  84. package/dist/nodes/llms/LMOllama/LmOllama.node.js +2 -0
  85. package/dist/nodes/llms/LMOllama/LmOllama.node.js.map +1 -1
  86. package/dist/nodes/llms/LMOpenAi/LmOpenAi.node.d.ts +11 -1
  87. package/dist/nodes/llms/LMOpenAi/LmOpenAi.node.js +61 -42
  88. package/dist/nodes/llms/LMOpenAi/LmOpenAi.node.js.map +1 -1
  89. package/dist/nodes/llms/LMOpenHuggingFaceInference/LmOpenHuggingFaceInference.node.js +9 -0
  90. package/dist/nodes/llms/LMOpenHuggingFaceInference/LmOpenHuggingFaceInference.node.js.map +1 -1
  91. package/dist/nodes/llms/LmChatAwsBedrock/LmChatAwsBedrock.node.d.ts +5 -0
  92. package/dist/nodes/llms/LmChatAwsBedrock/LmChatAwsBedrock.node.js +149 -0
  93. package/dist/nodes/llms/LmChatAwsBedrock/LmChatAwsBedrock.node.js.map +1 -0
  94. package/dist/nodes/llms/LmChatAwsBedrock/bedrock.svg +18 -0
  95. package/dist/nodes/llms/LmChatGooglePalm/LmChatGooglePalm.node.js +2 -0
  96. package/dist/nodes/llms/LmChatGooglePalm/LmChatGooglePalm.node.js.map +1 -1
  97. package/dist/nodes/llms/LmGooglePalm/LmGooglePalm.node.js +2 -0
  98. package/dist/nodes/llms/LmGooglePalm/LmGooglePalm.node.js.map +1 -1
  99. package/dist/nodes/memory/MemoryBufferWindow/MemoryBufferWindow.node.js +4 -2
  100. package/dist/nodes/memory/MemoryBufferWindow/MemoryBufferWindow.node.js.map +1 -1
  101. package/dist/nodes/memory/MemoryChatRetriever/MemoryChatRetriever.node.js +1 -1
  102. package/dist/nodes/memory/MemoryChatRetriever/MemoryChatRetriever.node.js.map +1 -1
  103. package/dist/nodes/memory/MemoryMotorhead/MemoryMotorhead.node.js +2 -0
  104. package/dist/nodes/memory/MemoryMotorhead/MemoryMotorhead.node.js.map +1 -1
  105. package/dist/nodes/memory/MemoryRedisChat/MemoryRedisChat.node.js +2 -0
  106. package/dist/nodes/memory/MemoryRedisChat/MemoryRedisChat.node.js.map +1 -1
  107. package/dist/nodes/memory/MemoryXata/MemoryXata.node.js +2 -0
  108. package/dist/nodes/memory/MemoryXata/MemoryXata.node.js.map +1 -1
  109. package/dist/nodes/memory/MemoryZep/MemoryZep.node.js +2 -0
  110. package/dist/nodes/memory/MemoryZep/MemoryZep.node.js.map +1 -1
  111. package/dist/nodes/output_parser/OutputParserAutofixing/OutputParserAutofixing.node.js +10 -1
  112. package/dist/nodes/output_parser/OutputParserAutofixing/OutputParserAutofixing.node.js.map +1 -1
  113. package/dist/nodes/output_parser/OutputParserItemList/ItemListOutputParser.js.map +1 -1
  114. package/dist/nodes/output_parser/OutputParserItemList/OutputParserItemList.node.js +2 -0
  115. package/dist/nodes/output_parser/OutputParserItemList/OutputParserItemList.node.js.map +1 -1
  116. package/dist/nodes/output_parser/OutputParserStructured/OutputParserStructured.node.js +45 -8
  117. package/dist/nodes/output_parser/OutputParserStructured/OutputParserStructured.node.js.map +1 -1
  118. package/dist/nodes/retrievers/RetrieverVectorStore/RetrieverVectorStore.node.js +2 -2
  119. package/dist/nodes/retrievers/RetrieverVectorStore/RetrieverVectorStore.node.js.map +1 -1
  120. package/dist/nodes/retrievers/RetrieverWorkflow/RetrieverWorkflow.node.js.map +1 -1
  121. package/dist/nodes/text_splitters/TextSplitterCharacterTextSplitter/TextSplitterCharacterTextSplitter.node.js +2 -0
  122. package/dist/nodes/text_splitters/TextSplitterCharacterTextSplitter/TextSplitterCharacterTextSplitter.node.js.map +1 -1
  123. package/dist/nodes/text_splitters/TextSplitterRecursiveCharacterTextSplitter/TextSplitterRecursiveCharacterTextSplitter.node.js +2 -0
  124. package/dist/nodes/text_splitters/TextSplitterRecursiveCharacterTextSplitter/TextSplitterRecursiveCharacterTextSplitter.node.js.map +1 -1
  125. package/dist/nodes/text_splitters/TextSplitterTokenSplitter/TextSplitterTokenSplitter.node.js +2 -0
  126. package/dist/nodes/text_splitters/TextSplitterTokenSplitter/TextSplitterTokenSplitter.node.js.map +1 -1
  127. package/dist/nodes/tools/ToolCalculator/ToolCalculator.node.js +3 -2
  128. package/dist/nodes/tools/ToolCalculator/ToolCalculator.node.js.map +1 -1
  129. package/dist/nodes/tools/ToolCode/ToolCode.node.js +5 -3
  130. package/dist/nodes/tools/ToolCode/ToolCode.node.js.map +1 -1
  131. package/dist/nodes/tools/ToolSerpApi/ToolSerpApi.node.js +3 -1
  132. package/dist/nodes/tools/ToolSerpApi/ToolSerpApi.node.js.map +1 -1
  133. package/dist/nodes/tools/ToolWikipedia/ToolWikipedia.node.js +2 -1
  134. package/dist/nodes/tools/ToolWikipedia/ToolWikipedia.node.js.map +1 -1
  135. package/dist/nodes/tools/ToolWolframAlpha/ToolWolframAlpha.node.js +2 -1
  136. package/dist/nodes/tools/ToolWolframAlpha/ToolWolframAlpha.node.js.map +1 -1
  137. package/dist/nodes/tools/ToolWorkflow/ToolWorkflow.node.js +9 -3
  138. package/dist/nodes/tools/ToolWorkflow/ToolWorkflow.node.js.map +1 -1
  139. package/dist/nodes/trigger/ManualChatTrigger/ManualChatTrigger.node.js +2 -2
  140. package/dist/nodes/trigger/ManualChatTrigger/ManualChatTrigger.node.js.map +1 -1
  141. package/dist/nodes/vector_store/VectorStoreInMemory/VectorStoreInMemory.node.d.ts +12 -5
  142. package/dist/nodes/vector_store/VectorStoreInMemory/VectorStoreInMemory.node.js +51 -62
  143. package/dist/nodes/vector_store/VectorStoreInMemory/VectorStoreInMemory.node.js.map +1 -1
  144. package/dist/nodes/vector_store/VectorStoreInMemoryInsert/VectorStoreInMemoryInsert.node.js +9 -8
  145. package/dist/nodes/vector_store/VectorStoreInMemoryInsert/VectorStoreInMemoryInsert.node.js.map +1 -1
  146. package/dist/nodes/vector_store/VectorStoreInMemoryLoad/VectorStoreInMemoryLoad.node.js +2 -1
  147. package/dist/nodes/vector_store/VectorStoreInMemoryLoad/VectorStoreInMemoryLoad.node.js.map +1 -1
  148. package/dist/nodes/vector_store/VectorStorePinecone/VectorStorePinecone.node.d.ts +12 -0
  149. package/dist/nodes/vector_store/VectorStorePinecone/VectorStorePinecone.node.js +122 -0
  150. package/dist/nodes/vector_store/VectorStorePinecone/VectorStorePinecone.node.js.map +1 -0
  151. package/dist/nodes/vector_store/VectorStorePinecone/pinecone.svg +1 -0
  152. package/dist/nodes/vector_store/VectorStorePineconeInsert/VectorStorePineconeInsert.node.d.ts +6 -0
  153. package/dist/nodes/vector_store/VectorStorePineconeInsert/VectorStorePineconeInsert.node.js +13 -12
  154. package/dist/nodes/vector_store/VectorStorePineconeInsert/VectorStorePineconeInsert.node.js.map +1 -1
  155. package/dist/nodes/vector_store/VectorStorePineconeLoad/VectorStorePineconeLoad.node.d.ts +6 -0
  156. package/dist/nodes/vector_store/VectorStorePineconeLoad/VectorStorePineconeLoad.node.js +27 -12
  157. package/dist/nodes/vector_store/VectorStorePineconeLoad/VectorStorePineconeLoad.node.js.map +1 -1
  158. package/dist/nodes/vector_store/VectorStoreSupabase/VectorStoreSupabase.node.d.ts +12 -0
  159. package/dist/nodes/vector_store/VectorStoreSupabase/VectorStoreSupabase.node.js +115 -0
  160. package/dist/nodes/vector_store/VectorStoreSupabase/VectorStoreSupabase.node.js.map +1 -0
  161. package/dist/nodes/vector_store/VectorStoreSupabase/supabase.svg +15 -0
  162. package/dist/nodes/vector_store/VectorStoreSupabaseInsert/VectorStoreSupabaseInsert.node.d.ts +6 -0
  163. package/dist/nodes/vector_store/VectorStoreSupabaseInsert/VectorStoreSupabaseInsert.node.js +7 -10
  164. package/dist/nodes/vector_store/VectorStoreSupabaseInsert/VectorStoreSupabaseInsert.node.js.map +1 -1
  165. package/dist/nodes/vector_store/VectorStoreSupabaseLoad/VectorStoreSupabaseLoad.node.d.ts +6 -0
  166. package/dist/nodes/vector_store/VectorStoreSupabaseLoad/VectorStoreSupabaseLoad.node.js +15 -25
  167. package/dist/nodes/vector_store/VectorStoreSupabaseLoad/VectorStoreSupabaseLoad.node.js.map +1 -1
  168. package/dist/nodes/vector_store/VectorStoreZep/VectorStoreZep.node.d.ts +12 -0
  169. package/dist/nodes/vector_store/VectorStoreZep/VectorStoreZep.node.js +112 -0
  170. package/dist/nodes/vector_store/VectorStoreZep/VectorStoreZep.node.js.map +1 -0
  171. package/dist/nodes/vector_store/VectorStoreZep/zep.png +0 -0
  172. package/dist/nodes/vector_store/VectorStoreZepInsert/VectorStoreZepInsert.node.js +4 -3
  173. package/dist/nodes/vector_store/VectorStoreZepInsert/VectorStoreZepInsert.node.js.map +1 -1
  174. package/dist/nodes/vector_store/VectorStoreZepLoad/VectorStoreZepLoad.node.js +5 -0
  175. package/dist/nodes/vector_store/VectorStoreZepLoad/VectorStoreZepLoad.node.js.map +1 -1
  176. package/dist/nodes/vector_store/shared/MemoryVectorStoreManager.js.map +1 -1
  177. package/dist/nodes/vector_store/shared/createVectorStoreNode.d.ts +39 -0
  178. package/dist/nodes/vector_store/shared/createVectorStoreNode.js +197 -0
  179. package/dist/nodes/vector_store/shared/createVectorStoreNode.js.map +1 -0
  180. package/dist/nodes/vector_store/shared/descriptions.d.ts +3 -0
  181. package/dist/nodes/vector_store/shared/descriptions.js +48 -0
  182. package/dist/nodes/vector_store/shared/descriptions.js.map +1 -0
  183. package/dist/nodes/vector_store/shared/methods/listSearch.d.ts +13 -0
  184. package/dist/nodes/vector_store/shared/methods/listSearch.js +41 -0
  185. package/dist/nodes/vector_store/shared/methods/listSearch.js.map +1 -0
  186. package/dist/nodes/vector_store/shared/processDocuments.d.ts +14 -1
  187. package/dist/nodes/vector_store/shared/processDocuments.js +22 -2
  188. package/dist/nodes/vector_store/shared/processDocuments.js.map +1 -1
  189. package/dist/types/credentials.json +1 -1
  190. package/dist/types/nodes.json +57 -49
  191. package/dist/utils/N8nBinaryLoader.d.ts +4 -2
  192. package/dist/utils/N8nBinaryLoader.js +82 -63
  193. package/dist/utils/N8nBinaryLoader.js.map +1 -1
  194. package/dist/utils/N8nJsonLoader.d.ts +4 -2
  195. package/dist/utils/N8nJsonLoader.js +50 -13
  196. package/dist/utils/N8nJsonLoader.js.map +1 -1
  197. package/dist/utils/helpers.d.ts +2 -0
  198. package/dist/utils/helpers.js +12 -0
  199. package/dist/utils/helpers.js.map +1 -0
  200. package/dist/utils/logWrapper.d.ts +1 -1
  201. package/dist/utils/logWrapper.js +57 -13
  202. package/dist/utils/logWrapper.js.map +1 -1
  203. package/dist/utils/sharedFields.d.ts +6 -0
  204. package/dist/utils/sharedFields.js +114 -0
  205. package/dist/utils/sharedFields.js.map +1 -0
  206. package/package.json +27 -7
  207. package/dist/tsconfig.tsbuildinfo +0 -1
@@ -4,10 +4,13 @@ exports.VectorStoreSupabaseInsert = void 0;
4
4
  const supabase_js_1 = require("@supabase/supabase-js");
5
5
  const supabase_1 = require("langchain/vectorstores/supabase");
6
6
  const processDocuments_1 = require("../shared/processDocuments");
7
+ const descriptions_1 = require("../shared/descriptions");
8
+ const listSearch_1 = require("../shared/methods/listSearch");
7
9
  class VectorStoreSupabaseInsert {
8
10
  constructor() {
9
11
  this.description = {
10
12
  displayName: 'Supabase: Insert',
13
+ hidden: true,
11
14
  name: 'vectorStoreSupabaseInsert',
12
15
  icon: 'file:supabase.svg',
13
16
  group: ['transform'],
@@ -24,7 +27,7 @@ class VectorStoreSupabaseInsert {
24
27
  resources: {
25
28
  primaryDocumentation: [
26
29
  {
27
- url: 'https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.vectorstoresupabaseinsert/',
30
+ url: 'https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.vectorstoresupabaseinsert/',
28
31
  },
29
32
  ],
30
33
  },
@@ -58,14 +61,7 @@ class VectorStoreSupabaseInsert {
58
61
  type: 'notice',
59
62
  default: '',
60
63
  },
61
- {
62
- displayName: 'Table Name',
63
- name: 'tableName',
64
- type: 'string',
65
- default: '',
66
- required: true,
67
- description: 'Name of the table to insert into',
68
- },
64
+ descriptions_1.supabaseTableNameRLC,
69
65
  {
70
66
  displayName: 'Query Name',
71
67
  name: 'queryName',
@@ -82,11 +78,12 @@ class VectorStoreSupabaseInsert {
82
78
  },
83
79
  ],
84
80
  };
81
+ this.methods = { listSearch: { supabaseTableNameSearch: listSearch_1.supabaseTableNameSearch } };
85
82
  }
86
83
  async execute() {
87
84
  this.logger.verbose('Executing data for Supabase Insert Vector Store');
88
85
  const items = this.getInputData(0);
89
- const tableName = this.getNodeParameter('tableName', 0);
86
+ const tableName = this.getNodeParameter('tableName', 0, '', { extractValue: true });
90
87
  const queryName = this.getNodeParameter('queryName', 0);
91
88
  const credentials = await this.getCredentials('supabaseApi');
92
89
  const documentInput = (await this.getInputConnectionData("ai_document", 0));
@@ -1 +1 @@
1
- {"version":3,"file":"VectorStoreSupabaseInsert.node.js","sourceRoot":"","sources":["../../../../nodes/vector_store/VectorStoreSupabaseInsert/VectorStoreSupabaseInsert.node.ts"],"names":[],"mappings":";;;AASA,uDAAqD;AACrD,8DAAsE;AAGtE,iEAA8D;AAE9D,MAAa,yBAAyB;IAAtC;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,kBAAkB;YAC/B,IAAI,EAAE,2BAA2B;YACjC,IAAI,EAAE,mBAAmB;YACzB,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC;YACV,WAAW,EACV,8FAA8F;YAC/F,QAAQ,EAAE;gBACT,IAAI,EAAE,kBAAkB;aACxB;YACD,KAAK,EAAE;gBACN,UAAU,EAAE,CAAC,IAAI,CAAC;gBAClB,aAAa,EAAE;oBACd,EAAE,EAAE,CAAC,eAAe,CAAC;iBACrB;gBACD,SAAS,EAAE;oBACV,oBAAoB,EAAE;wBACrB;4BACC,GAAG,EAAE,iHAAiH;yBACtH;qBACD;iBACD;aACD;YACD,WAAW,EAAE;gBACZ;oBACC,IAAI,EAAE,aAAa;oBACnB,QAAQ,EAAE,IAAI;iBACd;aACD;YACD,MAAM,EAAE;;gBAEP;oBACC,WAAW,EAAE,UAAU;oBACvB,cAAc,EAAE,CAAC;oBACjB,IAAI,eAA+B;oBACnC,QAAQ,EAAE,IAAI;iBACd;gBACD;oBACC,WAAW,EAAE,WAAW;oBACxB,cAAc,EAAE,CAAC;oBACjB,IAAI,gBAAgC;oBACpC,QAAQ,EAAE,IAAI;iBACd;aACD;YACD,OAAO,EAAE,QAAyB;YAClC,UAAU,EAAE;gBACX;oBACC,WAAW,EACV,8LAA8L;oBAC/L,IAAI,EAAE,aAAa;oBACnB,IAAI,EAAE,QAAQ;oBACd,OAAO,EAAE,EAAE;iBACX;gBACD;oBACC,WAAW,EAAE,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;QAEF,MAAM,8BAAmB,CAAC,aAAa,CAAC,kBAAkB,EAAE,UAAU,EAAE;YACvE,MAAM;YACN,SAAS;YACT,SAAS;SACT,CAAC,CAAC;QAEH,OAAO,IAAI,CAAC,iBAAiB,CAAC,mBAAmB,CAAC,CAAC;IACpD,CAAC;CACD;AA/GD,8DA+GC"}
1
+ {"version":3,"file":"VectorStoreSupabaseInsert.node.js","sourceRoot":"","sources":["../../../../nodes/vector_store/VectorStoreSupabaseInsert/VectorStoreSupabaseInsert.node.ts"],"names":[],"mappings":";;;AASA,uDAAqD;AACrD,8DAAsE;AAGtE,iEAA8D;AAC9D,yDAA8D;AAC9D,6DAAuE;AAGvE,MAAa,yBAAyB;IAAtC;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,kBAAkB;YAE/B,MAAM,EAAE,IAAI;YACZ,IAAI,EAAE,2BAA2B;YACjC,IAAI,EAAE,mBAAmB;YACzB,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC;YACV,WAAW,EACV,8FAA8F;YAC/F,QAAQ,EAAE;gBACT,IAAI,EAAE,kBAAkB;aACxB;YACD,KAAK,EAAE;gBACN,UAAU,EAAE,CAAC,IAAI,CAAC;gBAClB,aAAa,EAAE;oBACd,EAAE,EAAE,CAAC,eAAe,CAAC;iBACrB;gBACD,SAAS,EAAE;oBACV,oBAAoB,EAAE;wBACrB;4BACC,GAAG,EAAE,kHAAkH;yBACvH;qBACD;iBACD;aACD;YACD,WAAW,EAAE;gBACZ;oBACC,IAAI,EAAE,aAAa;oBACnB,QAAQ,EAAE,IAAI;iBACd;aACD;YACD,MAAM,EAAE;;gBAEP;oBACC,WAAW,EAAE,UAAU;oBACvB,cAAc,EAAE,CAAC;oBACjB,IAAI,eAA+B;oBACnC,QAAQ,EAAE,IAAI;iBACd;gBACD;oBACC,WAAW,EAAE,WAAW;oBACxB,cAAc,EAAE,CAAC;oBACjB,IAAI,gBAAgC;oBACpC,QAAQ,EAAE,IAAI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,0BAAY,EAAC,WAAW,CAAC,IAAc,EAAE,WAAW,CAAC,WAAqB,CAAC,CAAC;QAE3F,MAAM,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,GAAG,MAAM,IAAA,mCAAgB,EACzE,aAAa,EACb,KAAK,CACL,CAAC;QAEF,MAAM,8BAAmB,CAAC,aAAa,CAAC,kBAAkB,EAAE,UAAU,EAAE;YACvE,MAAM;YACN,SAAS;YACT,SAAS;SACT,CAAC,CAAC;QAEH,OAAO,IAAI,CAAC,iBAAiB,CAAC,mBAAmB,CAAC,CAAC;IACpD,CAAC;CACD;AA5GD,8DA4GC"}
@@ -1,5 +1,11 @@
1
1
  import { type IExecuteFunctions, type INodeType, type INodeTypeDescription, type SupplyData } from 'n8n-workflow';
2
+ import { supabaseTableNameSearch } from '../shared/methods/listSearch';
2
3
  export declare class VectorStoreSupabaseLoad implements INodeType {
3
4
  description: INodeTypeDescription;
5
+ methods: {
6
+ listSearch: {
7
+ supabaseTableNameSearch: typeof supabaseTableNameSearch;
8
+ };
9
+ };
4
10
  supplyData(this: IExecuteFunctions, itemIndex: number): Promise<SupplyData>;
5
11
  }
@@ -4,12 +4,17 @@ exports.VectorStoreSupabaseLoad = void 0;
4
4
  const supabase_js_1 = require("@supabase/supabase-js");
5
5
  const supabase_1 = require("langchain/vectorstores/supabase");
6
6
  const logWrapper_1 = require("../../../utils/logWrapper");
7
+ const sharedFields_1 = require("../../../utils/sharedFields");
8
+ const helpers_1 = require("../../../utils/helpers");
9
+ const descriptions_1 = require("../shared/descriptions");
10
+ const listSearch_1 = require("../shared/methods/listSearch");
7
11
  class VectorStoreSupabaseLoad {
8
12
  constructor() {
9
13
  this.description = {
10
14
  displayName: 'Supabase: Load',
11
15
  name: 'vectorStoreSupabaseLoad',
12
16
  icon: 'file:supabase.svg',
17
+ hidden: true,
13
18
  group: ['transform'],
14
19
  version: 1,
15
20
  description: 'Load data from Supabase Vector Store index',
@@ -46,14 +51,7 @@ class VectorStoreSupabaseLoad {
46
51
  outputs: ["ai_vectorStore"],
47
52
  outputNames: ['Vector Store'],
48
53
  properties: [
49
- {
50
- displayName: 'Table Name',
51
- name: 'tableName',
52
- type: 'string',
53
- default: '',
54
- required: true,
55
- description: 'Name of the table to load from',
56
- },
54
+ descriptions_1.supabaseTableNameRLC,
57
55
  {
58
56
  displayName: 'Query Name',
59
57
  name: 'queryName',
@@ -68,36 +66,28 @@ class VectorStoreSupabaseLoad {
68
66
  type: 'collection',
69
67
  placeholder: 'Add Option',
70
68
  default: {},
71
- options: [
72
- {
73
- displayName: 'Metadata Filter',
74
- name: 'filter',
75
- type: 'string',
76
- typeOptions: {
77
- editor: 'json',
78
- editorLanguage: 'json',
79
- },
80
- default: '',
81
- },
82
- ],
69
+ options: [sharedFields_1.metadataFilterField],
83
70
  },
84
71
  ],
85
72
  };
73
+ this.methods = { listSearch: { supabaseTableNameSearch: listSearch_1.supabaseTableNameSearch } };
86
74
  }
87
75
  async supplyData(itemIndex) {
88
76
  this.logger.verbose('Supply Supabase Load Vector Store');
89
- const tableName = this.getNodeParameter('tableName', itemIndex);
77
+ const tableName = this.getNodeParameter('tableName', itemIndex, '', {
78
+ extractValue: true,
79
+ });
90
80
  const queryName = this.getNodeParameter('queryName', itemIndex);
91
- const options = this.getNodeParameter('options', itemIndex, {});
92
81
  const credentials = await this.getCredentials('supabaseApi');
93
82
  const embeddings = (await this.getInputConnectionData("ai_embedding", 0));
94
83
  const client = (0, supabase_js_1.createClient)(credentials.host, credentials.serviceRole);
95
- const vectorStore = await supabase_1.SupabaseVectorStore.fromExistingIndex(embeddings, {
84
+ const config = {
96
85
  client,
97
86
  tableName,
98
87
  queryName,
99
- filter: options.filter,
100
- });
88
+ filter: (0, helpers_1.getMetadataFiltersValues)(this, itemIndex),
89
+ };
90
+ const vectorStore = await supabase_1.SupabaseVectorStore.fromExistingIndex(embeddings, config);
101
91
  return {
102
92
  response: (0, logWrapper_1.logWrapper)(vectorStore, this),
103
93
  };
@@ -1 +1 @@
1
- {"version":3,"file":"VectorStoreSupabaseLoad.node.js","sourceRoot":"","sources":["../../../../nodes/vector_store/VectorStoreSupabaseLoad/VectorStoreSupabaseLoad.node.ts"],"names":[],"mappings":";;;AASA,uDAAqD;AACrD,8DAAsE;AACtE,0DAAuD;AAEvD,MAAa,uBAAuB;IAApC;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,gBAAgB;YAC7B,IAAI,EAAE,yBAAyB;YAC/B,IAAI,EAAE,mBAAmB;YACzB,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC;YACV,WAAW,EAAE,4CAA4C;YACzD,QAAQ,EAAE;gBACT,IAAI,EAAE,gBAAgB;aACtB;YACD,KAAK,EAAE;gBACN,UAAU,EAAE,CAAC,IAAI,CAAC;gBAClB,aAAa,EAAE;oBACd,EAAE,EAAE,CAAC,eAAe,CAAC;iBACrB;gBACD,SAAS,EAAE;oBACV,oBAAoB,EAAE;wBACrB;4BACC,GAAG,EAAE,+GAA+G;yBACpH;qBACD;iBACD;aACD;YACD,WAAW,EAAE;gBACZ;oBACC,IAAI,EAAE,aAAa;oBACnB,QAAQ,EAAE,IAAI;iBACd;aACD;YACD,MAAM,EAAE;gBACP;oBACC,WAAW,EAAE,WAAW;oBACxB,cAAc,EAAE,CAAC;oBACjB,IAAI,gBAAgC;oBACpC,QAAQ,EAAE,IAAI;iBACd;aACD;YACD,OAAO,EAAE,kBAAkC;YAC3C,WAAW,EAAE,CAAC,cAAc,CAAC;YAC7B,UAAU,EAAE;gBACX;oBACC,WAAW,EAAE,YAAY;oBACzB,IAAI,EAAE,WAAW;oBACjB,IAAI,EAAE,QAAQ;oBACd,OAAO,EAAE,EAAE;oBACX,QAAQ,EAAE,IAAI;oBACd,WAAW,EAAE,gCAAgC;iBAC7C;gBACD;oBACC,WAAW,EAAE,YAAY;oBACzB,IAAI,EAAE,WAAW;oBACjB,IAAI,EAAE,QAAQ;oBACd,OAAO,EAAE,iBAAiB;oBAC1B,QAAQ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Q,EAAE,IAAA,uBAAU,EAAC,WAAW,EAAE,IAAI,CAAC;SACvC,CAAC;IACH,CAAC;CACD;AA5GD,0DA4GC"}
1
+ {"version":3,"file":"VectorStoreSupabaseLoad.node.js","sourceRoot":"","sources":["../../../../nodes/vector_store/VectorStoreSupabaseLoad/VectorStoreSupabaseLoad.node.ts"],"names":[],"mappings":";;;AAQA,uDAAqD;AAErD,8DAAsE;AACtE,0DAAuD;AACvD,8DAAkE;AAClE,oDAAkE;AAClE,yDAA8D;AAC9D,6DAAuE;AAGvE,MAAa,uBAAuB;IAApC;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,gBAAgB;YAC7B,IAAI,EAAE,yBAAyB;YAC/B,IAAI,EAAE,mBAAmB;YAEzB,MAAM,EAAE,IAAI;YACZ,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC;YACV,WAAW,EAAE,4CAA4C;YACzD,QAAQ,EAAE;gBACT,IAAI,EAAE,gBAAgB;aACtB;YACD,KAAK,EAAE;gBACN,UAAU,EAAE,CAAC,IAAI,CAAC;gBAClB,aAAa,EAAE;oBACd,EAAE,EAAE,CAAC,eAAe,CAAC;iBACrB;gBACD,SAAS,EAAE;oBACV,oBAAoB,EAAE;wBACrB;4BACC,GAAG,EAAE,+GAA+G;yBACpH;qBACD;iBACD;aACD;YACD,WAAW,EAAE;gBACZ;oBACC,IAAI,EAAE,aAAa;oBACnB,QAAQ,EAAE,IAAI;iBACd;aACD;YACD,MAAM,EAAE;gBACP;oBACC,WAAW,EAAE,WAAW;oBACxB,cAAc,EAAE,CAAC;oBACjB,IAAI,gBAAgC;oBACpC,QAAQ,EAAE,IAAI;iBACd;aACD;YACD,OAAO,EAAE,kBAAkC;YAC3C,WAAW,EAAE,CAAC,cAAc,CAAC;YAC7B,UAAU,EAAE;gBACX,mCAAoB;gBACpB;oBACC,WAAW,EAAE,YAAY;oBACzB,IAAI,EAAE,WAAW;oBACjB,IAAI,EAAE,QAAQ;oB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,EAAE,IAAI,CAAC;SACvC,CAAC;IACH,CAAC;CACD;AA9FD,0DA8FC"}
@@ -0,0 +1,12 @@
1
+ export declare const VectorStoreZep: {
2
+ new (): {
3
+ description: import("n8n-workflow").INodeTypeDescription;
4
+ methods: {
5
+ listSearch?: {
6
+ [key: string]: (this: import("n8n-workflow").ILoadOptionsFunctions, filter?: string | undefined, paginationToken?: string | undefined) => Promise<import("n8n-workflow").INodeListSearchResult>;
7
+ } | undefined;
8
+ } | undefined;
9
+ execute(this: import("n8n-workflow").IExecuteFunctions): Promise<import("n8n-workflow").INodeExecutionData[][]>;
10
+ supplyData(this: import("n8n-workflow").IExecuteFunctions, itemIndex: number): Promise<import("n8n-workflow").SupplyData>;
11
+ };
12
+ };
@@ -0,0 +1,112 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.VectorStoreZep = void 0;
4
+ const n8n_workflow_1 = require("n8n-workflow");
5
+ const zep_1 = require("langchain/vectorstores/zep");
6
+ const createVectorStoreNode_1 = require("../shared/createVectorStoreNode");
7
+ const sharedFields_1 = require("../../../utils/sharedFields");
8
+ const embeddingDimensions = {
9
+ displayName: 'Embedding Dimensions',
10
+ name: 'embeddingDimensions',
11
+ type: 'number',
12
+ default: 1536,
13
+ description: 'Whether to allow using characters from the Unicode surrogate blocks',
14
+ };
15
+ const insertFields = [
16
+ {
17
+ displayName: 'Options',
18
+ name: 'options',
19
+ type: 'collection',
20
+ placeholder: 'Add Option',
21
+ default: {},
22
+ options: [
23
+ embeddingDimensions,
24
+ {
25
+ displayName: 'Is Auto Embedded',
26
+ name: 'isAutoEmbedded',
27
+ type: 'boolean',
28
+ default: true,
29
+ description: 'Whether to automatically embed documents when they are added',
30
+ },
31
+ ],
32
+ },
33
+ ];
34
+ const retrieveFields = [
35
+ {
36
+ displayName: 'Options',
37
+ name: 'options',
38
+ type: 'collection',
39
+ placeholder: 'Add Option',
40
+ default: {},
41
+ options: [embeddingDimensions, sharedFields_1.metadataFilterField],
42
+ },
43
+ ];
44
+ exports.VectorStoreZep = (0, createVectorStoreNode_1.createVectorStoreNode)({
45
+ meta: {
46
+ displayName: 'Zep Vector Store',
47
+ name: 'vectorStoreZep',
48
+ description: 'Work with your data in Zep Vector Store',
49
+ credentials: [
50
+ {
51
+ name: 'zepApi',
52
+ required: true,
53
+ },
54
+ ],
55
+ icon: 'file:zep.png',
56
+ docsUrl: 'https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.vectorstorezep/',
57
+ },
58
+ sharedFields: [
59
+ {
60
+ displayName: 'Collection Name',
61
+ name: 'collectionName',
62
+ type: 'string',
63
+ default: '',
64
+ required: true,
65
+ },
66
+ ],
67
+ insertFields,
68
+ loadFields: retrieveFields,
69
+ retrieveFields,
70
+ async getVectorStoreClient(context, filter, embeddings, itemIndex) {
71
+ var _a;
72
+ const collectionName = context.getNodeParameter('collectionName', itemIndex);
73
+ const options = context.getNodeParameter('options', itemIndex) || {};
74
+ const credentials = (await context.getCredentials('zepApi'));
75
+ const zepConfig = {
76
+ apiUrl: credentials.apiUrl,
77
+ apiKey: credentials.apiKey,
78
+ collectionName,
79
+ embeddingDimensions: (_a = options.embeddingDimensions) !== null && _a !== void 0 ? _a : 1536,
80
+ metadata: filter,
81
+ };
82
+ return new zep_1.ZepVectorStore(embeddings, zepConfig);
83
+ },
84
+ async populateVectorStore(context, embeddings, documents, itemIndex) {
85
+ var _a, _b;
86
+ const collectionName = context.getNodeParameter('collectionName', itemIndex);
87
+ const options = context.getNodeParameter('options', itemIndex) || {};
88
+ const credentials = (await context.getCredentials('zepApi'));
89
+ const zepConfig = {
90
+ apiUrl: credentials.apiUrl,
91
+ apiKey: credentials.apiKey,
92
+ collectionName,
93
+ embeddingDimensions: (_a = options.embeddingDimensions) !== null && _a !== void 0 ? _a : 1536,
94
+ isAutoEmbedded: (_b = options.isAutoEmbedded) !== null && _b !== void 0 ? _b : true,
95
+ };
96
+ try {
97
+ await zep_1.ZepVectorStore.fromDocuments(documents, embeddings, zepConfig);
98
+ }
99
+ catch (error) {
100
+ const errorCode = error.code;
101
+ const responseData = error.responseData;
102
+ if (errorCode === 400 && responseData.includes('CreateDocumentCollectionRequest')) {
103
+ throw new n8n_workflow_1.NodeOperationError(context.getNode(), `Collection ${collectionName} not found`, {
104
+ itemIndex,
105
+ description: 'Please check that the collection exists in your vector store, or make sure that collection name contains only alphanumeric characters',
106
+ });
107
+ }
108
+ throw new n8n_workflow_1.NodeOperationError(context.getNode(), error, { itemIndex });
109
+ }
110
+ },
111
+ });
112
+ //# sourceMappingURL=VectorStoreZep.node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VectorStoreZep.node.js","sourceRoot":"","sources":["../../../../nodes/vector_store/VectorStoreZep/VectorStoreZep.node.ts"],"names":[],"mappings":";;;AACA,+CAAkD;AAElD,oDAA4D;AAC5D,2EAAwE;AACxE,8DAAkE;AAElE,MAAM,mBAAmB,GAAoB;IAC5C,WAAW,EAAE,sBAAsB;IACnC,IAAI,EAAE,qBAAqB;IAC3B,IAAI,EAAE,QAAQ;IACd,OAAO,EAAE,IAAI;IACb,WAAW,EAAE,qEAAqE;CAClF,CAAC;AAEF,MAAM,YAAY,GAAsB;IACvC;QACC,WAAW,EAAE,SAAS;QACtB,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,YAAY;QAClB,WAAW,EAAE,YAAY;QACzB,OAAO,EAAE,EAAE;QACX,OAAO,EAAE;YACR,mBAAmB;YACnB;gBACC,WAAW,EAAE,kBAAkB;gBAC/B,IAAI,EAAE,gBAAgB;gBACtB,IAAI,EAAE,SAAS;gBACf,OAAO,EAAE,IAAI;gBACb,WAAW,EAAE,8DAA8D;aAC3E;SACD;KACD;CACD,CAAC;AAEF,MAAM,cAAc,GAAsB;IACzC;QACC,WAAW,EAAE,SAAS;QACtB,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,YAAY;QAClB,WAAW,EAAE,YAAY;QACzB,OAAO,EAAE,EAAE;QAC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 'vectorStoreZepInsert',
11
+ hidden: true,
11
12
  icon: 'file:zep.png',
12
13
  group: ['transform'],
13
14
  version: 1,
@@ -23,7 +24,7 @@ class VectorStoreZepInsert {
23
24
  resources: {
24
25
  primaryDocumentation: [
25
26
  {
26
- url: 'https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.vectorstorezepinsert/',
27
+ url: 'https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.vectorstorezepinsert/',
27
28
  },
28
29
  ],
29
30
  },
@@ -92,10 +93,10 @@ class VectorStoreZepInsert {
92
93
  }
93
94
  async execute() {
94
95
  var _a, _b;
95
- const items = this.getInputData(0);
96
96
  this.logger.verbose('Executing data for Zep Insert Vector Store');
97
+ const items = this.getInputData(0);
97
98
  const collectionName = this.getNodeParameter('collectionName', 0);
98
- const options = this.getNodeParameter('options', 0) || {};
99
+ const options = this.getNodeParameter('options', 0, {}) || {};
99
100
  const credentials = (await this.getCredentials('zepApi'));
100
101
  const documentInput = (await this.getInputConnectionData("ai_document", 0));
101
102
  const embeddings = (await this.getInputConnectionData("ai_embedding", 0));
@@ -1 +1 @@
1
- {"version":3,"file":"VectorStoreZepInsert.node.js","sourceRoot":"","sources":["../../../../nodes/vector_store/VectorStoreZepInsert/VectorStoreZepInsert.node.ts"],"names":[],"mappings":";;;AAOA,oDAA4D;AAI5D,iEAA8D;AAE9D,MAAa,oBAAoB;IAAjC;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,0BAA0B;YACvC,IAAI,EAAE,sBAAsB;YAE5B,IAAI,EAAE,cAAc;YACpB,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC;YACV,WAAW,EAAE,yCAAyC;YACtD,QAAQ,EAAE;gBACT,IAAI,EAAE,aAAa;aACnB;YACD,KAAK,EAAE;gBACN,UAAU,EAAE,CAAC,IAAI,CAAC;gBAClB,aAAa,EAAE;oBACd,EAAE,EAAE,CAAC,e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AK,CAAC,OAAO;;QACZ,MAAM,KAAK,GAAG,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;QACnC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,4CAA4C,CAAC,CAAC;QAElE,MAAM,cAAc,GAAG,IAAI,CAAC,gBAAgB,CAAC,gBAAgB,EAAE,CAAC,CAAW,CAAC;QAE5E,MAAM,OAAO,GACX,IAAI,CAAC,gBAAgB,CAAC,SAAS,EAAE,CAAC,CAGjC,IAAI,EAAE,CAAC;QAEV,MAAM,WAAW,GAAG,CAAC,MAAM,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,CAGvD,CAAC;QAEF,MAAM,aAAa,GAAG,CAAC,MAAM,IAAI,CAAC,sBAAsB,gBAAgC,CAAC,CAAC,CAE/C,CAAC;QAE5C,MAAM,UAAU,GAAG,CAAC,MAAM,IAAI,CAAC,sBAAsB,iBAEpD,CAAC,CACD,CAAe,CAAC;QAEjB,MAAM,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,GAAG,MAAM,IAAA,mCAAgB,EACzE,aAAa,EACb,KAAK,CACL,CAAC;QAEF,MAAM,SAAS,GAAG;YACjB,MAAM,EAAE,WAAW,CAAC,MAAM;YAC1B,MAAM,EAAE,WAAW,CAAC,MAAM;YAC1B,cAAc;YACd,mBAAmB,EAAE,MAAA,OAAO,CAAC,mBAAmB,mCAAI,IAAI;YACxD,cAAc,EAAE,MAAA,OAAO,CAAC,cAAc,mCAAI,IAAI;SAC9C,CAAC;QAEF,MAAM,oBAAc,CAAC,aAAa,CAAC,kBAAkB,EAAE,UAAU,EAAE,SAAS,CAAC,CAAC;QAE9E,OAAO,IAAI,CAAC,iBAAiB,CAAC,mBAAmB,CAAC,CAAC;IACpD,CAAC;CACD;AAlID,oDAkIC"}
1
+ {"version":3,"file":"VectorStoreZepInsert.node.js","sourceRoot":"","sources":["../../../../nodes/vector_store/VectorStoreZepInsert/VectorStoreZepInsert.node.ts"],"names":[],"mappings":";;;AA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ACd,mBAAmB,EAAE,MAAA,OAAO,CAAC,mBAAmB,mCAAI,IAAI;YACxD,cAAc,EAAE,MAAA,OAAO,CAAC,cAAc,mCAAI,IAAI;SAC9C,CAAC;QAEF,MAAM,oBAAc,CAAC,aAAa,CAAC,kBAAkB,EAAE,UAAU,EAAE,SAAS,CAAC,CAAC;QAE9E,OAAO,IAAI,CAAC,iBAAiB,CAAC,mBAAmB,CAAC,CAAC;IACpD,CAAC;CACD;AAjID,oDAiIC"}
@@ -2,12 +2,15 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VectorStoreZepLoad = void 0;
4
4
  const zep_1 = require("langchain/vectorstores/zep");
5
+ const sharedFields_1 = require("../../../utils/sharedFields");
6
+ const helpers_1 = require("../../../utils/helpers");
5
7
  const logWrapper_1 = require("../../../utils/logWrapper");
6
8
  class VectorStoreZepLoad {
7
9
  constructor() {
8
10
  this.description = {
9
11
  displayName: 'Zep Vector Store: Load',
10
12
  name: 'vectorStoreZepLoad',
13
+ hidden: true,
11
14
  icon: 'file:zep.png',
12
15
  group: ['transform'],
13
16
  version: 1,
@@ -66,6 +69,7 @@ class VectorStoreZepLoad {
66
69
  default: 1536,
67
70
  description: 'Whether to allow using characters from the Unicode surrogate blocks',
68
71
  },
72
+ sharedFields_1.metadataFilterField,
69
73
  ],
70
74
  },
71
75
  ],
@@ -83,6 +87,7 @@ class VectorStoreZepLoad {
83
87
  apiKey: credentials.apiKey,
84
88
  collectionName,
85
89
  embeddingDimensions: (_a = options.embeddingDimensions) !== null && _a !== void 0 ? _a : 1536,
90
+ metadata: (0, helpers_1.getMetadataFiltersValues)(this, itemIndex),
86
91
  };
87
92
  const vectorStore = new zep_1.ZepVectorStore(embeddings, zepConfig);
88
93
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"VectorStoreZepLoad.node.js","sourceRoot":"","sources":["../../../../nodes/vector_store/VectorStoreZepLoad/VectorStoreZepLoad.node.ts"],"names":[],"mappings":";;;AAOA,oDAA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D;iBACD;aACD;SACD,CAAC;IAkCH,CAAC;IAhCA,KAAK,CAAC,UAAU,CAA0B,SAAiB;;QAC1D,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,0CAA0C,CAAC,CAAC;QAEhE,MAAM,cAAc,GAAG,IAAI,CAAC,gBAAgB,CAAC,gBAAgB,EAAE,SAAS,CAAW,CAAC;QAEpF,MAAM,OAAO,GACX,IAAI,CAAC,gBAAgB,CAAC,SAAS,EAAE,SAAS,CAEzC,IAAI,EAAE,CAAC;QAEV,MAAM,WAAW,GAAG,CAAC,MAAM,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,CAGvD,CAAC;QACF,MAAM,UAAU,GAAG,CAAC,MAAM,IAAI,CAAC,sBAAsB,iBAEpD,CAAC,CACD,CAAe,CAAC;QAEjB,MAAM,SAAS,GAAG;YACjB,MAAM,EAAE,WAAW,CAAC,MAAM;YAC1B,MAAM,EAAE,WAAW,CAAC,MAAM;YAC1B,cAAc;YACd,mBAAmB,EAAE,MAAA,OAAO,CAAC,mBAAmB,mCAAI,IAAI;SACxD,CAAC;QAEF,MAAM,WAAW,GAAG,IAAI,oBAAc,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC;QAE9D,OAAO;YACN,QAAQ,EAAE,IAAA,uBAAU,EAAC,WAAW,EAAE,IAAI,CAAC;SACvC,CAAC;IACH,CAAC;CACD;AApGD,gDAoGC"}
1
+ {"version":3,"file":"VectorStoreZepLoad.node.js","sourceRoot":"","sources":["../../../../nodes/vector_store/VectorStoreZepLoad/VectorStoreZepLoad.node.ts"],"names":[],"mappings":";;;AAQA,oDAA4D;AAE5D,8DAAkE;AAClE,oDAAkE;AAClE,0DAAuD;AAGvD,MAAa,kBAAkB;IAA/B;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,wBAAwB;YACrC,IAAI,EAAE,oBAAoB;YAC1B,MAAM,EAAE,IAAI;YAEZ,IAAI,EAAE,cAAc;YACpB,KAAK,EAAE,CAAC,WAAW,CAA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,QAAQ,CAAC;IAC1C,CAAC;IAEM,KAAK,CAAC,cAAc,CAAC,SAAiB;QAC5C,IAAI,mBAAmB,GAAG,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QAEhE,IAAI,CAAC,mBAAmB,EAAE,CAAC;YAC1B,mBAAmB,GAAG,MAAM,0BAAiB,CAAC,iBAAiB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;YACjF,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC;QAC5D,CAAC;QAED,OAAO,mBAAmB,CAAC;IAC5B,CAAC;IAEM,KAAK,CAAC,YAAY,CACxB,SAAiB,EACjB,SAAqB,EACrB,UAAoB;QAEpB,IAAI,UAAU,EAAE,CAAC;YAChB,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;QAC1C,CAAC;QACD,MAAM,mBAAmB,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC;QACjE,MAAM,mBAAmB,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC;IACnD,CAAC;;AAxCF,4DAyCC;AAxCe,iCAAQ,GAAoC,IAAI,CAAC"}
@@ -0,0 +1,39 @@
1
+ import type { VectorStore } from 'langchain/vectorstores/base';
2
+ import type { INodeCredentialDescription, INodeProperties, INodeExecutionData, IExecuteFunctions, INodeTypeDescription, SupplyData, ILoadOptionsFunctions, INodeListSearchResult } from 'n8n-workflow';
3
+ import type { Embeddings } from 'langchain/embeddings/base';
4
+ import type { Document } from 'langchain/document';
5
+ interface NodeMeta {
6
+ displayName: string;
7
+ name: string;
8
+ description: string;
9
+ docsUrl: string;
10
+ icon: string;
11
+ credentials?: INodeCredentialDescription[];
12
+ }
13
+ interface VectorStoreNodeConstructorArgs {
14
+ meta: NodeMeta;
15
+ methods?: {
16
+ listSearch?: {
17
+ [key: string]: (this: ILoadOptionsFunctions, filter?: string, paginationToken?: string) => Promise<INodeListSearchResult>;
18
+ };
19
+ };
20
+ sharedFields: INodeProperties[];
21
+ insertFields?: INodeProperties[];
22
+ loadFields?: INodeProperties[];
23
+ retrieveFields?: INodeProperties[];
24
+ populateVectorStore: (context: IExecuteFunctions, embeddings: Embeddings, documents: Array<Document<Record<string, unknown>>>, itemIndex: number) => Promise<void>;
25
+ getVectorStoreClient: (context: IExecuteFunctions, filter: Record<string, never> | undefined, embeddings: Embeddings, itemIndex: number) => Promise<VectorStore>;
26
+ }
27
+ export declare const createVectorStoreNode: (args: VectorStoreNodeConstructorArgs) => {
28
+ new (): {
29
+ description: INodeTypeDescription;
30
+ methods: {
31
+ listSearch?: {
32
+ [key: string]: (this: ILoadOptionsFunctions, filter?: string, paginationToken?: string) => Promise<INodeListSearchResult>;
33
+ } | undefined;
34
+ } | undefined;
35
+ execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
36
+ supplyData(this: IExecuteFunctions, itemIndex: number): Promise<SupplyData>;
37
+ };
38
+ };
39
+ export {};
@@ -0,0 +1,197 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createVectorStoreNode = void 0;
4
+ const n8n_workflow_1 = require("n8n-workflow");
5
+ const logWrapper_1 = require("../../../utils/logWrapper");
6
+ const helpers_1 = require("../../../utils/helpers");
7
+ const sharedFields_1 = require("../../../utils/sharedFields");
8
+ const processDocuments_1 = require("./processDocuments");
9
+ function transformDescriptionForOperationMode(fields, mode) {
10
+ return fields.map((field) => ({
11
+ ...field,
12
+ displayOptions: { show: { mode: [mode] } },
13
+ }));
14
+ }
15
+ const createVectorStoreNode = (args) => class VectorStoreNodeType {
16
+ constructor() {
17
+ var _a, _b, _c;
18
+ this.description = {
19
+ displayName: args.meta.displayName,
20
+ name: args.meta.name,
21
+ description: args.meta.description,
22
+ icon: args.meta.icon,
23
+ group: ['transform'],
24
+ version: 1,
25
+ defaults: {
26
+ name: args.meta.displayName,
27
+ },
28
+ codex: {
29
+ categories: ['AI'],
30
+ subcategories: {
31
+ AI: ['Vector Stores'],
32
+ },
33
+ resources: {
34
+ primaryDocumentation: [
35
+ {
36
+ url: args.meta.docsUrl,
37
+ },
38
+ ],
39
+ },
40
+ },
41
+ credentials: args.meta.credentials,
42
+ inputs: `={{
43
+ ((parameters) => {
44
+ const mode = parameters?.mode;
45
+ const inputs = [{ displayName: "Embedding", type: "${"ai_embedding"}", required: true, maxConnections: 1}]
46
+
47
+ if (['insert', 'load'].includes(mode)) {
48
+ inputs.push({ displayName: "", type: "${"main"}"})
49
+ }
50
+
51
+ if (mode === 'insert') {
52
+ inputs.push({ displayName: "Document", type: "${"ai_document"}", required: true, maxConnections: 1})
53
+ }
54
+ return inputs
55
+ })($parameter)
56
+ }}`,
57
+ outputs: `={{
58
+ ((parameters) => {
59
+ const mode = parameters?.mode ?? 'retrieve';
60
+ if (mode === 'retrieve') {
61
+ return [{ displayName: "Vector Store", type: "${"ai_vectorStore"}"}]
62
+ }
63
+ return [{ displayName: "", type: "${"main"}"}]
64
+ })($parameter)
65
+ }}`,
66
+ properties: [
67
+ {
68
+ displayName: 'Operation Mode',
69
+ name: 'mode',
70
+ type: 'options',
71
+ noDataExpression: true,
72
+ default: 'retrieve',
73
+ options: [
74
+ {
75
+ name: 'Get Many',
76
+ value: 'load',
77
+ description: 'Get many ranked documents from vector store for query',
78
+ action: 'Get many ranked documents from vector store for query',
79
+ },
80
+ {
81
+ name: 'Insert Documents',
82
+ value: 'insert',
83
+ description: 'Insert documents into vector store',
84
+ action: 'Insert documents into vector store',
85
+ },
86
+ {
87
+ name: 'Retrieve Documents (For Agent/Chain)',
88
+ value: 'retrieve',
89
+ description: 'Retrieve documents from vector store to be used with AI nodes',
90
+ action: 'Retrieve documents from vector store to be used with AI nodes',
91
+ },
92
+ ],
93
+ },
94
+ {
95
+ ...(0, sharedFields_1.getConnectionHintNoticeField)(["ai_retriever"]),
96
+ displayOptions: {
97
+ show: {
98
+ mode: ['retrieve'],
99
+ },
100
+ },
101
+ },
102
+ ...args.sharedFields,
103
+ ...transformDescriptionForOperationMode((_a = args.insertFields) !== null && _a !== void 0 ? _a : [], 'insert'),
104
+ {
105
+ displayName: 'Prompt',
106
+ name: 'prompt',
107
+ type: 'string',
108
+ default: '',
109
+ required: true,
110
+ description: 'Search prompt to retrieve matching documents from the vector store using similarity-based ranking',
111
+ displayOptions: {
112
+ show: {
113
+ mode: ['load'],
114
+ },
115
+ },
116
+ },
117
+ {
118
+ displayName: 'Limit',
119
+ name: 'topK',
120
+ type: 'number',
121
+ default: 4,
122
+ description: 'Number of top results to fetch from vector store',
123
+ displayOptions: {
124
+ show: {
125
+ mode: ['load'],
126
+ },
127
+ },
128
+ },
129
+ ...transformDescriptionForOperationMode((_b = args.loadFields) !== null && _b !== void 0 ? _b : [], 'load'),
130
+ ...transformDescriptionForOperationMode((_c = args.retrieveFields) !== null && _c !== void 0 ? _c : [], 'retrieve'),
131
+ ],
132
+ };
133
+ this.methods = args.methods;
134
+ }
135
+ async execute() {
136
+ const mode = this.getNodeParameter('mode', 0);
137
+ const embeddings = (await this.getInputConnectionData("ai_embedding", 0));
138
+ if (mode === 'load') {
139
+ const items = this.getInputData(0);
140
+ const resultData = [];
141
+ for (let itemIndex = 0; itemIndex < items.length; itemIndex++) {
142
+ const filter = (0, helpers_1.getMetadataFiltersValues)(this, itemIndex);
143
+ const vectorStore = await args.getVectorStoreClient(this, undefined, embeddings, itemIndex);
144
+ const prompt = this.getNodeParameter('prompt', itemIndex);
145
+ const topK = this.getNodeParameter('topK', itemIndex, 4);
146
+ const embeddedPrompt = await embeddings.embedQuery(prompt);
147
+ const docs = await vectorStore.similaritySearchVectorWithScore(embeddedPrompt, topK, filter);
148
+ const serializedDocs = docs.map(([doc, score]) => {
149
+ const document = {
150
+ metadata: doc.metadata,
151
+ pageContent: doc.pageContent,
152
+ };
153
+ return {
154
+ json: { document, score },
155
+ pairedItem: {
156
+ item: itemIndex,
157
+ },
158
+ };
159
+ });
160
+ resultData.push(...serializedDocs);
161
+ }
162
+ return this.prepareOutputData(resultData);
163
+ }
164
+ if (mode === 'insert') {
165
+ const items = this.getInputData();
166
+ const documentInput = (await this.getInputConnectionData("ai_document", 0));
167
+ const resultData = [];
168
+ for (let itemIndex = 0; itemIndex < items.length; itemIndex++) {
169
+ const itemData = items[itemIndex];
170
+ const { processedDocuments, serializedDocuments } = await (0, processDocuments_1.processDocument)(documentInput, itemData, itemIndex);
171
+ resultData.push(...serializedDocuments);
172
+ try {
173
+ await args.populateVectorStore(this, embeddings, processedDocuments, itemIndex);
174
+ }
175
+ catch (error) {
176
+ throw error;
177
+ }
178
+ }
179
+ return this.prepareOutputData(resultData);
180
+ }
181
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Only the "load" and "insert" operation modes are supported with execute');
182
+ }
183
+ async supplyData(itemIndex) {
184
+ const mode = this.getNodeParameter('mode', 0);
185
+ const filter = (0, helpers_1.getMetadataFiltersValues)(this, itemIndex);
186
+ const embeddings = (await this.getInputConnectionData("ai_embedding", 0));
187
+ if (mode === 'retrieve') {
188
+ const vectorStore = await args.getVectorStoreClient(this, filter, embeddings, itemIndex);
189
+ return {
190
+ response: (0, logWrapper_1.logWrapper)(vectorStore, this),
191
+ };
192
+ }
193
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Only the "retrieve" operation mode is supported to supply data');
194
+ }
195
+ };
196
+ exports.createVectorStoreNode = createVectorStoreNode;
197
+ //# sourceMappingURL=createVectorStoreNode.js.map