@n8n/n8n-nodes-langchain 0.0.2 → 0.1.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/README.md +1 -1
- package/dist/build.tsbuildinfo +1 -0
- package/dist/known/credentials.json +87 -0
- package/dist/known/nodes.json +210 -0
- package/dist/nodes/agents/Agent/agents/ConversationalAgent/description.js +1 -0
- package/dist/nodes/agents/Agent/agents/ConversationalAgent/description.js.map +1 -1
- package/dist/nodes/agents/Agent/agents/ConversationalAgent/execute.js +3 -0
- package/dist/nodes/agents/Agent/agents/ConversationalAgent/execute.js.map +1 -1
- package/dist/nodes/agents/Agent/agents/OpenAiFunctionsAgent/description.js +1 -0
- package/dist/nodes/agents/Agent/agents/OpenAiFunctionsAgent/description.js.map +1 -1
- package/dist/nodes/agents/Agent/agents/OpenAiFunctionsAgent/execute.js +3 -0
- package/dist/nodes/agents/Agent/agents/OpenAiFunctionsAgent/execute.js.map +1 -1
- package/dist/nodes/agents/Agent/agents/ReActAgent/description.js +1 -0
- package/dist/nodes/agents/Agent/agents/ReActAgent/description.js.map +1 -1
- package/dist/nodes/agents/Agent/agents/ReActAgent/execute.js +4 -0
- package/dist/nodes/agents/Agent/agents/ReActAgent/execute.js.map +1 -1
- package/dist/nodes/agents/Agent/agents/SqlAgent/execute.js +3 -0
- package/dist/nodes/agents/Agent/agents/SqlAgent/execute.js.map +1 -1
- package/dist/nodes/chains/ChainLLM/ChainLlm.node.js +21 -22
- package/dist/nodes/chains/ChainLLM/ChainLlm.node.js.map +1 -1
- package/dist/nodes/chains/ChainRetrievalQA/ChainRetrievalQa.node.js +7 -2
- package/dist/nodes/chains/ChainRetrievalQA/ChainRetrievalQa.node.js.map +1 -1
- package/dist/nodes/code/Code.node.d.ts +1 -1
- package/dist/nodes/code/Code.node.js +5 -6
- package/dist/nodes/code/Code.node.js.map +1 -1
- package/dist/nodes/document_loaders/DocumentGithubLoader/DocumentGithubLoader.node.d.ts +1 -1
- package/dist/nodes/document_loaders/DocumentGithubLoader/DocumentGithubLoader.node.js +3 -3
- package/dist/nodes/document_loaders/DocumentGithubLoader/DocumentGithubLoader.node.js.map +1 -1
- package/dist/nodes/document_loaders/DocumentJSONInputLoader/DocumentJsonInputLoader.node.js.map +1 -1
- package/dist/nodes/embeddings/EmbeddingsCohere/EmbeddingsCohere.node.d.ts +1 -1
- package/dist/nodes/embeddings/EmbeddingsCohere/EmbeddingsCohere.node.js +2 -2
- package/dist/nodes/embeddings/EmbeddingsCohere/EmbeddingsCohere.node.js.map +1 -1
- package/dist/nodes/embeddings/EmbeddingsGooglePalm/EmbeddingsGooglePalm.node.d.ts +1 -1
- package/dist/nodes/embeddings/EmbeddingsGooglePalm/EmbeddingsGooglePalm.node.js +2 -2
- package/dist/nodes/embeddings/EmbeddingsGooglePalm/EmbeddingsGooglePalm.node.js.map +1 -1
- package/dist/nodes/embeddings/EmbeddingsHuggingFaceInference/EmbeddingsHuggingFaceInference.node.d.ts +1 -1
- package/dist/nodes/embeddings/EmbeddingsHuggingFaceInference/EmbeddingsHuggingFaceInference.node.js +2 -2
- package/dist/nodes/embeddings/EmbeddingsHuggingFaceInference/EmbeddingsHuggingFaceInference.node.js.map +1 -1
- package/dist/nodes/embeddings/EmbeddingsOpenAI/EmbeddingsOpenAi.node.d.ts +1 -1
- package/dist/nodes/embeddings/EmbeddingsOpenAI/EmbeddingsOpenAi.node.js +1 -2
- package/dist/nodes/embeddings/EmbeddingsOpenAI/EmbeddingsOpenAi.node.js.map +1 -1
- package/dist/nodes/llms/LMChatAnthropic/LmChatAnthropic.node.d.ts +1 -1
- package/dist/nodes/llms/LMChatAnthropic/LmChatAnthropic.node.js +1 -2
- package/dist/nodes/llms/LMChatAnthropic/LmChatAnthropic.node.js.map +1 -1
- package/dist/nodes/llms/LMChatOllama/LmChatOllama.node.d.ts +1 -1
- package/dist/nodes/llms/LMChatOllama/LmChatOllama.node.js +1 -2
- package/dist/nodes/llms/LMChatOllama/LmChatOllama.node.js.map +1 -1
- package/dist/nodes/llms/LMChatOpenAi/LmChatOpenAi.node.d.ts +1 -1
- package/dist/nodes/llms/LMChatOpenAi/LmChatOpenAi.node.js +1 -2
- package/dist/nodes/llms/LMChatOpenAi/LmChatOpenAi.node.js.map +1 -1
- package/dist/nodes/llms/LMCohere/LmCohere.node.d.ts +1 -1
- package/dist/nodes/llms/LMCohere/LmCohere.node.js +1 -2
- package/dist/nodes/llms/LMCohere/LmCohere.node.js.map +1 -1
- package/dist/nodes/llms/LMOllama/LmOllama.node.d.ts +1 -1
- package/dist/nodes/llms/LMOllama/LmOllama.node.js +1 -2
- package/dist/nodes/llms/LMOllama/LmOllama.node.js.map +1 -1
- package/dist/nodes/llms/LMOpenAi/LmOpenAi.node.d.ts +1 -1
- package/dist/nodes/llms/LMOpenAi/LmOpenAi.node.js +1 -2
- package/dist/nodes/llms/LMOpenAi/LmOpenAi.node.js.map +1 -1
- package/dist/nodes/llms/LMOpenHuggingFaceInference/LmOpenHuggingFaceInference.node.d.ts +1 -1
- package/dist/nodes/llms/LMOpenHuggingFaceInference/LmOpenHuggingFaceInference.node.js +1 -2
- package/dist/nodes/llms/LMOpenHuggingFaceInference/LmOpenHuggingFaceInference.node.js.map +1 -1
- package/dist/nodes/llms/LmChatGooglePalm/LmChatGooglePalm.node.d.ts +1 -1
- package/dist/nodes/llms/LmChatGooglePalm/LmChatGooglePalm.node.js +3 -3
- package/dist/nodes/llms/LmChatGooglePalm/LmChatGooglePalm.node.js.map +1 -1
- package/dist/nodes/llms/LmGooglePalm/LmGooglePalm.node.d.ts +1 -1
- package/dist/nodes/llms/LmGooglePalm/LmGooglePalm.node.js +3 -3
- package/dist/nodes/llms/LmGooglePalm/LmGooglePalm.node.js.map +1 -1
- package/dist/nodes/memory/MemoryBufferWindow/MemoryBufferWindow.node.d.ts +1 -1
- package/dist/nodes/memory/MemoryBufferWindow/MemoryBufferWindow.node.js +3 -3
- package/dist/nodes/memory/MemoryBufferWindow/MemoryBufferWindow.node.js.map +1 -1
- package/dist/nodes/memory/MemoryMotorhead/MemoryMotorhead.node.d.ts +1 -1
- package/dist/nodes/memory/MemoryMotorhead/MemoryMotorhead.node.js +1 -2
- package/dist/nodes/memory/MemoryMotorhead/MemoryMotorhead.node.js.map +1 -1
- package/dist/nodes/memory/MemoryRedisChat/MemoryRedisChat.node.d.ts +1 -1
- package/dist/nodes/memory/MemoryRedisChat/MemoryRedisChat.node.js +3 -3
- package/dist/nodes/memory/MemoryRedisChat/MemoryRedisChat.node.js.map +1 -1
- package/dist/nodes/memory/MemoryXata/MemoryXata.node.d.ts +1 -1
- package/dist/nodes/memory/MemoryXata/MemoryXata.node.js +1 -2
- package/dist/nodes/memory/MemoryXata/MemoryXata.node.js.map +1 -1
- package/dist/nodes/memory/MemoryZep/MemoryZep.node.d.ts +1 -1
- package/dist/nodes/memory/MemoryZep/MemoryZep.node.js +1 -2
- package/dist/nodes/memory/MemoryZep/MemoryZep.node.js.map +1 -1
- package/dist/nodes/output_parser/OutputParserAutofixing/OutputParserAutofixing.node.d.ts +1 -1
- package/dist/nodes/output_parser/OutputParserAutofixing/OutputParserAutofixing.node.js +3 -3
- package/dist/nodes/output_parser/OutputParserAutofixing/OutputParserAutofixing.node.js.map +1 -1
- package/dist/nodes/output_parser/OutputParserItemList/OutputParserItemList.node.d.ts +1 -1
- package/dist/nodes/output_parser/OutputParserItemList/OutputParserItemList.node.js +1 -2
- package/dist/nodes/output_parser/OutputParserItemList/OutputParserItemList.node.js.map +1 -1
- package/dist/nodes/output_parser/OutputParserStructured/OutputParserStructured.node.d.ts +1 -1
- package/dist/nodes/output_parser/OutputParserStructured/OutputParserStructured.node.js +1 -2
- package/dist/nodes/output_parser/OutputParserStructured/OutputParserStructured.node.js.map +1 -1
- package/dist/nodes/retrievers/RetrieverContextualCompression/RetrieverContextualCompression.node.d.ts +1 -1
- package/dist/nodes/retrievers/RetrieverContextualCompression/RetrieverContextualCompression.node.js +3 -3
- package/dist/nodes/retrievers/RetrieverContextualCompression/RetrieverContextualCompression.node.js.map +1 -1
- package/dist/nodes/retrievers/RetrieverMultiQuery/RetrieverMultiQuery.node.d.ts +1 -1
- package/dist/nodes/retrievers/RetrieverMultiQuery/RetrieverMultiQuery.node.js +3 -4
- package/dist/nodes/retrievers/RetrieverMultiQuery/RetrieverMultiQuery.node.js.map +1 -1
- package/dist/nodes/retrievers/RetrieverVectorStore/RetrieverVectorStore.node.d.ts +1 -1
- package/dist/nodes/retrievers/RetrieverVectorStore/RetrieverVectorStore.node.js +3 -3
- package/dist/nodes/retrievers/RetrieverVectorStore/RetrieverVectorStore.node.js.map +1 -1
- package/dist/nodes/retrievers/RetrieverWorkflow/RetrieverWorkflow.node.d.ts +1 -1
- package/dist/nodes/retrievers/RetrieverWorkflow/RetrieverWorkflow.node.js +4 -5
- package/dist/nodes/retrievers/RetrieverWorkflow/RetrieverWorkflow.node.js.map +1 -1
- package/dist/nodes/text_splitters/TextSplitterCharacterTextSplitter/TextSplitterCharacterTextSplitter.node.d.ts +1 -1
- package/dist/nodes/text_splitters/TextSplitterCharacterTextSplitter/TextSplitterCharacterTextSplitter.node.js +1 -2
- package/dist/nodes/text_splitters/TextSplitterCharacterTextSplitter/TextSplitterCharacterTextSplitter.node.js.map +1 -1
- package/dist/nodes/text_splitters/TextSplitterRecursiveCharacterTextSplitter/TextSplitterRecursiveCharacterTextSplitter.node.d.ts +1 -1
- package/dist/nodes/text_splitters/TextSplitterRecursiveCharacterTextSplitter/TextSplitterRecursiveCharacterTextSplitter.node.js +3 -3
- package/dist/nodes/text_splitters/TextSplitterRecursiveCharacterTextSplitter/TextSplitterRecursiveCharacterTextSplitter.node.js.map +1 -1
- package/dist/nodes/text_splitters/TextSplitterTokenSplitter/TextSplitterTokenSplitter.node.d.ts +1 -1
- package/dist/nodes/text_splitters/TextSplitterTokenSplitter/TextSplitterTokenSplitter.node.js +1 -2
- package/dist/nodes/text_splitters/TextSplitterTokenSplitter/TextSplitterTokenSplitter.node.js.map +1 -1
- package/dist/nodes/tools/ToolCode/ToolCode.node.d.ts +1 -1
- package/dist/nodes/tools/ToolCode/ToolCode.node.js +2 -3
- package/dist/nodes/tools/ToolCode/ToolCode.node.js.map +1 -1
- package/dist/nodes/tools/ToolSerpApi/ToolSerpApi.node.d.ts +1 -1
- package/dist/nodes/tools/ToolSerpApi/ToolSerpApi.node.js +1 -2
- package/dist/nodes/tools/ToolSerpApi/ToolSerpApi.node.js.map +1 -1
- package/dist/nodes/tools/ToolWorkflow/ToolWorkflow.node.d.ts +1 -1
- package/dist/nodes/tools/ToolWorkflow/ToolWorkflow.node.js +5 -6
- package/dist/nodes/tools/ToolWorkflow/ToolWorkflow.node.js.map +1 -1
- package/dist/nodes/vector_store/VectorStoreInMemory/VectorStoreInMemory.node.d.ts +1 -1
- package/dist/nodes/vector_store/VectorStoreInMemory/VectorStoreInMemory.node.js +3 -3
- package/dist/nodes/vector_store/VectorStoreInMemory/VectorStoreInMemory.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 +4 -4
- package/dist/nodes/vector_store/VectorStorePineconeLoad/VectorStorePineconeLoad.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 +4 -4
- package/dist/nodes/vector_store/VectorStoreSupabaseLoad/VectorStoreSupabaseLoad.node.js.map +1 -1
- package/dist/nodes/vector_store/VectorStoreZepLoad/VectorStoreZepLoad.node.d.ts +1 -1
- package/dist/nodes/vector_store/VectorStoreZepLoad/VectorStoreZepLoad.node.js +3 -3
- package/dist/nodes/vector_store/VectorStoreZepLoad/VectorStoreZepLoad.node.js.map +1 -1
- package/dist/types/nodes.json +6 -6
- package/dist/utils/logWrapper.js +4 -2
- package/dist/utils/logWrapper.js.map +1 -1
- package/package.json +4 -2
- package/dist/nodes/agents/ConversationalAgent/ConversationalAgent.node.d.ts +0 -0
- package/dist/nodes/agents/ConversationalAgent/ConversationalAgent.node.js +0 -2
- package/dist/nodes/agents/ConversationalAgent/ConversationalAgent.node.js.map +0 -1
- package/dist/nodes/retrievers/RetrieverContextualCompression copy/RetrieverContextualCompression.node.d.ts +0 -5
- package/dist/nodes/retrievers/RetrieverContextualCompression copy/RetrieverContextualCompression.node.js +0 -71
- package/dist/nodes/retrievers/RetrieverContextualCompression copy/RetrieverContextualCompression.node.js.map +0 -1
- package/dist/nodes/retrievers/RetrieverMultiQuery/RetrieverContextualCompression.node.d.ts +0 -5
- package/dist/nodes/retrievers/RetrieverMultiQuery/RetrieverContextualCompression.node.js +0 -71
- package/dist/nodes/retrievers/RetrieverMultiQuery/RetrieverContextualCompression.node.js.map +0 -1
- package/dist/nodes/retrievers/RetrieverMultiQuery copy/RetrieverMultiQuery.node.d.ts +0 -5
- package/dist/nodes/retrievers/RetrieverMultiQuery copy/RetrieverMultiQuery.node.js +0 -69
- package/dist/nodes/retrievers/RetrieverMultiQuery copy/RetrieverMultiQuery.node.js.map +0 -1
- package/dist/nodes/retrievers/RetrieverWorkflow/RetrieverMultiQuery.node.d.ts +0 -5
- package/dist/nodes/retrievers/RetrieverWorkflow/RetrieverMultiQuery.node.js +0 -69
- package/dist/nodes/retrievers/RetrieverWorkflow/RetrieverMultiQuery.node.js.map +0 -1
- package/dist/tsconfig.build.tsbuildinfo +0 -1
- package/dist/tsconfig.tsbuildinfo +0 -1
|
@@ -40,7 +40,7 @@ class ToolCode {
|
|
|
40
40
|
name: 'name',
|
|
41
41
|
type: 'string',
|
|
42
42
|
default: '',
|
|
43
|
-
placeholder: '
|
|
43
|
+
placeholder: 'My_Tool',
|
|
44
44
|
},
|
|
45
45
|
{
|
|
46
46
|
displayName: 'Description',
|
|
@@ -108,8 +108,7 @@ class ToolCode {
|
|
|
108
108
|
],
|
|
109
109
|
};
|
|
110
110
|
}
|
|
111
|
-
async supplyData() {
|
|
112
|
-
const itemIndex = 0;
|
|
111
|
+
async supplyData(itemIndex) {
|
|
113
112
|
const node = this.getNode();
|
|
114
113
|
const workflowMode = this.getMode();
|
|
115
114
|
const name = this.getNodeParameter('name', itemIndex);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToolCode.node.js","sourceRoot":"","sources":["../../../../nodes/tools/ToolCode/ToolCode.node.ts"],"names":[],"mappings":";;;AAQA,+CAAsE;AAEtE,oEAA2E;AAC3E,wFAAqF;AACrF,gFAA6E;AAE7E,2CAA8C;AAE9C,MAAa,QAAQ;IAArB;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,WAAW;YACxB,IAAI,EAAE,UAAU;YAChB,IAAI,EAAE,SAAS;YACf,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC;YACV,WAAW,EAAE,wBAAwB;YACrC,QAAQ,EAAE;gBACT,IAAI,EAAE,WAAW;aACjB;YACD,KAAK,EAAE;gBACN,UAAU,EAAE,CAAC,IAAI,CAAC;gBAClB,aAAa,EAAE;oBACd,EAAE,EAAE,CAAC,OAAO,CAAC;iBACb;gBACD,SAAS,EAAE;oBACV,oBAAoB,EAAE;wBACrB;4BACC,GAAG,EAAE,gGAAgG;yBACrG;qBACD;iBACD;aACD;YAED,MAAM,EAAE,EAAE;YAEV,OAAO,EAAE,WAA2B;YACpC,WAAW,EAAE,CAAC,MAAM,CAAC;YACrB,UAAU,EAAE;gBACX;oBACC,WAAW,EAAE,MAAM;oBACnB,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,QAAQ;oBACd,OAAO,EAAE,EAAE;oBACX,WAAW,EAAE,SAAS;iBACtB;gBACD;oBACC,WAAW,EAAE,aAAa;oBAC1B,IAAI,EAAE,aAAa;oBACnB,IAAI,EAAE,QAAQ;oBACd,OAAO,EAAE,EAAE;oBACX,WAAW,EACV,oHAAoH;oBACrH,WAAW,EAAE;wBACZ,IAAI,EAAE,CAAC;qBACP;iBACD;gBAED;oBACC,WAAW,EAAE,UAAU;oBACvB,IAAI,EAAE,UAAU;oBAChB,IAAI,EAAE,SAAS;oBACf,gBAAgB,EAAE,IAAI;oBACtB,OAAO,EAAE;wBACR;4BACC,IAAI,EAAE,YAAY;4BAClB,KAAK,EAAE,YAAY;yBACnB;wBACD;4BACC,IAAI,EAAE,eAAe;4BACrB,KAAK,EAAE,QAAQ;yBACf;qBACD;oBACD,OAAO,EAAE,YAAY;iBACrB;gBACD;oBACC,WAAW,EAAE,YAAY;oBACzB,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,QAAQ;oBACd,cAAc,EAAE;wBACf,IAAI,EAAE;4BACL,QAAQ,EAAE,CAAC,YAAY,CAAC;yBACxB;qBACD;oBACD,WAAW,EAAE;wBACZ,MAAM,EAAE,gBAAgB;wBACxB,cAAc,EAAE,YAAY;qBAC5B;oBACD,OAAO,EAAE,EAAE;oBAEX,IAAI,EAAE,0HAA0H;oBAChI,WAAW,EACV,wOAAwO;oBACzO,gBAAgB,EAAE,IAAI;iBACtB;gBACD;oBACC,WAAW,EAAE,QAAQ;oBACrB,IAAI,EAAE,YAAY;oBAClB,IAAI,EAAE,QAAQ;oBACd,cAAc,EAAE;wBACf,IAAI,EAAE;4BACL,QAAQ,EAAE,CAAC,QAAQ,CAAC;yBACpB;qBACD;oBACD,WAAW,EAAE;wBACZ,MAAM,EAAE,gBAAgB;wBACxB,cAAc,EAAE,QAAQ;qBACxB;oBACD,OAAO,EAAE,EAAE;oBAEX,IAAI,EAAE,0HAA0H;oBAChI,WAAW,EACV,oOAAoO;oBACrO,gBAAgB,EAAE,IAAI;iBACtB;aACD;SACD,CAAC;
|
|
1
|
+
{"version":3,"file":"ToolCode.node.js","sourceRoot":"","sources":["../../../../nodes/tools/ToolCode/ToolCode.node.ts"],"names":[],"mappings":";;;AAQA,+CAAsE;AAEtE,oEAA2E;AAC3E,wFAAqF;AACrF,gFAA6E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
export declare class ToolSerpApi implements INodeType {
|
|
3
3
|
description: INodeTypeDescription;
|
|
4
|
-
supplyData(this: IExecuteFunctions): Promise<SupplyData>;
|
|
4
|
+
supplyData(this: IExecuteFunctions, itemIndex: number): Promise<SupplyData>;
|
|
5
5
|
}
|
|
@@ -99,9 +99,8 @@ class ToolSerpApi {
|
|
|
99
99
|
],
|
|
100
100
|
};
|
|
101
101
|
}
|
|
102
|
-
async supplyData() {
|
|
102
|
+
async supplyData(itemIndex) {
|
|
103
103
|
const credentials = await this.getCredentials('serpApi');
|
|
104
|
-
const itemIndex = 0;
|
|
105
104
|
const options = this.getNodeParameter('options', itemIndex);
|
|
106
105
|
return {
|
|
107
106
|
response: (0, logWrapper_1.logWrapper)(new tools_1.SerpAPI(credentials.apiKey, options), this),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToolSerpApi.node.js","sourceRoot":"","sources":["../../../../nodes/tools/ToolSerpApi/ToolSerpApi.node.ts"],"names":[],"mappings":";;;AAQA,2CAA0C;AAC1C,0DAAuD;AAEvD,MAAa,WAAW;IAAxB;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,SAAS;YACtB,IAAI,EAAE,aAAa;YACnB,IAAI,EAAE,kBAAkB;YACxB,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC;YACV,WAAW,EAAE,gCAAgC;YAC7C,QAAQ,EAAE;gBACT,IAAI,EAAE,SAAS;aACf;YACD,KAAK,EAAE;gBACN,UAAU,EAAE,CAAC,IAAI,CAAC;gBAClB,aAAa,EAAE;oBACd,EAAE,EAAE,CAAC,OAAO,CAAC;iBACb;gBACD,SAAS,EAAE;oBACV,oBAAoB,EAAE;wBACrB;4BACC,GAAG,EAAE,mGAAmG;yBACxG;qBACD;iBACD;aACD;YAED,MAAM,EAAE,EAAE;YAEV,OAAO,EAAE,WAA2B;YACpC,WAAW,EAAE,CAAC,MAAM,CAAC;YACrB,WAAW,EAAE;gBACZ;oBAC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;gCACD;oCACC,IAAI,EAAE,QAAQ;oCACd,KAAK,EAAE,QAAQ;iCACf;6BACD;4BACD,OAAO,EAAE,SAAS;4BAClB,WAAW,EAAE,kCAAkC;yBAC/C;wBACD;4BACC,WAAW,EAAE,gBAAgB;4BAC7B,IAAI,EAAE,UAAU;4BAChB,IAAI,EAAE,SAAS;4BACf,OAAO,EAAE,KAAK;4BACd,WAAW,EACV,0MAA0M;yBAC3M;wBACD;4BACC,WAAW,EAAE,eAAe;4BAC5B,IAAI,EAAE,eAAe;4BACrB,IAAI,EAAE,QAAQ;4BACd,OAAO,EAAE,YAAY;4BACrB,WAAW,EACV,iKAAiK;yBAClK;wBACD;4BACC,WAAW,EAAE,UAAU;4BACvB,IAAI,EAAE,IAAI;4BACV,IAAI,EAAE,QAAQ;4BACd,OAAO,EAAE,IAAI;4BACb,WAAW,EACV,yPAAyP;yBAC1P;qBACD;iBACD;aACD;SACD,CAAC;IAWH,CAAC;IATA,KAAK,CAAC,UAAU,CAA0B,SAAiB;QAC1D,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC;QAEzD,MAAM,OAAO,GAAG,IAAI,CAAC,gBAAgB,CAAC,SAAS,EAAE,SAAS,CAAW,CAAC;QAEtE,OAAO;YACN,QAAQ,EAAE,IAAA,uBAAU,EAAC,IAAI,eAAO,CAAC,WAAW,CAAC,MAAgB,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC;SAC9E,CAAC;IACH,CAAC;CACD;AA9GD,kCA8GC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { IExecuteFunctions, INodeType, INodeTypeDescription, SupplyData } from 'n8n-workflow';
|
|
2
2
|
export declare class ToolWorkflow implements INodeType {
|
|
3
3
|
description: INodeTypeDescription;
|
|
4
|
-
supplyData(this: IExecuteFunctions): Promise<SupplyData>;
|
|
4
|
+
supplyData(this: IExecuteFunctions, itemIndex: number): Promise<SupplyData>;
|
|
5
5
|
}
|
|
@@ -65,7 +65,7 @@ class ToolWorkflow {
|
|
|
65
65
|
name: 'name',
|
|
66
66
|
type: 'string',
|
|
67
67
|
default: '',
|
|
68
|
-
placeholder: '
|
|
68
|
+
placeholder: 'My_Color_Tool',
|
|
69
69
|
},
|
|
70
70
|
{
|
|
71
71
|
displayName: 'Description',
|
|
@@ -281,8 +281,7 @@ class ToolWorkflow {
|
|
|
281
281
|
],
|
|
282
282
|
};
|
|
283
283
|
}
|
|
284
|
-
async supplyData() {
|
|
285
|
-
const itemIndex = 0;
|
|
284
|
+
async supplyData(itemIndex) {
|
|
286
285
|
const name = this.getNodeParameter('name', itemIndex);
|
|
287
286
|
const description = this.getNodeParameter('description', itemIndex);
|
|
288
287
|
const runFunction = async (query) => {
|
|
@@ -290,10 +289,10 @@ class ToolWorkflow {
|
|
|
290
289
|
const responsePropertyName = this.getNodeParameter('responsePropertyName', itemIndex);
|
|
291
290
|
const workflowInfo = {};
|
|
292
291
|
if (source === 'database') {
|
|
293
|
-
workflowInfo.id = this.getNodeParameter('workflowId',
|
|
292
|
+
workflowInfo.id = this.getNodeParameter('workflowId', itemIndex);
|
|
294
293
|
}
|
|
295
294
|
else if (source === 'parameter') {
|
|
296
|
-
const workflowJson = this.getNodeParameter('workflowJson',
|
|
295
|
+
const workflowJson = this.getNodeParameter('workflowJson', itemIndex);
|
|
297
296
|
try {
|
|
298
297
|
workflowInfo.code = JSON.parse(workflowJson);
|
|
299
298
|
}
|
|
@@ -304,7 +303,7 @@ class ToolWorkflow {
|
|
|
304
303
|
}
|
|
305
304
|
}
|
|
306
305
|
const rawData = { query };
|
|
307
|
-
const workflowFieldsJson = this.getNodeParameter('fields.values',
|
|
306
|
+
const workflowFieldsJson = this.getNodeParameter('fields.values', itemIndex, [], {
|
|
308
307
|
rawExpressions: true,
|
|
309
308
|
});
|
|
310
309
|
for (const entry of workflowFieldsJson) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToolWorkflow.node.js","sourceRoot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D;oCACD,YAAY,EAAE,QAAQ;oCACtB,+BAA+B,EAAE,IAAI;iCACrC;gCACD;oCACC,WAAW,EAAE,OAAO;oCACpB,IAAI,EAAE,cAAc;oCACpB,IAAI,EAAE,SAAS;oCACf,OAAO,EAAE,MAAM;oCACf,OAAO,EAAE;wCACR;4CACC,IAAI,EAAE,MAAM;4CACZ,KAAK,EAAE,MAAM;yCACb;wCACD;4CACC,IAAI,EAAE,OAAO;4CACb,KAAK,EAAE,OAAO;yCACd;qCACD;oCACD,cAAc,EAAE;wCACf,IAAI,EAAE;4CACL,IAAI,EAAE,CAAC,cAAc,CAAC;yCACtB;qCACD;oCACD,YAAY,EAAE,SAAS;oCACvB,+BAA+B,EAAE,IAAI;iCACrC;gCACD;oCACC,WAAW,EAAE,OAAO;oCACpB,IAAI,EAAE,YAAY;oCAClB,IAAI,EAAE,QAAQ;oCACd,OAAO,EAAE,EAAE;oCACX,WAAW,EAAE,6CAA6C;oCAC1D,cAAc,EAAE;wCACf,IAAI,EAAE;4CACL,IAAI,EAAE,CAAC,YAAY,CAAC;yCACpB;qCACD;oCACD,YAAY,EAAE,OAAO;oCACrB,+BAA+B,EAAE,IAAI;iCACrC;gCACD;oCACC,WAAW,EAAE,OAAO;oCACpB,IAAI,EAAE,aAAa;oCACnB,IAAI,EAAE,QAAQ;oCACd,OAAO,EAAE,KAAK;oCACd,WAAW,EAAE;wCACZ,MAAM,EAAE,MAAM;wCACd,cAAc,EAAE,MAAM;wCACtB,IAAI,EAAE,CAAC;qCACP;oCACD,cAAc,EAAE;wCACf,IAAI,EAAE;4CACL,IAAI,EAAE,CAAC,aAAa,CAAC;yCACrB;qCACD;oCACD,YAAY,EAAE,QAAQ;oCACtB,+BAA+B,EAAE,IAAI;iCACrC;6BACD;yBACD;qBACD;iBACD;aACD;SACD,CAAC;
|
|
1
|
+
{"version":3,"file":"ToolWorkflow.node.js","sourceRoot":"","sources":["../../../../nodes/tools/ToolWorkflow/ToolWorkflow.node.ts"],"names":[],"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1B,IAAI,cAA0C,CAAC;oBAC/C,IAAI;wBACH,QAAQ,GAAG,MAAM,WAAW,CAAC,KAAK,CAAC,CAAC;qBACpC;oBAAC,OAAO,KAAK,EAAE;wBAGf,cAAc,GAAG,KAAK,CAAC;wBAEvB,QAAQ,GAAG,wBAAwB,KAAK,CAAC,OAAO,GAAG,CAAC;qBACpD;oBAED,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE;wBACjC,QAAQ,GAAI,QAAmB,CAAC,QAAQ,EAAE,CAAC;qBAC3C;oBAED,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE;wBAEjC,cAAc,GAAG,IAAI,iCAAkB,CACtC,IAAI,CAAC,OAAO,EAAE,EACd,mFAAmF,OAAO,QAAQ,iBAAiB,CACnH,CAAC;wBACF,QAAQ,GAAG,wBAAwB,cAAc,CAAC,OAAO,GAAG,CAAC;qBAC7D;oBAED,IAAI,cAAc,EAAE;wBACnB,KAAK,IAAI,CAAC,aAAa,YAA4B,KAAK,EAAE,cAAc,CAAC,CAAC;qBAC1E;yBAAM;wBACN,KAAK,IAAI,CAAC,aAAa,YAA4B,KAAK,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;qBACtF;oBACD,OAAO,QAAQ,CAAC;gBACjB,CAAC;aACD,CAAC;SACF,CAAC;IACH,CAAC;CACD;AA5YD,oCA4YC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type IExecuteFunctions, type INodeType, type INodeTypeDescription, type SupplyData } from 'n8n-workflow';
|
|
2
2
|
export declare class VectorStoreInMemory implements INodeType {
|
|
3
3
|
description: INodeTypeDescription;
|
|
4
|
-
supplyData(this: IExecuteFunctions): Promise<SupplyData>;
|
|
4
|
+
supplyData(this: IExecuteFunctions, itemIndex: number): Promise<SupplyData>;
|
|
5
5
|
}
|
|
@@ -53,9 +53,9 @@ class VectorStoreInMemory {
|
|
|
53
53
|
],
|
|
54
54
|
};
|
|
55
55
|
}
|
|
56
|
-
async supplyData() {
|
|
57
|
-
const documents = (await this.getInputConnectionData("ai_document",
|
|
58
|
-
const embeddings = (await this.getInputConnectionData("ai_embedding",
|
|
56
|
+
async supplyData(itemIndex) {
|
|
57
|
+
const documents = (await this.getInputConnectionData("ai_document", itemIndex));
|
|
58
|
+
const embeddings = (await this.getInputConnectionData("ai_embedding", itemIndex));
|
|
59
59
|
const documentsStore = await memory_1.MemoryVectorStore.fromDocuments(documents, embeddings);
|
|
60
60
|
return {
|
|
61
61
|
response: (0, logWrapper_1.logWrapper)(documentsStore, this),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VectorStoreInMemory.node.js","sourceRoot":"","sources":["../../../../nodes/vector_store/VectorStoreInMemory/VectorStoreInMemory.node.ts"],"names":[],"mappings":";;;AASA,0DAAkE;AAElE,0DAAuD;AAEvD,MAAa,mBAAmB;IAAhC;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,wBAAwB;YACrC,IAAI,EAAE,qBAAqB;YAC3B,IAAI,EAAE,aAAa;YACnB,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC;YACV,WAAW,EAAE,0BAA0B;YACvC,QAAQ,EAAE;gBACT,IAAI,EAAE,wBAAwB;aAC9B;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,2GAA2G;yBAChH;qBACD;iBACD;aACD;YAED,MAAM,EAAE;gBACP;oBACC,WAAW,EAAE,UAAU;oBACvB,IAAI,eAA+B;oBACnC,QAAQ,EAAE,KAAK;iBACf;gBACD;oBACC,WAAW,EAAE,WAAW;oBACxB,cAAc,EAAE,CAAC;oBACjB,IAAI,gBAAgC;oBACpC,QAAQ,EAAE,KAAK;iBACf;aACD;YAED,OAAO,EAAE,sBAAsC;YAC/C,WAAW,EAAE,CAAC,kBAAkB,CAAC;YACjC,UAAU,EAAE;gBACX;oBACC,WAAW,EAAE,8DAA8D;oBAC3E,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,QAAQ;oBACd,OAAO,EAAE,EAAE;iBACX;aACD;SACD,CAAC;IAkBH,CAAC;IAhBA,KAAK,CAAC,UAAU;
|
|
1
|
+
{"version":3,"file":"VectorStoreInMemory.node.js","sourceRoot":"","sources":["../../../../nodes/vector_store/VectorStoreInMemory/VectorStoreInMemory.node.ts"],"names":[],"mappings":";;;AASA,0DAAkE;AAElE,0DAAuD;AAEvD,MAAa,mBAAmB;IAAhC;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,wBAAwB;YACrC,IAAI,EAAE,qBAAqB;YAC3B,IAAI,EAAE,aAAa;YACnB,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC;YACV,WAAW,EAAE,0BAA0B;YACvC,QAAQ,EAAE;gBACT,IAAI,EAAE,wBAAwB;aAC9B;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,2GAA2G;yBAChH;qBACD;iBACD;aACD;YAED,MAAM,EAAE;gBACP;oBACC,WAAW,EAAE,UAAU;oBACvB,IAAI,eAA+B;oBACnC,QAAQ,EAAE,KAAK;iBACf;gBACD;oBACC,WAAW,EAAE,WAAW;oBACxB,cAAc,EAAE,CAAC;oBACjB,IAAI,gBAAgC;oBACpC,QAAQ,EAAE,KAAK;iBACf;aACD;YAED,OAAO,EAAE,sBAAsC;YAC/C,WAAW,EAAE,CAAC,kBAAkB,CAAC;YACjC,UAAU,EAAE;gBACX;oBACC,WAAW,EAAE,8DAA8D;oBAC3E,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,QAAQ;oBACd,OAAO,EAAE,EAAE;iBACX;aACD;SACD,CAAC;IAkBH,CAAC;IAhBA,KAAK,CAAC,UAAU,CAA0B,SAAiB;QAC1D,MAAM,SAAS,GAAG,CAAC,MAAM,IAAI,CAAC,sBAAsB,gBAEnD,SAAS,CACT,CAAe,CAAC;QACjB,MAAM,UAAU,GAAG,CAAC,MAAM,IAAI,CAAC,sBAAsB,iBAEpD,SAAS,CACT,CAAe,CAAC;QAEjB,MAAM,cAAc,GAAG,MAAM,0BAAiB,CAAC,aAAa,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;QAEpF,OAAO;YACN,QAAQ,EAAE,IAAA,uBAAU,EAAC,cAAc,EAAE,IAAI,CAAC;SAC1C,CAAC;IACH,CAAC;CACD;AAnED,kDAmEC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type IExecuteFunctions, type INodeType, type INodeTypeDescription, type SupplyData } from 'n8n-workflow';
|
|
2
2
|
export declare class VectorStorePineconeLoad implements INodeType {
|
|
3
3
|
description: INodeTypeDescription;
|
|
4
|
-
supplyData(this: IExecuteFunctions): Promise<SupplyData>;
|
|
4
|
+
supplyData(this: IExecuteFunctions, itemIndex: number): Promise<SupplyData>;
|
|
5
5
|
}
|
|
@@ -62,12 +62,12 @@ class VectorStorePineconeLoad {
|
|
|
62
62
|
],
|
|
63
63
|
};
|
|
64
64
|
}
|
|
65
|
-
async supplyData() {
|
|
65
|
+
async supplyData(itemIndex) {
|
|
66
66
|
this.logger.verbose('Supplying data for Pinecone Load Vector Store');
|
|
67
|
-
const namespace = this.getNodeParameter('pineconeNamespace',
|
|
68
|
-
const index = this.getNodeParameter('pineconeIndex',
|
|
67
|
+
const namespace = this.getNodeParameter('pineconeNamespace', itemIndex);
|
|
68
|
+
const index = this.getNodeParameter('pineconeIndex', itemIndex);
|
|
69
69
|
const credentials = await this.getCredentials('pineconeApi');
|
|
70
|
-
const embeddings = (await this.getInputConnectionData("ai_embedding",
|
|
70
|
+
const embeddings = (await this.getInputConnectionData("ai_embedding", itemIndex));
|
|
71
71
|
const client = new pinecone_2.PineconeClient();
|
|
72
72
|
await client.init({
|
|
73
73
|
apiKey: credentials.apiKey,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VectorStorePineconeLoad.node.js","sourceRoot":"","sources":["../../../../nodes/vector_store/VectorStorePineconeLoad/VectorStorePineconeLoad.node.ts"],"names":[],"mappings":";;;AAOA,8DAAgE;AAChE,0DAA6D;AAE7D,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,gBAAgB;oBAC7B,IAAI,EAAE,eAAe;oBACrB,IAAI,EAAE,QAAQ;oBACd,OAAO,EAAE,EAAE;oBACX,QAAQ,EAAE,IAAI;iBACd;gBACD;oBACC,WAAW,EAAE,oBAAoB;oBACjC,IAAI,EAAE,mBAAmB;oBACzB,IAAI,EAAE,QAAQ;oBACd,OAAO,EAAE,EAAE;iBACX;aACD;SACD,CAAC;
|
|
1
|
+
{"version":3,"file":"VectorStorePineconeLoad.node.js","sourceRoot":"","sources":["../../../../nodes/vector_store/VectorStorePineconeLoad/VectorStorePineconeLoad.node.ts"],"names":[],"mappings":";;;AAOA,8DAAgE;AAChE,0DAA6D;AAE7D,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,gBAAgB;oBAC7B,IAAI,EAAE,eAAe;oBACrB,IAAI,EAAE,QAAQ;oBACd,OAAO,EAAE,EAAE;oBACX,QAAQ,EAAE,IAAI;iBACd;gBACD;oBACC,WAAW,EAAE,oBAAoB;oBACjC,IAAI,EAAE,mBAAmB;oBACzB,IAAI,EAAE,QAAQ;oBACd,OAAO,EAAE,EAAE;iBACX;aACD;SACD,CAAC;IA8BH,CAAC;IA5BA,KAAK,CAAC,UAAU,CAA0B,SAAiB;QAC1D,IAAI,CAAC,MAAM,CAAC,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,yBAAc,EAAE,CAAC;QACpC,MAAM,MAAM,CAAC,IAAI,CAAC;YACjB,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,WAAW,GAAG,MAAM,wBAAa,CAAC,iBAAiB,CAAC,UAAU,EAAE;YACrE,SAAS,EAAE,SAAS,IAAI,SAAS;YACjC,aAAa;SACb,CAAC,CAAC;QAEH,OAAO;YACN,QAAQ,EAAE,IAAA,uBAAU,EAAC,WAAW,EAAE,IAAI,CAAC;SACvC,CAAC;IACH,CAAC;CACD;AArFD,0DAqFC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type IExecuteFunctions, type INodeType, type INodeTypeDescription, type SupplyData } from 'n8n-workflow';
|
|
2
2
|
export declare class VectorStoreSupabaseLoad implements INodeType {
|
|
3
3
|
description: INodeTypeDescription;
|
|
4
|
-
supplyData(this: IExecuteFunctions): Promise<SupplyData>;
|
|
4
|
+
supplyData(this: IExecuteFunctions, itemIndex: number): Promise<SupplyData>;
|
|
5
5
|
}
|
|
@@ -84,11 +84,11 @@ class VectorStoreSupabaseLoad {
|
|
|
84
84
|
],
|
|
85
85
|
};
|
|
86
86
|
}
|
|
87
|
-
async supplyData() {
|
|
87
|
+
async supplyData(itemIndex) {
|
|
88
88
|
this.logger.verbose('Supply Supabase Load Vector Store');
|
|
89
|
-
const tableName = this.getNodeParameter('tableName',
|
|
90
|
-
const queryName = this.getNodeParameter('queryName',
|
|
91
|
-
const options = this.getNodeParameter('options',
|
|
89
|
+
const tableName = this.getNodeParameter('tableName', itemIndex);
|
|
90
|
+
const queryName = this.getNodeParameter('queryName', itemIndex);
|
|
91
|
+
const options = this.getNodeParameter('options', itemIndex, {});
|
|
92
92
|
const credentials = await this.getCredentials('supabaseApi');
|
|
93
93
|
const embeddings = (await this.getInputConnectionData("ai_embedding", 0));
|
|
94
94
|
const client = (0, supabase_js_1.createClient)(credentials.host, credentials.serviceRole);
|
|
@@ -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,C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StoreSupabaseLoad.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,EAAE,IAAI;oB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BAAU,EAAC,WAAW,EAAE,IAAI,CAAC;SACvC,CAAC;IACH,CAAC;CACD;AA5GD,0DA4GC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type IExecuteFunctions, type INodeType, type INodeTypeDescription, type SupplyData } from 'n8n-workflow';
|
|
2
2
|
export declare class VectorStoreZepLoad implements INodeType {
|
|
3
3
|
description: INodeTypeDescription;
|
|
4
|
-
supplyData(this: IExecuteFunctions): Promise<SupplyData>;
|
|
4
|
+
supplyData(this: IExecuteFunctions, itemIndex: number): Promise<SupplyData>;
|
|
5
5
|
}
|
|
@@ -71,11 +71,11 @@ class VectorStoreZepLoad {
|
|
|
71
71
|
],
|
|
72
72
|
};
|
|
73
73
|
}
|
|
74
|
-
async supplyData() {
|
|
74
|
+
async supplyData(itemIndex) {
|
|
75
75
|
var _a;
|
|
76
76
|
this.logger.verbose('Supplying data for Zep Load Vector Store');
|
|
77
|
-
const collectionName = this.getNodeParameter('collectionName',
|
|
78
|
-
const options = this.getNodeParameter('options',
|
|
77
|
+
const collectionName = this.getNodeParameter('collectionName', itemIndex);
|
|
78
|
+
const options = this.getNodeParameter('options', itemIndex) || {};
|
|
79
79
|
const credentials = (await this.getCredentials('zepApi'));
|
|
80
80
|
const embeddings = (await this.getInputConnectionData("ai_embedding", 0));
|
|
81
81
|
const zepConfig = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VectorStoreZepLoad.node.js","sourceRoot":"","sources":["../../../../nodes/vector_store/VectorStoreZepLoad/VectorStoreZepLoad.node.ts"],"names":[],"mappings":";;;AAOA,oDAA4D;AAE5D,0DAAuD;AAEvD,MAAa,kBAAkB;IAA/B;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,wBAAwB;YACrC,IAAI,EAAE,oBAAoB;YAE1B,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,IAAI,EAAE,YAAY;oBAClB,WAAW,EAAE,YAAY;oBACzB,OAAO,EAAE,EAAE;oBACX,OAAO,EAAE;wBACR;4BACC,WAAW,EAAE,sBAAsB;4BACnC,IAAI,EAAE,qBAAqB;4BAC3B,IAAI,EAAE,QAAQ;4BACd,OAAO,EAAE,IAAI;4BACb,WAAW,EAAE,qEAAqE;yBAClF;qBACD;iBACD;aACD;SACD,CAAC;
|
|
1
|
+
{"version":3,"file":"VectorStoreZepLoad.node.js","sourceRoot":"","sources":["../../../../nodes/vector_store/VectorStoreZepLoad/VectorStoreZepLoad.node.ts"],"names":[],"mappings":";;;AAOA,oDAA4D;AAE5D,0DAAuD;AAEvD,MAAa,kBAAkB;IAA/B;QACC,gBAAW,GAAyB;YACnC,WAAW,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AC1D,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,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;AAnGD,gDAmGC"}
|
package/dist/types/nodes.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
[
|
|
2
|
-
{"displayName":"Agent","name":"@n8n/n8n-nodes-langchain.agent","icon":"fa:robot","group":["transform"],"version":1,"description":"Seamlessly coordinates LLMs & tools per user input","subtitle":"={{ {\tconversationalAgent: 'Conversational Agent', openAiFunctionsAgent: 'OpenAI Functions Agent', reactAgent: 'ReAct Agent', sqlAgent: 'SQL Agent' }[$parameter.agent] }}","defaults":{"name":"Agent","color":"#404040"},"codex":{"alias":["LangChain"],"categories":["AI"],"subcategories":{"AI":["Agents"]},"resources":{"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.agent/"}]}},"inputs":"={{ ((agent) => { function getInputs(agent) {\n const getInputData = (inputs) => {\n const displayNames = {\n [\"ai_languageModel\"]: 'Model',\n [\"ai_memory\"]: 'Memory',\n [\"ai_tool\"]: 'Tool',\n [\"ai_outputParser\"]: 'Output Parser',\n };\n return inputs.map(({ type, filter }) => {\n const input = {\n type,\n displayName: type in displayNames ? displayNames[type] : undefined,\n required: type === \"ai_languageModel\",\n maxConnections: [\"ai_languageModel\", \"ai_memory\"].includes(type)\n ? 1\n : undefined,\n };\n if (filter) {\n input.filter = filter;\n }\n return input;\n });\n };\n let specialInputs = [];\n if (agent === 'conversationalAgent') {\n specialInputs = [\n {\n type: \"ai_languageModel\",\n filter: {\n nodes: [\n '@n8n/n8n-nodes-langchain.lmChatAnthropic',\n '@n8n/n8n-nodes-langchain.lmChatOllama',\n '@n8n/n8n-nodes-langchain.lmChatOpenAi',\n '@n8n/n8n-nodes-langchain.lmChatGooglePalm',\n ],\n },\n },\n {\n type: \"ai_memory\",\n },\n {\n type: \"ai_tool\",\n },\n {\n type: \"ai_outputParser\",\n },\n ];\n }\n else if (agent === 'openAiFunctionsAgent') {\n specialInputs = [\n {\n type: \"ai_languageModel\",\n filter: {\n nodes: ['@n8n/n8n-nodes-langchain.lmChatOpenAi'],\n },\n },\n {\n type: \"ai_memory\",\n },\n {\n type: \"ai_tool\",\n },\n {\n type: \"ai_outputParser\",\n },\n ];\n }\n else if (agent === 'reActAgent') {\n specialInputs = [\n {\n type: \"ai_languageModel\",\n },\n {\n type: \"ai_tool\",\n },\n {\n type: \"ai_outputParser\",\n },\n ];\n }\n else if (agent === 'sqlAgent') {\n specialInputs = [\n {\n type: \"ai_languageModel\",\n },\n ];\n }\n return [\"main\", ...getInputData(specialInputs)];\n}; return getInputs(agent) })($parameter.agent) }}","outputs":["main"],"credentials":[{"name":"mySql","required":true,"testedBy":"mysqlConnectionTest","displayOptions":{"show":{"agent":["sqlAgent"],"/dataSource":["mysql"]}}},{"name":"postgres","required":true,"displayOptions":{"show":{"agent":["sqlAgent"],"/dataSource":["postgres"]}}}],"properties":[{"displayName":"Agent","name":"agent","type":"options","noDataExpression":true,"options":[{"name":"Conversational Agent","value":"conversationalAgent","description":"Selects tools to accomplish its task and uses memory to recall previous conversations"},{"name":"OpenAI Functions Agent","value":"openAiFunctionsAgent","description":"Utilizes OpenAI's Function Calling feature to select the appropriate tool and arguments for execution"},{"name":"ReAct Agent","value":"reActAgent","description":"Strategically select tools to accomplish a given task"},{"name":"SQL Agent","value":"sqlAgent","description":"Answers questions about data in an SQL database"}],"default":"conversationalAgent"},{"displayName":"Text","name":"text","type":"string","displayOptions":{"show":{"agent":["conversationalAgent"]}},"default":"={{ $json.input }}"},{"displayName":"Options","name":"options","type":"collection","displayOptions":{"show":{"agent":["conversationalAgent"]}},"default":{},"placeholder":"Add Option","options":[{"displayName":"Human Message","name":"humanMessage","type":"string","default":"TOOLS\n------\nAssistant can ask the user to use tools to look up information that may be helpful in answering the users original question. The tools the human can use are:\n\n{tools}\n\n{format_instructions}\n\nUSER'S INPUT\n--------------------\nHere is the user's input (remember to respond with a markdown code snippet of a json blob with a single action, and NOTHING else):\n\n{{input}}","description":"The message that will provide the agent with a list of tools to use","typeOptions":{"rows":6}},{"displayName":"System Message","name":"systemMessage","type":"string","default":"Assistant is a large language model trained by OpenAI.\n\nAssistant is designed to be able to assist with a wide range of tasks, from answering simple questions to providing in-depth explanations and discussions on a wide range of topics. As a language model, Assistant is able to generate human-like text based on the input it receives, allowing it to engage in natural-sounding conversations and provide responses that are coherent and relevant to the topic at hand.\n\nAssistant is constantly learning and improving, and its capabilities are constantly evolving. It is able to process and understand large amounts of text, and can use this knowledge to provide accurate and informative responses to a wide range of questions. Additionally, Assistant is able to generate its own text based on the input it receives, allowing it to engage in discussions and provide explanations and descriptions on a wide range of topics.\n\nOverall, Assistant is a powerful system that can help with a wide range of tasks and provide valuable insights and information on a wide range of topics. Whether you need help with a specific question or just want to have a conversation about a particular topic, Assistant is here to assist.","description":"The message that will be sent to the agent before the conversation starts","typeOptions":{"rows":6}}]},{"displayName":"Text","name":"text","type":"string","displayOptions":{"show":{"agent":["openAiFunctionsAgent"]}},"default":"={{ $json.input }}"},{"displayName":"Options","name":"options","type":"collection","displayOptions":{"show":{"agent":["openAiFunctionsAgent"]}},"default":{},"placeholder":"Add Option","options":[{"displayName":"System Message","name":"systemMessage","type":"string","default":"You are a helpful AI assistant.","description":"The message that will be sent to the agent before the conversation starts","typeOptions":{"rows":6}}]},{"displayName":"Text","name":"text","type":"string","displayOptions":{"show":{"agent":["reActAgent"]}},"default":"={{ $json.input }}"},{"displayName":"Options","name":"options","type":"collection","displayOptions":{"show":{"agent":["reActAgent"]}},"default":{},"placeholder":"Add Option","options":[{"displayName":"Human Message Template","name":"humanMessageTemplate","type":"string","default":"{input}\n\n{agent_scratchpad}","description":"String to use directly as the human message template","typeOptions":{"rows":6}},{"displayName":"Prefix Message","name":"prefix","type":"string","default":"Answer the following questions as best you can. You have access to the following tools:","description":"String to put before the list of tools","typeOptions":{"rows":6}},{"displayName":"Suffix Message for Chat Model","name":"suffixChat","type":"string","default":"Begin! Reminder to always use the exact characters `Final Answer` when responding.","description":"String to put after the list of tools that will be used if chat model is used","typeOptions":{"rows":6}},{"displayName":"Suffix Message for Regular Model","name":"suffix","type":"string","default":"Begin!\n\n\tQuestion: {input}\n\tThought:{agent_scratchpad}","description":"String to put after the list of tools that will be used if regular model is used","typeOptions":{"rows":6}}]},{"displayName":"Data Source","name":"dataSource","type":"options","displayOptions":{"show":{"agent":["sqlAgent"]}},"default":"sqlite","description":"SQL database to connect to","options":[{"name":"MySQL","value":"mysql","description":"Connect to a MySQL database"},{"name":"Postgres","value":"postgres","description":"Connect to a Postgres database"},{"name":"SQLite","value":"sqlite","description":"Use SQLite by connecting a database file as binary input"}]},{"displayName":"Prompt","name":"input","type":"string","displayOptions":{"show":{"agent":["sqlAgent"]}},"default":"","required":true,"typeOptions":{"rows":5}},{"displayName":"Options","name":"options","type":"collection","displayOptions":{"show":{"agent":["sqlAgent"]}},"default":{},"placeholder":"Add Option","options":[{"displayName":"Ignored Tables","name":"ignoredTables","type":"string","default":"","description":"Comma-separated list of tables to ignore from the database. If empty, no tables are ignored."},{"displayName":"Include Sample Rows","name":"includedSampleRows","type":"number","description":"Number of sample rows to include in the prompt to the agent. It helps the agent to understand the schema of the database but it also increases the amount of tokens used.","default":3},{"displayName":"Included Tables","name":"includedTables","type":"string","default":"","description":"Comma-separated list of tables to include in the database. If empty, all tables are included."},{"displayName":"Prefix Prompt","name":"prefixPrompt","type":"string","default":"You are an agent designed to interact with an SQL database.\nGiven an input question, create a syntactically correct {dialect} query to run, then look at the results of the query and return the answer.\nUnless the user specifies a specific number of examples they wish to obtain, always limit your query to at most {top_k} results using the LIMIT clause.\nYou can order the results by a relevant column to return the most interesting examples in the database.\nNever query for all the columns from a specific table, only ask for a the few relevant columns given the question.\nYou have access to tools for interacting with the database.\nOnly use the below tools. Only use the information returned by the below tools to construct your final answer.\nYou MUST double check your query before executing it. If you get an error while executing a query, rewrite the query and try again.\n\nDO NOT make any DML statements (INSERT, UPDATE, DELETE, DROP etc.) to the database.\n\nIf the question does not seem related to the database, just return \"I don't know\" as the answer.","description":"Prefix prompt to use for the agent","typeOptions":{"rows":10}},{"displayName":"Suffix Prompt","name":"suffixPrompt","type":"string","default":"Begin!\n\nQuestion: {input}\nThought: I should look at the tables in the database to see what I can query.\n{agent_scratchpad}","description":"Suffix prompt to use for the agent","typeOptions":{"rows":4}},{"displayName":"Top K","name":"topK","type":"number","default":10,"description":"Number of top results agent should return"}]}]},
|
|
2
|
+
{"displayName":"Agent","name":"@n8n/n8n-nodes-langchain.agent","icon":"fa:robot","group":["transform"],"version":1,"description":"Seamlessly coordinates LLMs & tools per user input","subtitle":"={{ {\tconversationalAgent: 'Conversational Agent', openAiFunctionsAgent: 'OpenAI Functions Agent', reactAgent: 'ReAct Agent', sqlAgent: 'SQL Agent' }[$parameter.agent] }}","defaults":{"name":"Agent","color":"#404040"},"codex":{"alias":["LangChain"],"categories":["AI"],"subcategories":{"AI":["Agents"]},"resources":{"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.agent/"}]}},"inputs":"={{ ((agent) => { function getInputs(agent) {\n const getInputData = (inputs) => {\n const displayNames = {\n [\"ai_languageModel\"]: 'Model',\n [\"ai_memory\"]: 'Memory',\n [\"ai_tool\"]: 'Tool',\n [\"ai_outputParser\"]: 'Output Parser',\n };\n return inputs.map(({ type, filter }) => {\n const input = {\n type,\n displayName: type in displayNames ? displayNames[type] : undefined,\n required: type === \"ai_languageModel\",\n maxConnections: [\"ai_languageModel\", \"ai_memory\"].includes(type)\n ? 1\n : undefined,\n };\n if (filter) {\n input.filter = filter;\n }\n return input;\n });\n };\n let specialInputs = [];\n if (agent === 'conversationalAgent') {\n specialInputs = [\n {\n type: \"ai_languageModel\",\n filter: {\n nodes: [\n '@n8n/n8n-nodes-langchain.lmChatAnthropic',\n '@n8n/n8n-nodes-langchain.lmChatOllama',\n '@n8n/n8n-nodes-langchain.lmChatOpenAi',\n '@n8n/n8n-nodes-langchain.lmChatGooglePalm',\n ],\n },\n },\n {\n type: \"ai_memory\",\n },\n {\n type: \"ai_tool\",\n },\n {\n type: \"ai_outputParser\",\n },\n ];\n }\n else if (agent === 'openAiFunctionsAgent') {\n specialInputs = [\n {\n type: \"ai_languageModel\",\n filter: {\n nodes: ['@n8n/n8n-nodes-langchain.lmChatOpenAi'],\n },\n },\n {\n type: \"ai_memory\",\n },\n {\n type: \"ai_tool\",\n },\n {\n type: \"ai_outputParser\",\n },\n ];\n }\n else if (agent === 'reActAgent') {\n specialInputs = [\n {\n type: \"ai_languageModel\",\n },\n {\n type: \"ai_tool\",\n },\n {\n type: \"ai_outputParser\",\n },\n ];\n }\n else if (agent === 'sqlAgent') {\n specialInputs = [\n {\n type: \"ai_languageModel\",\n },\n ];\n }\n return [\"main\", ...getInputData(specialInputs)];\n}; return getInputs(agent) })($parameter.agent) }}","outputs":["main"],"credentials":[{"name":"mySql","required":true,"testedBy":"mysqlConnectionTest","displayOptions":{"show":{"agent":["sqlAgent"],"/dataSource":["mysql"]}}},{"name":"postgres","required":true,"displayOptions":{"show":{"agent":["sqlAgent"],"/dataSource":["postgres"]}}}],"properties":[{"displayName":"Agent","name":"agent","type":"options","noDataExpression":true,"options":[{"name":"Conversational Agent","value":"conversationalAgent","description":"Selects tools to accomplish its task and uses memory to recall previous conversations"},{"name":"OpenAI Functions Agent","value":"openAiFunctionsAgent","description":"Utilizes OpenAI's Function Calling feature to select the appropriate tool and arguments for execution"},{"name":"ReAct Agent","value":"reActAgent","description":"Strategically select tools to accomplish a given task"},{"name":"SQL Agent","value":"sqlAgent","description":"Answers questions about data in an SQL database"}],"default":"conversationalAgent"},{"displayName":"Text","name":"text","type":"string","required":true,"displayOptions":{"show":{"agent":["conversationalAgent"]}},"default":"={{ $json.input }}"},{"displayName":"Options","name":"options","type":"collection","displayOptions":{"show":{"agent":["conversationalAgent"]}},"default":{},"placeholder":"Add Option","options":[{"displayName":"Human Message","name":"humanMessage","type":"string","default":"TOOLS\n------\nAssistant can ask the user to use tools to look up information that may be helpful in answering the users original question. The tools the human can use are:\n\n{tools}\n\n{format_instructions}\n\nUSER'S INPUT\n--------------------\nHere is the user's input (remember to respond with a markdown code snippet of a json blob with a single action, and NOTHING else):\n\n{{input}}","description":"The message that will provide the agent with a list of tools to use","typeOptions":{"rows":6}},{"displayName":"System Message","name":"systemMessage","type":"string","default":"Assistant is a large language model trained by OpenAI.\n\nAssistant is designed to be able to assist with a wide range of tasks, from answering simple questions to providing in-depth explanations and discussions on a wide range of topics. As a language model, Assistant is able to generate human-like text based on the input it receives, allowing it to engage in natural-sounding conversations and provide responses that are coherent and relevant to the topic at hand.\n\nAssistant is constantly learning and improving, and its capabilities are constantly evolving. It is able to process and understand large amounts of text, and can use this knowledge to provide accurate and informative responses to a wide range of questions. Additionally, Assistant is able to generate its own text based on the input it receives, allowing it to engage in discussions and provide explanations and descriptions on a wide range of topics.\n\nOverall, Assistant is a powerful system that can help with a wide range of tasks and provide valuable insights and information on a wide range of topics. Whether you need help with a specific question or just want to have a conversation about a particular topic, Assistant is here to assist.","description":"The message that will be sent to the agent before the conversation starts","typeOptions":{"rows":6}}]},{"displayName":"Text","name":"text","type":"string","required":true,"displayOptions":{"show":{"agent":["openAiFunctionsAgent"]}},"default":"={{ $json.input }}"},{"displayName":"Options","name":"options","type":"collection","displayOptions":{"show":{"agent":["openAiFunctionsAgent"]}},"default":{},"placeholder":"Add Option","options":[{"displayName":"System Message","name":"systemMessage","type":"string","default":"You are a helpful AI assistant.","description":"The message that will be sent to the agent before the conversation starts","typeOptions":{"rows":6}}]},{"displayName":"Text","name":"text","type":"string","required":true,"displayOptions":{"show":{"agent":["reActAgent"]}},"default":"={{ $json.input }}"},{"displayName":"Options","name":"options","type":"collection","displayOptions":{"show":{"agent":["reActAgent"]}},"default":{},"placeholder":"Add Option","options":[{"displayName":"Human Message Template","name":"humanMessageTemplate","type":"string","default":"{input}\n\n{agent_scratchpad}","description":"String to use directly as the human message template","typeOptions":{"rows":6}},{"displayName":"Prefix Message","name":"prefix","type":"string","default":"Answer the following questions as best you can. You have access to the following tools:","description":"String to put before the list of tools","typeOptions":{"rows":6}},{"displayName":"Suffix Message for Chat Model","name":"suffixChat","type":"string","default":"Begin! Reminder to always use the exact characters `Final Answer` when responding.","description":"String to put after the list of tools that will be used if chat model is used","typeOptions":{"rows":6}},{"displayName":"Suffix Message for Regular Model","name":"suffix","type":"string","default":"Begin!\n\n\tQuestion: {input}\n\tThought:{agent_scratchpad}","description":"String to put after the list of tools that will be used if regular model is used","typeOptions":{"rows":6}}]},{"displayName":"Data Source","name":"dataSource","type":"options","displayOptions":{"show":{"agent":["sqlAgent"]}},"default":"sqlite","description":"SQL database to connect to","options":[{"name":"MySQL","value":"mysql","description":"Connect to a MySQL database"},{"name":"Postgres","value":"postgres","description":"Connect to a Postgres database"},{"name":"SQLite","value":"sqlite","description":"Use SQLite by connecting a database file as binary input"}]},{"displayName":"Prompt","name":"input","type":"string","displayOptions":{"show":{"agent":["sqlAgent"]}},"default":"","required":true,"typeOptions":{"rows":5}},{"displayName":"Options","name":"options","type":"collection","displayOptions":{"show":{"agent":["sqlAgent"]}},"default":{},"placeholder":"Add Option","options":[{"displayName":"Ignored Tables","name":"ignoredTables","type":"string","default":"","description":"Comma-separated list of tables to ignore from the database. If empty, no tables are ignored."},{"displayName":"Include Sample Rows","name":"includedSampleRows","type":"number","description":"Number of sample rows to include in the prompt to the agent. It helps the agent to understand the schema of the database but it also increases the amount of tokens used.","default":3},{"displayName":"Included Tables","name":"includedTables","type":"string","default":"","description":"Comma-separated list of tables to include in the database. If empty, all tables are included."},{"displayName":"Prefix Prompt","name":"prefixPrompt","type":"string","default":"You are an agent designed to interact with an SQL database.\nGiven an input question, create a syntactically correct {dialect} query to run, then look at the results of the query and return the answer.\nUnless the user specifies a specific number of examples they wish to obtain, always limit your query to at most {top_k} results using the LIMIT clause.\nYou can order the results by a relevant column to return the most interesting examples in the database.\nNever query for all the columns from a specific table, only ask for a the few relevant columns given the question.\nYou have access to tools for interacting with the database.\nOnly use the below tools. Only use the information returned by the below tools to construct your final answer.\nYou MUST double check your query before executing it. If you get an error while executing a query, rewrite the query and try again.\n\nDO NOT make any DML statements (INSERT, UPDATE, DELETE, DROP etc.) to the database.\n\nIf the question does not seem related to the database, just return \"I don't know\" as the answer.","description":"Prefix prompt to use for the agent","typeOptions":{"rows":10}},{"displayName":"Suffix Prompt","name":"suffixPrompt","type":"string","default":"Begin!\n\nQuestion: {input}\nThought: I should look at the tables in the database to see what I can query.\n{agent_scratchpad}","description":"Suffix prompt to use for the agent","typeOptions":{"rows":4}},{"displayName":"Top K","name":"topK","type":"number","default":10,"description":"Number of top results agent should return"}]}]},
|
|
3
3
|
{"displayName":"Summarization Chain","name":"@n8n/n8n-nodes-langchain.chainSummarization","icon":"fa:link","group":["transform"],"version":1,"description":"Transforms text into a concise summary","defaults":{"name":"Summarization Chain","color":"#909298"},"codex":{"alias":["LangChain"],"categories":["AI"],"subcategories":{"AI":["Chains"]},"resources":{"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.chainsummarization/"}]}},"inputs":["main",{"displayName":"Model","maxConnections":1,"type":"ai_languageModel","required":true},{"displayName":"Document","maxConnections":1,"type":"ai_document","required":true}],"outputs":["main"],"credentials":[],"properties":[{"displayName":"Specify the document to load in the document loader sub-node","name":"notice","type":"notice","default":""},{"displayName":"Type","name":"type","type":"options","description":"The type of summarization to run","default":"map_reduce","options":[{"name":"Map Reduce (Recommended)","value":"map_reduce","description":"Individually summarizes each document using an LLM (Map step), then combines these summaries into a global summary (Reduce step), with an optional compression step to ensure fit"},{"name":"Refine","value":"refine","description":"Iteratively updates its answer by looping over the documents and passing the current document along with the latest intermediate answer to an LLM, suitable for analyzing large document sets, albeit with more LLM calls"},{"name":"Stuff","value":"stuff","description":"Inserts all documents into a prompt, then passes it to an LLM for summarization, ideal for small document sets"}]},{"displayName":"Options","name":"options","type":"collection","default":{},"placeholder":"Add Option","options":[{"displayName":"Combine Map Prompt","name":"combineMapPrompt","type":"string","displayOptions":{"show":{"/type":["map_reduce"]}},"default":"Write a concise summary of the following:\n\n\n\"{text}\"\n\n\nCONCISE SUMMARY:","typeOptions":{"rows":6}},{"displayName":"Prompt","name":"prompt","type":"string","default":"Write a concise summary of the following:\n\n\n\"{text}\"\n\n\nCONCISE SUMMARY:","displayOptions":{"hide":{"/type":["refine"]}},"typeOptions":{"rows":6}},{"displayName":"Refine Prompt","name":"refinePrompt","type":"string","displayOptions":{"show":{"/type":["refine"]}},"default":"Your job is to produce a final summary\nWe have provided an existing summary up to a certain point: \"{existing_answer}\"\nWe have the opportunity to refine the existing summary\n(only if needed) with some more context below.\n------------\n\"{text}\"\n------------\n\nGiven the new context, refine the original summary\nIf the context isn't useful, return the original summary.\n\nREFINED SUMMARY:","typeOptions":{"rows":6}},{"displayName":"Refine Question Prompt","name":"refineQuestionPrompt","type":"string","displayOptions":{"show":{"/type":["refine"]}},"default":"Write a concise summary of the following:\n\n\n\"{text}\"\n\n\nCONCISE SUMMARY:","typeOptions":{"rows":6}}]}]},
|
|
4
|
-
{"displayName":"Basic LLM Chain","name":"@n8n/n8n-nodes-langchain.chainLlm","icon":"fa:link","group":["transform"],"version":1,"description":"A simple chain to prompt a large language mode","defaults":{"name":"Basic LLM Chain","color":"#909298"},"codex":{"alias":["LangChain"],"categories":["AI"],"subcategories":{"AI":["Chains"]},"resources":{"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.chainllm/"}]}},"inputs":["main",{"displayName":"Model","maxConnections":1,"type":"ai_languageModel","required":true},{"displayName":"Output Parser","type":"ai_outputParser","required":false}],"outputs":["main"],"credentials":[],"properties":[{"displayName":"Prompt","name":"prompt","type":"string","default":"={{ $json.input }}"}]},
|
|
5
|
-
{"displayName":"Q&A Chain
|
|
6
|
-
{"displayName":"LangChain Code","name":"@n8n/n8n-nodes-langchain.code","icon":"fa:code","group":["transform"],"version":1,"description":"LangChain Code Node","defaults":{"name":"LangChain Code"},"codex":{"categories":["AI"],"subcategories":{"AI":["Miscellaneous"]},"resources":{"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.code/"}]}},"inputs":"={{ ((values) => { const connectorTypes = {\"ai_chain\":\"Chain\",\"ai_document\":\"Document\",\"ai_embedding\":\"Embedding\",\"ai_languageModel\":\"Language Model\",\"ai_memory\":\"Memory\",\"ai_outputParser\":\"Output Parser\",\"ai_textSplitter\":\"Text Splitter\",\"ai_tool\":\"Tool\",\"ai_vectorRetriever\":\"Vector Retriever\",\"ai_vectorStore\":\"Vector Store\",\"main\":\"Main\"}; return values.map(value => { return { type: value.type, required: value.required, maxConnections: value.maxConnections === -1 ? undefined : value.maxConnections, displayName: connectorTypes[value.type] !== 'Main' ? connectorTypes[value.type] : undefined } } ) })($parameter.inputs.input) }}","outputs":"={{ ((values) => { const connectorTypes = {\"ai_chain\":\"Chain\",\"ai_document\":\"Document\",\"ai_embedding\":\"Embedding\",\"ai_languageModel\":\"Language Model\",\"ai_memory\":\"Memory\",\"ai_outputParser\":\"Output Parser\",\"ai_textSplitter\":\"Text Splitter\",\"ai_tool\":\"Tool\",\"ai_vectorRetriever\":\"Vector Retriever\",\"ai_vectorStore\":\"Vector Store\",\"main\":\"Main\"}; return values.map(value => { return { type: value.type, displayName: connectorTypes[value.type] !== 'Main' ? connectorTypes[value.type] : undefined } } ) })($parameter.outputs.output) }}","properties":[{"displayName":"Code","name":"code","placeholder":"Add Code","type":"fixedCollection","noDataExpression":true,"default":{},"options":[{"name":"execute","displayName":"Execute","values":[{"displayName":"JavaScript - Execute","name":"code","type":"string","typeOptions":{"editor":"codeNodeEditor","editorLanguage":"javaScript"},"default":"const { PromptTemplate } = require('langchain/prompts');\n\nconst query = 'Tell me a joke';\nconst prompt = PromptTemplate.fromTemplate(query);\nconst llm = await this.getInputConnectionData('languageModel', 0);\nlet chain = prompt.pipe(llm);\nconst output = await chain.invoke();\nreturn [ {json: { output } } ];","hint":"This code will only run and return data if a \"Main\" input & output got created.","noDataExpression":true}]},{"name":"supplyData","displayName":"
|
|
4
|
+
{"displayName":"Basic LLM Chain","name":"@n8n/n8n-nodes-langchain.chainLlm","icon":"fa:link","group":["transform"],"version":1,"description":"A simple chain to prompt a large language mode","defaults":{"name":"Basic LLM Chain","color":"#909298"},"codex":{"alias":["LangChain"],"categories":["AI"],"subcategories":{"AI":["Chains"]},"resources":{"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.chainllm/"}]}},"inputs":["main",{"displayName":"Model","maxConnections":1,"type":"ai_languageModel","required":true},{"displayName":"Output Parser","type":"ai_outputParser","required":false}],"outputs":["main"],"credentials":[],"properties":[{"displayName":"Prompt","name":"prompt","type":"string","required":true,"default":"={{ $json.input }}"}]},
|
|
5
|
+
{"displayName":"Retrieval Q&A Chain","name":"@n8n/n8n-nodes-langchain.chainRetrievalQa","icon":"fa:link","group":["transform"],"version":1,"description":"Retrieves answers to queries based on retrieved documents","defaults":{"name":"Retrieval Q&A Chain","color":"#909298"},"codex":{"alias":["LangChain"],"categories":["AI"],"subcategories":{"AI":["Chains"]},"resources":{"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.chainretrievalqa/"}]}},"inputs":["main",{"displayName":"Model","maxConnections":1,"type":"ai_languageModel","required":true},{"displayName":"Retriever","maxConnections":1,"type":"ai_retriever","required":true}],"outputs":["main"],"credentials":[],"properties":[{"displayName":"Query","name":"query","type":"string","required":true,"default":"={{ $json.input }}"}]},
|
|
6
|
+
{"displayName":"LangChain Code","name":"@n8n/n8n-nodes-langchain.code","icon":"fa:code","group":["transform"],"version":1,"description":"LangChain Code Node","defaults":{"name":"LangChain Code"},"codex":{"categories":["AI"],"subcategories":{"AI":["Miscellaneous"]},"resources":{"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.code/"}]}},"inputs":"={{ ((values) => { const connectorTypes = {\"ai_chain\":\"Chain\",\"ai_document\":\"Document\",\"ai_embedding\":\"Embedding\",\"ai_languageModel\":\"Language Model\",\"ai_memory\":\"Memory\",\"ai_outputParser\":\"Output Parser\",\"ai_textSplitter\":\"Text Splitter\",\"ai_tool\":\"Tool\",\"ai_vectorRetriever\":\"Vector Retriever\",\"ai_vectorStore\":\"Vector Store\",\"main\":\"Main\"}; return values.map(value => { return { type: value.type, required: value.required, maxConnections: value.maxConnections === -1 ? undefined : value.maxConnections, displayName: connectorTypes[value.type] !== 'Main' ? connectorTypes[value.type] : undefined } } ) })($parameter.inputs.input) }}","outputs":"={{ ((values) => { const connectorTypes = {\"ai_chain\":\"Chain\",\"ai_document\":\"Document\",\"ai_embedding\":\"Embedding\",\"ai_languageModel\":\"Language Model\",\"ai_memory\":\"Memory\",\"ai_outputParser\":\"Output Parser\",\"ai_textSplitter\":\"Text Splitter\",\"ai_tool\":\"Tool\",\"ai_vectorRetriever\":\"Vector Retriever\",\"ai_vectorStore\":\"Vector Store\",\"main\":\"Main\"}; return values.map(value => { return { type: value.type, displayName: connectorTypes[value.type] !== 'Main' ? connectorTypes[value.type] : undefined } } ) })($parameter.outputs.output) }}","properties":[{"displayName":"Code","name":"code","placeholder":"Add Code","type":"fixedCollection","noDataExpression":true,"default":{},"options":[{"name":"execute","displayName":"Execute","values":[{"displayName":"JavaScript - Execute","name":"code","type":"string","typeOptions":{"editor":"codeNodeEditor","editorLanguage":"javaScript"},"default":"const { PromptTemplate } = require('langchain/prompts');\n\nconst query = 'Tell me a joke';\nconst prompt = PromptTemplate.fromTemplate(query);\nconst llm = await this.getInputConnectionData('languageModel', 0);\nlet chain = prompt.pipe(llm);\nconst output = await chain.invoke();\nreturn [ {json: { output } } ];","hint":"This code will only run and return data if a \"Main\" input & output got created.","noDataExpression":true}]},{"name":"supplyData","displayName":"Supply Data","values":[{"displayName":"JavaScript - Supply Data","name":"code","type":"string","typeOptions":{"editor":"codeNodeEditor","editorLanguage":"javaScript"},"default":"const { WikipediaQueryRun } = require('langchain/tools');\nreturn new WikipediaQueryRun();","hint":"This code will only run and return data if an output got created which is not \"Main\".","noDataExpression":true}]}]},{"displayName":"You can import LangChain and use all available functionality. Debug by using <code>console.log()</code> statements and viewing their output in the browser console.","name":"notice","type":"notice","default":""},{"displayName":"Inputs","name":"inputs","placeholder":"Add Input","type":"fixedCollection","noDataExpression":true,"typeOptions":{"multipleValues":true,"sortable":true},"description":"The input to add","default":{},"options":[{"name":"input","displayName":"Input","values":[{"displayName":"Type","name":"type","type":"options","options":[{"name":"Chain","value":"ai_chain"},{"name":"Document","value":"ai_document"},{"name":"Embedding","value":"ai_embedding"},{"name":"Language Model","value":"ai_languageModel"},{"name":"Memory","value":"ai_memory"},{"name":"Output Parser","value":"ai_outputParser"},{"name":"Text Splitter","value":"ai_textSplitter"},{"name":"Tool","value":"ai_tool"},{"name":"Vector Retriever","value":"ai_vectorRetriever"},{"name":"Vector Store","value":"ai_vectorStore"},{"name":"Main","value":"main"}],"noDataExpression":true,"default":"","required":true,"description":"The type of the input"},{"displayName":"Max Connections","name":"maxConnections","type":"number","noDataExpression":true,"default":-1,"required":true,"description":"How many nodes of this type are allowed to be connected. Set it to -1 for unlimited."},{"displayName":"Required","name":"required","type":"boolean","noDataExpression":true,"default":false,"required":true,"description":"Whether the input needs a connection"}]}]},{"displayName":"Outputs","name":"outputs","placeholder":"Add Output","type":"fixedCollection","noDataExpression":true,"typeOptions":{"multipleValues":true,"sortable":true},"description":"The output to add","default":{},"options":[{"name":"output","displayName":"Output","values":[{"displayName":"Type","name":"type","type":"options","options":[{"name":"Chain","value":"ai_chain"},{"name":"Document","value":"ai_document"},{"name":"Embedding","value":"ai_embedding"},{"name":"Language Model","value":"ai_languageModel"},{"name":"Memory","value":"ai_memory"},{"name":"Output Parser","value":"ai_outputParser"},{"name":"Text Splitter","value":"ai_textSplitter"},{"name":"Tool","value":"ai_tool"},{"name":"Vector Retriever","value":"ai_vectorRetriever"},{"name":"Vector Store","value":"ai_vectorStore"},{"name":"Main","value":"main"}],"noDataExpression":true,"default":"","required":true,"description":"The type of the input"}]}]}]},
|
|
7
7
|
{"displayName":"Binary Input Loader","name":"@n8n/n8n-nodes-langchain.documentBinaryInputLoader","group":["transform"],"version":1,"description":"Use binary data from a previous step in the workflow","defaults":{"name":"Binary Input Loader"},"codex":{"categories":["AI"],"subcategories":{"AI":["Document Loaders"]},"resources":{"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.documentbinaryinputloader/"}]}},"inputs":[{"displayName":"Text Splitter","maxConnections":1,"type":"ai_textSplitter","required":true}],"outputs":["ai_document"],"outputNames":["Document"],"properties":[{"displayName":"Loader Type","name":"loader","type":"options","default":"jsonLoader","required":true,"options":[{"name":"CSV Loader","value":"csvLoader","description":"Load CSV files"},{"name":"Docx Loader","value":"docxLoader","description":"Load Docx documents"},{"name":"EPub Loader","value":"epubLoader","description":"Load EPub files"},{"name":"JSON Loader","value":"jsonLoader","description":"Load JSON files"},{"name":"PDF Loader","value":"pdfLoader","description":"Load PDF documents"},{"name":"Text Loader","value":"textLoader","description":"Load plain text files"}]},{"displayName":"Binary Data Key","name":"binaryDataKey","type":"string","default":"data","required":true,"description":"Name of the binary property from which to read the file buffer"},{"displayName":"Split Pages","name":"splitPages","type":"boolean","default":true,"displayOptions":{"show":{"loader":["pdfLoader"]}}},{"displayName":"Column","name":"column","type":"string","default":"","description":"Column to extract from CSV","displayOptions":{"show":{"loader":["csvLoader"]}}},{"displayName":"Separator","name":"separator","type":"string","description":"Separator to use for CSV","default":",","displayOptions":{"show":{"loader":["csvLoader"]}}},{"displayName":"Pointers","name":"pointers","type":"string","default":"","description":"Pointers to extract from JSON, e.g. \"/text\" or \"/text, /meta/title\"","displayOptions":{"show":{"loader":["jsonLoader"]}}}],"iconUrl":"icons/@n8n/n8n-nodes-langchain/dist/nodes/document_loaders/DocumentBinaryInputLoader/binary.svg"},
|
|
8
8
|
{"displayName":"GitHub Document Loader","name":"@n8n/n8n-nodes-langchain.documentGithubLoader","group":["transform"],"version":1,"description":"Use GitHub data as input to this chain","defaults":{"name":"GitHub Document Loader"},"codex":{"categories":["AI"],"subcategories":{"AI":["Document Loaders"]},"resources":{"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.documentgithubloader/"}]}},"credentials":[{"name":"githubApi","required":true}],"inputs":[{"displayName":"Text Splitter","maxConnections":1,"type":"ai_textSplitter"}],"inputNames":["Text Splitter"],"outputs":["ai_document"],"outputNames":["Document"],"properties":[{"displayName":"Repository Link","name":"repository","type":"string","default":""},{"displayName":"Branch","name":"branch","type":"string","default":"main"},{"displayName":"Options","name":"additionalOptions","type":"collection","placeholder":"Add Option","default":{},"options":[{"displayName":"Recursive","name":"recursive","type":"boolean","default":false},{"displayName":"Ignore Paths","name":"recursive","type":"string","description":"Comma-separated list of paths to ignore, e.g. \"docs, src/tests","default":""}]}],"iconUrl":"icons/@n8n/n8n-nodes-langchain/dist/nodes/document_loaders/DocumentGithubLoader/github.svg"},
|
|
9
9
|
{"displayName":"JSON Input Loader","name":"@n8n/n8n-nodes-langchain.documentJsonInputLoader","group":["transform"],"version":1,"description":"Use JSON data from a previous step in the workflow","defaults":{"name":"JSON Input Loader"},"codex":{"categories":["AI"],"subcategories":{"AI":["Document Loaders"]},"resources":{"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.documentjsoninputloader/"}]}},"inputs":[{"displayName":"Text Splitter","maxConnections":1,"type":"ai_textSplitter"}],"inputNames":["Text Splitter"],"outputs":["ai_document"],"outputNames":["Document"],"properties":[{"displayName":"Pointers","name":"pointers","type":"string","default":"","description":"Pointers to extract from JSON, e.g. \"/text\" or \"/text, /meta/title\""}],"iconUrl":"icons/@n8n/n8n-nodes-langchain/dist/nodes/document_loaders/DocumentJSONInputLoader/json.svg"},
|
|
@@ -38,11 +38,11 @@
|
|
|
38
38
|
{"displayName":"Recursive Character Text Splitter","name":"@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter","icon":"fa:grip-lines-vertical","group":["transform"],"version":1,"description":"Split text into chunks by characters recursively, recommended for most use cases","defaults":{"name":"Recursive Character Text Splitter"},"codex":{"categories":["AI"],"subcategories":{"AI":["Text Splitters"]},"resources":{"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.textsplitterrecursivecharactertextsplitter/"}]}},"inputs":[],"outputs":["ai_textSplitter"],"outputNames":["Text Splitter"],"properties":[{"displayName":"Chunk Size","name":"chunkSize","type":"number","default":1000},{"displayName":"Chunk Overlap","name":"chunkOverlap","type":"number","default":0}]},
|
|
39
39
|
{"displayName":"Token Splitter","name":"@n8n/n8n-nodes-langchain.textSplitterTokenSplitter","icon":"fa:grip-lines-vertical","group":["transform"],"version":1,"description":"Split text into chunks by tokens","defaults":{"name":"Token Splitter"},"codex":{"categories":["AI"],"subcategories":{"AI":["Text Splitters"]},"resources":{"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.textsplittertokensplitter/"}]}},"inputs":[],"outputs":["ai_textSplitter"],"outputNames":["Text Splitter"],"properties":[{"displayName":"Chunk Size","name":"chunkSize","type":"number","default":1000},{"displayName":"Chunk Overlap","name":"chunkOverlap","type":"number","default":0}]},
|
|
40
40
|
{"displayName":"Calculator","name":"@n8n/n8n-nodes-langchain.toolCalculator","icon":"fa:calculator","group":["transform"],"version":1,"description":"Use Calculator","defaults":{"name":"Calculator"},"codex":{"categories":["AI"],"subcategories":{"AI":["Tools"]},"resources":{"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.toolcalculator/"}]}},"inputs":[],"outputs":["ai_tool"],"outputNames":["Tool"],"properties":[]},
|
|
41
|
-
{"displayName":"Code Tool","name":"@n8n/n8n-nodes-langchain.toolCode","icon":"fa:code","group":["transform"],"version":1,"description":"Create a tool via code","defaults":{"name":"Code Tool"},"codex":{"categories":["AI"],"subcategories":{"AI":["Tools"]},"resources":{"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.toolcode/"}]}},"inputs":[],"outputs":["ai_tool"],"outputNames":["Tool"],"properties":[{"displayName":"Name","name":"name","type":"string","default":"","placeholder":"
|
|
41
|
+
{"displayName":"Code Tool","name":"@n8n/n8n-nodes-langchain.toolCode","icon":"fa:code","group":["transform"],"version":1,"description":"Create a tool via code","defaults":{"name":"Code Tool"},"codex":{"categories":["AI"],"subcategories":{"AI":["Tools"]},"resources":{"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.toolcode/"}]}},"inputs":[],"outputs":["ai_tool"],"outputNames":["Tool"],"properties":[{"displayName":"Name","name":"name","type":"string","default":"","placeholder":"My_Tool"},{"displayName":"Description","name":"description","type":"string","default":"","placeholder":"Call this tool to get a random color. The input should be a string with comma separted names of colors to exclude.","typeOptions":{"rows":3}},{"displayName":"Language","name":"language","type":"options","noDataExpression":true,"options":[{"name":"JavaScript","value":"javaScript"},{"name":"Python (Beta)","value":"python"}],"default":"javaScript"},{"displayName":"JavaScript","name":"jsCode","type":"string","displayOptions":{"show":{"language":["javaScript"]}},"typeOptions":{"editor":"codeNodeEditor","editorLanguage":"javaScript"},"default":"","hint":"You can access the input the tool receives via the input property \"query\". The returned value should be a single string.","description":"JavaScript code to execute.<br><br>Tip: You can use luxon vars like <code>$today</code> for dates and <code>$jmespath</code> for querying JSON structures. <a href=\"https://docs.n8n.io/nodes/n8n-nodes-base.function\">Learn more</a>.","noDataExpression":true},{"displayName":"Python","name":"pythonCode","type":"string","displayOptions":{"show":{"language":["python"]}},"typeOptions":{"editor":"codeNodeEditor","editorLanguage":"python"},"default":"","hint":"You can access the input the tool receives via the input property \"query\". The returned value should be a single string.","description":"Python code to execute.<br><br>Tip: You can use luxon vars like <code>_today</code> for dates and <code>$_mespath</code> for querying JSON structures. <a href=\"https://docs.n8n.io/nodes/n8n-nodes-base.function\">Learn more</a>.","noDataExpression":true}]},
|
|
42
42
|
{"displayName":"SerpAPI","name":"@n8n/n8n-nodes-langchain.toolSerpApi","group":["transform"],"version":1,"description":"Search in Google using SerpAPI","defaults":{"name":"SerpAPI"},"codex":{"categories":["AI"],"subcategories":{"AI":["Tools"]},"resources":{"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.toolserpapi/"}]}},"inputs":[],"outputs":["ai_tool"],"outputNames":["Tool"],"credentials":[{"name":"serpApi","required":true}],"properties":[{"displayName":"Options","name":"options","type":"collection","placeholder":"Add Option","default":{},"options":[{"displayName":"Country","name":"gl","type":"string","default":"us","description":"Defines the country to use for search. Head to <a href=\"https://serpapi.com/google-countries\">Google countries page</a> for a full list of supported countries."},{"displayName":"Device","name":"device","type":"options","options":[{"name":"Desktop","value":"desktop"},{"name":"Mobile","value":"mobile"},{"name":"Tablet","value":"tablet"}],"default":"desktop","description":"Device to use to get the results"},{"displayName":"Explicit Array","name":"no_cache","type":"boolean","default":false,"description":"Whether to force SerpApi to fetch the Google results even if a cached version is already present. Cache expires after 1h. Cached searches are free, and are not counted towards your searches per month."},{"displayName":"Google Domain","name":"google_domain","type":"string","default":"google.com","description":"Defines the country to use for search. Head to <a href=\"https://serpapi.com/google-countries\">Google countries page</a> for a full list of supported countries."},{"displayName":"Language","name":"hl","type":"string","default":"en","description":"Defines the language to use. It's a two-letter language code. (e.g., `en` for English, `es` for Spanish, or `fr` for French). Head to <a href=\"https://serpapi.com/google-languages\">Google languages page</a> for a full list of supported languages."}]}],"iconUrl":"icons/@n8n/n8n-nodes-langchain/dist/nodes/tools/ToolSerpApi/serpApi.svg"},
|
|
43
43
|
{"displayName":"Wikipedia","name":"@n8n/n8n-nodes-langchain.toolWikipedia","group":["transform"],"version":1,"description":"Search in Wikipedia","defaults":{"name":"Wikipedia"},"codex":{"categories":["AI"],"subcategories":{"AI":["Tools"]},"resources":{"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.toolwikipedia/"}]}},"inputs":[],"outputs":["ai_tool"],"outputNames":["Tool"],"properties":[],"iconUrl":"icons/@n8n/n8n-nodes-langchain/dist/nodes/tools/ToolWikipedia/wikipedia.svg"},
|
|
44
44
|
{"displayName":"Wolfram|Alpha","name":"@n8n/n8n-nodes-langchain.toolWolframAlpha","group":["transform"],"version":1,"description":"Connects to WolframAlpha's computational intelligence engine.","defaults":{"name":"Wolfram Alpha"},"credentials":[{"name":"wolframAlphaApi","required":true}],"codex":{"categories":["AI"],"subcategories":{"AI":["Tools"]},"resources":{"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.toolwolframalpha/"}]}},"inputs":[],"outputs":["ai_tool"],"outputNames":["Tool"],"properties":[],"iconUrl":"icons/@n8n/n8n-nodes-langchain/dist/nodes/tools/ToolWolframAlpha/wolfram-alpha.svg"},
|
|
45
|
-
{"displayName":"Workflow Tool","name":"@n8n/n8n-nodes-langchain.toolWorkflow","icon":"fa:network-wired","group":["transform"],"version":1,"description":"Create a tool via a workflow","defaults":{"name":"Workflow Tool"},"codex":{"categories":["AI"],"subcategories":{"AI":["Tools"]},"resources":{"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.toolworkflow/"}]}},"inputs":[],"outputs":["ai_tool"],"outputNames":["Tool"],"properties":[{"displayName":"Name","name":"name","type":"string","default":"","placeholder":"
|
|
45
|
+
{"displayName":"Workflow Tool","name":"@n8n/n8n-nodes-langchain.toolWorkflow","icon":"fa:network-wired","group":["transform"],"version":1,"description":"Create a tool via a workflow","defaults":{"name":"Workflow Tool"},"codex":{"categories":["AI"],"subcategories":{"AI":["Tools"]},"resources":{"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.toolworkflow/"}]}},"inputs":[],"outputs":["ai_tool"],"outputNames":["Tool"],"properties":[{"displayName":"Name","name":"name","type":"string","default":"","placeholder":"My_Color_Tool"},{"displayName":"Description","name":"description","type":"string","default":"","placeholder":"Call this tool to get a random color. The input should be a string with comma separted names of colors to exclude.","typeOptions":{"rows":3}},{"displayName":"The workflow will receive \"query\" as input and the output of the last node will be returned as response","name":"executeNotice","type":"notice","default":""},{"displayName":"Source","name":"source","type":"options","options":[{"name":"Database","value":"database","description":"Load the workflow from the database by ID"},{"name":"Parameter","value":"parameter","description":"Load the workflow from a parameter"}],"default":"database","description":"Where to get the workflow to execute from"},{"displayName":"Workflow ID","name":"workflowId","type":"string","displayOptions":{"show":{"source":["database"]}},"default":"","required":true,"description":"The workflow to execute"},{"displayName":"Workflow JSON","name":"workflowJson","type":"string","typeOptions":{"editor":"json","rows":10},"displayOptions":{"show":{"source":["parameter"]}},"default":"\n\n\n","required":true,"description":"The workflow JSON code to execute"},{"displayName":"Response Property Name","name":"responsePropertyName","type":"string","default":"response","description":"The name of the property of the last node that will be returned as response"},{"displayName":"Workflow Values","name":"fields","placeholder":"Add Value","type":"fixedCollection","description":"Set the values which should be made available in the workflow","typeOptions":{"multipleValues":true,"sortable":true},"default":{},"options":[{"name":"values","displayName":"Values","values":[{"displayName":"Name","name":"name","type":"string","default":"","placeholder":"e.g. fieldName","description":"Name of the field to set the value of. Supports dot-notation. Example: data.person[0].name.","requiresDataPath":"single"},{"displayName":"Type","name":"type","type":"options","description":"The field value type","options":[{"name":"String","value":"stringValue"},{"name":"Number","value":"numberValue"},{"name":"Boolean","value":"booleanValue"},{"name":"Array","value":"arrayValue"},{"name":"Object","value":"objectValue"}],"default":"stringValue"},{"displayName":"Value","name":"stringValue","type":"string","default":"","displayOptions":{"show":{"type":["stringValue"]}},"validateType":"string","ignoreValidationDuringExecution":true},{"displayName":"Value","name":"numberValue","type":"string","default":"","displayOptions":{"show":{"type":["numberValue"]}},"validateType":"number","ignoreValidationDuringExecution":true},{"displayName":"Value","name":"booleanValue","type":"options","default":"true","options":[{"name":"True","value":"true"},{"name":"False","value":"false"}],"displayOptions":{"show":{"type":["booleanValue"]}},"validateType":"boolean","ignoreValidationDuringExecution":true},{"displayName":"Value","name":"arrayValue","type":"string","default":"","placeholder":"e.g. [ arrayItem1, arrayItem2, arrayItem3 ]","displayOptions":{"show":{"type":["arrayValue"]}},"validateType":"array","ignoreValidationDuringExecution":true},{"displayName":"Value","name":"objectValue","type":"string","default":"={}","typeOptions":{"editor":"json","editorLanguage":"json","rows":2},"displayOptions":{"show":{"type":["objectValue"]}},"validateType":"object","ignoreValidationDuringExecution":true}]}]}]},
|
|
46
46
|
{"displayName":"Manual Chat Trigger","name":"@n8n/n8n-nodes-langchain.manualChatTrigger","icon":"fa:comments","group":["trigger"],"version":1,"description":"Runs the flow on new manual chat message","eventTriggerDescription":"","maxNodes":1,"defaults":{"name":"On new manual Chat Message","color":"#909298"},"codex":{"categories":["Core Nodes"],"resources":{"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.manualchattrigger/"}]},"subcategories":{"Core Nodes":["Other Trigger Nodes"]}},"inputs":[],"outputs":["main"],"properties":[{"displayName":"This node is where a manual chat workflow execution starts. To make one, go back to the canvas and click ‘Chat’","name":"notice","type":"notice","default":""},{"displayName":"Chat and execute workflow","name":"openChat","type":"button","typeOptions":{"action":"openChat"},"default":""}]},
|
|
47
47
|
{"displayName":"In Memory Vector Store","name":"@n8n/n8n-nodes-langchain.vectorStoreInMemory","icon":"fa:database","group":["transform"],"version":1,"description":"Stores vectors in memory","defaults":{"name":"In Memory Vector Store"},"codex":{"categories":["AI"],"subcategories":{"AI":["Vector Stores"]},"resources":{"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.vectorstoreinmemory/"}]}},"inputs":[{"displayName":"Document","type":"ai_document","required":false},{"displayName":"Embedding","maxConnections":1,"type":"ai_embedding","required":false}],"outputs":["ai_vectorRetriever"],"outputNames":["Vector Retriever"],"properties":[{"displayName":"Specify the document to load in the document loader sub-node","name":"notice","type":"notice","default":""}]},
|
|
48
48
|
{"displayName":"Pinecone: Insert","name":"@n8n/n8n-nodes-langchain.vectorStorePineconeInsert","group":["transform"],"version":1,"description":"Insert data into Pinecone Vector Store index","defaults":{"name":"Pinecone: Insert","color":"#1321A7"},"codex":{"categories":["AI"],"subcategories":{"AI":["Vector Stores"]},"resources":{"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.vectorstorepineconeinsert/"}]}},"credentials":[{"name":"pineconeApi","required":true}],"inputs":["main",{"displayName":"Document","maxConnections":1,"type":"ai_document","required":true},{"displayName":"Embedding","maxConnections":1,"type":"ai_embedding","required":true}],"outputs":["main"],"properties":[{"displayName":"Pinecone Index","name":"pineconeIndex","type":"string","default":"","required":true},{"displayName":"Pinecone Namespace","name":"pineconeNamespace","type":"string","default":""},{"displayName":"Specify the document to load in the document loader sub-node","name":"notice","type":"notice","default":""},{"displayName":"Clear Namespace","name":"clearNamespace","type":"boolean","default":false,"description":"Whether to clear the namespace before inserting new data"}],"iconUrl":"icons/@n8n/n8n-nodes-langchain/dist/nodes/vector_store/VectorStorePineconeInsert/pinecone.svg"},
|
package/dist/utils/logWrapper.js
CHANGED
|
@@ -12,6 +12,7 @@ const base_4 = require("langchain/llms/base");
|
|
|
12
12
|
const memory_1 = require("langchain/memory");
|
|
13
13
|
const retriever_1 = require("langchain/schema/retriever");
|
|
14
14
|
const output_parser_1 = require("langchain/schema/output_parser");
|
|
15
|
+
const lodash_1 = require("lodash");
|
|
15
16
|
const N8nJsonLoader_1 = require("./N8nJsonLoader");
|
|
16
17
|
const N8nBinaryLoader_1 = require("./N8nBinaryLoader");
|
|
17
18
|
async function callMethodAsync(parameters) {
|
|
@@ -166,15 +167,16 @@ function logWrapper(originalInstance, executeFunctions) {
|
|
|
166
167
|
else if (prop === 'parse' && 'parse' in target) {
|
|
167
168
|
return async (text) => {
|
|
168
169
|
connectionType = "ai_outputParser";
|
|
170
|
+
const stringifiedText = (0, lodash_1.isObject)(text) ? JSON.stringify(text) : text;
|
|
169
171
|
const { index } = executeFunctions.addInputData(connectionType, [
|
|
170
|
-
[{ json: { action: 'parse', text } }],
|
|
172
|
+
[{ json: { action: 'parse', text: stringifiedText } }],
|
|
171
173
|
]);
|
|
172
174
|
const response = (await callMethodAsync.call(target, {
|
|
173
175
|
executeFunctions,
|
|
174
176
|
connectionType,
|
|
175
177
|
currentNodeRunIndex: index,
|
|
176
178
|
method: target[prop],
|
|
177
|
-
arguments: [
|
|
179
|
+
arguments: [stringifiedText],
|
|
178
180
|
}));
|
|
179
181
|
executeFunctions.addOutputData(connectionType, index, [
|
|
180
182
|
[{ json: { action: 'parse', response } }],
|