@n8n/n8n-nodes-langchain 1.83.1 → 1.84.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.
- package/dist/build.tsbuildinfo +1 -1
- package/dist/known/nodes.json +4 -0
- package/dist/nodes/agents/Agent/Agent.node.js +5 -1
- package/dist/nodes/agents/Agent/Agent.node.js.map +1 -1
- package/dist/nodes/agents/Agent/agents/ConversationalAgent/execute.js +9 -19
- package/dist/nodes/agents/Agent/agents/ConversationalAgent/execute.js.map +1 -1
- package/dist/nodes/agents/Agent/agents/OpenAiFunctionsAgent/execute.js +3 -7
- package/dist/nodes/agents/Agent/agents/OpenAiFunctionsAgent/execute.js.map +1 -1
- package/dist/nodes/agents/Agent/agents/PlanAndExecuteAgent/execute.js +3 -7
- package/dist/nodes/agents/Agent/agents/PlanAndExecuteAgent/execute.js.map +1 -1
- package/dist/nodes/agents/Agent/agents/ReActAgent/execute.js +3 -7
- package/dist/nodes/agents/Agent/agents/ReActAgent/execute.js.map +1 -1
- package/dist/nodes/agents/Agent/agents/ToolsAgent/execute.js +5 -6
- package/dist/nodes/agents/Agent/agents/ToolsAgent/execute.js.map +1 -1
- package/dist/nodes/chains/ChainLLM/ChainLlm.node.js +17 -389
- package/dist/nodes/chains/ChainLLM/ChainLlm.node.js.map +1 -1
- package/dist/nodes/chains/ChainLLM/methods/chainExecutor.d.ts +15 -0
- package/dist/nodes/chains/ChainLLM/methods/chainExecutor.js +69 -0
- package/dist/nodes/chains/ChainLLM/methods/chainExecutor.js.map +1 -0
- package/dist/nodes/chains/ChainLLM/methods/config.d.ts +14 -0
- package/dist/nodes/chains/ChainLLM/methods/config.js +253 -0
- package/dist/nodes/chains/ChainLLM/methods/config.js.map +1 -0
- package/dist/nodes/chains/ChainLLM/methods/imageUtils.d.ts +12 -0
- package/dist/nodes/chains/ChainLLM/methods/imageUtils.js +66 -0
- package/dist/nodes/chains/ChainLLM/methods/imageUtils.js.map +1 -0
- package/dist/nodes/chains/ChainLLM/methods/index.d.ts +4 -0
- package/dist/nodes/chains/ChainLLM/methods/index.js +11 -0
- package/dist/nodes/chains/ChainLLM/methods/index.js.map +1 -0
- package/dist/nodes/chains/ChainLLM/methods/promptUtils.d.ts +3 -0
- package/dist/nodes/chains/ChainLLM/methods/promptUtils.js +69 -0
- package/dist/nodes/chains/ChainLLM/methods/promptUtils.js.map +1 -0
- package/dist/nodes/chains/ChainLLM/methods/responseFormatter.d.ts +2 -0
- package/dist/nodes/chains/ChainLLM/methods/responseFormatter.js +29 -0
- package/dist/nodes/chains/ChainLLM/methods/responseFormatter.js.map +1 -0
- package/dist/nodes/chains/ChainLLM/methods/types.d.ts +28 -0
- package/dist/nodes/chains/ChainLLM/methods/types.js +3 -0
- package/dist/nodes/chains/ChainLLM/methods/types.js.map +1 -0
- package/dist/nodes/chains/ChainRetrievalQA/ChainRetrievalQa.node.js +68 -33
- package/dist/nodes/chains/ChainRetrievalQA/ChainRetrievalQa.node.js.map +1 -1
- package/dist/nodes/llms/LMChatOpenAi/methods/loadModels.js +1 -0
- package/dist/nodes/llms/LMChatOpenAi/methods/loadModels.js.map +1 -1
- package/dist/nodes/llms/LmChatAzureOpenAi/LmChatAzureOpenAi.node.js +1 -1
- package/dist/nodes/llms/LmChatAzureOpenAi/LmChatAzureOpenAi.node.js.map +1 -1
- package/dist/nodes/vector_store/VectorStoreInMemory/VectorStoreInMemory.node.js +1 -1
- package/dist/nodes/vector_store/VectorStoreInMemory/VectorStoreInMemory.node.js.map +1 -1
- package/dist/nodes/vector_store/VectorStoreMongoDBAtlas/VectorStoreMongoDBAtlas.node.d.ts +16 -0
- package/dist/nodes/vector_store/VectorStoreMongoDBAtlas/VectorStoreMongoDBAtlas.node.js +244 -0
- package/dist/nodes/vector_store/VectorStoreMongoDBAtlas/VectorStoreMongoDBAtlas.node.js.map +1 -0
- package/dist/nodes/vector_store/VectorStoreMongoDBAtlas/mongodb.dark.svg +3 -0
- package/dist/nodes/vector_store/VectorStoreMongoDBAtlas/mongodb.svg +3 -0
- package/dist/nodes/vector_store/VectorStorePGVector/VectorStorePGVector.node.js +1 -1
- package/dist/nodes/vector_store/VectorStorePGVector/VectorStorePGVector.node.js.map +1 -1
- package/dist/nodes/vector_store/VectorStorePinecone/VectorStorePinecone.node.js +2 -2
- package/dist/nodes/vector_store/VectorStorePinecone/VectorStorePinecone.node.js.map +1 -1
- package/dist/nodes/vector_store/VectorStorePineconeInsert/VectorStorePineconeInsert.node.d.ts +1 -1
- package/dist/nodes/vector_store/VectorStorePineconeInsert/VectorStorePineconeInsert.node.js +1 -1
- package/dist/nodes/vector_store/VectorStorePineconeInsert/VectorStorePineconeInsert.node.js.map +1 -1
- package/dist/nodes/vector_store/VectorStorePineconeLoad/VectorStorePineconeLoad.node.d.ts +1 -1
- package/dist/nodes/vector_store/VectorStorePineconeLoad/VectorStorePineconeLoad.node.js +1 -1
- package/dist/nodes/vector_store/VectorStorePineconeLoad/VectorStorePineconeLoad.node.js.map +1 -1
- package/dist/nodes/vector_store/VectorStoreQdrant/VectorStoreQdrant.node.js +2 -2
- package/dist/nodes/vector_store/VectorStoreQdrant/VectorStoreQdrant.node.js.map +1 -1
- package/dist/nodes/vector_store/VectorStoreSupabase/VectorStoreSupabase.node.js +2 -2
- package/dist/nodes/vector_store/VectorStoreSupabase/VectorStoreSupabase.node.js.map +1 -1
- package/dist/nodes/vector_store/VectorStoreSupabaseInsert/VectorStoreSupabaseInsert.node.d.ts +1 -1
- package/dist/nodes/vector_store/VectorStoreSupabaseInsert/VectorStoreSupabaseInsert.node.js +1 -1
- package/dist/nodes/vector_store/VectorStoreSupabaseInsert/VectorStoreSupabaseInsert.node.js.map +1 -1
- package/dist/nodes/vector_store/VectorStoreSupabaseLoad/VectorStoreSupabaseLoad.node.d.ts +1 -1
- package/dist/nodes/vector_store/VectorStoreSupabaseLoad/VectorStoreSupabaseLoad.node.js +1 -1
- package/dist/nodes/vector_store/VectorStoreSupabaseLoad/VectorStoreSupabaseLoad.node.js.map +1 -1
- package/dist/nodes/vector_store/VectorStoreZep/VectorStoreZep.node.js +1 -1
- package/dist/nodes/vector_store/VectorStoreZep/VectorStoreZep.node.js.map +1 -1
- package/dist/nodes/vector_store/shared/createVectorStoreNode/constants.d.ts +4 -0
- package/dist/nodes/vector_store/shared/createVectorStoreNode/constants.js +44 -0
- package/dist/nodes/vector_store/shared/createVectorStoreNode/constants.js.map +1 -0
- package/dist/nodes/vector_store/shared/createVectorStoreNode/createVectorStoreNode.d.ts +15 -0
- package/dist/nodes/vector_store/shared/createVectorStoreNode/createVectorStoreNode.js +226 -0
- package/dist/nodes/vector_store/shared/createVectorStoreNode/createVectorStoreNode.js.map +1 -0
- package/dist/nodes/vector_store/shared/createVectorStoreNode/methods/listSearch.js.map +1 -0
- package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/index.d.ts +5 -0
- package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/index.js +22 -0
- package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/index.js.map +1 -0
- package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/insertOperation.d.ts +5 -0
- package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/insertOperation.js +34 -0
- package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/insertOperation.js.map +1 -0
- package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/loadOperation.d.ts +5 -0
- package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/loadOperation.js +33 -0
- package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/loadOperation.js.map +1 -0
- package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/retrieveAsToolOperation.d.ts +5 -0
- package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/retrieveAsToolOperation.js +42 -0
- package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/retrieveAsToolOperation.js.map +1 -0
- package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/retrieveOperation.d.ts +5 -0
- package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/retrieveOperation.js +16 -0
- package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/retrieveOperation.js.map +1 -0
- package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/updateOperation.d.ts +5 -0
- package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/updateOperation.js +39 -0
- package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/updateOperation.js.map +1 -0
- package/dist/nodes/vector_store/shared/{createVectorStoreNode.d.ts → createVectorStoreNode/types.d.ts} +3 -16
- package/dist/nodes/vector_store/shared/createVectorStoreNode/types.js +3 -0
- package/dist/nodes/vector_store/shared/createVectorStoreNode/types.js.map +1 -0
- package/dist/nodes/vector_store/shared/createVectorStoreNode/utils.d.ts +6 -0
- package/dist/nodes/vector_store/shared/createVectorStoreNode/utils.js +20 -0
- package/dist/nodes/vector_store/shared/createVectorStoreNode/utils.js.map +1 -0
- package/dist/types/nodes.json +10 -9
- package/dist/utils/helpers.d.ts +1 -0
- package/dist/utils/helpers.js +12 -0
- package/dist/utils/helpers.js.map +1 -1
- package/dist/utils/output_parsers/N8nOutputFixingParser.js +6 -1
- package/dist/utils/output_parsers/N8nOutputFixingParser.js.map +1 -1
- package/dist/utils/output_parsers/N8nOutputParser.d.ts +1 -1
- package/dist/utils/output_parsers/N8nOutputParser.js +5 -5
- package/dist/utils/output_parsers/N8nOutputParser.js.map +1 -1
- package/dist/utils/output_parsers/N8nStructuredOutputParser.js +2 -1
- package/dist/utils/output_parsers/N8nStructuredOutputParser.js.map +1 -1
- package/package.json +9 -6
- package/dist/nodes/chains/ChainLLM/utils.d.ts +0 -5
- package/dist/nodes/chains/ChainLLM/utils.js +0 -14
- package/dist/nodes/chains/ChainLLM/utils.js.map +0 -1
- package/dist/nodes/vector_store/shared/createVectorStoreNode.js +0 -369
- package/dist/nodes/vector_store/shared/createVectorStoreNode.js.map +0 -1
- package/dist/nodes/vector_store/shared/methods/listSearch.js.map +0 -1
- /package/dist/nodes/vector_store/shared/{methods → createVectorStoreNode/methods}/listSearch.d.ts +0 -0
- /package/dist/nodes/vector_store/shared/{methods → createVectorStoreNode/methods}/listSearch.js +0 -0
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":";;;AAEA,kDAAoD;AACpD,0DAAuD;AAWvD,yDAA0D;AAC1D,
|
|
1
|
+
{"version":3,"file":"VectorStorePineconeInsert.node.js","sourceRoot":"","sources":["../../../../nodes/vector_store/VectorStorePineconeInsert/VectorStorePineconeInsert.node.ts"],"names":[],"mappings":";;;AAEA,kDAAoD;AACpD,0DAAuD;AAWvD,mFAAyF;AACzF,yDAA0D;AAC1D,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,4GAA4G;yBACjH;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;oB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Ac,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;QAEjB,MAAM,MAAM,GAAG,IAAI,mBAAQ,CAAC;YAC3B,MAAM,EAAE,WAAW,CAAC,MAAgB;SACpC,CAAC,CAAC;QAEH,MAAM,aAAa,GAAG,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAE1C,IAAI,SAAS,IAAI,cAAc,EAAE,CAAC;YACjC,MAAM,aAAa,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,SAAS,EAAE,CAAC;QACtD,CAAC;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,CAAC,mBAAmB,CAAC,CAAC;IAC9B,CAAC;CACD;AAxHD,8DAwHC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type INodeType, type INodeTypeDescription, type ISupplyDataFunctions, type SupplyData } from 'n8n-workflow';
|
|
2
|
-
import { pineconeIndexSearch } from '../shared/methods/listSearch';
|
|
2
|
+
import { pineconeIndexSearch } from '../shared/createVectorStoreNode/methods/listSearch';
|
|
3
3
|
export declare class VectorStorePineconeLoad implements INodeType {
|
|
4
4
|
description: INodeTypeDescription;
|
|
5
5
|
methods: {
|
|
@@ -6,8 +6,8 @@ const pinecone_2 = require("@pinecone-database/pinecone");
|
|
|
6
6
|
const helpers_1 = require("../../../utils/helpers");
|
|
7
7
|
const logWrapper_1 = require("../../../utils/logWrapper");
|
|
8
8
|
const sharedFields_1 = require("../../../utils/sharedFields");
|
|
9
|
+
const listSearch_1 = require("../shared/createVectorStoreNode/methods/listSearch");
|
|
9
10
|
const descriptions_1 = require("../shared/descriptions");
|
|
10
|
-
const listSearch_1 = require("../shared/methods/listSearch");
|
|
11
11
|
class VectorStorePineconeLoad {
|
|
12
12
|
constructor() {
|
|
13
13
|
this.description = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VectorStorePineconeLoad.node.js","sourceRoot":"","sources":["../../../../nodes/vector_store/VectorStorePineconeLoad/VectorStorePineconeLoad.node.ts"],"names":[],"mappings":";;;AAEA,kDAAoD;AACpD,0DAAuD;AASvD,4CAA0D;AAC1D,kDAA+C;AAC/C,sDAA0D;AAE1D,
|
|
1
|
+
{"version":3,"file":"VectorStorePineconeLoad.node.js","sourceRoot":"","sources":["../../../../nodes/vector_store/VectorStorePineconeLoad/VectorStorePineconeLoad.node.ts"],"names":[],"mappings":";;;AAEA,kDAAoD;AACpD,0DAAuD;AASvD,4CAA0D;AAC1D,kDAA+C;AAC/C,sDAA0D;AAE1D,mFAAyF;AACzF,yDAA0D;AAG1D,MAAa,uBAAuB;IAApC;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,gBAAgB;YAE7B,MAAM,EAAE,IAAI;YACZ,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,4GAA4G;yBACjH;qBACD;iBACD;aACD;YACD,WAAW,E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C3B,MAAM,EAAE,WAAW,CAAC,MAAgB;SACpC,CAAC,CAAC;QAEH,MAAM,aAAa,GAAG,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAC1C,MAAM,MAAM,GAAwB;YACnC,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;AAlGD,0DAkGC"}
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.VectorStoreQdrant = void 0;
|
|
4
4
|
const qdrant_1 = require("@langchain/qdrant");
|
|
5
|
-
const createVectorStoreNode_1 = require("../shared/createVectorStoreNode");
|
|
5
|
+
const createVectorStoreNode_1 = require("../shared/createVectorStoreNode/createVectorStoreNode");
|
|
6
|
+
const listSearch_1 = require("../shared/createVectorStoreNode/methods/listSearch");
|
|
6
7
|
const descriptions_1 = require("../shared/descriptions");
|
|
7
|
-
const listSearch_1 = require("../shared/methods/listSearch");
|
|
8
8
|
class ExtendedQdrantVectorStore extends qdrant_1.QdrantVectorStore {
|
|
9
9
|
static async fromExistingCollection(embeddings, args, defaultFilter = {}) {
|
|
10
10
|
ExtendedQdrantVectorStore.defaultFilter = defaultFilter;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VectorStoreQdrant.node.js","sourceRoot":"","sources":["../../../../nodes/vector_store/VectorStoreQdrant/VectorStoreQdrant.node.ts"],"names":[],"mappings":";;;AAGA,8CAAsD;AAItD,
|
|
1
|
+
{"version":3,"file":"VectorStoreQdrant.node.js","sourceRoot":"","sources":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O,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS;QAClE,MAAM,cAAc,GAAG,OAAO,CAAC,gBAAgB,CAAC,kBAAkB,EAAE,SAAS,EAAE,EAAE,EAAE;YAClF,YAAY,EAAE,IAAI;SAClB,CAAW,CAAC;QAIb,MAAM,EAAE,gBAAgB,EAAE,GAAG,OAAO,CAAC,gBAAgB,CAAC,SAAS,EAAE,SAAS,EAAE,EAAE,CAE7E,CAAC;QACF,MAAM,WAAW,GAAG,MAAM,OAAO,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;QAE9D,MAAM,MAAM,GAAkB;YAC7B,GAAG,EAAE,WAAW,CAAC,SAAmB;YACpC,MAAM,EAAE,WAAW,CAAC,MAAgB;YACpC,cAAc;YACd,gBAAgB;SAChB,CAAC;QAEF,MAAM,0BAAiB,CAAC,aAAa,CAAC,SAAS,EAAE,UAAU,EAAE,MAAM,CAAC,CAAC;IACtE,CAAC;CACD,CAAC;CAAG;AAxDL,8CAwDK"}
|
|
@@ -5,9 +5,9 @@ const supabase_1 = require("@langchain/community/vectorstores/supabase");
|
|
|
5
5
|
const supabase_js_1 = require("@supabase/supabase-js");
|
|
6
6
|
const n8n_workflow_1 = require("n8n-workflow");
|
|
7
7
|
const sharedFields_1 = require("../../../utils/sharedFields");
|
|
8
|
-
const createVectorStoreNode_1 = require("../shared/createVectorStoreNode");
|
|
8
|
+
const createVectorStoreNode_1 = require("../shared/createVectorStoreNode/createVectorStoreNode");
|
|
9
|
+
const listSearch_1 = require("../shared/createVectorStoreNode/methods/listSearch");
|
|
9
10
|
const descriptions_1 = require("../shared/descriptions");
|
|
10
|
-
const listSearch_1 = require("../shared/methods/listSearch");
|
|
11
11
|
const queryNameField = {
|
|
12
12
|
displayName: 'Query Name',
|
|
13
13
|
name: 'queryName',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VectorStoreSupabase.node.js","sourceRoot":"","sources":["../../../../nodes/vector_store/VectorStoreSupabase/VectorStoreSupabase.node.ts"],"names":[],"mappings":";;;AAAA,yEAAiF;AACjF,uDAAqD;AACrD,+CAAwE;AAExE,sDAA0D;AAE1D,
|
|
1
|
+
{"version":3,"file":"VectorStoreSupabase.node.js","sourceRoot":"","sources":["../../../../nodes/vector_store/VectorStoreSupabase/VectorStoreSupabase.node.ts"],"names":[],"mappings":";;;AAAA,yEAAiF;AACjF,uDAAqD;AACrD,+CAAwE;AAExE,sDAA0D;AAE1D,iGAA8F;AAC9F,mFAA6F;AAC7F,yDAA8D;AAE9D,MAAM,cAAc,GAAoB;IACvC,WAAW,EAAE,YAAY;IACzB,IAAI,EAAE,WAAW;IACjB,IAAI,EAAE,QAAQ;IACd,OAAO,EAAE,iBAAiB;IAC1B,WAAW,EAAE,iDAAiD;CAC9D,CAAC;AAEF,MAAM,YAAY,GAAsB,CAAC,mCAAoB,CAAC,CAAC;AAC/D,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,CAAC,cAAc,CAAC;KACzB;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,CAAC,cAAc,EAAE,kCAAmB,CAAC;KAC9C;CACD,CAAC;AAEF,MAAM,YAAY,GAAsB,CAAC,GAAG,YAAY,CAAC,CAAC;AAE1D,MAAa,mBAAoB,SAAQ,IAAA,6CAAqB,EAAsB;IACnF,IAAI,EAAE;QACL,WAAW,EAAE,8CAA8C;QAC3D,IAAI,EAAE,mBAAmB;QACzB,WAAW,EAAE,uBAAuB;QACpC,OAAO,EACN,4GAA4G;QAC7G,IAAI,EAAE,qBAAqB;QAC3B,WAAW,EAAE;Y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hE,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,IAAI,CAAC;YACJ,MAAM,8BAAmB,CAAC,aAAa,CAAC,SAAS,EAAE,UAAU,EAAE;gBAC9D,MAAM;gBACN,SAAS;gBACT,SAAS,EAAE,OAAO,CAAC,SAAS,IAAI,iBAAiB;aACjD,CAAC,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YAChB,IAAK,KAAe,CAAC,OAAO,KAAK,0CAA0C,EAAE,CAAC;gBAC7E,MAAM,IAAI,iCAAkB,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,SAAS,SAAS,YAAY,EAAE;oBAC/E,SAAS;oBACT,WAAW,EAAE,yDAAyD;iBACtE,CAAC,CAAC;YACJ,CAAC;iBAAM,CAAC;gBACP,MAAM,IAAI,iCAAkB,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,KAAc,EAAE;oBAC/D,SAAS;iBACT,CAAC,CAAC;YACJ,CAAC;QACF,CAAC;IACF,CAAC;CACD,CAAC;CAAG;AAtEL,kDAsEK"}
|
package/dist/nodes/vector_store/VectorStoreSupabaseInsert/VectorStoreSupabaseInsert.node.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type IExecuteFunctions, type INodeType, type INodeTypeDescription, type INodeExecutionData } from 'n8n-workflow';
|
|
2
|
-
import { supabaseTableNameSearch } from '../shared/methods/listSearch';
|
|
2
|
+
import { supabaseTableNameSearch } from '../shared/createVectorStoreNode/methods/listSearch';
|
|
3
3
|
export declare class VectorStoreSupabaseInsert implements INodeType {
|
|
4
4
|
description: INodeTypeDescription;
|
|
5
5
|
methods: {
|
|
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.VectorStoreSupabaseInsert = void 0;
|
|
4
4
|
const supabase_1 = require("@langchain/community/vectorstores/supabase");
|
|
5
5
|
const supabase_js_1 = require("@supabase/supabase-js");
|
|
6
|
+
const listSearch_1 = require("../shared/createVectorStoreNode/methods/listSearch");
|
|
6
7
|
const descriptions_1 = require("../shared/descriptions");
|
|
7
|
-
const listSearch_1 = require("../shared/methods/listSearch");
|
|
8
8
|
const processDocuments_1 = require("../shared/processDocuments");
|
|
9
9
|
class VectorStoreSupabaseInsert {
|
|
10
10
|
constructor() {
|
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":";;;AAAA,yEAAiF;AAGjF,uDAAqD;AAWrD,yDAA8D;AAC9D,
|
|
1
|
+
{"version":3,"file":"VectorStoreSupabaseInsert.node.js","sourceRoot":"","sources":["../../../../nodes/vector_store/VectorStoreSupabaseInsert/VectorStoreSupabaseInsert.node.ts"],"names":[],"mappings":";;;AAAA,yEAAiF;AAGjF,uDAAqD;AAWrD,mFAA6F;AAC7F,yDAA8D;AAC9D,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,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,CAA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E,EAAE,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,CAAW,CAAC;QAC9F,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,CAAC,mBAAmB,CAAC,CAAC;IAC9B,CAAC;CACD;AA5GD,8DA4GC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type INodeType, type INodeTypeDescription, type ISupplyDataFunctions, type SupplyData } from 'n8n-workflow';
|
|
2
|
-
import { supabaseTableNameSearch } from '../shared/methods/listSearch';
|
|
2
|
+
import { supabaseTableNameSearch } from '../shared/createVectorStoreNode/methods/listSearch';
|
|
3
3
|
export declare class VectorStoreSupabaseLoad implements INodeType {
|
|
4
4
|
description: INodeTypeDescription;
|
|
5
5
|
methods: {
|
|
@@ -6,8 +6,8 @@ const supabase_js_1 = require("@supabase/supabase-js");
|
|
|
6
6
|
const helpers_1 = require("../../../utils/helpers");
|
|
7
7
|
const logWrapper_1 = require("../../../utils/logWrapper");
|
|
8
8
|
const sharedFields_1 = require("../../../utils/sharedFields");
|
|
9
|
+
const listSearch_1 = require("../shared/createVectorStoreNode/methods/listSearch");
|
|
9
10
|
const descriptions_1 = require("../shared/descriptions");
|
|
10
|
-
const listSearch_1 = require("../shared/methods/listSearch");
|
|
11
11
|
class VectorStoreSupabaseLoad {
|
|
12
12
|
constructor() {
|
|
13
13
|
this.description = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VectorStoreSupabaseLoad.node.js","sourceRoot":"","sources":["../../../../nodes/vector_store/VectorStoreSupabaseLoad/VectorStoreSupabaseLoad.node.ts"],"names":[],"mappings":";;;AACA,yEAAiF;AAEjF,uDAAqD;AASrD,4CAA0D;AAC1D,kDAA+C;AAC/C,sDAA0D;AAE1D,
|
|
1
|
+
{"version":3,"file":"VectorStoreSupabaseLoad.node.js","sourceRoot":"","sources":["../../../../nodes/vector_store/VectorStoreSupabaseLoad/VectorStoreSupabaseLoad.node.ts"],"names":[],"mappings":";;;AACA,yEAAiF;AAEjF,uDAAqD;AASrD,4CAA0D;AAC1D,kDAA+C;AAC/C,sDAA0D;AAE1D,mFAA6F;AAC7F,yDAA8D;AAG9D,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,4GAA4G;yBACjH;qBACD;iBACD;aACD;YACD,WAAW,EAA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AAC;QAGjB,MAAM,MAAM,GAAG,IAAA,0BAAY,EAAC,WAAW,CAAC,IAAc,EAAE,WAAW,CAAC,WAAqB,CAAC,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;AA9FD,0DA8FC"}
|
|
@@ -5,7 +5,7 @@ const zep_1 = require("@langchain/community/vectorstores/zep");
|
|
|
5
5
|
const zep_cloud_1 = require("@langchain/community/vectorstores/zep_cloud");
|
|
6
6
|
const n8n_workflow_1 = require("n8n-workflow");
|
|
7
7
|
const sharedFields_1 = require("../../../utils/sharedFields");
|
|
8
|
-
const createVectorStoreNode_1 = require("../shared/createVectorStoreNode");
|
|
8
|
+
const createVectorStoreNode_1 = require("../shared/createVectorStoreNode/createVectorStoreNode");
|
|
9
9
|
const embeddingDimensions = {
|
|
10
10
|
displayName: 'Embedding Dimensions',
|
|
11
11
|
name: 'embeddingDimensions',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VectorStoreZep.node.js","sourceRoot":"","sources":["../../../../nodes/vector_store/VectorStoreZep/VectorStoreZep.node.ts"],"names":[],"mappings":";;;AAAA,+DAAuE;AACvE,2EAAkF;AAElF,+CAAkD;AAElD,sDAA0D;AAE1D,
|
|
1
|
+
{"version":3,"file":"VectorStoreZep.node.js","sourceRoot":"","sources":["../../../../nodes/vector_store/VectorStoreZep/VectorStoreZep.node.ts"],"names":[],"mappings":";;;AAAA,+DAAuE;AACvE,2EAAkF;AAElF,+CAAkD;AAElD,sDAA0D;AAE1D,iGAA8F;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IAAI;SAC9C,CAAC;QAEF,IAAI,CAAC;YACJ,IAAI,WAAW,CAAC,KAAK,EAAE,CAAC;gBACvB,MAAM,+BAAmB,CAAC,aAAa,CAAC,SAAS,EAAE,UAAU,EAAE,SAAS,CAAC,CAAC;YAC3E,CAAC;iBAAM,CAAC;gBACP,MAAM,oBAAc,CAAC,aAAa,CAAC,SAAS,EAAE,UAAU,EAAE;oBACzD,GAAG,SAAS;oBACZ,MAAM,EAAE,WAAW,CAAC,MAAM;iBAC1B,CAAC,CAAC;YACJ,CAAC;QACF,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YAChB,MAAM,SAAS,GAAI,KAAqB,CAAC,IAAc,CAAC;YACxD,MAAM,YAAY,GAAI,KAAqB,CAAC,YAAsB,CAAC;YACnE,IAAI,SAAS,KAAK,GAAG,IAAI,YAAY,CAAC,QAAQ,CAAC,iCAAiC,CAAC,EAAE,CAAC;gBACnF,MAAM,IAAI,iCAAkB,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,cAAc,cAAc,YAAY,EAAE;oBACzF,SAAS;oBACT,WAAW,EACV,uIAAuI;iBACxI,CAAC,CAAC;YACJ,CAAC;YACD,MAAM,IAAI,iCAAkB,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,KAAc,EAAE,EAAE,SAAS,EAAE,CAAC,CAAC;QAChF,CAAC;IACF,CAAC;CACD,CAAC;CAAG;AAjGL,wCAiGK"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OPERATION_MODE_DESCRIPTIONS = exports.DEFAULT_OPERATION_MODES = void 0;
|
|
4
|
+
exports.DEFAULT_OPERATION_MODES = [
|
|
5
|
+
'load',
|
|
6
|
+
'insert',
|
|
7
|
+
'retrieve',
|
|
8
|
+
'retrieve-as-tool',
|
|
9
|
+
];
|
|
10
|
+
exports.OPERATION_MODE_DESCRIPTIONS = [
|
|
11
|
+
{
|
|
12
|
+
name: 'Get Many',
|
|
13
|
+
value: 'load',
|
|
14
|
+
description: 'Get many ranked documents from vector store for query',
|
|
15
|
+
action: 'Get ranked documents from vector store',
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
name: 'Insert Documents',
|
|
19
|
+
value: 'insert',
|
|
20
|
+
description: 'Insert documents into vector store',
|
|
21
|
+
action: 'Add documents to vector store',
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
name: 'Retrieve Documents (As Vector Store for Chain/Tool)',
|
|
25
|
+
value: 'retrieve',
|
|
26
|
+
description: 'Retrieve documents from vector store to be used as vector store with AI nodes',
|
|
27
|
+
action: 'Retrieve documents for Chain/Tool as Vector Store',
|
|
28
|
+
outputConnectionType: "ai_vectorStore",
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
name: 'Retrieve Documents (As Tool for AI Agent)',
|
|
32
|
+
value: 'retrieve-as-tool',
|
|
33
|
+
description: 'Retrieve documents from vector store to be used as tool with AI nodes',
|
|
34
|
+
action: 'Retrieve documents for AI Agent as Tool',
|
|
35
|
+
outputConnectionType: "ai_tool",
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
name: 'Update Documents',
|
|
39
|
+
value: 'update',
|
|
40
|
+
description: 'Update documents in vector store by ID',
|
|
41
|
+
action: 'Update vector store documents',
|
|
42
|
+
},
|
|
43
|
+
];
|
|
44
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../nodes/vector_store/shared/createVectorStoreNode/constants.ts"],"names":[],"mappings":";;;AAKa,QAAA,uBAAuB,GAAwB;IAC3D,MAAM;IACN,QAAQ;IACR,UAAU;IACV,kBAAkB;CAClB,CAAC;AAEW,QAAA,2BAA2B,GAA2B;IAClE;QACC,IAAI,EAAE,UAAU;QAChB,KAAK,EAAE,MAAM;QACb,WAAW,EAAE,uDAAuD;QACpE,MAAM,EAAE,wCAAwC;KAChD;IACD;QACC,IAAI,EAAE,kBAAkB;QACxB,KAAK,EAAE,QAAQ;QACf,WAAW,EAAE,oCAAoC;QACjD,MAAM,EAAE,+BAA+B;KACvC;IACD;QACC,IAAI,EAAE,qDAAqD;QAC3D,KAAK,EAAE,UAAU;QACjB,WAAW,EAAE,+EAA+E;QAC5F,MAAM,EAAE,mDAAmD;QAC3D,oBAAoB,kBAAkC;KACtD;IACD;QACC,IAAI,EAAE,2CAA2C;QACjD,KAAK,EAAE,kBAAkB;QACzB,WAAW,EAAE,uEAAuE;QACpF,MAAM,EAAE,yCAAyC;QACjD,oBAAoB,WAA2B;KAC/C;IACD;QACC,IAAI,EAAE,kBAAkB;QACxB,KAAK,EAAE,QAAQ;QACf,WAAW,EAAE,wCAAwC;QACrD,MAAM,EAAE,+BAA+B;KACvC;CACD,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { VectorStore } from '@langchain/core/vectorstores';
|
|
2
|
+
import type { IExecuteFunctions, INodeExecutionData, INodeTypeDescription, SupplyData, ISupplyDataFunctions } from 'n8n-workflow';
|
|
3
|
+
import type { VectorStoreNodeConstructorArgs } from './types';
|
|
4
|
+
export declare const createVectorStoreNode: <T extends VectorStore = VectorStore>(args: VectorStoreNodeConstructorArgs<T>) => {
|
|
5
|
+
new (): {
|
|
6
|
+
description: INodeTypeDescription;
|
|
7
|
+
methods: {
|
|
8
|
+
listSearch?: {
|
|
9
|
+
[key: string]: (this: import("n8n-workflow").ILoadOptionsFunctions, filter?: string, paginationToken?: string) => Promise<import("n8n-workflow").INodeListSearchResult>;
|
|
10
|
+
};
|
|
11
|
+
} | undefined;
|
|
12
|
+
execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
|
|
13
|
+
supplyData(this: ISupplyDataFunctions, itemIndex: number): Promise<SupplyData>;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
@@ -0,0 +1,226 @@
|
|
|
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 sharedFields_1 = require("../../../../utils/sharedFields");
|
|
6
|
+
const operations_1 = require("./operations");
|
|
7
|
+
const utils_1 = require("./utils");
|
|
8
|
+
const createVectorStoreNode = (args) => class VectorStoreNodeType {
|
|
9
|
+
constructor() {
|
|
10
|
+
this.description = {
|
|
11
|
+
displayName: args.meta.displayName,
|
|
12
|
+
name: args.meta.name,
|
|
13
|
+
description: args.meta.description,
|
|
14
|
+
icon: args.meta.icon,
|
|
15
|
+
iconColor: args.meta.iconColor,
|
|
16
|
+
group: ['transform'],
|
|
17
|
+
version: [1, 1.1],
|
|
18
|
+
defaults: {
|
|
19
|
+
name: args.meta.displayName,
|
|
20
|
+
},
|
|
21
|
+
codex: {
|
|
22
|
+
categories: ['AI'],
|
|
23
|
+
subcategories: {
|
|
24
|
+
AI: ['Vector Stores', 'Tools', 'Root Nodes'],
|
|
25
|
+
Tools: ['Other Tools'],
|
|
26
|
+
},
|
|
27
|
+
resources: {
|
|
28
|
+
primaryDocumentation: [
|
|
29
|
+
{
|
|
30
|
+
url: args.meta.docsUrl,
|
|
31
|
+
},
|
|
32
|
+
],
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
credentials: args.meta.credentials,
|
|
36
|
+
inputs: `={{
|
|
37
|
+
((parameters) => {
|
|
38
|
+
const mode = parameters?.mode;
|
|
39
|
+
const inputs = [{ displayName: "Embedding", type: "${"ai_embedding"}", required: true, maxConnections: 1}]
|
|
40
|
+
|
|
41
|
+
if (mode === 'retrieve-as-tool') {
|
|
42
|
+
return inputs;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
if (['insert', 'load', 'update'].includes(mode)) {
|
|
46
|
+
inputs.push({ displayName: "", type: "${"main"}"})
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
if (['insert'].includes(mode)) {
|
|
50
|
+
inputs.push({ displayName: "Document", type: "${"ai_document"}", required: true, maxConnections: 1})
|
|
51
|
+
}
|
|
52
|
+
return inputs
|
|
53
|
+
})($parameter)
|
|
54
|
+
}}`,
|
|
55
|
+
outputs: `={{
|
|
56
|
+
((parameters) => {
|
|
57
|
+
const mode = parameters?.mode ?? 'retrieve';
|
|
58
|
+
|
|
59
|
+
if (mode === 'retrieve-as-tool') {
|
|
60
|
+
return [{ displayName: "Tool", type: "${"ai_tool"}"}]
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
if (mode === 'retrieve') {
|
|
64
|
+
return [{ displayName: "Vector Store", type: "${"ai_vectorStore"}"}]
|
|
65
|
+
}
|
|
66
|
+
return [{ displayName: "", type: "${"main"}"}]
|
|
67
|
+
})($parameter)
|
|
68
|
+
}}`,
|
|
69
|
+
properties: [
|
|
70
|
+
{
|
|
71
|
+
displayName: 'Operation Mode',
|
|
72
|
+
name: 'mode',
|
|
73
|
+
type: 'options',
|
|
74
|
+
noDataExpression: true,
|
|
75
|
+
default: 'retrieve',
|
|
76
|
+
options: (0, utils_1.getOperationModeOptions)(args),
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
...(0, sharedFields_1.getConnectionHintNoticeField)(["ai_retriever"]),
|
|
80
|
+
displayOptions: {
|
|
81
|
+
show: {
|
|
82
|
+
mode: ['retrieve'],
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
displayName: 'Name',
|
|
88
|
+
name: 'toolName',
|
|
89
|
+
type: 'string',
|
|
90
|
+
default: '',
|
|
91
|
+
required: true,
|
|
92
|
+
description: 'Name of the vector store',
|
|
93
|
+
placeholder: 'e.g. company_knowledge_base',
|
|
94
|
+
validateType: 'string-alphanumeric',
|
|
95
|
+
displayOptions: {
|
|
96
|
+
show: {
|
|
97
|
+
mode: ['retrieve-as-tool'],
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
displayName: 'Description',
|
|
103
|
+
name: 'toolDescription',
|
|
104
|
+
type: 'string',
|
|
105
|
+
default: '',
|
|
106
|
+
required: true,
|
|
107
|
+
typeOptions: { rows: 2 },
|
|
108
|
+
description: 'Explain to the LLM what this tool does, a good, specific description would allow LLMs to produce expected results much more often',
|
|
109
|
+
placeholder: `e.g. ${args.meta.description}`,
|
|
110
|
+
displayOptions: {
|
|
111
|
+
show: {
|
|
112
|
+
mode: ['retrieve-as-tool'],
|
|
113
|
+
},
|
|
114
|
+
},
|
|
115
|
+
},
|
|
116
|
+
...args.sharedFields,
|
|
117
|
+
{
|
|
118
|
+
displayName: 'Embedding Batch Size',
|
|
119
|
+
name: 'embeddingBatchSize',
|
|
120
|
+
type: 'number',
|
|
121
|
+
default: 200,
|
|
122
|
+
description: 'Number of documents to embed in a single batch',
|
|
123
|
+
displayOptions: {
|
|
124
|
+
show: {
|
|
125
|
+
mode: ['insert'],
|
|
126
|
+
'@version': [{ _cnd: { gte: 1.1 } }],
|
|
127
|
+
},
|
|
128
|
+
},
|
|
129
|
+
},
|
|
130
|
+
...(0, utils_1.transformDescriptionForOperationMode)(args.insertFields ?? [], 'insert'),
|
|
131
|
+
{
|
|
132
|
+
displayName: 'Prompt',
|
|
133
|
+
name: 'prompt',
|
|
134
|
+
type: 'string',
|
|
135
|
+
default: '',
|
|
136
|
+
required: true,
|
|
137
|
+
description: 'Search prompt to retrieve matching documents from the vector store using similarity-based ranking',
|
|
138
|
+
displayOptions: {
|
|
139
|
+
show: {
|
|
140
|
+
mode: ['load'],
|
|
141
|
+
},
|
|
142
|
+
},
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
displayName: 'Limit',
|
|
146
|
+
name: 'topK',
|
|
147
|
+
type: 'number',
|
|
148
|
+
default: 4,
|
|
149
|
+
description: 'Number of top results to fetch from vector store',
|
|
150
|
+
displayOptions: {
|
|
151
|
+
show: {
|
|
152
|
+
mode: ['load', 'retrieve-as-tool'],
|
|
153
|
+
},
|
|
154
|
+
},
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
displayName: 'Include Metadata',
|
|
158
|
+
name: 'includeDocumentMetadata',
|
|
159
|
+
type: 'boolean',
|
|
160
|
+
default: true,
|
|
161
|
+
description: 'Whether or not to include document metadata',
|
|
162
|
+
displayOptions: {
|
|
163
|
+
show: {
|
|
164
|
+
mode: ['load', 'retrieve-as-tool'],
|
|
165
|
+
},
|
|
166
|
+
},
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
displayName: 'ID',
|
|
170
|
+
name: 'id',
|
|
171
|
+
type: 'string',
|
|
172
|
+
default: '',
|
|
173
|
+
required: true,
|
|
174
|
+
description: 'ID of an embedding entry',
|
|
175
|
+
displayOptions: {
|
|
176
|
+
show: {
|
|
177
|
+
mode: ['update'],
|
|
178
|
+
},
|
|
179
|
+
},
|
|
180
|
+
},
|
|
181
|
+
...(0, utils_1.transformDescriptionForOperationMode)(args.loadFields ?? [], [
|
|
182
|
+
'load',
|
|
183
|
+
'retrieve-as-tool',
|
|
184
|
+
]),
|
|
185
|
+
...(0, utils_1.transformDescriptionForOperationMode)(args.retrieveFields ?? [], 'retrieve'),
|
|
186
|
+
...(0, utils_1.transformDescriptionForOperationMode)(args.updateFields ?? [], 'update'),
|
|
187
|
+
],
|
|
188
|
+
};
|
|
189
|
+
this.methods = args.methods;
|
|
190
|
+
}
|
|
191
|
+
async execute() {
|
|
192
|
+
const mode = this.getNodeParameter('mode', 0);
|
|
193
|
+
const embeddings = (await this.getInputConnectionData("ai_embedding", 0));
|
|
194
|
+
if (mode === 'load') {
|
|
195
|
+
const items = this.getInputData(0);
|
|
196
|
+
const resultData = [];
|
|
197
|
+
for (let itemIndex = 0; itemIndex < items.length; itemIndex++) {
|
|
198
|
+
const docs = await (0, operations_1.handleLoadOperation)(this, args, embeddings, itemIndex);
|
|
199
|
+
resultData.push(...docs);
|
|
200
|
+
}
|
|
201
|
+
return [resultData];
|
|
202
|
+
}
|
|
203
|
+
if (mode === 'insert') {
|
|
204
|
+
const resultData = await (0, operations_1.handleInsertOperation)(this, args, embeddings);
|
|
205
|
+
return [resultData];
|
|
206
|
+
}
|
|
207
|
+
if (mode === 'update') {
|
|
208
|
+
const resultData = await (0, operations_1.handleUpdateOperation)(this, args, embeddings);
|
|
209
|
+
return [resultData];
|
|
210
|
+
}
|
|
211
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Only the "load", "update" and "insert" operation modes are supported with execute');
|
|
212
|
+
}
|
|
213
|
+
async supplyData(itemIndex) {
|
|
214
|
+
const mode = this.getNodeParameter('mode', 0);
|
|
215
|
+
const embeddings = (await this.getInputConnectionData("ai_embedding", 0));
|
|
216
|
+
if (mode === 'retrieve') {
|
|
217
|
+
return await (0, operations_1.handleRetrieveOperation)(this, args, embeddings, itemIndex);
|
|
218
|
+
}
|
|
219
|
+
if (mode === 'retrieve-as-tool') {
|
|
220
|
+
return await (0, operations_1.handleRetrieveAsToolOperation)(this, args, embeddings, itemIndex);
|
|
221
|
+
}
|
|
222
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Only the "retrieve" and "retrieve-as-tool" operation mode is supported to supply data');
|
|
223
|
+
}
|
|
224
|
+
};
|
|
225
|
+
exports.createVectorStoreNode = createVectorStoreNode;
|
|
226
|
+
//# sourceMappingURL=createVectorStoreNode.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createVectorStoreNode.js","sourceRoot":"","sources":["../../../../../nodes/vector_store/shared/createVectorStoreNode/createVectorStoreNode.ts"],"names":[],"mappings":";;;AAIA,+CAAsE;AAUtE,sDAAmE;AAGnE,6CAMsB;AAGtB,mCAAwF;AAQjF,MAAM,qBAAqB,GAAG,CACpC,IAAuC,EACtC,EAAE,CACH,MAAM,mBAAmB;IAAzB;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,IAAI,CAAC,IAAI,CAAC,WAAW;YAClC,IAAI,EAAE,IAAI,CAAC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AM,IAAI,CAAC,sBAAsB,iBAEpD,CAAC,CACD,CAAe,CAAC;QAGjB,IAAI,IAAI,KAAK,UAAU,EAAE,CAAC;YACzB,OAAO,MAAM,IAAA,oCAAuB,EAAC,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,SAAS,CAAC,CAAC;QACzE,CAAC;QAED,IAAI,IAAI,KAAK,kBAAkB,EAAE,CAAC;YACjC,OAAO,MAAM,IAAA,0CAA6B,EAAC,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,SAAS,CAAC,CAAC;QAC/E,CAAC;QAED,MAAM,IAAI,iCAAkB,CAC3B,IAAI,CAAC,OAAO,EAAE,EACd,uFAAuF,CACvF,CAAC;IACH,CAAC;CACD,CAAC;AApQU,QAAA,qBAAqB,yBAoQ/B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"listSearch.js","sourceRoot":"","sources":["../../../../../../nodes/vector_store/shared/createVectorStoreNode/methods/listSearch.ts"],"names":[],"mappings":";;AAIA,kDAeC;AAED,0DA6BC;AAED,0DAgBC;AApED,0DAAuD;AACvD,2DAAsD;AACtD,+CAA8F;AAEvF,KAAK,UAAU,mBAAmB;IACxC,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,aAAa,CAAC,CAAC;IAE7D,MAAM,MAAM,GAAG,IAAI,mBAAQ,CAAC;QAC3B,MAAM,EAAE,WAAW,CAAC,MAAgB;KACpC,CAAC,CAAC;IAEH,MAAM,OAAO,GAAG,MAAM,MAAM,CAAC,WAAW,EAAE,CAAC;IAE3C,MAAM,OAAO,GAAG,CAAC,OAAO,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QACvD,IAAI,EAAE,KAAK,CAAC,IAAI;QAChB,KAAK,EAAE,KAAK,CAAC,IAAI;KACjB,CAAC,CAAC,CAAC;IAEJ,OAAO,EAAE,OAAO,EAAE,CAAC;AACpB,CA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MAAM,OAAO,GAAG,QAAQ,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;QACzD,IAAI,EAAE,UAAU,CAAC,IAAI;QACrB,KAAK,EAAE,UAAU,CAAC,IAAI;KACtB,CAAC,CAAC,CAAC;IAEJ,OAAO,EAAE,OAAO,EAAE,CAAC;AACpB,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./loadOperation"), exports);
|
|
18
|
+
__exportStar(require("./insertOperation"), exports);
|
|
19
|
+
__exportStar(require("./updateOperation"), exports);
|
|
20
|
+
__exportStar(require("./retrieveOperation"), exports);
|
|
21
|
+
__exportStar(require("./retrieveAsToolOperation"), exports);
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../nodes/vector_store/shared/createVectorStoreNode/operations/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAAgC;AAChC,oDAAkC;AAClC,oDAAkC;AAClC,sDAAoC;AACpC,4DAA0C"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { Embeddings } from '@langchain/core/embeddings';
|
|
2
|
+
import type { VectorStore } from '@langchain/core/vectorstores';
|
|
3
|
+
import type { IExecuteFunctions, INodeExecutionData } from 'n8n-workflow';
|
|
4
|
+
import type { VectorStoreNodeConstructorArgs } from '../types';
|
|
5
|
+
export declare function handleInsertOperation<T extends VectorStore = VectorStore>(context: IExecuteFunctions, args: VectorStoreNodeConstructorArgs<T>, embeddings: Embeddings): Promise<INodeExecutionData[]>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.handleInsertOperation = handleInsertOperation;
|
|
4
|
+
const helpers_1 = require("../../../../../utils/helpers");
|
|
5
|
+
const processDocuments_1 = require("../../processDocuments");
|
|
6
|
+
async function handleInsertOperation(context, args, embeddings) {
|
|
7
|
+
const nodeVersion = context.getNode().typeVersion;
|
|
8
|
+
const items = context.getInputData();
|
|
9
|
+
const documentInput = (await context.getInputConnectionData("ai_document", 0));
|
|
10
|
+
const resultData = [];
|
|
11
|
+
const documentsForEmbedding = [];
|
|
12
|
+
for (let itemIndex = 0; itemIndex < items.length; itemIndex++) {
|
|
13
|
+
if (context.getExecutionCancelSignal()?.aborted) {
|
|
14
|
+
break;
|
|
15
|
+
}
|
|
16
|
+
const itemData = items[itemIndex];
|
|
17
|
+
const processedDocuments = await (0, processDocuments_1.processDocument)(documentInput, itemData, itemIndex);
|
|
18
|
+
resultData.push(...processedDocuments.serializedDocuments);
|
|
19
|
+
documentsForEmbedding.push(...processedDocuments.processedDocuments);
|
|
20
|
+
if (nodeVersion === 1) {
|
|
21
|
+
await args.populateVectorStore(context, embeddings, processedDocuments.processedDocuments, itemIndex);
|
|
22
|
+
}
|
|
23
|
+
(0, helpers_1.logAiEvent)(context, 'ai-vector-store-populated');
|
|
24
|
+
}
|
|
25
|
+
if (nodeVersion >= 1.1) {
|
|
26
|
+
const embeddingBatchSize = context.getNodeParameter('embeddingBatchSize', 0, 200) ?? 200;
|
|
27
|
+
for (let i = 0; i < documentsForEmbedding.length; i += embeddingBatchSize) {
|
|
28
|
+
const nextBatch = documentsForEmbedding.slice(i, i + embeddingBatchSize);
|
|
29
|
+
await args.populateVectorStore(context, embeddings, nextBatch, 0);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
return resultData;
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=insertOperation.js.map
|
package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/insertOperation.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"insertOperation.js","sourceRoot":"","sources":["../../../../../../nodes/vector_store/shared/createVectorStoreNode/operations/insertOperation.ts"],"names":[],"mappings":";;AAiBA,sDA4DC;AAvED,4CAA4C;AAI5C,6DAAyD;AAOlD,KAAK,UAAU,qBAAqB,CAC1C,OAA0B,EAC1B,IAAuC,EACvC,UAAsB;IAEtB,MAAM,WAAW,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC,WAAW,CAAC;IAElD,MAAM,KAAK,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC;IACrC,MAAM,aAAa,GAAG,CAAC,MAAM,OAAO,CAAC,sBAAsB,gBAAgC,CAAC,CAAC,CAGlD,CAAC;IAE5C,MAAM,UAAU,GAAyB,EAAE,CAAC;IAC5C,MAAM,qBAAqB,GAA6C,EAAE,CAAC;IAG3E,KAAK,IAAI,SAAS,GAAG,CAAC,EAAE,SAAS,GAAG,KAAK,CAAC,MAAM,EAAE,SAAS,EAAE,EAAE,CAAC;QAE/D,IAAI,OAAO,CAAC,wBAAwB,EAAE,EAAE,OAAO,EAAE,CAAC;YACjD,MAAM;QACP,CAAC;QAED,MAAM,QAAQ,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC;QAGlC,MAAM,kBAAkB,GAAG,MAAM,IAAA,kCAAe,EAAC,aAAa,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC;QAGrF,UAAU,CAAC,IAAI,CAAC,GAAG,kBAAkB,CAAC,mBAAmB,CAAC,CAAC;QAG3D,qBAAqB,CAAC,IAAI,CAAC,GAAG,kBAAkB,CAAC,kBAAkB,CAAC,CAAC;QAGrE,IAAI,WAAW,KAAK,CAAC,EAAE,CAAC;YACvB,MAAM,IAAI,CAAC,mBAAmB,CAC7B,OAAO,EACP,UAAU,EACV,kBAAkB,CAAC,kBAAkB,EACrC,SAAS,CACT,CAAC;QACH,CAAC;QAED,IAAA,oBAAU,EAAC,OAAO,EAAE,2BAA2B,CAAC,CAAC;IAClD,CAAC;IAGD,IAAI,WAAW,IAAI,GAAG,EAAE,CAAC;QACxB,MAAM,kBAAkB,GACtB,OAAO,CAAC,gBAAgB,CAAC,oBAAoB,EAAE,CAAC,EAAE,GAAG,CAAY,IAAI,GAAG,CAAC;QAG3E,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,qBAAqB,CAAC,MAAM,EAAE,CAAC,IAAI,kBAAkB,EAAE,CAAC;YAC3E,MAAM,SAAS,GAAG,qBAAqB,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,kBAAkB,CAAC,CAAC;YACzE,MAAM,IAAI,CAAC,mBAAmB,CAAC,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC;QACnE,CAAC;IACF,CAAC;IAED,OAAO,UAAU,CAAC;AACnB,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { Embeddings } from '@langchain/core/embeddings';
|
|
2
|
+
import type { VectorStore } from '@langchain/core/vectorstores';
|
|
3
|
+
import type { IExecuteFunctions, INodeExecutionData } from 'n8n-workflow';
|
|
4
|
+
import type { VectorStoreNodeConstructorArgs } from '../types';
|
|
5
|
+
export declare function handleLoadOperation<T extends VectorStore = VectorStore>(context: IExecuteFunctions, args: VectorStoreNodeConstructorArgs<T>, embeddings: Embeddings, itemIndex: number): Promise<INodeExecutionData[]>;
|