@n8n/n8n-nodes-langchain 0.2.0 → 0.3.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.
- package/dist/build.tsbuildinfo +1 -1
- package/dist/known/credentials.json +2 -0
- package/dist/known/nodes.json +28 -0
- package/dist/nodes/agents/Agent/agents/ConversationalAgent/description.js +7 -0
- package/dist/nodes/agents/Agent/agents/ConversationalAgent/description.js.map +1 -1
- package/dist/nodes/agents/Agent/agents/ConversationalAgent/execute.js +2 -0
- package/dist/nodes/agents/Agent/agents/ConversationalAgent/execute.js.map +1 -1
- package/dist/nodes/agents/Agent/agents/OpenAiFunctionsAgent/description.js +7 -0
- package/dist/nodes/agents/Agent/agents/OpenAiFunctionsAgent/description.js.map +1 -1
- package/dist/nodes/agents/Agent/agents/OpenAiFunctionsAgent/execute.js +2 -0
- package/dist/nodes/agents/Agent/agents/OpenAiFunctionsAgent/execute.js.map +1 -1
- package/dist/nodes/chains/ChainLLM/ChainLlm.node.js +84 -11
- package/dist/nodes/chains/ChainLLM/ChainLlm.node.js.map +1 -1
- package/dist/nodes/chains/ChainSummarization/ChainSummarization.node.js +1 -1
- package/dist/nodes/chains/ChainSummarization/ChainSummarization.node.js.map +1 -1
- package/dist/nodes/document_loaders/DocumentBinaryInputLoader/DocumentBinaryInputLoader.node.d.ts +3 -0
- package/dist/nodes/document_loaders/DocumentBinaryInputLoader/DocumentBinaryInputLoader.node.js +19 -0
- package/dist/nodes/document_loaders/DocumentBinaryInputLoader/DocumentBinaryInputLoader.node.js.map +1 -1
- package/dist/nodes/document_loaders/DocumentJSONInputLoader/DocumentJsonInputLoader.node.js +16 -0
- package/dist/nodes/document_loaders/DocumentJSONInputLoader/DocumentJsonInputLoader.node.js.map +1 -1
- package/dist/nodes/embeddings/EmbeddingsAwsBedrock/EmbeddingsAwsBedrock.node.d.ts +5 -0
- package/dist/nodes/embeddings/EmbeddingsAwsBedrock/EmbeddingsAwsBedrock.node.js +120 -0
- package/dist/nodes/embeddings/EmbeddingsAwsBedrock/EmbeddingsAwsBedrock.node.js.map +1 -0
- package/dist/nodes/embeddings/EmbeddingsAwsBedrock/bedrock.svg +18 -0
- package/dist/nodes/embeddings/EmbeddingsHuggingFaceInference/EmbeddingsHuggingFaceInference.node.js +19 -0
- package/dist/nodes/embeddings/EmbeddingsHuggingFaceInference/EmbeddingsHuggingFaceInference.node.js.map +1 -1
- package/dist/nodes/embeddings/EmbeddingsHuggingFaceInference/HuggingFaceEmbeddings.d.ts +19 -0
- package/dist/nodes/embeddings/EmbeddingsHuggingFaceInference/HuggingFaceEmbeddings.js +32 -0
- package/dist/nodes/embeddings/EmbeddingsHuggingFaceInference/HuggingFaceEmbeddings.js.map +1 -0
- package/dist/nodes/llms/LMOpenHuggingFaceInference/HuggingFaceInferenceEndpoints.d.ts +31 -0
- package/dist/nodes/llms/LMOpenHuggingFaceInference/HuggingFaceInferenceEndpoints.js +90 -0
- package/dist/nodes/llms/LMOpenHuggingFaceInference/HuggingFaceInferenceEndpoints.js.map +1 -0
- package/dist/nodes/llms/LMOpenHuggingFaceInference/LmOpenHuggingFaceInference.node.js +7 -0
- package/dist/nodes/llms/LMOpenHuggingFaceInference/LmOpenHuggingFaceInference.node.js.map +1 -1
- package/dist/nodes/llms/LmChatAwsBedrock/LmChatAwsBedrock.node.d.ts +5 -0
- package/dist/nodes/llms/LmChatAwsBedrock/LmChatAwsBedrock.node.js +147 -0
- package/dist/nodes/llms/LmChatAwsBedrock/LmChatAwsBedrock.node.js.map +1 -0
- package/dist/nodes/llms/LmChatAwsBedrock/bedrock.svg +18 -0
- package/dist/nodes/output_parser/OutputParserStructured/OutputParserStructured.node.js +43 -8
- package/dist/nodes/output_parser/OutputParserStructured/OutputParserStructured.node.js.map +1 -1
- package/dist/nodes/tools/ToolWorkflow/ToolWorkflow.node.js +4 -0
- package/dist/nodes/tools/ToolWorkflow/ToolWorkflow.node.js.map +1 -1
- package/dist/nodes/trigger/ChatTrigger/ChatTrigger.node.d.ts +5 -0
- package/dist/nodes/trigger/ChatTrigger/ChatTrigger.node.js +189 -0
- package/dist/nodes/trigger/ChatTrigger/ChatTrigger.node.js.map +1 -0
- package/dist/nodes/trigger/ChatTrigger/GenericFunctions.d.ts +2 -0
- package/dist/nodes/trigger/ChatTrigger/GenericFunctions.js +51 -0
- package/dist/nodes/trigger/ChatTrigger/GenericFunctions.js.map +1 -0
- package/dist/nodes/trigger/ChatTrigger/error.d.ts +4 -0
- package/dist/nodes/trigger/ChatTrigger/error.js +20 -0
- package/dist/nodes/trigger/ChatTrigger/error.js.map +1 -0
- package/dist/nodes/trigger/ChatTrigger/templates.d.ts +10 -0
- package/dist/nodes/trigger/ChatTrigger/templates.js +55 -0
- package/dist/nodes/trigger/ChatTrigger/templates.js.map +1 -0
- package/dist/nodes/vector_store/VectorStoreInMemory/VectorStoreInMemory.node.d.ts +7 -0
- package/dist/nodes/vector_store/VectorStoreInMemory/VectorStoreInMemory.node.js +55 -0
- package/dist/nodes/vector_store/VectorStoreInMemory/VectorStoreInMemory.node.js.map +1 -0
- package/dist/nodes/vector_store/VectorStoreInMemoryInsert/VectorStoreInMemoryInsert.node.js +9 -8
- package/dist/nodes/vector_store/VectorStoreInMemoryInsert/VectorStoreInMemoryInsert.node.js.map +1 -1
- package/dist/nodes/vector_store/VectorStoreInMemoryLoad/VectorStoreInMemoryLoad.node.js +2 -1
- package/dist/nodes/vector_store/VectorStoreInMemoryLoad/VectorStoreInMemoryLoad.node.js.map +1 -1
- package/dist/nodes/vector_store/VectorStorePinecone/VectorStorePinecone.node.d.ts +7 -0
- package/dist/nodes/vector_store/VectorStorePinecone/VectorStorePinecone.node.js +115 -0
- package/dist/nodes/vector_store/VectorStorePinecone/VectorStorePinecone.node.js.map +1 -0
- package/dist/nodes/vector_store/VectorStorePinecone/pinecone.svg +1 -0
- package/dist/nodes/vector_store/VectorStorePineconeInsert/VectorStorePineconeInsert.node.js +4 -4
- package/dist/nodes/vector_store/VectorStorePineconeInsert/VectorStorePineconeInsert.node.js.map +1 -1
- package/dist/nodes/vector_store/VectorStorePineconeLoad/VectorStorePineconeLoad.node.js +16 -4
- package/dist/nodes/vector_store/VectorStorePineconeLoad/VectorStorePineconeLoad.node.js.map +1 -1
- package/dist/nodes/vector_store/VectorStoreSupabase/VectorStoreSupabase.node.d.ts +7 -0
- package/dist/nodes/vector_store/VectorStoreSupabase/VectorStoreSupabase.node.js +99 -0
- package/dist/nodes/vector_store/VectorStoreSupabase/VectorStoreSupabase.node.js.map +1 -0
- package/dist/nodes/vector_store/VectorStoreSupabase/supabase.svg +15 -0
- package/dist/nodes/vector_store/VectorStoreSupabaseInsert/VectorStoreSupabaseInsert.node.js +2 -1
- package/dist/nodes/vector_store/VectorStoreSupabaseInsert/VectorStoreSupabaseInsert.node.js.map +1 -1
- package/dist/nodes/vector_store/VectorStoreSupabaseLoad/VectorStoreSupabaseLoad.node.js +8 -16
- package/dist/nodes/vector_store/VectorStoreSupabaseLoad/VectorStoreSupabaseLoad.node.js.map +1 -1
- package/dist/nodes/vector_store/VectorStoreZep/VectorStoreZep.node.d.ts +7 -0
- package/dist/nodes/vector_store/VectorStoreZep/VectorStoreZep.node.js +98 -0
- package/dist/nodes/vector_store/VectorStoreZep/VectorStoreZep.node.js.map +1 -0
- package/dist/nodes/vector_store/VectorStoreZep/zep.png +0 -0
- package/dist/nodes/vector_store/VectorStoreZepInsert/VectorStoreZepInsert.node.js +3 -2
- package/dist/nodes/vector_store/VectorStoreZepInsert/VectorStoreZepInsert.node.js.map +1 -1
- package/dist/nodes/vector_store/VectorStoreZepLoad/VectorStoreZepLoad.node.js +5 -0
- package/dist/nodes/vector_store/VectorStoreZepLoad/VectorStoreZepLoad.node.js.map +1 -1
- package/dist/nodes/vector_store/shared/createVectorStoreNode.d.ts +29 -0
- package/dist/nodes/vector_store/shared/createVectorStoreNode.js +182 -0
- package/dist/nodes/vector_store/shared/createVectorStoreNode.js.map +1 -0
- package/dist/nodes/vector_store/shared/processDocuments.d.ts +14 -1
- package/dist/nodes/vector_store/shared/processDocuments.js +22 -2
- package/dist/nodes/vector_store/shared/processDocuments.js.map +1 -1
- package/dist/types/nodes.json +20 -14
- package/dist/utils/N8nBinaryLoader.d.ts +2 -1
- package/dist/utils/N8nBinaryLoader.js +76 -60
- package/dist/utils/N8nBinaryLoader.js.map +1 -1
- package/dist/utils/N8nJsonLoader.d.ts +2 -1
- package/dist/utils/N8nJsonLoader.js +27 -13
- package/dist/utils/N8nJsonLoader.js.map +1 -1
- package/dist/utils/helpers.d.ts +2 -0
- package/dist/utils/helpers.js +12 -0
- package/dist/utils/helpers.js.map +1 -0
- package/dist/utils/logWrapper.js +18 -1
- package/dist/utils/logWrapper.js.map +1 -1
- package/dist/utils/sharedFields.d.ts +2 -0
- package/dist/utils/sharedFields.js +36 -0
- package/dist/utils/sharedFields.js.map +1 -0
- package/package.json +18 -13
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VectorStorePinecone.node.js","sourceRoot":"","sources":["../../../../nodes/vector_store/VectorStorePinecone/VectorStorePinecone.node.ts"],"names":[],"mappings":";;;AAEA,8DAAgE;AAChE,0DAAuD;AACvD,2EAAwE;AACxE,8DAAkE;AAElE,MAAM,YAAY,GAAsB;IACvC;QACC,WAAW,EAAE,gBAAgB;QAC7B,IAAI,EAAE,eAAe;QACrB,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,QAAQ,EAAE,IAAI;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;QACX,OAAO,EAAE;YACR;gBACC,WAAW,EAAE,oBAAoB;gBACjC,IAAI,EAAE,mBAAmB;gBACzB,IAAI,EAAE,QAAQ;gBACd,WAAW,EACV,sLAAsL;gBACvL,OAAO,EAAE,EAAE;aACX;YACD,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
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" class="w-full -translate-y-0.5" viewBox="1 1 30 29"><g fill="none" fill-rule="evenodd" transform="translate(0 1)"><path stroke="currentColor" stroke-linecap="square" stroke-width="1.77" d="m14.58 5.24.7-3.89"></path><path stroke="#7D7D87" stroke-linecap="square" stroke-linejoin="round" stroke-width="1.77" d="M17.8 3.86 15.36.88l-3.32 1.94"></path><path stroke="currentColor" stroke-linecap="square" stroke-width="1.77" d="m11.66 21.84.68-3.89"></path><path stroke="currentColor" stroke-linecap="square" stroke-linejoin="round" stroke-width="1.77" d="m14.88 20.45-2.46-2.97-3.31 1.95"></path><path stroke="currentColor" stroke-linecap="square" stroke-width="1.77" d="m13.07 13.82.68-3.89"></path><path stroke="currentColor" stroke-linecap="square" stroke-linejoin="round" stroke-width="1.77" d="m16.29 12.43-2.45-2.96-3.31 1.94"></path><circle cx="10.77" cy="26.85" r="1.63" fill="currentColor" fill-rule="nonzero"></circle><g stroke="currentColor" stroke-linecap="square"><path stroke-width="1.68" d="m6.15 21.5-2.99 2.08"></path><path stroke-linejoin="round" stroke-width="1.68" d="M6.33 24.87 2.8 23.83l.26-3.67"></path><path stroke-width="1.68" d="m17.01 23.45 2.08 3"></path><path stroke-linejoin="round" stroke-width="1.68" d="m15.67 26.55 3.67.25 1.04-3.51"></path><path stroke-width="1.72" d="m20.42 17.36 3.66.66"></path><path stroke-linejoin="round" stroke-width="1.72" d="m21.68 20.57 2.84-2.47-1.79-3.29"></path><path stroke-width="1.72" d="m19.35 10.1 3.26-1.8"></path><path stroke-linejoin="round" stroke-width="1.72" d="M19.53 6.65 23 8.09l-.65 3.69"></path><path stroke-width="1.72" d="M4.97 14.64 1.3 14"></path><path stroke-linejoin="round" stroke-width="1.72" d="M2.68 17.22.86 13.93l2.81-2.48"></path><path stroke-width="1.72" d="M8.45 8.17 6 5.37"></path><path stroke-linejoin="round" stroke-width="1.72" d="m9.46 4.88-3.75.16-.66 3.69"></path></g></g></svg>
|
|
@@ -8,6 +8,7 @@ class VectorStorePineconeInsert {
|
|
|
8
8
|
constructor() {
|
|
9
9
|
this.description = {
|
|
10
10
|
displayName: 'Pinecone: Insert',
|
|
11
|
+
hidden: true,
|
|
11
12
|
name: 'vectorStorePineconeInsert',
|
|
12
13
|
icon: 'file:pinecone.svg',
|
|
13
14
|
group: ['transform'],
|
|
@@ -25,7 +26,7 @@ class VectorStorePineconeInsert {
|
|
|
25
26
|
resources: {
|
|
26
27
|
primaryDocumentation: [
|
|
27
28
|
{
|
|
28
|
-
url: 'https://docs.n8n.io/integrations/builtin/cluster-nodes/
|
|
29
|
+
url: 'https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.vectorstorepineconeinsert/',
|
|
29
30
|
},
|
|
30
31
|
],
|
|
31
32
|
},
|
|
@@ -91,14 +92,13 @@ class VectorStorePineconeInsert {
|
|
|
91
92
|
const credentials = await this.getCredentials('pineconeApi');
|
|
92
93
|
const documentInput = (await this.getInputConnectionData("ai_document", 0));
|
|
93
94
|
const embeddings = (await this.getInputConnectionData("ai_embedding", 0));
|
|
94
|
-
const client = new pinecone_2.
|
|
95
|
-
await client.init({
|
|
95
|
+
const client = new pinecone_2.Pinecone({
|
|
96
96
|
apiKey: credentials.apiKey,
|
|
97
97
|
environment: credentials.environment,
|
|
98
98
|
});
|
|
99
99
|
const pineconeIndex = client.Index(index);
|
|
100
100
|
if (namespace && clearNamespace) {
|
|
101
|
-
await pineconeIndex.
|
|
101
|
+
await pineconeIndex.namespace(namespace).deleteAll();
|
|
102
102
|
}
|
|
103
103
|
const { processedDocuments, serializedDocuments } = await (0, processDocuments_1.processDocuments)(documentInput, items);
|
|
104
104
|
await pinecone_1.PineconeStore.fromDocuments(processedDocuments, embeddings, {
|
package/dist/nodes/vector_store/VectorStorePineconeInsert/VectorStorePineconeInsert.node.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VectorStorePineconeInsert.node.js","sourceRoot":"","sources":["../../../../nodes/vector_store/VectorStorePineconeInsert/VectorStorePineconeInsert.node.ts"],"names":[],"mappings":";;;AAOA,8DAAgE;AAChE,
|
|
1
|
+
{"version":3,"file":"VectorStorePineconeInsert.node.js","sourceRoot":"","sources":["../../../../nodes/vector_store/VectorStorePineconeInsert/VectorStorePineconeInsert.node.ts"],"names":[],"mappings":";;;AAOA,8DAAgE;AAChE,0DAAuD;AAIvD,iEAA8D;AAG9D,MAAa,yBAAyB;IAAtC;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,kBAAkB;YAC/B,MAAM,EAAE,IAAI;YACZ,IAAI,EAAE,2BAA2B;YACjC,IAAI,EAAE,mBAAmB;YACzB,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC;YACV,WAAW,EAAE,8CAA8C;YAC3D,QAAQ,EAAE;gBACT,IAAI,EAAE,kBAAkB;gBAExB,KAAK,EAAE,SAAS;aAChB;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;iBACd;aACD;YACD,OAAO,EAAE,QAAyB;YAClC,UAAU,EAAE;gBACX;oBACC,WAAW,EAAE,gBAAgB;oBAC7B,IAAI,EAAE,eAAe;oBAC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AAW,EAAE,WAAW,CAAC,WAAqB;SAC9C,CAAC,CAAC;QAEH,MAAM,aAAa,GAAG,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAE1C,IAAI,SAAS,IAAI,cAAc,EAAE;YAChC,MAAM,aAAa,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,SAAS,EAAE,CAAC;SACrD;QAED,MAAM,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,GAAG,MAAM,IAAA,mCAAgB,EACzE,aAAa,EACb,KAAK,CACL,CAAC;QAEF,MAAM,wBAAa,CAAC,aAAa,CAAC,kBAAkB,EAAE,UAAU,EAAE;YACjE,SAAS,EAAE,SAAS,IAAI,SAAS;YACjC,aAAa;SACb,CAAC,CAAC;QAEH,OAAO,IAAI,CAAC,iBAAiB,CAAC,mBAAmB,CAAC,CAAC;IACpD,CAAC;CACD;AAzHD,8DAyHC"}
|
|
@@ -4,10 +4,13 @@ exports.VectorStorePineconeLoad = void 0;
|
|
|
4
4
|
const pinecone_1 = require("langchain/vectorstores/pinecone");
|
|
5
5
|
const pinecone_2 = require("@pinecone-database/pinecone");
|
|
6
6
|
const logWrapper_1 = require("../../../utils/logWrapper");
|
|
7
|
+
const sharedFields_1 = require("../../../utils/sharedFields");
|
|
8
|
+
const helpers_1 = require("../../../utils/helpers");
|
|
7
9
|
class VectorStorePineconeLoad {
|
|
8
10
|
constructor() {
|
|
9
11
|
this.description = {
|
|
10
12
|
displayName: 'Pinecone: Load',
|
|
13
|
+
hidden: true,
|
|
11
14
|
name: 'vectorStorePineconeLoad',
|
|
12
15
|
icon: 'file:pinecone.svg',
|
|
13
16
|
group: ['transform'],
|
|
@@ -59,6 +62,14 @@ class VectorStorePineconeLoad {
|
|
|
59
62
|
type: 'string',
|
|
60
63
|
default: '',
|
|
61
64
|
},
|
|
65
|
+
{
|
|
66
|
+
displayName: 'Options',
|
|
67
|
+
name: 'options',
|
|
68
|
+
type: 'collection',
|
|
69
|
+
placeholder: 'Add Option',
|
|
70
|
+
default: {},
|
|
71
|
+
options: [sharedFields_1.metadataFilterField],
|
|
72
|
+
},
|
|
62
73
|
],
|
|
63
74
|
};
|
|
64
75
|
}
|
|
@@ -68,16 +79,17 @@ class VectorStorePineconeLoad {
|
|
|
68
79
|
const index = this.getNodeParameter('pineconeIndex', itemIndex);
|
|
69
80
|
const credentials = await this.getCredentials('pineconeApi');
|
|
70
81
|
const embeddings = (await this.getInputConnectionData("ai_embedding", itemIndex));
|
|
71
|
-
const client = new pinecone_2.
|
|
72
|
-
await client.init({
|
|
82
|
+
const client = new pinecone_2.Pinecone({
|
|
73
83
|
apiKey: credentials.apiKey,
|
|
74
84
|
environment: credentials.environment,
|
|
75
85
|
});
|
|
76
86
|
const pineconeIndex = client.Index(index);
|
|
77
|
-
const
|
|
87
|
+
const config = {
|
|
78
88
|
namespace: namespace || undefined,
|
|
79
89
|
pineconeIndex,
|
|
80
|
-
|
|
90
|
+
filter: (0, helpers_1.getMetadataFiltersValues)(this, itemIndex),
|
|
91
|
+
};
|
|
92
|
+
const vectorStore = await pinecone_1.PineconeStore.fromExistingIndex(embeddings, config);
|
|
81
93
|
return {
|
|
82
94
|
response: (0, logWrapper_1.logWrapper)(vectorStore, this),
|
|
83
95
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VectorStorePineconeLoad.node.js","sourceRoot":"","sources":["../../../../nodes/vector_store/VectorStorePineconeLoad/VectorStorePineconeLoad.node.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"VectorStorePineconeLoad.node.js","sourceRoot":"","sources":["../../../../nodes/vector_store/VectorStorePineconeLoad/VectorStorePineconeLoad.node.ts"],"names":[],"mappings":";;;AAQA,8DAAgE;AAChE,0DAAuD;AAEvD,0DAAuD;AACvD,8DAAkE;AAClE,oDAAkE;AAGlE,MAAa,uBAAuB;IAApC;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,gBAAgB;YAE7B,MAAM,EAAE,IAAI;YACZ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OAAO,CAAC,+CAA+C,CAAC,CAAC;QAErE,MAAM,SAAS,GAAG,IAAI,CAAC,gBAAgB,CAAC,mBAAmB,EAAE,SAAS,CAAW,CAAC;QAClF,MAAM,KAAK,GAAG,IAAI,CAAC,gBAAgB,CAAC,eAAe,EAAE,SAAS,CAAW,CAAC;QAE1E,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,aAAa,CAAC,CAAC;QAC7D,MAAM,UAAU,GAAG,CAAC,MAAM,IAAI,CAAC,sBAAsB,iBAEpD,SAAS,CACT,CAAe,CAAC;QAEjB,MAAM,MAAM,GAAG,IAAI,mBAAQ,CAAC;YAC3B,MAAM,EAAE,WAAW,CAAC,MAAgB;YACpC,WAAW,EAAE,WAAW,CAAC,WAAqB;SAC9C,CAAC,CAAC;QAEH,MAAM,aAAa,GAAG,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAC1C,MAAM,MAAM,GAAoB;YAC/B,SAAS,EAAE,SAAS,IAAI,SAAS;YACjC,aAAa;YACb,MAAM,EAAE,IAAA,kCAAwB,EAAC,IAAI,EAAE,SAAS,CAAC;SACjD,CAAC;QAEF,MAAM,WAAW,GAAG,MAAM,wBAAa,CAAC,iBAAiB,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;QAE9E,OAAO;YACN,QAAQ,EAAE,IAAA,uBAAU,EAAC,WAAW,EAAE,IAAI,CAAC;SACvC,CAAC;IACH,CAAC;CACD;AAjGD,0DAiGC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const VectorStoreSupabase: {
|
|
2
|
+
new (): {
|
|
3
|
+
description: import("n8n-workflow").INodeTypeDescription;
|
|
4
|
+
execute(this: import("n8n-workflow").IExecuteFunctions): Promise<import("n8n-workflow").INodeExecutionData[][]>;
|
|
5
|
+
supplyData(this: import("n8n-workflow").IExecuteFunctions, itemIndex: number): Promise<import("n8n-workflow").SupplyData>;
|
|
6
|
+
};
|
|
7
|
+
};
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VectorStoreSupabase = void 0;
|
|
4
|
+
const supabase_js_1 = require("@supabase/supabase-js");
|
|
5
|
+
const supabase_1 = require("langchain/vectorstores/supabase");
|
|
6
|
+
const createVectorStoreNode_1 = require("../shared/createVectorStoreNode");
|
|
7
|
+
const sharedFields_1 = require("../../../utils/sharedFields");
|
|
8
|
+
const sharedFields = [
|
|
9
|
+
{
|
|
10
|
+
displayName: 'Table Name',
|
|
11
|
+
name: 'tableName',
|
|
12
|
+
type: 'string',
|
|
13
|
+
default: '',
|
|
14
|
+
required: true,
|
|
15
|
+
description: 'Name of the table to load from',
|
|
16
|
+
},
|
|
17
|
+
];
|
|
18
|
+
const insertFields = [
|
|
19
|
+
{
|
|
20
|
+
displayName: 'Options',
|
|
21
|
+
name: 'options',
|
|
22
|
+
type: 'collection',
|
|
23
|
+
placeholder: 'Add Option',
|
|
24
|
+
default: {},
|
|
25
|
+
options: [
|
|
26
|
+
{
|
|
27
|
+
displayName: 'Query Name',
|
|
28
|
+
name: 'queryName',
|
|
29
|
+
type: 'string',
|
|
30
|
+
default: 'match_documents',
|
|
31
|
+
description: 'Name of the query to use for matching documents',
|
|
32
|
+
},
|
|
33
|
+
],
|
|
34
|
+
},
|
|
35
|
+
];
|
|
36
|
+
const retrieveFields = [
|
|
37
|
+
{
|
|
38
|
+
displayName: 'Options',
|
|
39
|
+
name: 'options',
|
|
40
|
+
type: 'collection',
|
|
41
|
+
placeholder: 'Add Option',
|
|
42
|
+
default: {},
|
|
43
|
+
options: [
|
|
44
|
+
{
|
|
45
|
+
displayName: 'Query Name',
|
|
46
|
+
name: 'queryName',
|
|
47
|
+
type: 'string',
|
|
48
|
+
default: 'match_documents',
|
|
49
|
+
description: 'Name of the query to use for matching documents',
|
|
50
|
+
},
|
|
51
|
+
sharedFields_1.metadataFilterField,
|
|
52
|
+
],
|
|
53
|
+
},
|
|
54
|
+
];
|
|
55
|
+
exports.VectorStoreSupabase = (0, createVectorStoreNode_1.createVectorStoreNode)({
|
|
56
|
+
meta: {
|
|
57
|
+
description: 'Work with your data in Supabase Vector Store',
|
|
58
|
+
icon: 'file:supabase.svg',
|
|
59
|
+
displayName: 'Supabase Vector Store',
|
|
60
|
+
docsUrl: 'https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.vectorstoresupabase/',
|
|
61
|
+
name: 'vectorStoreSupabase',
|
|
62
|
+
credentials: [
|
|
63
|
+
{
|
|
64
|
+
name: 'supabaseApi',
|
|
65
|
+
required: true,
|
|
66
|
+
},
|
|
67
|
+
],
|
|
68
|
+
},
|
|
69
|
+
sharedFields,
|
|
70
|
+
insertFields,
|
|
71
|
+
loadFields: retrieveFields,
|
|
72
|
+
retrieveFields,
|
|
73
|
+
async getVectorStoreClient(context, filter, embeddings, itemIndex) {
|
|
74
|
+
var _a;
|
|
75
|
+
const tableName = context.getNodeParameter('tableName', itemIndex);
|
|
76
|
+
const options = context.getNodeParameter('options', itemIndex, {});
|
|
77
|
+
const credentials = await context.getCredentials('supabaseApi');
|
|
78
|
+
const client = (0, supabase_js_1.createClient)(credentials.host, credentials.serviceRole);
|
|
79
|
+
return supabase_1.SupabaseVectorStore.fromExistingIndex(embeddings, {
|
|
80
|
+
client,
|
|
81
|
+
tableName,
|
|
82
|
+
queryName: (_a = options.queryName) !== null && _a !== void 0 ? _a : 'match_documents',
|
|
83
|
+
filter,
|
|
84
|
+
});
|
|
85
|
+
},
|
|
86
|
+
async populateVectorStore(context, embeddings, documents, itemIndex) {
|
|
87
|
+
var _a;
|
|
88
|
+
const tableName = context.getNodeParameter('tableName', itemIndex);
|
|
89
|
+
const options = context.getNodeParameter('options', itemIndex, {});
|
|
90
|
+
const credentials = await context.getCredentials('supabaseApi');
|
|
91
|
+
const client = (0, supabase_js_1.createClient)(credentials.host, credentials.serviceRole);
|
|
92
|
+
void supabase_1.SupabaseVectorStore.fromDocuments(documents, embeddings, {
|
|
93
|
+
client,
|
|
94
|
+
tableName,
|
|
95
|
+
queryName: (_a = options.queryName) !== null && _a !== void 0 ? _a : 'match_documents',
|
|
96
|
+
});
|
|
97
|
+
},
|
|
98
|
+
});
|
|
99
|
+
//# sourceMappingURL=VectorStoreSupabase.node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VectorStoreSupabase.node.js","sourceRoot":"","sources":["../../../../nodes/vector_store/VectorStoreSupabase/VectorStoreSupabase.node.ts"],"names":[],"mappings":";;;AACA,uDAAqD;AACrD,8DAAsE;AACtE,2EAAwE;AACxE,8DAAkE;AAElE,MAAM,YAAY,GAAsB;IACvC;QACC,WAAW,EAAE,YAAY;QACzB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,gCAAgC;KAC7C;CACD,CAAC;AACF,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;gBACC,WAAW,EAAE,YAAY;gBACzB,IAAI,EAAE,WAAW;gBACjB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,iBAAiB;gBAC1B,WAAW,EAAE,iDAAiD;aAC9D;SACD;KACD;CACD,CAAC;AACF,MAAM,cAAc,GAAsB;IACzC;QACC,WAAW,EAAE,SAAS;QACtB,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,YAAY;QAClB,WAAW,EAAE,YAAY;QACzB,OAAO,EAAE,EAAE;QACX,OAAO,EAAE;YACR;gBACC,WAAW,EAAE,YAAY;gBACzB,IAAI,EAAE,WAAW;gBACjB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,iBAAiB;gBAC1B,WAAW,EAAE,iD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,CAAC;QACF,MAAM,WAAW,GAAG,MAAM,OAAO,CAAC,cAAc,CAAC,aAAa,CAAC,CAAC;QAChE,MAAM,MAAM,GAAG,IAAA,0BAAY,EAAC,WAAW,CAAC,IAAc,EAAE,WAAW,CAAC,WAAqB,CAAC,CAAC;QAE3F,KAAK,8BAAmB,CAAC,aAAa,CAAC,SAAS,EAAE,UAAU,EAAE;YAC7D,MAAM;YACN,SAAS;YACT,SAAS,EAAE,MAAA,OAAO,CAAC,SAAS,mCAAI,iBAAiB;SACjD,CAAC,CAAC;IACJ,CAAC;CACD,CAAC,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<svg width="109" height="113" viewBox="0 0 109 113" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M63.7076 110.284C60.8481 113.885 55.0502 111.912 54.9813 107.314L53.9738 40.0627L99.1935 40.0627C107.384 40.0627 111.952 49.5228 106.859 55.9374L63.7076 110.284Z" fill="url(#paint0_linear)"/>
|
|
3
|
+
<path d="M63.7076 110.284C60.8481 113.885 55.0502 111.912 54.9813 107.314L53.9738 40.0627L99.1935 40.0627C107.384 40.0627 111.952 49.5228 106.859 55.9374L63.7076 110.284Z" fill="url(#paint1_linear)" fill-opacity="0.2"/>
|
|
4
|
+
<path d="M45.317 2.07103C48.1765 -1.53037 53.9745 0.442937 54.0434 5.041L54.4849 72.2922H9.83113C1.64038 72.2922 -2.92775 62.8321 2.1655 56.4175L45.317 2.07103Z" fill="#3ECF8E"/>
|
|
5
|
+
<defs>
|
|
6
|
+
<linearGradient id="paint0_linear" x1="53.9738" y1="54.974" x2="94.1635" y2="71.8295" gradientUnits="userSpaceOnUse">
|
|
7
|
+
<stop stop-color="#249361"/>
|
|
8
|
+
<stop offset="1" stop-color="#3ECF8E"/>
|
|
9
|
+
</linearGradient>
|
|
10
|
+
<linearGradient id="paint1_linear" x1="36.1558" y1="30.578" x2="54.4844" y2="65.0806" gradientUnits="userSpaceOnUse">
|
|
11
|
+
<stop/>
|
|
12
|
+
<stop offset="1" stop-opacity="0"/>
|
|
13
|
+
</linearGradient>
|
|
14
|
+
</defs>
|
|
15
|
+
</svg>
|
|
@@ -8,6 +8,7 @@ class VectorStoreSupabaseInsert {
|
|
|
8
8
|
constructor() {
|
|
9
9
|
this.description = {
|
|
10
10
|
displayName: 'Supabase: Insert',
|
|
11
|
+
hidden: true,
|
|
11
12
|
name: 'vectorStoreSupabaseInsert',
|
|
12
13
|
icon: 'file:supabase.svg',
|
|
13
14
|
group: ['transform'],
|
|
@@ -24,7 +25,7 @@ class VectorStoreSupabaseInsert {
|
|
|
24
25
|
resources: {
|
|
25
26
|
primaryDocumentation: [
|
|
26
27
|
{
|
|
27
|
-
url: 'https://docs.n8n.io/integrations/builtin/cluster-nodes/
|
|
28
|
+
url: 'https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.vectorstoresupabaseinsert/',
|
|
28
29
|
},
|
|
29
30
|
],
|
|
30
31
|
},
|
package/dist/nodes/vector_store/VectorStoreSupabaseInsert/VectorStoreSupabaseInsert.node.js.map
CHANGED
|
@@ -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;
|
|
1
|
+
{"version":3,"file":"VectorStoreSupabaseInsert.node.js","sourceRoot":"","sources":["../../../../nodes/vector_store/VectorStoreSupabaseInsert/VectorStoreSupabaseInsert.node.ts"],"names":[],"mappings":";;;AASA,uDAAqD;AACrD,8DAAsE;AAGtE,iEAA8D;AAG9D,MAAa,yBAAyB;IAAtC;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,kBAAkB;YAE/B,MAAM,EAAE,IAAI;YACZ,IAAI,EAAE,2BAA2B;YACjC,IAAI,EAAE,mBAAmB;YACzB,K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I,EAAE,QAAQ;oBACd,OAAO,EAAE,EAAE;iBACX;aACD;SACD,CAAC;IAiCH,CAAC;IA/BA,KAAK,CAAC,OAAO;QACZ,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,iDAAiD,CAAC,CAAC;QAEvE,MAAM,KAAK,GAAG,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;QACnC,MAAM,SAAS,GAAG,IAAI,CAAC,gBAAgB,CAAC,WAAW,EAAE,CAAC,CAAW,CAAC;QAClE,MAAM,SAAS,GAAG,IAAI,CAAC,gBAAgB,CAAC,WAAW,EAAE,CAAC,CAAW,CAAC;QAClE,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,aAAa,CAAC,CAAC;QAE7D,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;QACjB,MAAM,MAAM,GAAG,IAAA,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;AAjHD,8DAiHC"}
|
|
@@ -4,12 +4,15 @@ 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");
|
|
7
9
|
class VectorStoreSupabaseLoad {
|
|
8
10
|
constructor() {
|
|
9
11
|
this.description = {
|
|
10
12
|
displayName: 'Supabase: Load',
|
|
11
13
|
name: 'vectorStoreSupabaseLoad',
|
|
12
14
|
icon: 'file:supabase.svg',
|
|
15
|
+
hidden: true,
|
|
13
16
|
group: ['transform'],
|
|
14
17
|
version: 1,
|
|
15
18
|
description: 'Load data from Supabase Vector Store index',
|
|
@@ -68,18 +71,7 @@ class VectorStoreSupabaseLoad {
|
|
|
68
71
|
type: 'collection',
|
|
69
72
|
placeholder: 'Add Option',
|
|
70
73
|
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
|
-
],
|
|
74
|
+
options: [sharedFields_1.metadataFilterField],
|
|
83
75
|
},
|
|
84
76
|
],
|
|
85
77
|
};
|
|
@@ -88,16 +80,16 @@ class VectorStoreSupabaseLoad {
|
|
|
88
80
|
this.logger.verbose('Supply Supabase Load Vector Store');
|
|
89
81
|
const tableName = this.getNodeParameter('tableName', itemIndex);
|
|
90
82
|
const queryName = this.getNodeParameter('queryName', itemIndex);
|
|
91
|
-
const options = this.getNodeParameter('options', itemIndex, {});
|
|
92
83
|
const credentials = await this.getCredentials('supabaseApi');
|
|
93
84
|
const embeddings = (await this.getInputConnectionData("ai_embedding", 0));
|
|
94
85
|
const client = (0, supabase_js_1.createClient)(credentials.host, credentials.serviceRole);
|
|
95
|
-
const
|
|
86
|
+
const config = {
|
|
96
87
|
client,
|
|
97
88
|
tableName,
|
|
98
89
|
queryName,
|
|
99
|
-
filter:
|
|
100
|
-
}
|
|
90
|
+
filter: (0, helpers_1.getMetadataFiltersValues)(this, itemIndex),
|
|
91
|
+
};
|
|
92
|
+
const vectorStore = await supabase_1.SupabaseVectorStore.fromExistingIndex(embeddings, config);
|
|
101
93
|
return {
|
|
102
94
|
response: (0, logWrapper_1.logWrapper)(vectorStore, this),
|
|
103
95
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VectorStoreSupabaseLoad.node.js","sourceRoot":"","sources":["../../../../nodes/vector_store/VectorStoreSupabaseLoad/VectorStoreSupabaseLoad.node.ts"],"names":[],"mappings":";;;
|
|
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;AAGlE,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,WAA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C,CAAC;QAC3F,MAAM,MAAM,GAAoB;YAC/B,MAAM;YACN,SAAS;YACT,SAAS;YACT,MAAM,EAAE,IAAA,kCAAwB,EAAC,IAAI,EAAE,SAAS,CAAC;SACjD,CAAC;QAEF,MAAM,WAAW,GAAG,MAAM,8BAAmB,CAAC,iBAAiB,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;QAEpF,OAAO;YACN,QAAQ,EAAE,IAAA,uBAAU,EAAC,WAAW,EAAE,IAAI,CAAC;SACvC,CAAC;IACH,CAAC;CACD;AAjGD,0DAiGC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const VectorStoreZep: {
|
|
2
|
+
new (): {
|
|
3
|
+
description: import("n8n-workflow").INodeTypeDescription;
|
|
4
|
+
execute(this: import("n8n-workflow").IExecuteFunctions): Promise<import("n8n-workflow").INodeExecutionData[][]>;
|
|
5
|
+
supplyData(this: import("n8n-workflow").IExecuteFunctions, itemIndex: number): Promise<import("n8n-workflow").SupplyData>;
|
|
6
|
+
};
|
|
7
|
+
};
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VectorStoreZep = void 0;
|
|
4
|
+
const zep_1 = require("langchain/vectorstores/zep");
|
|
5
|
+
const createVectorStoreNode_1 = require("../shared/createVectorStoreNode");
|
|
6
|
+
const sharedFields_1 = require("../../../utils/sharedFields");
|
|
7
|
+
const embeddingDimensions = {
|
|
8
|
+
displayName: 'Embedding Dimensions',
|
|
9
|
+
name: 'embeddingDimensions',
|
|
10
|
+
type: 'number',
|
|
11
|
+
default: 1536,
|
|
12
|
+
description: 'Whether to allow using characters from the Unicode surrogate blocks',
|
|
13
|
+
};
|
|
14
|
+
const insertFields = [
|
|
15
|
+
{
|
|
16
|
+
displayName: 'Options',
|
|
17
|
+
name: 'options',
|
|
18
|
+
type: 'collection',
|
|
19
|
+
placeholder: 'Add Option',
|
|
20
|
+
default: {},
|
|
21
|
+
options: [
|
|
22
|
+
embeddingDimensions,
|
|
23
|
+
{
|
|
24
|
+
displayName: 'Is Auto Embedded',
|
|
25
|
+
name: 'isAutoEmbedded',
|
|
26
|
+
type: 'boolean',
|
|
27
|
+
default: true,
|
|
28
|
+
description: 'Whether to automatically embed documents when they are added',
|
|
29
|
+
},
|
|
30
|
+
],
|
|
31
|
+
},
|
|
32
|
+
];
|
|
33
|
+
const retrieveFields = [
|
|
34
|
+
{
|
|
35
|
+
displayName: 'Options',
|
|
36
|
+
name: 'options',
|
|
37
|
+
type: 'collection',
|
|
38
|
+
placeholder: 'Add Option',
|
|
39
|
+
default: {},
|
|
40
|
+
options: [embeddingDimensions, sharedFields_1.metadataFilterField],
|
|
41
|
+
},
|
|
42
|
+
];
|
|
43
|
+
exports.VectorStoreZep = (0, createVectorStoreNode_1.createVectorStoreNode)({
|
|
44
|
+
meta: {
|
|
45
|
+
displayName: 'Zep Vector Store',
|
|
46
|
+
name: 'vectorStoreZep',
|
|
47
|
+
description: 'Work with your data in Zep Vector Store',
|
|
48
|
+
credentials: [
|
|
49
|
+
{
|
|
50
|
+
name: 'zepApi',
|
|
51
|
+
required: true,
|
|
52
|
+
},
|
|
53
|
+
],
|
|
54
|
+
icon: 'file:zep.png',
|
|
55
|
+
docsUrl: 'https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.vectorstorezep/',
|
|
56
|
+
},
|
|
57
|
+
sharedFields: [
|
|
58
|
+
{
|
|
59
|
+
displayName: 'Collection Name',
|
|
60
|
+
name: 'collectionName',
|
|
61
|
+
type: 'string',
|
|
62
|
+
default: '',
|
|
63
|
+
required: true,
|
|
64
|
+
},
|
|
65
|
+
],
|
|
66
|
+
insertFields,
|
|
67
|
+
loadFields: retrieveFields,
|
|
68
|
+
retrieveFields,
|
|
69
|
+
async getVectorStoreClient(context, filter, embeddings, itemIndex) {
|
|
70
|
+
var _a;
|
|
71
|
+
const collectionName = context.getNodeParameter('collectionName', itemIndex);
|
|
72
|
+
const options = context.getNodeParameter('options', itemIndex) || {};
|
|
73
|
+
const credentials = (await context.getCredentials('zepApi'));
|
|
74
|
+
const zepConfig = {
|
|
75
|
+
apiUrl: credentials.apiUrl,
|
|
76
|
+
apiKey: credentials.apiKey,
|
|
77
|
+
collectionName,
|
|
78
|
+
embeddingDimensions: (_a = options.embeddingDimensions) !== null && _a !== void 0 ? _a : 1536,
|
|
79
|
+
metadata: filter,
|
|
80
|
+
};
|
|
81
|
+
return new zep_1.ZepVectorStore(embeddings, zepConfig);
|
|
82
|
+
},
|
|
83
|
+
async populateVectorStore(context, embeddings, documents, itemIndex) {
|
|
84
|
+
var _a, _b;
|
|
85
|
+
const collectionName = context.getNodeParameter('collectionName', itemIndex);
|
|
86
|
+
const options = context.getNodeParameter('options', itemIndex) || {};
|
|
87
|
+
const credentials = (await context.getCredentials('zepApi'));
|
|
88
|
+
const zepConfig = {
|
|
89
|
+
apiUrl: credentials.apiUrl,
|
|
90
|
+
apiKey: credentials.apiKey,
|
|
91
|
+
collectionName,
|
|
92
|
+
embeddingDimensions: (_a = options.embeddingDimensions) !== null && _a !== void 0 ? _a : 1536,
|
|
93
|
+
isAutoEmbedded: (_b = options.isAutoEmbedded) !== null && _b !== void 0 ? _b : true,
|
|
94
|
+
};
|
|
95
|
+
zep_1.ZepVectorStore.fromDocuments(documents, embeddings, zepConfig);
|
|
96
|
+
},
|
|
97
|
+
});
|
|
98
|
+
//# 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":";;;AAEA,oDAA4D;AAE5D,2EAAwE;AACxE,8DAAkE;AAElE,MAAM,mBAAmB,GAAoB;IAC5C,WAAW,EAAE,sBAAsB;IACnC,IAAI,EAAE,qBAAqB;IAC3B,IAAI,EAAE,QAAQ;I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
8
8
|
this.description = {
|
|
9
9
|
displayName: 'Zep Vector Store: Insert',
|
|
10
10
|
name: '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/
|
|
27
|
+
url: 'https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.vectorstorezepinsert/',
|
|
27
28
|
},
|
|
28
29
|
],
|
|
29
30
|
},
|
|
@@ -92,8 +93,8 @@ 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
99
|
const options = this.getNodeParameter('options', 0) || {};
|
|
99
100
|
const credentials = (await this.getCredentials('zepApi'));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VectorStoreZepInsert.node.js","sourceRoot":"","sources":["../../../../nodes/vector_store/VectorStoreZepInsert/VectorStoreZepInsert.node.ts"],"names":[],"mappings":";;;AAOA,oDAA4D;AAI5D,iEAA8D;
|
|
1
|
+
{"version":3,"file":"VectorStoreZepInsert.node.js","sourceRoot":"","sources":["../../../../nodes/vector_store/VectorStoreZepInsert/VectorStoreZepInsert.node.ts"],"names":[],"mappings":";;;AAOA,oDAA4D;AAI5D,iEAA8D;AAG9D,MAAa,oBAAoB;IAAjC;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,0BAA0B;YACvC,IAAI,EAAE,sBAAsB;YAC5B,MAAM,EAAE,IA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,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":";;;
|
|
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,CAAC;YACpB,OAAO,EAAE,CAAC;YACV,WAAW,EAAE,uCAAuC;YACpD,QAAQ,EAAE;gBACT,IAAI,EAAE,WAAW;aACjB;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,0GAA0G;yBAC/G;qBACD;iBACD;aACD;YACD,WAAW,EAAE;gBACZ;oBACC,IAAI,EAAE,QAAQ;oBACd,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,iBAAiB;oBAC9B,IAAI,EAAE,gBAAgB;oBACtB,IAAI,EAAE,QAAQ;oBACd,OAAO,EAAE,EAAE;oBACX,QAAQ,EAAE,IAAI;iBACd;gBACD;oBACC,WAAW,EAAE,SAAS;oBACtB,IAAI,EAAE,SAAS;oBACf,I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ore } from 'langchain/vectorstores/base';
|
|
2
|
+
import type { INodeCredentialDescription, INodeProperties, INodeExecutionData, IExecuteFunctions, INodeTypeDescription, SupplyData } 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
|
+
sharedFields: INodeProperties[];
|
|
16
|
+
insertFields?: INodeProperties[];
|
|
17
|
+
loadFields?: INodeProperties[];
|
|
18
|
+
retrieveFields?: INodeProperties[];
|
|
19
|
+
populateVectorStore: (context: IExecuteFunctions, embeddings: Embeddings, documents: Array<Document<Record<string, unknown>>>, itemIndex: number) => Promise<void>;
|
|
20
|
+
getVectorStoreClient: (context: IExecuteFunctions, filter: Record<string, never> | undefined, embeddings: Embeddings, itemIndex: number) => Promise<VectorStore>;
|
|
21
|
+
}
|
|
22
|
+
export declare const createVectorStoreNode: (args: VectorStoreNodeConstructorArgs) => {
|
|
23
|
+
new (): {
|
|
24
|
+
description: INodeTypeDescription;
|
|
25
|
+
execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
|
|
26
|
+
supplyData(this: IExecuteFunctions, itemIndex: number): Promise<SupplyData>;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
export {};
|