@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
|
@@ -11,6 +11,7 @@ class VectorStoreInMemoryInsert {
|
|
|
11
11
|
icon: 'fa:database',
|
|
12
12
|
group: ['transform'],
|
|
13
13
|
version: 1,
|
|
14
|
+
hidden: true,
|
|
14
15
|
description: 'Insert data into an in-memory vector store',
|
|
15
16
|
defaults: {
|
|
16
17
|
name: 'In Memory Vector Store Insert',
|
|
@@ -23,7 +24,7 @@ class VectorStoreInMemoryInsert {
|
|
|
23
24
|
resources: {
|
|
24
25
|
primaryDocumentation: [
|
|
25
26
|
{
|
|
26
|
-
url: 'https://docs.n8n.io/integrations/builtin/cluster-nodes/
|
|
27
|
+
url: 'https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.vectorstoreinmemoryinsert/',
|
|
27
28
|
},
|
|
28
29
|
],
|
|
29
30
|
},
|
|
@@ -51,13 +52,6 @@ class VectorStoreInMemoryInsert {
|
|
|
51
52
|
type: 'notice',
|
|
52
53
|
default: '',
|
|
53
54
|
},
|
|
54
|
-
{
|
|
55
|
-
displayName: 'Memory Key',
|
|
56
|
-
name: 'memoryKey',
|
|
57
|
-
type: 'string',
|
|
58
|
-
default: 'vector_store_key',
|
|
59
|
-
description: 'The key to use to store the vector memory in the workflow data. The key will be prefixed with the workflow ID to avoid collisions.',
|
|
60
|
-
},
|
|
61
55
|
{
|
|
62
56
|
displayName: 'Clear Store',
|
|
63
57
|
name: 'clearStore',
|
|
@@ -65,6 +59,13 @@ class VectorStoreInMemoryInsert {
|
|
|
65
59
|
default: false,
|
|
66
60
|
description: 'Whether to clear the store before inserting new data',
|
|
67
61
|
},
|
|
62
|
+
{
|
|
63
|
+
displayName: 'Memory Key',
|
|
64
|
+
name: 'memoryKey',
|
|
65
|
+
type: 'string',
|
|
66
|
+
default: 'vector_store_key',
|
|
67
|
+
description: 'The key to use to store the vector memory in the workflow data. The key will be prefixed with the workflow ID to avoid collisions.',
|
|
68
|
+
},
|
|
68
69
|
],
|
|
69
70
|
};
|
|
70
71
|
}
|
package/dist/nodes/vector_store/VectorStoreInMemoryInsert/VectorStoreInMemoryInsert.node.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VectorStoreInMemoryInsert.node.js","sourceRoot":"","sources":["../../../../nodes/vector_store/VectorStoreInMemoryInsert/VectorStoreInMemoryInsert.node.ts"],"names":[],"mappings":";;;AAWA,iEAA8D;AAC9D,iFAA8E;
|
|
1
|
+
{"version":3,"file":"VectorStoreInMemoryInsert.node.js","sourceRoot":"","sources":["../../../../nodes/vector_store/VectorStoreInMemoryInsert/VectorStoreInMemoryInsert.node.ts"],"names":[],"mappings":";;;AAWA,iEAA8D;AAC9D,iFAA8E;AAG9E,MAAa,yBAAyB;IAAtC;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,+BAA+B;YAC5C,I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U,GAAG,CAAC,MAAM,IAAI,CAAC,sBAAsB,iBAEpD,CAAC,CACD,CAAe,CAAC;QAEjB,MAAM,SAAS,GAAG,IAAI,CAAC,gBAAgB,CAAC,WAAW,EAAE,CAAC,CAAW,CAAC;QAClE,MAAM,UAAU,GAAG,IAAI,CAAC,gBAAgB,CAAC,YAAY,EAAE,CAAC,CAAY,CAAC;QACrE,MAAM,aAAa,GAAG,CAAC,MAAM,IAAI,CAAC,sBAAsB,gBAAgC,CAAC,CAAC,CAE/C,CAAC;QAE5C,MAAM,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,GAAG,MAAM,IAAA,mCAAgB,EACzE,aAAa,EACb,KAAK,CACL,CAAC;QAEF,MAAM,UAAU,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC,EAAE,CAAC;QAEzC,MAAM,mBAAmB,GAAG,mDAAwB,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;QAC7E,MAAM,mBAAmB,CAAC,YAAY,CACrC,GAAG,UAAU,KAAK,SAAS,EAAE,EAC7B,kBAAkB,EAClB,UAAU,CACV,CAAC;QAEF,OAAO,IAAI,CAAC,iBAAiB,CAAC,mBAAmB,CAAC,CAAC;IACpD,CAAC;CACD;AAjGD,8DAiGC"}
|
|
@@ -11,6 +11,7 @@ class VectorStoreInMemoryLoad {
|
|
|
11
11
|
icon: 'fa:database',
|
|
12
12
|
group: ['transform'],
|
|
13
13
|
version: 1,
|
|
14
|
+
hidden: true,
|
|
14
15
|
description: 'Load embedded data from an in-memory vector store',
|
|
15
16
|
defaults: {
|
|
16
17
|
name: 'In Memory Vector Store Load',
|
|
@@ -23,7 +24,7 @@ class VectorStoreInMemoryLoad {
|
|
|
23
24
|
resources: {
|
|
24
25
|
primaryDocumentation: [
|
|
25
26
|
{
|
|
26
|
-
url: 'https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.
|
|
27
|
+
url: 'https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.vectorstoreinmemoryload/',
|
|
27
28
|
},
|
|
28
29
|
],
|
|
29
30
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VectorStoreInMemoryLoad.node.js","sourceRoot":"","sources":["../../../../nodes/vector_store/VectorStoreInMemoryLoad/VectorStoreInMemoryLoad.node.ts"],"names":[],"mappings":";;;AASA,iFAA8E;AAC9E,0DAAuD;
|
|
1
|
+
{"version":3,"file":"VectorStoreInMemoryLoad.node.js","sourceRoot":"","sources":["../../../../nodes/vector_store/VectorStoreInMemoryLoad/VectorStoreInMemoryLoad.node.ts"],"names":[],"mappings":";;;AASA,iFAA8E;AAC9E,0DAAuD;AAGvD,MAAa,uBAAuB;IAApC;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,6BAA6B;YAC1C,IAAI,EAAE,yBAAyB;YAC/B,IAAI,EAAE,aAAa;YACnB,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC;YACV,MAAM,EAAE,IAAI;YACZ,WAAW,EAAE,mDAAmD;YAChE,QAAQ,EAAE;gBACT,IAAI,EAAE,6BAA6B;aACnC;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;YAED,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,kBAAkB;oBAC3B,WAAW,EACV,oIAAoI;iBACrI;aACD;SACD,CAAC;IAoBH,CAAC;IAlBA,KAAK,CAAC,UAAU,CAA0B,SAAiB;QAC1D,MAAM,UAAU,GAAG,CAAC,MAAM,IAAI,CAAC,sBAAsB,iBAEpD,SAAS,CACT,CAAe,CAAC;QAEjB,MAAM,UAAU,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC,EAAE,CAAC;QACzC,MAAM,SAAS,GAAG,IAAI,CAAC,gBAAgB,CAAC,WAAW,EAAE,CAAC,CAAW,CAAC;QAElE,MAAM,oBAAoB,GAAG,mDAAwB,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;QAC9E,MAAM,mBAAmB,GAAG,MAAM,oBAAoB,CAAC,cAAc,CACpE,GAAG,UAAU,KAAK,SAAS,EAAE,CAC7B,CAAC;QAEF,OAAO;YACN,QAAQ,EAAE,IAAA,uBAAU,EAAC,mBAAmB,EAAE,IAAI,CAAC;SAC/C,CAAC;IACH,CAAC;CACD;AAlED,0DAkEC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const VectorStorePinecone: {
|
|
2
|
+
new (): {
|
|
3
|
+
description: import("n8n-workflow").INodeTypeDescription;
|
|
4
|
+
methods: {
|
|
5
|
+
listSearch?: {
|
|
6
|
+
[key: string]: (this: import("n8n-workflow").ILoadOptionsFunctions, filter?: string | undefined, paginationToken?: string | undefined) => Promise<import("n8n-workflow").INodeListSearchResult>;
|
|
7
|
+
} | undefined;
|
|
8
|
+
} | undefined;
|
|
9
|
+
execute(this: import("n8n-workflow").IExecuteFunctions): Promise<import("n8n-workflow").INodeExecutionData[][]>;
|
|
10
|
+
supplyData(this: import("n8n-workflow").IExecuteFunctions, itemIndex: number): Promise<import("n8n-workflow").SupplyData>;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VectorStorePinecone = void 0;
|
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
+
const pinecone_1 = require("langchain/vectorstores/pinecone");
|
|
6
|
+
const pinecone_2 = require("@pinecone-database/pinecone");
|
|
7
|
+
const createVectorStoreNode_1 = require("../shared/createVectorStoreNode");
|
|
8
|
+
const sharedFields_1 = require("../../../utils/sharedFields");
|
|
9
|
+
const descriptions_1 = require("../shared/descriptions");
|
|
10
|
+
const listSearch_1 = require("../shared/methods/listSearch");
|
|
11
|
+
const sharedFields = [descriptions_1.pineconeIndexRLC];
|
|
12
|
+
const retrieveFields = [
|
|
13
|
+
{
|
|
14
|
+
displayName: 'Options',
|
|
15
|
+
name: 'options',
|
|
16
|
+
type: 'collection',
|
|
17
|
+
placeholder: 'Add Option',
|
|
18
|
+
default: {},
|
|
19
|
+
options: [
|
|
20
|
+
{
|
|
21
|
+
displayName: 'Pinecone Namespace',
|
|
22
|
+
name: 'pineconeNamespace',
|
|
23
|
+
type: 'string',
|
|
24
|
+
description: 'Partition the records in an index into namespaces. Queries and other operations are then limited to one namespace, so different requests can search different subsets of your index.',
|
|
25
|
+
default: '',
|
|
26
|
+
},
|
|
27
|
+
sharedFields_1.metadataFilterField,
|
|
28
|
+
],
|
|
29
|
+
},
|
|
30
|
+
];
|
|
31
|
+
const insertFields = [
|
|
32
|
+
{
|
|
33
|
+
displayName: 'Options',
|
|
34
|
+
name: 'options',
|
|
35
|
+
type: 'collection',
|
|
36
|
+
placeholder: 'Add Option',
|
|
37
|
+
default: {},
|
|
38
|
+
options: [
|
|
39
|
+
{
|
|
40
|
+
displayName: 'Clear Namespace',
|
|
41
|
+
name: 'clearNamespace',
|
|
42
|
+
type: 'boolean',
|
|
43
|
+
default: false,
|
|
44
|
+
description: 'Whether to clear the namespace before inserting new data',
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
displayName: 'Pinecone Namespace',
|
|
48
|
+
name: 'pineconeNamespace',
|
|
49
|
+
type: 'string',
|
|
50
|
+
description: 'Partition the records in an index into namespaces. Queries and other operations are then limited to one namespace, so different requests can search different subsets of your index.',
|
|
51
|
+
default: '',
|
|
52
|
+
},
|
|
53
|
+
],
|
|
54
|
+
},
|
|
55
|
+
];
|
|
56
|
+
exports.VectorStorePinecone = (0, createVectorStoreNode_1.createVectorStoreNode)({
|
|
57
|
+
meta: {
|
|
58
|
+
displayName: 'Pinecone Vector Store',
|
|
59
|
+
name: 'vectorStorePinecone',
|
|
60
|
+
description: 'Work with your data in Pinecone Vector Store',
|
|
61
|
+
icon: 'file:pinecone.svg',
|
|
62
|
+
docsUrl: 'https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.vectorstorepinecone/',
|
|
63
|
+
credentials: [
|
|
64
|
+
{
|
|
65
|
+
name: 'pineconeApi',
|
|
66
|
+
required: true,
|
|
67
|
+
},
|
|
68
|
+
],
|
|
69
|
+
},
|
|
70
|
+
methods: { listSearch: { pineconeIndexSearch: listSearch_1.pineconeIndexSearch } },
|
|
71
|
+
retrieveFields,
|
|
72
|
+
loadFields: retrieveFields,
|
|
73
|
+
insertFields,
|
|
74
|
+
sharedFields,
|
|
75
|
+
async getVectorStoreClient(context, filter, embeddings, itemIndex) {
|
|
76
|
+
var _a;
|
|
77
|
+
const index = context.getNodeParameter('pineconeIndex', itemIndex, '', {
|
|
78
|
+
extractValue: true,
|
|
79
|
+
});
|
|
80
|
+
const options = context.getNodeParameter('options', itemIndex, {});
|
|
81
|
+
const credentials = await context.getCredentials('pineconeApi');
|
|
82
|
+
const client = new pinecone_2.Pinecone({
|
|
83
|
+
apiKey: credentials.apiKey,
|
|
84
|
+
environment: credentials.environment,
|
|
85
|
+
});
|
|
86
|
+
const pineconeIndex = client.Index(index);
|
|
87
|
+
const config = {
|
|
88
|
+
namespace: (_a = options.pineconeNamespace) !== null && _a !== void 0 ? _a : undefined,
|
|
89
|
+
pineconeIndex,
|
|
90
|
+
filter,
|
|
91
|
+
};
|
|
92
|
+
return pinecone_1.PineconeStore.fromExistingIndex(embeddings, config);
|
|
93
|
+
},
|
|
94
|
+
async populateVectorStore(context, embeddings, documents, itemIndex) {
|
|
95
|
+
var _a;
|
|
96
|
+
const index = context.getNodeParameter('pineconeIndex', itemIndex, '', {
|
|
97
|
+
extractValue: true,
|
|
98
|
+
});
|
|
99
|
+
const options = context.getNodeParameter('options', itemIndex, {});
|
|
100
|
+
const credentials = await context.getCredentials('pineconeApi');
|
|
101
|
+
const client = new pinecone_2.Pinecone({
|
|
102
|
+
apiKey: credentials.apiKey,
|
|
103
|
+
environment: credentials.environment,
|
|
104
|
+
});
|
|
105
|
+
const indexes = (await client.listIndexes()).map((i) => i.name);
|
|
106
|
+
if (!indexes.includes(index)) {
|
|
107
|
+
throw new n8n_workflow_1.NodeOperationError(context.getNode(), `Index ${index} not found`, {
|
|
108
|
+
itemIndex,
|
|
109
|
+
description: 'Please check that the index exists in your vector store',
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
const pineconeIndex = client.Index(index);
|
|
113
|
+
if (options.pineconeNamespace && options.clearNamespace) {
|
|
114
|
+
await pineconeIndex.namespace(options.pineconeNamespace).deleteAll();
|
|
115
|
+
}
|
|
116
|
+
await pinecone_1.PineconeStore.fromDocuments(documents, embeddings, {
|
|
117
|
+
namespace: (_a = options.pineconeNamespace) !== null && _a !== void 0 ? _a : undefined,
|
|
118
|
+
pineconeIndex,
|
|
119
|
+
});
|
|
120
|
+
},
|
|
121
|
+
});
|
|
122
|
+
//# sourceMappingURL=VectorStorePinecone.node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VectorStorePinecone.node.js","sourceRoot":"","sources":["../../../../nodes/vector_store/VectorStorePinecone/VectorStorePinecone.node.ts"],"names":[],"mappings":";;;AAAA,+CAAwE;AAExE,8DAAgE;AAChE,0DAAuD;AACvD,2EAAwE;AACxE,8DAAkE;AAClE,yDAA0D;AAC1D,6DAAmE;AAEn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Q,CAAC;YAC3B,MAAM,EAAE,WAAW,CAAC,MAAgB;YACpC,WAAW,EAAE,WAAW,CAAC,WAAqB;SAC9C,CAAC,CAAC;QAEH,MAAM,OAAO,GAAG,CAAC,MAAM,MAAM,CAAC,WAAW,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;QAEhE,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;YAC9B,MAAM,IAAI,iCAAkB,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,SAAS,KAAK,YAAY,EAAE;gBAC3E,SAAS;gBACT,WAAW,EAAE,yDAAyD;aACtE,CAAC,CAAC;QACJ,CAAC;QAED,MAAM,aAAa,GAAG,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAE1C,IAAI,OAAO,CAAC,iBAAiB,IAAI,OAAO,CAAC,cAAc,EAAE,CAAC;YACzD,MAAM,aAAa,CAAC,SAAS,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC,SAAS,EAAE,CAAC;QACtE,CAAC;QAED,MAAM,wBAAa,CAAC,aAAa,CAAC,SAAS,EAAE,UAAU,EAAE;YACxD,SAAS,EAAE,MAAA,OAAO,CAAC,iBAAiB,mCAAI,SAAS;YACjD,aAAa;SACb,CAAC,CAAC;IACJ,CAAC;CACD,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" class="w-full -translate-y-0.5" viewBox="1 1 30 29"><g fill="none" fill-rule="evenodd" transform="translate(0 1)"><path stroke="currentColor" stroke-linecap="square" stroke-width="1.77" d="m14.58 5.24.7-3.89"></path><path stroke="#7D7D87" stroke-linecap="square" stroke-linejoin="round" stroke-width="1.77" d="M17.8 3.86 15.36.88l-3.32 1.94"></path><path stroke="currentColor" stroke-linecap="square" stroke-width="1.77" d="m11.66 21.84.68-3.89"></path><path stroke="currentColor" stroke-linecap="square" stroke-linejoin="round" stroke-width="1.77" d="m14.88 20.45-2.46-2.97-3.31 1.95"></path><path stroke="currentColor" stroke-linecap="square" stroke-width="1.77" d="m13.07 13.82.68-3.89"></path><path stroke="currentColor" stroke-linecap="square" stroke-linejoin="round" stroke-width="1.77" d="m16.29 12.43-2.45-2.96-3.31 1.94"></path><circle cx="10.77" cy="26.85" r="1.63" fill="currentColor" fill-rule="nonzero"></circle><g stroke="currentColor" stroke-linecap="square"><path stroke-width="1.68" d="m6.15 21.5-2.99 2.08"></path><path stroke-linejoin="round" stroke-width="1.68" d="M6.33 24.87 2.8 23.83l.26-3.67"></path><path stroke-width="1.68" d="m17.01 23.45 2.08 3"></path><path stroke-linejoin="round" stroke-width="1.68" d="m15.67 26.55 3.67.25 1.04-3.51"></path><path stroke-width="1.72" d="m20.42 17.36 3.66.66"></path><path stroke-linejoin="round" stroke-width="1.72" d="m21.68 20.57 2.84-2.47-1.79-3.29"></path><path stroke-width="1.72" d="m19.35 10.1 3.26-1.8"></path><path stroke-linejoin="round" stroke-width="1.72" d="M19.53 6.65 23 8.09l-.65 3.69"></path><path stroke-width="1.72" d="M4.97 14.64 1.3 14"></path><path stroke-linejoin="round" stroke-width="1.72" d="M2.68 17.22.86 13.93l2.81-2.48"></path><path stroke-width="1.72" d="M8.45 8.17 6 5.37"></path><path stroke-linejoin="round" stroke-width="1.72" d="m9.46 4.88-3.75.16-.66 3.69"></path></g></g></svg>
|
package/dist/nodes/vector_store/VectorStorePineconeInsert/VectorStorePineconeInsert.node.d.ts
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import { type IExecuteFunctions, type INodeType, type INodeTypeDescription, type INodeExecutionData } from 'n8n-workflow';
|
|
2
|
+
import { pineconeIndexSearch } from '../shared/methods/listSearch';
|
|
2
3
|
export declare class VectorStorePineconeInsert implements INodeType {
|
|
3
4
|
description: INodeTypeDescription;
|
|
5
|
+
methods: {
|
|
6
|
+
listSearch: {
|
|
7
|
+
pineconeIndexSearch: typeof pineconeIndexSearch;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
4
10
|
execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
|
|
5
11
|
}
|
|
@@ -4,10 +4,13 @@ exports.VectorStorePineconeInsert = void 0;
|
|
|
4
4
|
const pinecone_1 = require("langchain/vectorstores/pinecone");
|
|
5
5
|
const pinecone_2 = require("@pinecone-database/pinecone");
|
|
6
6
|
const processDocuments_1 = require("../shared/processDocuments");
|
|
7
|
+
const descriptions_1 = require("../shared/descriptions");
|
|
8
|
+
const listSearch_1 = require("../shared/methods/listSearch");
|
|
7
9
|
class VectorStorePineconeInsert {
|
|
8
10
|
constructor() {
|
|
9
11
|
this.description = {
|
|
10
12
|
displayName: 'Pinecone: Insert',
|
|
13
|
+
hidden: true,
|
|
11
14
|
name: 'vectorStorePineconeInsert',
|
|
12
15
|
icon: 'file:pinecone.svg',
|
|
13
16
|
group: ['transform'],
|
|
@@ -25,7 +28,7 @@ class VectorStorePineconeInsert {
|
|
|
25
28
|
resources: {
|
|
26
29
|
primaryDocumentation: [
|
|
27
30
|
{
|
|
28
|
-
url: 'https://docs.n8n.io/integrations/builtin/cluster-nodes/
|
|
31
|
+
url: 'https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.vectorstorepineconeinsert/',
|
|
29
32
|
},
|
|
30
33
|
],
|
|
31
34
|
},
|
|
@@ -53,13 +56,7 @@ class VectorStorePineconeInsert {
|
|
|
53
56
|
],
|
|
54
57
|
outputs: ["main"],
|
|
55
58
|
properties: [
|
|
56
|
-
|
|
57
|
-
displayName: 'Pinecone Index',
|
|
58
|
-
name: 'pineconeIndex',
|
|
59
|
-
type: 'string',
|
|
60
|
-
default: '',
|
|
61
|
-
required: true,
|
|
62
|
-
},
|
|
59
|
+
descriptions_1.pineconeIndexRLC,
|
|
63
60
|
{
|
|
64
61
|
displayName: 'Pinecone Namespace',
|
|
65
62
|
name: 'pineconeNamespace',
|
|
@@ -81,24 +78,28 @@ class VectorStorePineconeInsert {
|
|
|
81
78
|
},
|
|
82
79
|
],
|
|
83
80
|
};
|
|
81
|
+
this.methods = {
|
|
82
|
+
listSearch: {
|
|
83
|
+
pineconeIndexSearch: listSearch_1.pineconeIndexSearch,
|
|
84
|
+
},
|
|
85
|
+
};
|
|
84
86
|
}
|
|
85
87
|
async execute() {
|
|
86
88
|
const items = this.getInputData(0);
|
|
87
89
|
this.logger.verbose('Executing data for Pinecone Insert Vector Store');
|
|
88
90
|
const namespace = this.getNodeParameter('pineconeNamespace', 0);
|
|
89
|
-
const index = this.getNodeParameter('pineconeIndex', 0);
|
|
91
|
+
const index = this.getNodeParameter('pineconeIndex', 0, '', { extractValue: true });
|
|
90
92
|
const clearNamespace = this.getNodeParameter('clearNamespace', 0);
|
|
91
93
|
const credentials = await this.getCredentials('pineconeApi');
|
|
92
94
|
const documentInput = (await this.getInputConnectionData("ai_document", 0));
|
|
93
95
|
const embeddings = (await this.getInputConnectionData("ai_embedding", 0));
|
|
94
|
-
const client = new pinecone_2.
|
|
95
|
-
await client.init({
|
|
96
|
+
const client = new pinecone_2.Pinecone({
|
|
96
97
|
apiKey: credentials.apiKey,
|
|
97
98
|
environment: credentials.environment,
|
|
98
99
|
});
|
|
99
100
|
const pineconeIndex = client.Index(index);
|
|
100
101
|
if (namespace && clearNamespace) {
|
|
101
|
-
await pineconeIndex.
|
|
102
|
+
await pineconeIndex.namespace(namespace).deleteAll();
|
|
102
103
|
}
|
|
103
104
|
const { processedDocuments, serializedDocuments } = await (0, processDocuments_1.processDocuments)(documentInput, items);
|
|
104
105
|
await pinecone_1.PineconeStore.fromDocuments(processedDocuments, embeddings, {
|
package/dist/nodes/vector_store/VectorStorePineconeInsert/VectorStorePineconeInsert.node.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VectorStorePineconeInsert.node.js","sourceRoot":"","sources":["../../../../nodes/vector_store/VectorStorePineconeInsert/VectorStorePineconeInsert.node.ts"],"names":[],"mappings":";;;AAOA,8DAAgE;AAChE,
|
|
1
|
+
{"version":3,"file":"VectorStorePineconeInsert.node.js","sourceRoot":"","sources":["../../../../nodes/vector_store/VectorStorePineconeInsert/VectorStorePineconeInsert.node.ts"],"names":[],"mappings":";;;AAOA,8DAAgE;AAChE,0DAAuD;AAIvD,iEAA8D;AAC9D,yDAA0D;AAC1D,6DAAmE;AAGnE,MAAa,yBAAyB;IAAtC;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,kBAAkB;YAC/B,MAAM,EAAE,IAAI;YACZ,IAAI,EAAE,2BAA2B;YACjC,IAAI,EAAE,mBAAmB;YACzB,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC;YACV,WAAW,EAAE,8CAA8C;YAC3D,QAAQ,EAAE;gBACT,IAAI,EAAE,kBAAkB;gBAExB,KAAK,EAAE,SAAS;aAChB;YACD,KAAK,EAAE;gBACN,UAAU,EAAE,CAAC,IAAI,CAAC;gBAClB,aAAa,EAAE;oBACd,EAAE,EAAE,CAAC,eAAe,CAAC;iBACrB;gBACD,SAAS,EAAE;oBACV,oBAAoB,EAAE;wBACrB;4BACC,GAAG,EAAE,kHAAkH;yBACvH;qBACD;iBACD;aACD;YACD,WAAW,EAAE;gBACZ;oBACC,IAAI,EAAE,aAAa;oBACnB,QAAQ,EAAE,IAAI;iBACd;aACD;YACD,MAAM,EAAE;;gBAEP;oBACC,WAAW,EAAE,UAAU;oBACvB,cAAc,EAAE,CAAC;oBACjB,IAAI,eAA+B;oBACnC,QAAQ,EAAE,IAAI;iBACd;gBACD;oBACC,WAAW,EAAE,WAAW;oBACxB,cAAc,EAAE,CAAC;oBACjB,IAAI,gBAAgC;oBACpC,QAAQ,EAAE,IAAI;iBACd;aACD;YACD,OAAO,EAAE,QAAyB;YAClC,UAAU,EAAE;gBACX,+BAAgB;gBAChB;oBACC,WAAW,EAAE,oBAAoB;oBACjC,IAAI,EAAE,mBAAm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EAAE,WAAW,CAAC,WAAqB;SAC9C,CAAC,CAAC;QAEH,MAAM,aAAa,GAAG,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAE1C,IAAI,SAAS,IAAI,cAAc,EAAE,CAAC;YACjC,MAAM,aAAa,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,SAAS,EAAE,CAAC;QACtD,CAAC;QAED,MAAM,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,GAAG,MAAM,IAAA,mCAAgB,EACzE,aAAa,EACb,KAAK,CACL,CAAC;QAEF,MAAM,wBAAa,CAAC,aAAa,CAAC,kBAAkB,EAAE,UAAU,EAAE;YACjE,SAAS,EAAE,SAAS,IAAI,SAAS;YACjC,aAAa;SACb,CAAC,CAAC;QAEH,OAAO,IAAI,CAAC,iBAAiB,CAAC,mBAAmB,CAAC,CAAC;IACpD,CAAC;CACD;AAzHD,8DAyHC"}
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import { type IExecuteFunctions, type INodeType, type INodeTypeDescription, type SupplyData } from 'n8n-workflow';
|
|
2
|
+
import { pineconeIndexSearch } from '../shared/methods/listSearch';
|
|
2
3
|
export declare class VectorStorePineconeLoad implements INodeType {
|
|
3
4
|
description: INodeTypeDescription;
|
|
5
|
+
methods: {
|
|
6
|
+
listSearch: {
|
|
7
|
+
pineconeIndexSearch: typeof pineconeIndexSearch;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
4
10
|
supplyData(this: IExecuteFunctions, itemIndex: number): Promise<SupplyData>;
|
|
5
11
|
}
|
|
@@ -4,10 +4,15 @@ exports.VectorStorePineconeLoad = void 0;
|
|
|
4
4
|
const pinecone_1 = require("langchain/vectorstores/pinecone");
|
|
5
5
|
const pinecone_2 = require("@pinecone-database/pinecone");
|
|
6
6
|
const logWrapper_1 = require("../../../utils/logWrapper");
|
|
7
|
+
const sharedFields_1 = require("../../../utils/sharedFields");
|
|
8
|
+
const helpers_1 = require("../../../utils/helpers");
|
|
9
|
+
const descriptions_1 = require("../shared/descriptions");
|
|
10
|
+
const listSearch_1 = require("../shared/methods/listSearch");
|
|
7
11
|
class VectorStorePineconeLoad {
|
|
8
12
|
constructor() {
|
|
9
13
|
this.description = {
|
|
10
14
|
displayName: 'Pinecone: Load',
|
|
15
|
+
hidden: true,
|
|
11
16
|
name: 'vectorStorePineconeLoad',
|
|
12
17
|
icon: 'file:pinecone.svg',
|
|
13
18
|
group: ['transform'],
|
|
@@ -46,38 +51,48 @@ class VectorStorePineconeLoad {
|
|
|
46
51
|
outputs: ["ai_vectorStore"],
|
|
47
52
|
outputNames: ['Vector Store'],
|
|
48
53
|
properties: [
|
|
49
|
-
|
|
50
|
-
displayName: 'Pinecone Index',
|
|
51
|
-
name: 'pineconeIndex',
|
|
52
|
-
type: 'string',
|
|
53
|
-
default: '',
|
|
54
|
-
required: true,
|
|
55
|
-
},
|
|
54
|
+
descriptions_1.pineconeIndexRLC,
|
|
56
55
|
{
|
|
57
56
|
displayName: 'Pinecone Namespace',
|
|
58
57
|
name: 'pineconeNamespace',
|
|
59
58
|
type: 'string',
|
|
60
59
|
default: '',
|
|
61
60
|
},
|
|
61
|
+
{
|
|
62
|
+
displayName: 'Options',
|
|
63
|
+
name: 'options',
|
|
64
|
+
type: 'collection',
|
|
65
|
+
placeholder: 'Add Option',
|
|
66
|
+
default: {},
|
|
67
|
+
options: [sharedFields_1.metadataFilterField],
|
|
68
|
+
},
|
|
62
69
|
],
|
|
63
70
|
};
|
|
71
|
+
this.methods = {
|
|
72
|
+
listSearch: {
|
|
73
|
+
pineconeIndexSearch: listSearch_1.pineconeIndexSearch,
|
|
74
|
+
},
|
|
75
|
+
};
|
|
64
76
|
}
|
|
65
77
|
async supplyData(itemIndex) {
|
|
66
78
|
this.logger.verbose('Supplying data for Pinecone Load Vector Store');
|
|
67
79
|
const namespace = this.getNodeParameter('pineconeNamespace', itemIndex);
|
|
68
|
-
const index = this.getNodeParameter('pineconeIndex', itemIndex
|
|
80
|
+
const index = this.getNodeParameter('pineconeIndex', itemIndex, '', {
|
|
81
|
+
extractValue: true,
|
|
82
|
+
});
|
|
69
83
|
const credentials = await this.getCredentials('pineconeApi');
|
|
70
84
|
const embeddings = (await this.getInputConnectionData("ai_embedding", itemIndex));
|
|
71
|
-
const client = new pinecone_2.
|
|
72
|
-
await client.init({
|
|
85
|
+
const client = new pinecone_2.Pinecone({
|
|
73
86
|
apiKey: credentials.apiKey,
|
|
74
87
|
environment: credentials.environment,
|
|
75
88
|
});
|
|
76
89
|
const pineconeIndex = client.Index(index);
|
|
77
|
-
const
|
|
90
|
+
const config = {
|
|
78
91
|
namespace: namespace || undefined,
|
|
79
92
|
pineconeIndex,
|
|
80
|
-
|
|
93
|
+
filter: (0, helpers_1.getMetadataFiltersValues)(this, itemIndex),
|
|
94
|
+
};
|
|
95
|
+
const vectorStore = await pinecone_1.PineconeStore.fromExistingIndex(embeddings, config);
|
|
81
96
|
return {
|
|
82
97
|
response: (0, logWrapper_1.logWrapper)(vectorStore, this),
|
|
83
98
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VectorStorePineconeLoad.node.js","sourceRoot":"","sources":["../../../../nodes/vector_store/VectorStorePineconeLoad/VectorStorePineconeLoad.node.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"VectorStorePineconeLoad.node.js","sourceRoot":"","sources":["../../../../nodes/vector_store/VectorStorePineconeLoad/VectorStorePineconeLoad.node.ts"],"names":[],"mappings":";;;AAQA,8DAAgE;AAChE,0DAAuD;AAEvD,0DAAuD;AACvD,8DAAkE;AAClE,oDAAkE;AAClE,yDAA0D;AAC1D,6DAAmE;AAGnE,MAAa,uBAAuB;IAApC;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,gBAAgB;YAE7B,MAAM,EAAE,IAAI;YACZ,IAAI,EAAE,yBAAyB;YAC/B,IAAI,EAAE,mBAAmB;YACzB,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAA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gBAAgB,CAAC,eAAe,EAAE,SAAS,EAAE,EAAE,EAAE;YACnE,YAAY,EAAE,IAAI;SAClB,CAAW,CAAC;QAEb,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,aAAa,CAAC,CAAC;QAC7D,MAAM,UAAU,GAAG,CAAC,MAAM,IAAI,CAAC,sBAAsB,iBAEpD,SAAS,CACT,CAAe,CAAC;QAEjB,MAAM,MAAM,GAAG,IAAI,mBAAQ,CAAC;YAC3B,MAAM,EAAE,WAAW,CAAC,MAAgB;YACpC,WAAW,EAAE,WAAW,CAAC,WAAqB;SAC9C,CAAC,CAAC;QAEH,MAAM,aAAa,GAAG,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAC1C,MAAM,MAAM,GAAoB;YAC/B,SAAS,EAAE,SAAS,IAAI,SAAS;YACjC,aAAa;YACb,MAAM,EAAE,IAAA,kCAAwB,EAAC,IAAI,EAAE,SAAS,CAAC;SACjD,CAAC;QAEF,MAAM,WAAW,GAAG,MAAM,wBAAa,CAAC,iBAAiB,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;QAE9E,OAAO;YACN,QAAQ,EAAE,IAAA,uBAAU,EAAC,WAAW,EAAE,IAAI,CAAC;SACvC,CAAC;IACH,CAAC;CACD;AAnGD,0DAmGC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const VectorStoreSupabase: {
|
|
2
|
+
new (): {
|
|
3
|
+
description: import("n8n-workflow").INodeTypeDescription;
|
|
4
|
+
methods: {
|
|
5
|
+
listSearch?: {
|
|
6
|
+
[key: string]: (this: import("n8n-workflow").ILoadOptionsFunctions, filter?: string | undefined, paginationToken?: string | undefined) => Promise<import("n8n-workflow").INodeListSearchResult>;
|
|
7
|
+
} | undefined;
|
|
8
|
+
} | undefined;
|
|
9
|
+
execute(this: import("n8n-workflow").IExecuteFunctions): Promise<import("n8n-workflow").INodeExecutionData[][]>;
|
|
10
|
+
supplyData(this: import("n8n-workflow").IExecuteFunctions, itemIndex: number): Promise<import("n8n-workflow").SupplyData>;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VectorStoreSupabase = void 0;
|
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
+
const supabase_js_1 = require("@supabase/supabase-js");
|
|
6
|
+
const supabase_1 = require("langchain/vectorstores/supabase");
|
|
7
|
+
const createVectorStoreNode_1 = require("../shared/createVectorStoreNode");
|
|
8
|
+
const sharedFields_1 = require("../../../utils/sharedFields");
|
|
9
|
+
const descriptions_1 = require("../shared/descriptions");
|
|
10
|
+
const listSearch_1 = require("../shared/methods/listSearch");
|
|
11
|
+
const sharedFields = [descriptions_1.supabaseTableNameRLC];
|
|
12
|
+
const insertFields = [
|
|
13
|
+
{
|
|
14
|
+
displayName: 'Options',
|
|
15
|
+
name: 'options',
|
|
16
|
+
type: 'collection',
|
|
17
|
+
placeholder: 'Add Option',
|
|
18
|
+
default: {},
|
|
19
|
+
options: [
|
|
20
|
+
{
|
|
21
|
+
displayName: 'Query Name',
|
|
22
|
+
name: 'queryName',
|
|
23
|
+
type: 'string',
|
|
24
|
+
default: 'match_documents',
|
|
25
|
+
description: 'Name of the query to use for matching documents',
|
|
26
|
+
},
|
|
27
|
+
],
|
|
28
|
+
},
|
|
29
|
+
];
|
|
30
|
+
const retrieveFields = [
|
|
31
|
+
{
|
|
32
|
+
displayName: 'Options',
|
|
33
|
+
name: 'options',
|
|
34
|
+
type: 'collection',
|
|
35
|
+
placeholder: 'Add Option',
|
|
36
|
+
default: {},
|
|
37
|
+
options: [
|
|
38
|
+
{
|
|
39
|
+
displayName: 'Query Name',
|
|
40
|
+
name: 'queryName',
|
|
41
|
+
type: 'string',
|
|
42
|
+
default: 'match_documents',
|
|
43
|
+
description: 'Name of the query to use for matching documents',
|
|
44
|
+
},
|
|
45
|
+
sharedFields_1.metadataFilterField,
|
|
46
|
+
],
|
|
47
|
+
},
|
|
48
|
+
];
|
|
49
|
+
exports.VectorStoreSupabase = (0, createVectorStoreNode_1.createVectorStoreNode)({
|
|
50
|
+
meta: {
|
|
51
|
+
description: 'Work with your data in Supabase Vector Store',
|
|
52
|
+
icon: 'file:supabase.svg',
|
|
53
|
+
displayName: 'Supabase Vector Store',
|
|
54
|
+
docsUrl: 'https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.vectorstoresupabase/',
|
|
55
|
+
name: 'vectorStoreSupabase',
|
|
56
|
+
credentials: [
|
|
57
|
+
{
|
|
58
|
+
name: 'supabaseApi',
|
|
59
|
+
required: true,
|
|
60
|
+
},
|
|
61
|
+
],
|
|
62
|
+
},
|
|
63
|
+
methods: {
|
|
64
|
+
listSearch: { supabaseTableNameSearch: listSearch_1.supabaseTableNameSearch },
|
|
65
|
+
},
|
|
66
|
+
sharedFields,
|
|
67
|
+
insertFields,
|
|
68
|
+
loadFields: retrieveFields,
|
|
69
|
+
retrieveFields,
|
|
70
|
+
async getVectorStoreClient(context, filter, embeddings, itemIndex) {
|
|
71
|
+
var _a;
|
|
72
|
+
const tableName = context.getNodeParameter('tableName', itemIndex, '', {
|
|
73
|
+
extractValue: true,
|
|
74
|
+
});
|
|
75
|
+
const options = context.getNodeParameter('options', itemIndex, {});
|
|
76
|
+
const credentials = await context.getCredentials('supabaseApi');
|
|
77
|
+
const client = (0, supabase_js_1.createClient)(credentials.host, credentials.serviceRole);
|
|
78
|
+
return supabase_1.SupabaseVectorStore.fromExistingIndex(embeddings, {
|
|
79
|
+
client,
|
|
80
|
+
tableName,
|
|
81
|
+
queryName: (_a = options.queryName) !== null && _a !== void 0 ? _a : 'match_documents',
|
|
82
|
+
filter,
|
|
83
|
+
});
|
|
84
|
+
},
|
|
85
|
+
async populateVectorStore(context, embeddings, documents, itemIndex) {
|
|
86
|
+
var _a;
|
|
87
|
+
const tableName = context.getNodeParameter('tableName', itemIndex, '', {
|
|
88
|
+
extractValue: true,
|
|
89
|
+
});
|
|
90
|
+
const options = context.getNodeParameter('options', itemIndex, {});
|
|
91
|
+
const credentials = await context.getCredentials('supabaseApi');
|
|
92
|
+
const client = (0, supabase_js_1.createClient)(credentials.host, credentials.serviceRole);
|
|
93
|
+
try {
|
|
94
|
+
await supabase_1.SupabaseVectorStore.fromDocuments(documents, embeddings, {
|
|
95
|
+
client,
|
|
96
|
+
tableName,
|
|
97
|
+
queryName: (_a = options.queryName) !== null && _a !== void 0 ? _a : 'match_documents',
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
catch (error) {
|
|
101
|
+
if (error.message === 'Error inserting: undefined 404 Not Found') {
|
|
102
|
+
throw new n8n_workflow_1.NodeOperationError(context.getNode(), `Table ${tableName} not found`, {
|
|
103
|
+
itemIndex,
|
|
104
|
+
description: 'Please check that the table exists in your vector store',
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
else {
|
|
108
|
+
throw new n8n_workflow_1.NodeOperationError(context.getNode(), error, {
|
|
109
|
+
itemIndex,
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
});
|
|
115
|
+
//# sourceMappingURL=VectorStoreSupabase.node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VectorStoreSupabase.node.js","sourceRoot":"","sources":["../../../../nodes/vector_store/VectorStoreSupabase/VectorStoreSupabase.node.ts"],"names":[],"mappings":";;;AAAA,+CAAwE;AACxE,uDAAqD;AACrD,8DAAsE;AACtE,2EAAwE;AACxE,8DAAkE;AAClE,yDAA8D;AAC9D,6DAAuE;AAEvE,MAAM,YAAY,GAAsB,CAAC,mCAAoB,CAAC,CAAC;AAC/D,MAAM,YAAY,GAAsB;IACvC;QACC,WAAW,EAAE,SAAS;QACtB,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,YAAY;QAClB,WAAW,EAAE,YAAY;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ACT,WAAW,EAAE,yDAAyD;iBACtE,CAAC,CAAC;YACJ,CAAC;iBAAM,CAAC;gBACP,MAAM,IAAI,iCAAkB,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,KAAc,EAAE;oBAC/D,SAAS;iBACT,CAAC,CAAC;YACJ,CAAC;QACF,CAAC;IACF,CAAC;CACD,CAAC,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<svg width="109" height="113" viewBox="0 0 109 113" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M63.7076 110.284C60.8481 113.885 55.0502 111.912 54.9813 107.314L53.9738 40.0627L99.1935 40.0627C107.384 40.0627 111.952 49.5228 106.859 55.9374L63.7076 110.284Z" fill="url(#paint0_linear)"/>
|
|
3
|
+
<path d="M63.7076 110.284C60.8481 113.885 55.0502 111.912 54.9813 107.314L53.9738 40.0627L99.1935 40.0627C107.384 40.0627 111.952 49.5228 106.859 55.9374L63.7076 110.284Z" fill="url(#paint1_linear)" fill-opacity="0.2"/>
|
|
4
|
+
<path d="M45.317 2.07103C48.1765 -1.53037 53.9745 0.442937 54.0434 5.041L54.4849 72.2922H9.83113C1.64038 72.2922 -2.92775 62.8321 2.1655 56.4175L45.317 2.07103Z" fill="#3ECF8E"/>
|
|
5
|
+
<defs>
|
|
6
|
+
<linearGradient id="paint0_linear" x1="53.9738" y1="54.974" x2="94.1635" y2="71.8295" gradientUnits="userSpaceOnUse">
|
|
7
|
+
<stop stop-color="#249361"/>
|
|
8
|
+
<stop offset="1" stop-color="#3ECF8E"/>
|
|
9
|
+
</linearGradient>
|
|
10
|
+
<linearGradient id="paint1_linear" x1="36.1558" y1="30.578" x2="54.4844" y2="65.0806" gradientUnits="userSpaceOnUse">
|
|
11
|
+
<stop/>
|
|
12
|
+
<stop offset="1" stop-opacity="0"/>
|
|
13
|
+
</linearGradient>
|
|
14
|
+
</defs>
|
|
15
|
+
</svg>
|
package/dist/nodes/vector_store/VectorStoreSupabaseInsert/VectorStoreSupabaseInsert.node.d.ts
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import { type IExecuteFunctions, type INodeType, type INodeTypeDescription, type INodeExecutionData } from 'n8n-workflow';
|
|
2
|
+
import { supabaseTableNameSearch } from '../shared/methods/listSearch';
|
|
2
3
|
export declare class VectorStoreSupabaseInsert implements INodeType {
|
|
3
4
|
description: INodeTypeDescription;
|
|
5
|
+
methods: {
|
|
6
|
+
listSearch: {
|
|
7
|
+
supabaseTableNameSearch: typeof supabaseTableNameSearch;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
4
10
|
execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
|
|
5
11
|
}
|