@n8n/n8n-nodes-langchain 0.2.1 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/build.tsbuildinfo +1 -1
- package/dist/credentials/PineconeApi.credentials.d.ts +2 -1
- package/dist/credentials/PineconeApi.credentials.js +8 -0
- package/dist/credentials/PineconeApi.credentials.js.map +1 -1
- package/dist/known/credentials.json +13 -11
- package/dist/known/nodes.json +28 -0
- package/dist/nodes/agents/Agent/Agent.node.js +45 -12
- package/dist/nodes/agents/Agent/Agent.node.js.map +1 -1
- package/dist/nodes/agents/Agent/agents/ConversationalAgent/description.js +21 -0
- package/dist/nodes/agents/Agent/agents/ConversationalAgent/description.js.map +1 -1
- package/dist/nodes/agents/Agent/agents/ConversationalAgent/execute.js +11 -7
- package/dist/nodes/agents/Agent/agents/ConversationalAgent/execute.js.map +1 -1
- package/dist/nodes/agents/Agent/agents/OpenAiFunctionsAgent/description.js +21 -0
- package/dist/nodes/agents/Agent/agents/OpenAiFunctionsAgent/description.js.map +1 -1
- package/dist/nodes/agents/Agent/agents/OpenAiFunctionsAgent/execute.js +3 -1
- package/dist/nodes/agents/Agent/agents/OpenAiFunctionsAgent/execute.js.map +1 -1
- package/dist/nodes/agents/Agent/agents/PlanAndExecuteAgent/description.d.ts +2 -0
- package/dist/nodes/agents/Agent/agents/PlanAndExecuteAgent/description.js +57 -0
- package/dist/nodes/agents/Agent/agents/PlanAndExecuteAgent/description.js.map +1 -0
- package/dist/nodes/agents/Agent/agents/PlanAndExecuteAgent/execute.d.ts +2 -0
- package/dist/nodes/agents/Agent/agents/PlanAndExecuteAgent/execute.js +50 -0
- package/dist/nodes/agents/Agent/agents/PlanAndExecuteAgent/execute.js.map +1 -0
- package/dist/nodes/agents/Agent/agents/PlanAndExecuteAgent/prompt.d.ts +1 -0
- package/dist/nodes/agents/Agent/agents/PlanAndExecuteAgent/prompt.js +11 -0
- package/dist/nodes/agents/Agent/agents/PlanAndExecuteAgent/prompt.js.map +1 -0
- package/dist/nodes/agents/Agent/agents/ReActAgent/description.js +14 -0
- package/dist/nodes/agents/Agent/agents/ReActAgent/description.js.map +1 -1
- package/dist/nodes/agents/Agent/agents/ReActAgent/execute.js +1 -1
- package/dist/nodes/agents/Agent/agents/ReActAgent/execute.js.map +1 -1
- package/dist/nodes/agents/Agent/agents/SqlAgent/description.js +2 -2
- package/dist/nodes/agents/Agent/agents/SqlAgent/description.js.map +1 -1
- package/dist/nodes/agents/Agent/agents/SqlAgent/execute.js +2 -2
- package/dist/nodes/agents/Agent/agents/SqlAgent/execute.js.map +1 -1
- package/dist/nodes/agents/Agent/agents/SqlAgent/other/handlers/postgres.js.map +1 -1
- package/dist/nodes/agents/Agent/agents/SqlAgent/other/handlers/sqlite.js.map +1 -1
- package/dist/nodes/agents/OpenAiAssistant/OpenAiAssistant.node.d.ts +5 -0
- package/dist/nodes/agents/OpenAiAssistant/OpenAiAssistant.node.js +328 -0
- package/dist/nodes/agents/OpenAiAssistant/OpenAiAssistant.node.js.map +1 -0
- package/dist/nodes/agents/OpenAiAssistant/utils.d.ts +5 -0
- package/dist/nodes/agents/OpenAiAssistant/utils.js +36 -0
- package/dist/nodes/agents/OpenAiAssistant/utils.js.map +1 -0
- package/dist/nodes/chains/ChainLLM/ChainLlm.node.d.ts +1 -1
- package/dist/nodes/chains/ChainLLM/ChainLlm.node.js +240 -18
- package/dist/nodes/chains/ChainLLM/ChainLlm.node.js.map +1 -1
- package/dist/nodes/chains/ChainRetrievalQA/ChainRetrievalQa.node.js +24 -5
- package/dist/nodes/chains/ChainRetrievalQA/ChainRetrievalQa.node.js.map +1 -1
- package/dist/nodes/chains/ChainSummarization/ChainSummarization.node.js +29 -15
- package/dist/nodes/chains/ChainSummarization/ChainSummarization.node.js.map +1 -1
- package/dist/nodes/code/Code.node.js +2 -1
- package/dist/nodes/code/Code.node.js.map +1 -1
- package/dist/nodes/document_loaders/DocumentBinaryInputLoader/DocumentBinaryInputLoader.node.d.ts +3 -0
- package/dist/nodes/document_loaders/DocumentBinaryInputLoader/DocumentBinaryInputLoader.node.js +21 -0
- package/dist/nodes/document_loaders/DocumentBinaryInputLoader/DocumentBinaryInputLoader.node.js.map +1 -1
- package/dist/nodes/document_loaders/DocumentDefaultDataLoader/DocumentDefaultDataLoader.node.d.ts +8 -0
- package/dist/nodes/document_loaders/DocumentDefaultDataLoader/DocumentDefaultDataLoader.node.js +253 -0
- package/dist/nodes/document_loaders/DocumentDefaultDataLoader/DocumentDefaultDataLoader.node.js.map +1 -0
- package/dist/nodes/document_loaders/DocumentDefaultDataLoader/binary.svg +3 -0
- package/dist/nodes/document_loaders/DocumentGithubLoader/DocumentGithubLoader.node.js +2 -0
- package/dist/nodes/document_loaders/DocumentGithubLoader/DocumentGithubLoader.node.js.map +1 -1
- package/dist/nodes/document_loaders/DocumentJSONInputLoader/DocumentJsonInputLoader.node.js +18 -0
- package/dist/nodes/document_loaders/DocumentJSONInputLoader/DocumentJsonInputLoader.node.js.map +1 -1
- package/dist/nodes/embeddings/EmbeddingsAwsBedrock/EmbeddingsAwsBedrock.node.d.ts +5 -0
- package/dist/nodes/embeddings/EmbeddingsAwsBedrock/EmbeddingsAwsBedrock.node.js +122 -0
- package/dist/nodes/embeddings/EmbeddingsAwsBedrock/EmbeddingsAwsBedrock.node.js.map +1 -0
- package/dist/nodes/embeddings/EmbeddingsAwsBedrock/bedrock.svg +18 -0
- package/dist/nodes/embeddings/EmbeddingsCohere/EmbeddingsCohere.node.js +2 -0
- package/dist/nodes/embeddings/EmbeddingsCohere/EmbeddingsCohere.node.js.map +1 -1
- package/dist/nodes/embeddings/EmbeddingsGooglePalm/EmbeddingsGooglePalm.node.js +2 -0
- package/dist/nodes/embeddings/EmbeddingsGooglePalm/EmbeddingsGooglePalm.node.js.map +1 -1
- package/dist/nodes/embeddings/EmbeddingsHuggingFaceInference/EmbeddingsHuggingFaceInference.node.js +21 -0
- package/dist/nodes/embeddings/EmbeddingsHuggingFaceInference/EmbeddingsHuggingFaceInference.node.js.map +1 -1
- package/dist/nodes/embeddings/EmbeddingsOpenAI/EmbeddingsOpenAi.node.js +2 -0
- package/dist/nodes/embeddings/EmbeddingsOpenAI/EmbeddingsOpenAi.node.js.map +1 -1
- package/dist/nodes/embeddings/EmbeddingsTensorFlow/EmbeddingsTensorFlow.node.js +2 -0
- package/dist/nodes/embeddings/EmbeddingsTensorFlow/EmbeddingsTensorFlow.node.js.map +1 -1
- package/dist/nodes/llms/LMChatAnthropic/LmChatAnthropic.node.js +12 -2
- package/dist/nodes/llms/LMChatAnthropic/LmChatAnthropic.node.js.map +1 -1
- package/dist/nodes/llms/LMChatOllama/LmChatOllama.node.js +2 -0
- package/dist/nodes/llms/LMChatOllama/LmChatOllama.node.js.map +1 -1
- package/dist/nodes/llms/LMChatOpenAi/LmChatOpenAi.node.js +48 -2
- package/dist/nodes/llms/LMChatOpenAi/LmChatOpenAi.node.js.map +1 -1
- package/dist/nodes/llms/LMCohere/LmCohere.node.js +2 -0
- package/dist/nodes/llms/LMCohere/LmCohere.node.js.map +1 -1
- package/dist/nodes/llms/LMOllama/LmOllama.node.js +2 -0
- package/dist/nodes/llms/LMOllama/LmOllama.node.js.map +1 -1
- package/dist/nodes/llms/LMOpenAi/LmOpenAi.node.d.ts +11 -1
- package/dist/nodes/llms/LMOpenAi/LmOpenAi.node.js +61 -42
- package/dist/nodes/llms/LMOpenAi/LmOpenAi.node.js.map +1 -1
- package/dist/nodes/llms/LMOpenHuggingFaceInference/LmOpenHuggingFaceInference.node.js +9 -0
- package/dist/nodes/llms/LMOpenHuggingFaceInference/LmOpenHuggingFaceInference.node.js.map +1 -1
- package/dist/nodes/llms/LmChatAwsBedrock/LmChatAwsBedrock.node.d.ts +5 -0
- package/dist/nodes/llms/LmChatAwsBedrock/LmChatAwsBedrock.node.js +149 -0
- package/dist/nodes/llms/LmChatAwsBedrock/LmChatAwsBedrock.node.js.map +1 -0
- package/dist/nodes/llms/LmChatAwsBedrock/bedrock.svg +18 -0
- package/dist/nodes/llms/LmChatGooglePalm/LmChatGooglePalm.node.js +2 -0
- package/dist/nodes/llms/LmChatGooglePalm/LmChatGooglePalm.node.js.map +1 -1
- package/dist/nodes/llms/LmGooglePalm/LmGooglePalm.node.js +2 -0
- package/dist/nodes/llms/LmGooglePalm/LmGooglePalm.node.js.map +1 -1
- package/dist/nodes/memory/MemoryBufferWindow/MemoryBufferWindow.node.js +4 -2
- package/dist/nodes/memory/MemoryBufferWindow/MemoryBufferWindow.node.js.map +1 -1
- package/dist/nodes/memory/MemoryChatRetriever/MemoryChatRetriever.node.js +1 -1
- package/dist/nodes/memory/MemoryChatRetriever/MemoryChatRetriever.node.js.map +1 -1
- package/dist/nodes/memory/MemoryMotorhead/MemoryMotorhead.node.js +2 -0
- package/dist/nodes/memory/MemoryMotorhead/MemoryMotorhead.node.js.map +1 -1
- package/dist/nodes/memory/MemoryRedisChat/MemoryRedisChat.node.js +2 -0
- package/dist/nodes/memory/MemoryRedisChat/MemoryRedisChat.node.js.map +1 -1
- package/dist/nodes/memory/MemoryXata/MemoryXata.node.js +2 -0
- package/dist/nodes/memory/MemoryXata/MemoryXata.node.js.map +1 -1
- package/dist/nodes/memory/MemoryZep/MemoryZep.node.js +2 -0
- package/dist/nodes/memory/MemoryZep/MemoryZep.node.js.map +1 -1
- package/dist/nodes/output_parser/OutputParserAutofixing/OutputParserAutofixing.node.js +10 -1
- package/dist/nodes/output_parser/OutputParserAutofixing/OutputParserAutofixing.node.js.map +1 -1
- package/dist/nodes/output_parser/OutputParserItemList/ItemListOutputParser.js.map +1 -1
- package/dist/nodes/output_parser/OutputParserItemList/OutputParserItemList.node.js +2 -0
- package/dist/nodes/output_parser/OutputParserItemList/OutputParserItemList.node.js.map +1 -1
- package/dist/nodes/output_parser/OutputParserStructured/OutputParserStructured.node.js +45 -8
- package/dist/nodes/output_parser/OutputParserStructured/OutputParserStructured.node.js.map +1 -1
- package/dist/nodes/retrievers/RetrieverVectorStore/RetrieverVectorStore.node.js +2 -2
- package/dist/nodes/retrievers/RetrieverVectorStore/RetrieverVectorStore.node.js.map +1 -1
- package/dist/nodes/retrievers/RetrieverWorkflow/RetrieverWorkflow.node.js.map +1 -1
- package/dist/nodes/text_splitters/TextSplitterCharacterTextSplitter/TextSplitterCharacterTextSplitter.node.js +2 -0
- package/dist/nodes/text_splitters/TextSplitterCharacterTextSplitter/TextSplitterCharacterTextSplitter.node.js.map +1 -1
- package/dist/nodes/text_splitters/TextSplitterRecursiveCharacterTextSplitter/TextSplitterRecursiveCharacterTextSplitter.node.js +2 -0
- package/dist/nodes/text_splitters/TextSplitterRecursiveCharacterTextSplitter/TextSplitterRecursiveCharacterTextSplitter.node.js.map +1 -1
- package/dist/nodes/text_splitters/TextSplitterTokenSplitter/TextSplitterTokenSplitter.node.js +2 -0
- package/dist/nodes/text_splitters/TextSplitterTokenSplitter/TextSplitterTokenSplitter.node.js.map +1 -1
- package/dist/nodes/tools/ToolCalculator/ToolCalculator.node.js +3 -2
- package/dist/nodes/tools/ToolCalculator/ToolCalculator.node.js.map +1 -1
- package/dist/nodes/tools/ToolCode/ToolCode.node.js +5 -3
- package/dist/nodes/tools/ToolCode/ToolCode.node.js.map +1 -1
- package/dist/nodes/tools/ToolSerpApi/ToolSerpApi.node.js +3 -1
- package/dist/nodes/tools/ToolSerpApi/ToolSerpApi.node.js.map +1 -1
- package/dist/nodes/tools/ToolWikipedia/ToolWikipedia.node.js +2 -1
- package/dist/nodes/tools/ToolWikipedia/ToolWikipedia.node.js.map +1 -1
- package/dist/nodes/tools/ToolWolframAlpha/ToolWolframAlpha.node.js +2 -1
- package/dist/nodes/tools/ToolWolframAlpha/ToolWolframAlpha.node.js.map +1 -1
- package/dist/nodes/tools/ToolWorkflow/ToolWorkflow.node.js +9 -3
- package/dist/nodes/tools/ToolWorkflow/ToolWorkflow.node.js.map +1 -1
- package/dist/nodes/trigger/ManualChatTrigger/ManualChatTrigger.node.js +2 -2
- package/dist/nodes/trigger/ManualChatTrigger/ManualChatTrigger.node.js.map +1 -1
- package/dist/nodes/vector_store/VectorStoreInMemory/VectorStoreInMemory.node.d.ts +12 -5
- package/dist/nodes/vector_store/VectorStoreInMemory/VectorStoreInMemory.node.js +51 -62
- package/dist/nodes/vector_store/VectorStoreInMemory/VectorStoreInMemory.node.js.map +1 -1
- package/dist/nodes/vector_store/VectorStoreInMemoryInsert/VectorStoreInMemoryInsert.node.js +9 -8
- package/dist/nodes/vector_store/VectorStoreInMemoryInsert/VectorStoreInMemoryInsert.node.js.map +1 -1
- package/dist/nodes/vector_store/VectorStoreInMemoryLoad/VectorStoreInMemoryLoad.node.js +2 -1
- package/dist/nodes/vector_store/VectorStoreInMemoryLoad/VectorStoreInMemoryLoad.node.js.map +1 -1
- package/dist/nodes/vector_store/VectorStorePinecone/VectorStorePinecone.node.d.ts +12 -0
- package/dist/nodes/vector_store/VectorStorePinecone/VectorStorePinecone.node.js +122 -0
- package/dist/nodes/vector_store/VectorStorePinecone/VectorStorePinecone.node.js.map +1 -0
- package/dist/nodes/vector_store/VectorStorePinecone/pinecone.svg +1 -0
- package/dist/nodes/vector_store/VectorStorePineconeInsert/VectorStorePineconeInsert.node.d.ts +6 -0
- package/dist/nodes/vector_store/VectorStorePineconeInsert/VectorStorePineconeInsert.node.js +13 -12
- package/dist/nodes/vector_store/VectorStorePineconeInsert/VectorStorePineconeInsert.node.js.map +1 -1
- package/dist/nodes/vector_store/VectorStorePineconeLoad/VectorStorePineconeLoad.node.d.ts +6 -0
- package/dist/nodes/vector_store/VectorStorePineconeLoad/VectorStorePineconeLoad.node.js +27 -12
- package/dist/nodes/vector_store/VectorStorePineconeLoad/VectorStorePineconeLoad.node.js.map +1 -1
- package/dist/nodes/vector_store/VectorStoreSupabase/VectorStoreSupabase.node.d.ts +12 -0
- package/dist/nodes/vector_store/VectorStoreSupabase/VectorStoreSupabase.node.js +115 -0
- package/dist/nodes/vector_store/VectorStoreSupabase/VectorStoreSupabase.node.js.map +1 -0
- package/dist/nodes/vector_store/VectorStoreSupabase/supabase.svg +15 -0
- package/dist/nodes/vector_store/VectorStoreSupabaseInsert/VectorStoreSupabaseInsert.node.d.ts +6 -0
- package/dist/nodes/vector_store/VectorStoreSupabaseInsert/VectorStoreSupabaseInsert.node.js +7 -10
- package/dist/nodes/vector_store/VectorStoreSupabaseInsert/VectorStoreSupabaseInsert.node.js.map +1 -1
- package/dist/nodes/vector_store/VectorStoreSupabaseLoad/VectorStoreSupabaseLoad.node.d.ts +6 -0
- package/dist/nodes/vector_store/VectorStoreSupabaseLoad/VectorStoreSupabaseLoad.node.js +15 -25
- package/dist/nodes/vector_store/VectorStoreSupabaseLoad/VectorStoreSupabaseLoad.node.js.map +1 -1
- package/dist/nodes/vector_store/VectorStoreZep/VectorStoreZep.node.d.ts +12 -0
- package/dist/nodes/vector_store/VectorStoreZep/VectorStoreZep.node.js +112 -0
- package/dist/nodes/vector_store/VectorStoreZep/VectorStoreZep.node.js.map +1 -0
- package/dist/nodes/vector_store/VectorStoreZep/zep.png +0 -0
- package/dist/nodes/vector_store/VectorStoreZepInsert/VectorStoreZepInsert.node.js +4 -3
- package/dist/nodes/vector_store/VectorStoreZepInsert/VectorStoreZepInsert.node.js.map +1 -1
- package/dist/nodes/vector_store/VectorStoreZepLoad/VectorStoreZepLoad.node.js +5 -0
- package/dist/nodes/vector_store/VectorStoreZepLoad/VectorStoreZepLoad.node.js.map +1 -1
- package/dist/nodes/vector_store/shared/MemoryVectorStoreManager.js.map +1 -1
- package/dist/nodes/vector_store/shared/createVectorStoreNode.d.ts +39 -0
- package/dist/nodes/vector_store/shared/createVectorStoreNode.js +197 -0
- package/dist/nodes/vector_store/shared/createVectorStoreNode.js.map +1 -0
- package/dist/nodes/vector_store/shared/descriptions.d.ts +3 -0
- package/dist/nodes/vector_store/shared/descriptions.js +48 -0
- package/dist/nodes/vector_store/shared/descriptions.js.map +1 -0
- package/dist/nodes/vector_store/shared/methods/listSearch.d.ts +13 -0
- package/dist/nodes/vector_store/shared/methods/listSearch.js +41 -0
- package/dist/nodes/vector_store/shared/methods/listSearch.js.map +1 -0
- package/dist/nodes/vector_store/shared/processDocuments.d.ts +14 -1
- package/dist/nodes/vector_store/shared/processDocuments.js +22 -2
- package/dist/nodes/vector_store/shared/processDocuments.js.map +1 -1
- package/dist/types/credentials.json +1 -1
- package/dist/types/nodes.json +57 -49
- package/dist/utils/N8nBinaryLoader.d.ts +4 -2
- package/dist/utils/N8nBinaryLoader.js +82 -63
- package/dist/utils/N8nBinaryLoader.js.map +1 -1
- package/dist/utils/N8nJsonLoader.d.ts +4 -2
- package/dist/utils/N8nJsonLoader.js +50 -13
- package/dist/utils/N8nJsonLoader.js.map +1 -1
- package/dist/utils/helpers.d.ts +2 -0
- package/dist/utils/helpers.js +12 -0
- package/dist/utils/helpers.js.map +1 -0
- package/dist/utils/logWrapper.d.ts +1 -1
- package/dist/utils/logWrapper.js +57 -13
- package/dist/utils/logWrapper.js.map +1 -1
- package/dist/utils/sharedFields.d.ts +6 -0
- package/dist/utils/sharedFields.js +114 -0
- package/dist/utils/sharedFields.js.map +1 -0
- package/package.json +27 -7
- package/dist/tsconfig.tsbuildinfo +0 -1
package/dist/nodes/document_loaders/DocumentBinaryInputLoader/DocumentBinaryInputLoader.node.js
CHANGED
|
@@ -3,9 +3,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.DocumentBinaryInputLoader = void 0;
|
|
4
4
|
const logWrapper_1 = require("../../../utils/logWrapper");
|
|
5
5
|
const N8nBinaryLoader_1 = require("../../../utils/N8nBinaryLoader");
|
|
6
|
+
const sharedFields_1 = require("../../../utils/sharedFields");
|
|
7
|
+
require("mammoth");
|
|
8
|
+
require("@gxl/epub-parser");
|
|
9
|
+
require("pdf-parse");
|
|
6
10
|
class DocumentBinaryInputLoader {
|
|
7
11
|
constructor() {
|
|
8
12
|
this.description = {
|
|
13
|
+
hidden: true,
|
|
9
14
|
displayName: 'Binary Input Loader',
|
|
10
15
|
name: 'documentBinaryInputLoader',
|
|
11
16
|
icon: 'file:binary.svg',
|
|
@@ -39,6 +44,7 @@ class DocumentBinaryInputLoader {
|
|
|
39
44
|
outputs: ["ai_document"],
|
|
40
45
|
outputNames: ['Document'],
|
|
41
46
|
properties: [
|
|
47
|
+
(0, sharedFields_1.getConnectionHintNoticeField)(["ai_vectorStore"]),
|
|
42
48
|
{
|
|
43
49
|
displayName: 'Loader Type',
|
|
44
50
|
name: 'loader',
|
|
@@ -133,6 +139,21 @@ class DocumentBinaryInputLoader {
|
|
|
133
139
|
},
|
|
134
140
|
},
|
|
135
141
|
},
|
|
142
|
+
{
|
|
143
|
+
displayName: 'Options',
|
|
144
|
+
name: 'options',
|
|
145
|
+
type: 'collection',
|
|
146
|
+
placeholder: 'Add Option',
|
|
147
|
+
default: {},
|
|
148
|
+
options: [
|
|
149
|
+
{
|
|
150
|
+
...sharedFields_1.metadataFilterField,
|
|
151
|
+
displayName: 'Metadata',
|
|
152
|
+
description: 'Metadata to add to each document. Could be used for filtering during retrieval',
|
|
153
|
+
placeholder: 'Add property',
|
|
154
|
+
},
|
|
155
|
+
],
|
|
156
|
+
},
|
|
136
157
|
],
|
|
137
158
|
};
|
|
138
159
|
}
|
package/dist/nodes/document_loaders/DocumentBinaryInputLoader/DocumentBinaryInputLoader.node.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DocumentBinaryInputLoader.node.js","sourceRoot":"","sources":["../../../../nodes/document_loaders/DocumentBinaryInputLoader/DocumentBinaryInputLoader.node.ts"],"names":[],"mappings":";;;AASA,0DAAuD;AACvD,oEAAiE;
|
|
1
|
+
{"version":3,"file":"DocumentBinaryInputLoader.node.js","sourceRoot":"","sources":["../../../../nodes/document_loaders/DocumentBinaryInputLoader/DocumentBinaryInputLoader.node.ts"],"names":[],"mappings":";;;AASA,0DAAuD;AACvD,oEAAiE;AACjE,8DAAgG;AAKhG,mBAAiB;AACjB,4BAA0B;AAC1B,qBAAmB;AAEnB,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,CAAC,YAAY,CAAC;yBACtB;qBACD;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,GAAG,kCAAmB;4BACtB,WAAW,EAAE,UAAU;4BACvB,WAAW,EACV,gFAAgF;4BACjF,WAAW,EAAE,cAAc;yBAC3B;qBACD;iBACD;aACD;SACD,CAAC;IAUH,CAAC;IARA,KAAK,CAAC,UAAU;QACf,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,qCAAqC,CAAC,CAAC;QAC3D,MAAM,SAAS,GAAG,IAAI,iCAAe,CAAC,IAAI,CAAC,CAAC;QAE5C,OAAO;YACN,QAAQ,EAAE,IAAA,uBAAU,EAAC,SAAS,EAAE,IAAI,CAAC;SACrC,CAAC;IACH,CAAC;CACD;AArKD,8DAqKC"}
|
package/dist/nodes/document_loaders/DocumentDefaultDataLoader/DocumentDefaultDataLoader.node.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type IExecuteFunctions, type INodeType, type INodeTypeDescription, type SupplyData } from 'n8n-workflow';
|
|
2
|
+
import 'mammoth';
|
|
3
|
+
import '@gxl/epub-parser';
|
|
4
|
+
import 'pdf-parse';
|
|
5
|
+
export declare class DocumentDefaultDataLoader implements INodeType {
|
|
6
|
+
description: INodeTypeDescription;
|
|
7
|
+
supplyData(this: IExecuteFunctions, itemIndex: number): Promise<SupplyData>;
|
|
8
|
+
}
|
package/dist/nodes/document_loaders/DocumentDefaultDataLoader/DocumentDefaultDataLoader.node.js
ADDED
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DocumentDefaultDataLoader = void 0;
|
|
4
|
+
const logWrapper_1 = require("../../../utils/logWrapper");
|
|
5
|
+
const N8nBinaryLoader_1 = require("../../../utils/N8nBinaryLoader");
|
|
6
|
+
const sharedFields_1 = require("../../../utils/sharedFields");
|
|
7
|
+
require("mammoth");
|
|
8
|
+
require("@gxl/epub-parser");
|
|
9
|
+
require("pdf-parse");
|
|
10
|
+
const N8nJsonLoader_1 = require("../../../utils/N8nJsonLoader");
|
|
11
|
+
class DocumentDefaultDataLoader {
|
|
12
|
+
constructor() {
|
|
13
|
+
this.description = {
|
|
14
|
+
displayName: 'Default Data Loader',
|
|
15
|
+
name: 'documentDefaultDataLoader',
|
|
16
|
+
icon: 'file:binary.svg',
|
|
17
|
+
group: ['transform'],
|
|
18
|
+
version: 1,
|
|
19
|
+
description: 'Load data from previous step in the workflow',
|
|
20
|
+
defaults: {
|
|
21
|
+
name: 'Default Data Loader',
|
|
22
|
+
},
|
|
23
|
+
codex: {
|
|
24
|
+
categories: ['AI'],
|
|
25
|
+
subcategories: {
|
|
26
|
+
AI: ['Document Loaders'],
|
|
27
|
+
},
|
|
28
|
+
resources: {
|
|
29
|
+
primaryDocumentation: [
|
|
30
|
+
{
|
|
31
|
+
url: 'https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.documentdefaultdataloader/',
|
|
32
|
+
},
|
|
33
|
+
],
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
inputs: [
|
|
37
|
+
{
|
|
38
|
+
displayName: 'Text Splitter',
|
|
39
|
+
maxConnections: 1,
|
|
40
|
+
type: "ai_textSplitter",
|
|
41
|
+
required: true,
|
|
42
|
+
},
|
|
43
|
+
],
|
|
44
|
+
outputs: ["ai_document"],
|
|
45
|
+
outputNames: ['Document'],
|
|
46
|
+
properties: [
|
|
47
|
+
{
|
|
48
|
+
displayName: 'This will load data from a previous step in the workflow. <a href="/templates/1962" target="_blank">Example</a>',
|
|
49
|
+
name: 'notice',
|
|
50
|
+
type: 'notice',
|
|
51
|
+
default: '',
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
displayName: 'Type of Data',
|
|
55
|
+
name: 'dataType',
|
|
56
|
+
type: 'options',
|
|
57
|
+
default: 'json',
|
|
58
|
+
required: true,
|
|
59
|
+
noDataExpression: true,
|
|
60
|
+
options: [
|
|
61
|
+
{
|
|
62
|
+
name: 'JSON',
|
|
63
|
+
value: 'json',
|
|
64
|
+
description: 'Process JSON data from previous step in the workflow',
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
name: 'Binary',
|
|
68
|
+
value: 'binary',
|
|
69
|
+
description: 'Process binary data from previous step in the workflow',
|
|
70
|
+
},
|
|
71
|
+
],
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
displayName: 'Mode',
|
|
75
|
+
name: 'jsonMode',
|
|
76
|
+
type: 'options',
|
|
77
|
+
default: 'allInputData',
|
|
78
|
+
required: true,
|
|
79
|
+
displayOptions: {
|
|
80
|
+
show: {
|
|
81
|
+
dataType: ['json'],
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
options: [
|
|
85
|
+
{
|
|
86
|
+
name: 'Load All Input Data',
|
|
87
|
+
value: 'allInputData',
|
|
88
|
+
description: 'Use all JSON data that flows into the parent agent or chain',
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
name: 'Load Specific Data',
|
|
92
|
+
value: 'expressionData',
|
|
93
|
+
description: 'Load a subset of data, and/or data from any previous step in the workflow',
|
|
94
|
+
},
|
|
95
|
+
],
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
displayName: 'Data Format',
|
|
99
|
+
name: 'loader',
|
|
100
|
+
type: 'options',
|
|
101
|
+
default: 'auto',
|
|
102
|
+
required: true,
|
|
103
|
+
displayOptions: {
|
|
104
|
+
show: {
|
|
105
|
+
dataType: ['binary'],
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
options: [
|
|
109
|
+
{
|
|
110
|
+
name: 'Automatically Detect by Mime Type',
|
|
111
|
+
value: 'auto',
|
|
112
|
+
description: 'Uses the mime type to detect the format',
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
name: 'CSV',
|
|
116
|
+
value: 'csvLoader',
|
|
117
|
+
description: 'Load CSV files',
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
name: 'Docx',
|
|
121
|
+
value: 'docxLoader',
|
|
122
|
+
description: 'Load Docx documents',
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
name: 'EPub',
|
|
126
|
+
value: 'epubLoader',
|
|
127
|
+
description: 'Load EPub files',
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
name: 'JSON',
|
|
131
|
+
value: 'jsonLoader',
|
|
132
|
+
description: 'Load JSON files',
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
name: 'PDF',
|
|
136
|
+
value: 'pdfLoader',
|
|
137
|
+
description: 'Load PDF documents',
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
name: 'Text',
|
|
141
|
+
value: 'textLoader',
|
|
142
|
+
description: 'Load plain text files',
|
|
143
|
+
},
|
|
144
|
+
],
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
displayName: 'Data',
|
|
148
|
+
name: 'jsonData',
|
|
149
|
+
type: 'string',
|
|
150
|
+
typeOptions: {
|
|
151
|
+
rows: 6,
|
|
152
|
+
},
|
|
153
|
+
default: '',
|
|
154
|
+
required: true,
|
|
155
|
+
description: 'Drag and drop fields from the input pane, or use an expression',
|
|
156
|
+
displayOptions: {
|
|
157
|
+
show: {
|
|
158
|
+
dataType: ['json'],
|
|
159
|
+
jsonMode: ['expressionData'],
|
|
160
|
+
},
|
|
161
|
+
},
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
displayName: 'Input Data Field Name',
|
|
165
|
+
name: 'binaryDataKey',
|
|
166
|
+
type: 'string',
|
|
167
|
+
default: 'data',
|
|
168
|
+
required: true,
|
|
169
|
+
description: 'The name of the field in the agent or chain’s input that contains the binary file to be processed',
|
|
170
|
+
displayOptions: {
|
|
171
|
+
show: {
|
|
172
|
+
dataType: ['binary'],
|
|
173
|
+
},
|
|
174
|
+
},
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
displayName: 'Options',
|
|
178
|
+
name: 'options',
|
|
179
|
+
type: 'collection',
|
|
180
|
+
placeholder: 'Add Option',
|
|
181
|
+
default: {},
|
|
182
|
+
options: [
|
|
183
|
+
{
|
|
184
|
+
displayName: 'JSON Pointers',
|
|
185
|
+
name: 'pointers',
|
|
186
|
+
type: 'string',
|
|
187
|
+
default: '',
|
|
188
|
+
description: 'Pointers to extract from JSON, e.g. "/text" or "/text, /meta/title"',
|
|
189
|
+
displayOptions: {
|
|
190
|
+
show: {
|
|
191
|
+
'/loader': ['jsonLoader', 'auto'],
|
|
192
|
+
},
|
|
193
|
+
},
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
displayName: 'CSV Separator',
|
|
197
|
+
name: 'separator',
|
|
198
|
+
type: 'string',
|
|
199
|
+
description: 'Separator to use for CSV',
|
|
200
|
+
default: ',',
|
|
201
|
+
displayOptions: {
|
|
202
|
+
show: {
|
|
203
|
+
'/loader': ['csvLoader', 'auto'],
|
|
204
|
+
},
|
|
205
|
+
},
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
displayName: 'CSV Column',
|
|
209
|
+
name: 'column',
|
|
210
|
+
type: 'string',
|
|
211
|
+
default: '',
|
|
212
|
+
description: 'Column to extract from CSV',
|
|
213
|
+
displayOptions: {
|
|
214
|
+
show: {
|
|
215
|
+
'/loader': ['csvLoader', 'auto'],
|
|
216
|
+
},
|
|
217
|
+
},
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
displayName: 'Split Pages in PDF',
|
|
221
|
+
description: 'Whether to split PDF pages into separate documents',
|
|
222
|
+
name: 'splitPages',
|
|
223
|
+
type: 'boolean',
|
|
224
|
+
default: true,
|
|
225
|
+
displayOptions: {
|
|
226
|
+
show: {
|
|
227
|
+
'/loader': ['pdfLoader', 'auto'],
|
|
228
|
+
},
|
|
229
|
+
},
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
...sharedFields_1.metadataFilterField,
|
|
233
|
+
displayName: 'Metadata',
|
|
234
|
+
description: 'Metadata to add to each document. Could be used for filtering during retrieval',
|
|
235
|
+
placeholder: 'Add property',
|
|
236
|
+
},
|
|
237
|
+
],
|
|
238
|
+
},
|
|
239
|
+
],
|
|
240
|
+
};
|
|
241
|
+
}
|
|
242
|
+
async supplyData(itemIndex) {
|
|
243
|
+
const dataType = this.getNodeParameter('dataType', itemIndex, 'json');
|
|
244
|
+
const processor = dataType === 'binary'
|
|
245
|
+
? new N8nBinaryLoader_1.N8nBinaryLoader(this, 'options.')
|
|
246
|
+
: new N8nJsonLoader_1.N8nJsonLoader(this, 'options.');
|
|
247
|
+
return {
|
|
248
|
+
response: (0, logWrapper_1.logWrapper)(processor, this),
|
|
249
|
+
};
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
exports.DocumentDefaultDataLoader = DocumentDefaultDataLoader;
|
|
253
|
+
//# sourceMappingURL=DocumentDefaultDataLoader.node.js.map
|
package/dist/nodes/document_loaders/DocumentDefaultDataLoader/DocumentDefaultDataLoader.node.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DocumentDefaultDataLoader.node.js","sourceRoot":"","sources":["../../../../nodes/document_loaders/DocumentDefaultDataLoader/DocumentDefaultDataLoader.node.ts"],"names":[],"mappings":";;;AASA,0DAAuD;AACvD,oEAAiE;AACjE,8DAAkE;AAKlE,mBAAiB;AACjB,4BAA0B;AAC1B,qBAAmB;AACnB,gEAA6D;AAE7D,MAAa,yBAAyB;IAAtC;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,qBAAqB;YAClC,IAAI,EAAE,2BAA2B;YACjC,IAAI,EAAE,iBAAiB;YACvB,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC;YACV,WAAW,EAAE,8CAA8C;YAC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WAAW,EAAE,MAAM,CAAC;iCAChC;6BACD;yBACD;wBACD;4BACC,WAAW,EAAE,oBAAoB;4BACjC,WAAW,EAAE,oDAAoD;4BACjE,IAAI,EAAE,YAAY;4BAClB,IAAI,EAAE,SAAS;4BACf,OAAO,EAAE,IAAI;4BACb,cAAc,EAAE;gCACf,IAAI,EAAE;oCACL,SAAS,EAAE,CAAC,WAAW,EAAE,MAAM,CAAC;iCAChC;6BACD;yBACD;wBACD;4BACC,GAAG,kCAAmB;4BACtB,WAAW,EAAE,UAAU;4BACvB,WAAW,EACV,gFAAgF;4BACjF,WAAW,EAAE,cAAc;yBAC3B;qBACD;iBACD;aACD;SACD,CAAC;IAcH,CAAC;IAZA,KAAK,CAAC,UAAU,CAA0B,SAAiB;QAC1D,MAAM,QAAQ,GAAG,IAAI,CAAC,gBAAgB,CAAC,UAAU,EAAE,SAAS,EAAE,MAAM,CAAsB,CAAC;QAE3F,MAAM,SAAS,GACd,QAAQ,KAAK,QAAQ;YACpB,CAAC,CAAC,IAAI,iCAAe,CAAC,IAAI,EAAE,UAAU,CAAC;YACvC,CAAC,CAAC,IAAI,6BAAa,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;QAExC,OAAO;YACN,QAAQ,EAAE,IAAA,uBAAU,EAAC,SAAS,EAAE,IAAI,CAAC;SACrC,CAAC;IACH,CAAC;CACD;AAxPD,8DAwPC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg height="1024" width="768" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M0 960V64h576l192 192v704H0zM704 320L512 128H64v768h640V320zM320 512H128V256h192V512zM256 320h-64v128h64V320zM256 768h64v64H128v-64h64V640h-64v-64h128V768zM512 448h64v64H384v-64h64V320h-64v-64h128V448zM576 832H384V576h192V832zM512 640h-64v128h64V640z" fill="#7D7D87" />
|
|
3
|
+
</svg>
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.DocumentGithubLoader = void 0;
|
|
4
4
|
const github_1 = require("langchain/document_loaders/web/github");
|
|
5
5
|
const logWrapper_1 = require("../../../utils/logWrapper");
|
|
6
|
+
const sharedFields_1 = require("../../../utils/sharedFields");
|
|
6
7
|
class DocumentGithubLoader {
|
|
7
8
|
constructor() {
|
|
8
9
|
this.description = {
|
|
@@ -45,6 +46,7 @@ class DocumentGithubLoader {
|
|
|
45
46
|
outputs: ["ai_document"],
|
|
46
47
|
outputNames: ['Document'],
|
|
47
48
|
properties: [
|
|
49
|
+
(0, sharedFields_1.getConnectionHintNoticeField)(["ai_vectorStore"]),
|
|
48
50
|
{
|
|
49
51
|
displayName: 'Repository Link',
|
|
50
52
|
name: 'repository',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DocumentGithubLoader.node.js","sourceRoot":"","sources":["../../../../nodes/document_loaders/DocumentGithubLoader/DocumentGithubLoader.node.ts"],"names":[],"mappings":";;;AAQA,kEAAyE;AAEzE,0DAAuD;
|
|
1
|
+
{"version":3,"file":"DocumentGithubLoader.node.js","sourceRoot":"","sources":["../../../../nodes/document_loaders/DocumentGithubLoader/DocumentGithubLoader.node.ts"],"names":[],"mappings":";;;AAQA,kEAAyE;AAEzE,0DAAuD;AACvD,8DAA2E;AAE3E,MAAa,oBAAoB;IAAjC;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,wBAAwB;YACrC,IAAI,EAAE,sBAAsB;YAC5B,IAAI,EAAE,iBAAiB;YACvB,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC;YACV,WAAW,EAAE,wCAAwC;YACrD,QAAQ,EAAE;gBACT,IAAI,EAAE,wBAAwB;aAC9B;YACD,KAAK,EAAE;gBACN,UAAU,EAAE,CAAC,IAAI,CAAC;gBAClB,aAAa,EAAE;oBACd,EAAE,EAAE,CAAC,kBAAkB,CAAC;iBACxB;gBACD,SAAS,EAAE;oBACV,oBAAoB,EAAE;wBACrB;4BACC,GAA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,CAAC;QAC5E,MAAM,MAAM,GAAG,IAAI,CAAC,gBAAgB,CAAC,QAAQ,EAAE,SAAS,CAAW,CAAC;QACpE,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;QAC3D,MAAM,EAAE,WAAW,EAAE,SAAS,EAAE,GAAG,IAAI,CAAC,gBAAgB,CAAC,mBAAmB,EAAE,CAAC,CAG9E,CAAC;QAEF,MAAM,YAAY,GAAG,CAAC,MAAM,IAAI,CAAC,sBAAsB,oBAEtD,CAAC,CACD,CAAsC,CAAC;QAExC,MAAM,IAAI,GAAG,IAAI,yBAAgB,CAAC,UAAU,EAAE;YAC7C,MAAM;YACN,WAAW,EAAE,CAAC,WAAW,aAAX,WAAW,cAAX,WAAW,GAAI,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;YAChE,SAAS;YACT,WAAW,EAAG,WAAW,CAAC,WAAsB,IAAI,EAAE;SACtD,CAAC,CAAC;QAEH,MAAM,UAAU,GAAG,YAAY,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,CAAC;QAE5F,OAAO;YACN,QAAQ,EAAE,IAAA,uBAAU,EAAC,UAAU,EAAE,IAAI,CAAC;SACtC,CAAC;IACH,CAAC;CACD;AA/GD,oDA+GC"}
|
|
@@ -3,9 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.DocumentJsonInputLoader = void 0;
|
|
4
4
|
const logWrapper_1 = require("../../../utils/logWrapper");
|
|
5
5
|
const N8nJsonLoader_1 = require("../../../utils/N8nJsonLoader");
|
|
6
|
+
const sharedFields_1 = require("../../../utils/sharedFields");
|
|
6
7
|
class DocumentJsonInputLoader {
|
|
7
8
|
constructor() {
|
|
8
9
|
this.description = {
|
|
10
|
+
hidden: true,
|
|
9
11
|
displayName: 'JSON Input Loader',
|
|
10
12
|
name: 'documentJsonInputLoader',
|
|
11
13
|
icon: 'file:json.svg',
|
|
@@ -39,6 +41,7 @@ class DocumentJsonInputLoader {
|
|
|
39
41
|
outputs: ["ai_document"],
|
|
40
42
|
outputNames: ['Document'],
|
|
41
43
|
properties: [
|
|
44
|
+
(0, sharedFields_1.getConnectionHintNoticeField)(["ai_vectorStore"]),
|
|
42
45
|
{
|
|
43
46
|
displayName: 'Pointers',
|
|
44
47
|
name: 'pointers',
|
|
@@ -46,6 +49,21 @@ class DocumentJsonInputLoader {
|
|
|
46
49
|
default: '',
|
|
47
50
|
description: 'Pointers to extract from JSON, e.g. "/text" or "/text, /meta/title"',
|
|
48
51
|
},
|
|
52
|
+
{
|
|
53
|
+
displayName: 'Options',
|
|
54
|
+
name: 'options',
|
|
55
|
+
type: 'collection',
|
|
56
|
+
placeholder: 'Add Option',
|
|
57
|
+
default: {},
|
|
58
|
+
options: [
|
|
59
|
+
{
|
|
60
|
+
...sharedFields_1.metadataFilterField,
|
|
61
|
+
displayName: 'Metadata',
|
|
62
|
+
description: 'Metadata to add to each document. Could be used for filtering during retrieval',
|
|
63
|
+
placeholder: 'Add property',
|
|
64
|
+
},
|
|
65
|
+
],
|
|
66
|
+
},
|
|
49
67
|
],
|
|
50
68
|
};
|
|
51
69
|
}
|
package/dist/nodes/document_loaders/DocumentJSONInputLoader/DocumentJsonInputLoader.node.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DocumentJsonInputLoader.node.js","sourceRoot":"","sources":["../../../../nodes/document_loaders/DocumentJSONInputLoader/DocumentJsonInputLoader.node.ts"],"names":[],"mappings":";;;AASA,0DAAuD;AACvD,gEAA6D;
|
|
1
|
+
{"version":3,"file":"DocumentJsonInputLoader.node.js","sourceRoot":"","sources":["../../../../nodes/document_loaders/DocumentJSONInputLoader/DocumentJsonInputLoader.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qBACD;iBACD;aACD;SACD,CAAC;IAUH,CAAC;IARA,KAAK,CAAC,UAAU;QACf,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,mCAAmC,CAAC,CAAC;QACzD,MAAM,SAAS,GAAG,IAAI,6BAAa,CAAC,IAAI,CAAC,CAAC;QAE1C,OAAO;YACN,QAAQ,EAAE,IAAA,uBAAU,EAAC,SAAS,EAAE,IAAI,CAAC;SACrC,CAAC;IACH,CAAC;CACD;AA3ED,0DA2EC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type IExecuteFunctions, type INodeType, type INodeTypeDescription, type SupplyData } from 'n8n-workflow';
|
|
2
|
+
export declare class EmbeddingsAwsBedrock implements INodeType {
|
|
3
|
+
description: INodeTypeDescription;
|
|
4
|
+
supplyData(this: IExecuteFunctions, itemIndex: number): Promise<SupplyData>;
|
|
5
|
+
}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EmbeddingsAwsBedrock = void 0;
|
|
4
|
+
const bedrock_1 = require("langchain/embeddings/bedrock");
|
|
5
|
+
const logWrapper_1 = require("../../../utils/logWrapper");
|
|
6
|
+
const sharedFields_1 = require("../../../utils/sharedFields");
|
|
7
|
+
class EmbeddingsAwsBedrock {
|
|
8
|
+
constructor() {
|
|
9
|
+
this.description = {
|
|
10
|
+
displayName: 'Embeddings AWS Bedrock',
|
|
11
|
+
name: 'embeddingsAwsBedrock',
|
|
12
|
+
icon: 'file:bedrock.svg',
|
|
13
|
+
credentials: [
|
|
14
|
+
{
|
|
15
|
+
name: 'aws',
|
|
16
|
+
required: true,
|
|
17
|
+
},
|
|
18
|
+
],
|
|
19
|
+
group: ['transform'],
|
|
20
|
+
version: 1,
|
|
21
|
+
description: 'Use Embeddings AWS Bedrock',
|
|
22
|
+
defaults: {
|
|
23
|
+
name: 'Embeddings AWS Bedrock',
|
|
24
|
+
},
|
|
25
|
+
codex: {
|
|
26
|
+
categories: ['AI'],
|
|
27
|
+
subcategories: {
|
|
28
|
+
AI: ['Embeddings'],
|
|
29
|
+
},
|
|
30
|
+
resources: {
|
|
31
|
+
primaryDocumentation: [
|
|
32
|
+
{
|
|
33
|
+
url: 'https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.embeddingsawsbedrock/',
|
|
34
|
+
},
|
|
35
|
+
],
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
inputs: [],
|
|
39
|
+
outputs: ["ai_embedding"],
|
|
40
|
+
outputNames: ['Embeddings'],
|
|
41
|
+
requestDefaults: {
|
|
42
|
+
ignoreHttpStatusErrors: true,
|
|
43
|
+
baseURL: '=https://bedrock.{{$credentials?.region ?? "eu-central-1"}}.amazonaws.com',
|
|
44
|
+
},
|
|
45
|
+
properties: [
|
|
46
|
+
(0, sharedFields_1.getConnectionHintNoticeField)(["ai_vectorStore"]),
|
|
47
|
+
{
|
|
48
|
+
displayName: 'Model',
|
|
49
|
+
name: 'model',
|
|
50
|
+
type: 'options',
|
|
51
|
+
description: 'The model which will generate the completion. <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/foundation-models.html">Learn more</a>.',
|
|
52
|
+
typeOptions: {
|
|
53
|
+
loadOptions: {
|
|
54
|
+
routing: {
|
|
55
|
+
request: {
|
|
56
|
+
method: 'GET',
|
|
57
|
+
url: '/foundation-models',
|
|
58
|
+
},
|
|
59
|
+
output: {
|
|
60
|
+
postReceive: [
|
|
61
|
+
{
|
|
62
|
+
type: 'rootProperty',
|
|
63
|
+
properties: {
|
|
64
|
+
property: 'modelSummaries',
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
type: 'filter',
|
|
69
|
+
properties: {
|
|
70
|
+
pass: "={{ !'anthropic.claude-instant-v1-100k,anthropic.claude-v2,amazon.titan-text-express-v1'.match($responseItem.modelId) }}",
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
type: 'setKeyValue',
|
|
75
|
+
properties: {
|
|
76
|
+
name: '={{$responseItem.modelName}}',
|
|
77
|
+
description: '={{$responseItem.modelArn}}',
|
|
78
|
+
value: '={{$responseItem.modelId}}',
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
type: 'sort',
|
|
83
|
+
properties: {
|
|
84
|
+
key: 'name',
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
],
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
routing: {
|
|
93
|
+
send: {
|
|
94
|
+
type: 'body',
|
|
95
|
+
property: 'model',
|
|
96
|
+
},
|
|
97
|
+
},
|
|
98
|
+
default: '',
|
|
99
|
+
},
|
|
100
|
+
],
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
async supplyData(itemIndex) {
|
|
104
|
+
const credentials = await this.getCredentials('aws');
|
|
105
|
+
const modelName = this.getNodeParameter('model', itemIndex);
|
|
106
|
+
const embeddings = new bedrock_1.BedrockEmbeddings({
|
|
107
|
+
region: credentials.region,
|
|
108
|
+
model: modelName,
|
|
109
|
+
maxRetries: 3,
|
|
110
|
+
credentials: {
|
|
111
|
+
secretAccessKey: credentials.secretAccessKey,
|
|
112
|
+
accessKeyId: credentials.accessKeyId,
|
|
113
|
+
sessionToken: credentials.sessionToken,
|
|
114
|
+
},
|
|
115
|
+
});
|
|
116
|
+
return {
|
|
117
|
+
response: (0, logWrapper_1.logWrapper)(embeddings, this),
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
exports.EmbeddingsAwsBedrock = EmbeddingsAwsBedrock;
|
|
122
|
+
//# sourceMappingURL=EmbeddingsAwsBedrock.node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EmbeddingsAwsBedrock.node.js","sourceRoot":"","sources":["../../../../nodes/embeddings/EmbeddingsAwsBedr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24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
3
|
+
<title>Icon-Architecture/16/Arch_Amazon-Bedrock_16</title>
|
|
4
|
+
<defs>
|
|
5
|
+
<linearGradient x1="0%" y1="100%" x2="100%" y2="0%" id="linearGradient-1">
|
|
6
|
+
<stop stop-color="#055F4E" offset="0%"></stop>
|
|
7
|
+
<stop stop-color="#56C0A7" offset="100%"></stop>
|
|
8
|
+
</linearGradient>
|
|
9
|
+
</defs>
|
|
10
|
+
<g id="Icon-Architecture/16/Arch_Amazon-Bedrock_16" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
11
|
+
<g id="Icon-Architecture-BG/16/Machine-Learning" fill="url(#linearGradient-1)">
|
|
12
|
+
<rect id="Rectangle" x="0" y="0" width="24" height="24"></rect>
|
|
13
|
+
</g>
|
|
14
|
+
<g id="Icon-Service/16/Amazon-Bedrock_16" transform="translate(4.000000, 4.000000)" fill="#FFFFFF">
|
|
15
|
+
<path d="M8,14.1397014 L5.574,14.9487014 L4.628,14.3177014 L5.658,13.9737014 L5.342,13.0257014 L3.574,13.6147014 L3,13.2327014 L3,10.4997014 C3,10.3107014 2.893,10.1377014 2.724,10.0527014 L1,9.19070136 L1,6.80870136 L2.5,6.05870136 L4,6.80870136 L4,8.49970136 C4,8.68970136 4.107,8.86270136 4.276,8.94770136 L6.276,9.94770136 L6.724,9.05270136 L5,8.19070136 L5,6.80870136 L6.724,5.94770136 C6.893,5.86270136 7,5.68970136 7,5.49970136 L7,3.99970136 L6,3.99970136 L6,5.19070136 L4.5,5.94070136 L3,5.19070136 L3,2.76770136 L4,2.10070136 L4,3.99970136 L5,3.99970136 L5,1.43470136 L5.574,1.05170136 L8,1.86070136 L8,14.1397014 Z M13.5,12.9997014 C13.775,12.9997014 14,13.2237014 14,13.4997014 C14,13.7757014 13.775,13.9997014 13.5,13.9997014 C13.225,13.9997014 13,13.7757014 13,13.4997014 C13,13.2237014 13.225,12.9997014 13.5,12.9997014 L13.5,12.9997014 Z M12.5,1.99970136 C12.775,1.99970136 13,2.22370136 13,2.49970136 C13,2.77570136 12.775,2.99970136 12.5,2.99970136 C12.225,2.99970136 12,2.77570136 12,2.49970136 C12,2.22370136 12.225,1.99970136 12.5,1.99970136 L12.5,1.99970136 Z M14.5,7.99970136 C14.775,7.99970136 15,8.22370136 15,8.49970136 C15,8.77570136 14.775,8.99970136 14.5,8.99970136 C14.225,8.99970136 14,8.77570136 14,8.49970136 C14,8.22370136 14.225,7.99970136 14.5,7.99970136 L14.5,7.99970136 Z M13.092,8.99970136 C13.299,9.58070136 13.849,9.99970136 14.5,9.99970136 C15.327,9.99970136 16,9.32770136 16,8.49970136 C16,7.67270136 15.327,6.99970136 14.5,6.99970136 C13.849,6.99970136 13.299,7.41970136 13.092,7.99970136 L9,7.99970136 L9,5.99970136 L12.5,5.99970136 C12.776,5.99970136 13,5.77670136 13,5.49970136 L13,3.90770136 C13.581,3.70070136 14,3.15070136 14,2.49970136 C14,1.67270136 13.327,0.999701362 12.5,0.999701362 C11.673,0.999701362 11,1.67270136 11,2.49970136 C11,3.15070136 11.419,3.70070136 12,3.90770136 L12,4.99970136 L9,4.99970136 L9,1.49970136 C9,1.28470136 8.862,1.09370136 8.658,1.02570136 L5.658,0.0257013622 C5.511,-0.0232986378 5.351,-0.00129863776 5.223,0.0837013622 L2.223,2.08370136 C2.084,2.17670136 2,2.33270136 2,2.49970136 L2,5.19070136 L0.276,6.05270136 C0.107,6.13770136 0,6.31070136 0,6.49970136 L0,9.49970136 C0,9.68970136 0.107,9.86270136 0.276,9.94770136 L2,10.8087014 L2,13.4997014 C2,13.6667014 2.084,13.8237014 2.223,13.9157014 L5.223,15.9157014 C5.306,15.9717014 5.402,15.9997014 5.5,15.9997014 C5.553,15.9997014 5.606,15.9917014 5.658,15.9737014 L8.658,14.9737014 C8.862,14.9067014 9,14.7157014 9,14.4997014 L9,11.9997014 L11.293,11.9997014 L12.146,12.8537014 L12.159,12.8407014 C12.061,13.0407014 12,13.2627014 12,13.4997014 C12,14.3267014 12.673,14.9997014 13.5,14.9997014 C14.327,14.9997014 15,14.3267014 15,13.4997014 C15,12.6727014 14.327,11.9997014 13.5,11.9997014 C13.262,11.9997014 13.04,12.0607014 12.841,12.1597014 L12.854,12.1467014 L11.854,11.1467014 C11.76,11.0527014 11.633,10.9997014 11.5,10.9997014 L9,10.9997014 L9,8.99970136 L13.092,8.99970136 Z" id="Fill-7"></path>
|
|
16
|
+
</g>
|
|
17
|
+
</g>
|
|
18
|
+
</svg>
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.EmbeddingsCohere = void 0;
|
|
4
4
|
const cohere_1 = require("langchain/embeddings/cohere");
|
|
5
5
|
const logWrapper_1 = require("../../../utils/logWrapper");
|
|
6
|
+
const sharedFields_1 = require("../../../utils/sharedFields");
|
|
6
7
|
class EmbeddingsCohere {
|
|
7
8
|
constructor() {
|
|
8
9
|
this.description = {
|
|
@@ -42,6 +43,7 @@ class EmbeddingsCohere {
|
|
|
42
43
|
outputs: ["ai_embedding"],
|
|
43
44
|
outputNames: ['Embeddings'],
|
|
44
45
|
properties: [
|
|
46
|
+
(0, sharedFields_1.getConnectionHintNoticeField)(["ai_vectorStore"]),
|
|
45
47
|
{
|
|
46
48
|
displayName: 'Each model is using different dimensional density for embeddings. Please make sure to use the same dimensionality for your vector store. The default model is using 768-dimensional embeddings.',
|
|
47
49
|
name: 'notice',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmbeddingsCohere.node.js","sourceRoot":"","sources":["../../../../nodes/embeddings/EmbeddingsCohere/EmbeddingsCohere.node.ts"],"names":[],"mappings":";;;AAQA,wDAA+D;AAC/D,0DAAuD;
|
|
1
|
+
{"version":3,"file":"EmbeddingsCohere.node.js","sourceRoot":"","sources":["../../../../nodes/embeddings/EmbeddingsCohere/EmbeddingsCohere.node.ts"],"names":[],"mappings":";;;A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BACjC;wBACD;4BACC,IAAI,EAAE,yCAAyC;4BAC/C,KAAK,EAAE,yBAAyB;yBAChC;qBACD;iBACD;aACD;SACD,CAAC;IAeH,CAAC;IAbA,KAAK,CAAC,UAAU,CAA0B,SAAiB;QAC1D,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,mCAAmC,CAAC,CAAC;QACzD,MAAM,SAAS,GAAG,IAAI,CAAC,gBAAgB,CAAC,WAAW,EAAE,SAAS,EAAE,oBAAoB,CAAW,CAAC;QAChG,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;QAC3D,MAAM,UAAU,GAAG,IAAI,yBAAgB,CAAC;YACvC,MAAM,EAAE,WAAW,CAAC,MAAgB;YACpC,SAAS;SACT,CAAC,CAAC;QAEH,OAAO;YACN,QAAQ,EAAE,IAAA,uBAAU,EAAC,UAAU,EAAE,IAAI,CAAC;SACtC,CAAC;IACH,CAAC;CACD;AAtFD,4CAsFC"}
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.EmbeddingsGooglePalm = void 0;
|
|
4
4
|
const googlepalm_1 = require("langchain/embeddings/googlepalm");
|
|
5
5
|
const logWrapper_1 = require("../../../utils/logWrapper");
|
|
6
|
+
const sharedFields_1 = require("../../../utils/sharedFields");
|
|
6
7
|
class EmbeddingsGooglePalm {
|
|
7
8
|
constructor() {
|
|
8
9
|
this.description = {
|
|
@@ -42,6 +43,7 @@ class EmbeddingsGooglePalm {
|
|
|
42
43
|
outputs: ["ai_embedding"],
|
|
43
44
|
outputNames: ['Embeddings'],
|
|
44
45
|
properties: [
|
|
46
|
+
(0, sharedFields_1.getConnectionHintNoticeField)(["ai_vectorStore"]),
|
|
45
47
|
{
|
|
46
48
|
displayName: 'Each model is using different dimensional density for embeddings. Please make sure to use the same dimensionality for your vector store. The default model is using 768-dimensional embeddings.',
|
|
47
49
|
name: 'notice',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmbeddingsGooglePalm.node.js","sourceRoot":"","sources":["../../../../nodes/embeddings/EmbeddingsGooglePalm/EmbeddingsGooglePalm.node.ts"],"names":[],"mappings":";;;AAQA,gEAAuE;AACvE,0DAAuD;
|
|
1
|
+
{"version":3,"file":"EmbeddingsGooglePalm.node.js","sourceRoot":"","sources":["../../../../nodes/embeddings/EmbeddingsGooglePalm/EmbeddingsGooglePalm.node.ts"],"names":[],"mappings":";;;AAQA,gEAAuE;AACvE,0DAAuD;AACvD,8DAA2E;AAE3E,MAAa,oBAAoB;IAAjC;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,wBAAwB;YACrC,IAAI,EAAE,sBAAsB;YAC5B,IAAI,EAAE,iBAAiB;YACvB,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC;YACV,WAAW,EAAE,4BAA4B;YACzC,QAAQ,EAAE;gBACT,IAAI,EAAE,wBAAwB;aAC9B;YACD,eAAe,EAAE;gBAChB,sBAAsB,EAAE,IAAI;gBAC5B,OAAO,EAAE,0BAA0B;aACnC;YACD,WAAW,EAAE;gBACZ;oBACC,IAAI,EAAE,eAAe;oBACrB,QAAQ,EAAE,IAAI;iBACd;aACD;YACD,KAAK,EAAE;gBACN,UAAU,EAAE,CAAC,IAAI,CAAC;gBAClB,aAAa,EAAE;oBACd,EAAE,EAAE,CAAC,YAAY,CAAC;iBAClB;gBACD,SAAS,EAAE;oBACV,oBAAoB,EAAE;wBACrB;4BACC,GAAG,EAAE,4GAA4G;yBACjH;qBACD;iBACD;aACD;YAED,MAAM,EAAE,EAAE;YAEV,OAAO,EAAE,gBAAgC;YACzC,WAAW,EAAE,CAAC,YAAY,CAAC;YAC3B,UAAU,EAAE;gBACX,IAAA,2CAA4B,EAAC,kBAAkC,CAAC;gBAChE;oBACC,WAAW,EACV,iMAAiM;oBAClM,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,QAAQ;oBACd,OAAO,EAA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