@n8n/n8n-nodes-langchain 0.0.2 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/build.tsbuildinfo +1 -0
- package/dist/known/credentials.json +87 -0
- package/dist/known/nodes.json +214 -0
- package/dist/nodes/agents/Agent/agents/ConversationalAgent/description.js +1 -0
- package/dist/nodes/agents/Agent/agents/ConversationalAgent/description.js.map +1 -1
- package/dist/nodes/agents/Agent/agents/ConversationalAgent/execute.js +3 -0
- package/dist/nodes/agents/Agent/agents/ConversationalAgent/execute.js.map +1 -1
- package/dist/nodes/agents/Agent/agents/OpenAiFunctionsAgent/description.js +1 -0
- package/dist/nodes/agents/Agent/agents/OpenAiFunctionsAgent/description.js.map +1 -1
- package/dist/nodes/agents/Agent/agents/OpenAiFunctionsAgent/execute.js +3 -0
- package/dist/nodes/agents/Agent/agents/OpenAiFunctionsAgent/execute.js.map +1 -1
- package/dist/nodes/agents/Agent/agents/ReActAgent/description.js +1 -0
- package/dist/nodes/agents/Agent/agents/ReActAgent/description.js.map +1 -1
- package/dist/nodes/agents/Agent/agents/ReActAgent/execute.js +4 -0
- package/dist/nodes/agents/Agent/agents/ReActAgent/execute.js.map +1 -1
- package/dist/nodes/agents/Agent/agents/SqlAgent/execute.js +3 -0
- package/dist/nodes/agents/Agent/agents/SqlAgent/execute.js.map +1 -1
- package/dist/nodes/chains/ChainLLM/ChainLlm.node.js +24 -22
- package/dist/nodes/chains/ChainLLM/ChainLlm.node.js.map +1 -1
- package/dist/nodes/chains/ChainRetrievalQA/ChainRetrievalQa.node.js +7 -2
- package/dist/nodes/chains/ChainRetrievalQA/ChainRetrievalQa.node.js.map +1 -1
- package/dist/nodes/code/Code.node.d.ts +1 -1
- package/dist/nodes/code/Code.node.js +7 -8
- package/dist/nodes/code/Code.node.js.map +1 -1
- package/dist/nodes/document_loaders/DocumentGithubLoader/DocumentGithubLoader.node.d.ts +1 -1
- package/dist/nodes/document_loaders/DocumentGithubLoader/DocumentGithubLoader.node.js +3 -3
- package/dist/nodes/document_loaders/DocumentGithubLoader/DocumentGithubLoader.node.js.map +1 -1
- package/dist/nodes/document_loaders/DocumentJSONInputLoader/DocumentJsonInputLoader.node.js.map +1 -1
- package/dist/nodes/embeddings/EmbeddingsCohere/EmbeddingsCohere.node.d.ts +1 -1
- package/dist/nodes/embeddings/EmbeddingsCohere/EmbeddingsCohere.node.js +2 -2
- package/dist/nodes/embeddings/EmbeddingsCohere/EmbeddingsCohere.node.js.map +1 -1
- package/dist/nodes/embeddings/EmbeddingsGooglePalm/EmbeddingsGooglePalm.node.d.ts +1 -1
- package/dist/nodes/embeddings/EmbeddingsGooglePalm/EmbeddingsGooglePalm.node.js +2 -2
- package/dist/nodes/embeddings/EmbeddingsGooglePalm/EmbeddingsGooglePalm.node.js.map +1 -1
- package/dist/nodes/embeddings/EmbeddingsHuggingFaceInference/EmbeddingsHuggingFaceInference.node.d.ts +1 -1
- package/dist/nodes/embeddings/EmbeddingsHuggingFaceInference/EmbeddingsHuggingFaceInference.node.js +2 -2
- package/dist/nodes/embeddings/EmbeddingsHuggingFaceInference/EmbeddingsHuggingFaceInference.node.js.map +1 -1
- package/dist/nodes/embeddings/EmbeddingsOpenAI/EmbeddingsOpenAi.node.d.ts +1 -1
- package/dist/nodes/embeddings/EmbeddingsOpenAI/EmbeddingsOpenAi.node.js +13 -3
- package/dist/nodes/embeddings/EmbeddingsOpenAI/EmbeddingsOpenAi.node.js.map +1 -1
- package/dist/nodes/llms/LMChatAnthropic/LmChatAnthropic.node.d.ts +1 -1
- package/dist/nodes/llms/LMChatAnthropic/LmChatAnthropic.node.js +1 -2
- package/dist/nodes/llms/LMChatAnthropic/LmChatAnthropic.node.js.map +1 -1
- package/dist/nodes/llms/LMChatOllama/LmChatOllama.node.d.ts +1 -1
- package/dist/nodes/llms/LMChatOllama/LmChatOllama.node.js +45 -20
- package/dist/nodes/llms/LMChatOllama/LmChatOllama.node.js.map +1 -1
- package/dist/nodes/llms/LMChatOpenAi/LmChatOpenAi.node.d.ts +1 -1
- package/dist/nodes/llms/LMChatOpenAi/LmChatOpenAi.node.js +15 -4
- package/dist/nodes/llms/LMChatOpenAi/LmChatOpenAi.node.js.map +1 -1
- package/dist/nodes/llms/LMCohere/LmCohere.node.d.ts +1 -1
- package/dist/nodes/llms/LMCohere/LmCohere.node.js +1 -2
- package/dist/nodes/llms/LMCohere/LmCohere.node.js.map +1 -1
- package/dist/nodes/llms/LMOllama/LmOllama.node.d.ts +1 -1
- package/dist/nodes/llms/LMOllama/LmOllama.node.js +45 -20
- package/dist/nodes/llms/LMOllama/LmOllama.node.js.map +1 -1
- package/dist/nodes/llms/LMOpenAi/LmOpenAi.node.d.ts +1 -1
- package/dist/nodes/llms/LMOpenAi/LmOpenAi.node.js +15 -4
- package/dist/nodes/llms/LMOpenAi/LmOpenAi.node.js.map +1 -1
- package/dist/nodes/llms/LMOpenHuggingFaceInference/LmOpenHuggingFaceInference.node.d.ts +1 -1
- package/dist/nodes/llms/LMOpenHuggingFaceInference/LmOpenHuggingFaceInference.node.js +1 -2
- package/dist/nodes/llms/LMOpenHuggingFaceInference/LmOpenHuggingFaceInference.node.js.map +1 -1
- package/dist/nodes/llms/LmChatGooglePalm/LmChatGooglePalm.node.d.ts +1 -1
- package/dist/nodes/llms/LmChatGooglePalm/LmChatGooglePalm.node.js +3 -3
- package/dist/nodes/llms/LmChatGooglePalm/LmChatGooglePalm.node.js.map +1 -1
- package/dist/nodes/llms/LmGooglePalm/LmGooglePalm.node.d.ts +1 -1
- package/dist/nodes/llms/LmGooglePalm/LmGooglePalm.node.js +3 -3
- package/dist/nodes/llms/LmGooglePalm/LmGooglePalm.node.js.map +1 -1
- package/dist/nodes/memory/MemoryBufferWindow/MemoryBufferWindow.node.d.ts +1 -1
- package/dist/nodes/memory/MemoryBufferWindow/MemoryBufferWindow.node.js +8 -8
- package/dist/nodes/memory/MemoryBufferWindow/MemoryBufferWindow.node.js.map +1 -1
- package/dist/nodes/memory/MemoryMotorhead/MemoryMotorhead.node.d.ts +1 -1
- package/dist/nodes/memory/MemoryMotorhead/MemoryMotorhead.node.js +1 -2
- package/dist/nodes/memory/MemoryMotorhead/MemoryMotorhead.node.js.map +1 -1
- package/dist/nodes/memory/MemoryRedisChat/MemoryRedisChat.node.d.ts +1 -1
- package/dist/nodes/memory/MemoryRedisChat/MemoryRedisChat.node.js +3 -3
- package/dist/nodes/memory/MemoryRedisChat/MemoryRedisChat.node.js.map +1 -1
- package/dist/nodes/memory/MemoryXata/MemoryXata.node.d.ts +1 -1
- package/dist/nodes/memory/MemoryXata/MemoryXata.node.js +1 -2
- package/dist/nodes/memory/MemoryXata/MemoryXata.node.js.map +1 -1
- package/dist/nodes/memory/MemoryZep/MemoryZep.node.d.ts +1 -1
- package/dist/nodes/memory/MemoryZep/MemoryZep.node.js +1 -2
- package/dist/nodes/memory/MemoryZep/MemoryZep.node.js.map +1 -1
- package/dist/nodes/output_parser/OutputParserAutofixing/OutputParserAutofixing.node.d.ts +1 -1
- package/dist/nodes/output_parser/OutputParserAutofixing/OutputParserAutofixing.node.js +3 -3
- package/dist/nodes/output_parser/OutputParserAutofixing/OutputParserAutofixing.node.js.map +1 -1
- package/dist/nodes/output_parser/OutputParserItemList/OutputParserItemList.node.d.ts +1 -1
- package/dist/nodes/output_parser/OutputParserItemList/OutputParserItemList.node.js +1 -2
- package/dist/nodes/output_parser/OutputParserItemList/OutputParserItemList.node.js.map +1 -1
- package/dist/nodes/output_parser/OutputParserStructured/OutputParserStructured.node.d.ts +1 -1
- package/dist/nodes/output_parser/OutputParserStructured/OutputParserStructured.node.js +1 -2
- package/dist/nodes/output_parser/OutputParserStructured/OutputParserStructured.node.js.map +1 -1
- package/dist/nodes/retrievers/RetrieverContextualCompression/RetrieverContextualCompression.node.d.ts +1 -1
- package/dist/nodes/retrievers/RetrieverContextualCompression/RetrieverContextualCompression.node.js +3 -3
- package/dist/nodes/retrievers/RetrieverContextualCompression/RetrieverContextualCompression.node.js.map +1 -1
- package/dist/nodes/retrievers/RetrieverMultiQuery/RetrieverMultiQuery.node.d.ts +1 -1
- package/dist/nodes/retrievers/RetrieverMultiQuery/RetrieverMultiQuery.node.js +3 -4
- package/dist/nodes/retrievers/RetrieverMultiQuery/RetrieverMultiQuery.node.js.map +1 -1
- package/dist/nodes/retrievers/RetrieverVectorStore/RetrieverVectorStore.node.d.ts +1 -1
- package/dist/nodes/retrievers/RetrieverVectorStore/RetrieverVectorStore.node.js +3 -3
- package/dist/nodes/retrievers/RetrieverVectorStore/RetrieverVectorStore.node.js.map +1 -1
- package/dist/nodes/retrievers/RetrieverWorkflow/RetrieverWorkflow.node.d.ts +1 -1
- package/dist/nodes/retrievers/RetrieverWorkflow/RetrieverWorkflow.node.js +4 -5
- package/dist/nodes/retrievers/RetrieverWorkflow/RetrieverWorkflow.node.js.map +1 -1
- package/dist/nodes/text_splitters/TextSplitterCharacterTextSplitter/TextSplitterCharacterTextSplitter.node.d.ts +1 -1
- package/dist/nodes/text_splitters/TextSplitterCharacterTextSplitter/TextSplitterCharacterTextSplitter.node.js +1 -2
- package/dist/nodes/text_splitters/TextSplitterCharacterTextSplitter/TextSplitterCharacterTextSplitter.node.js.map +1 -1
- package/dist/nodes/text_splitters/TextSplitterRecursiveCharacterTextSplitter/TextSplitterRecursiveCharacterTextSplitter.node.d.ts +1 -1
- package/dist/nodes/text_splitters/TextSplitterRecursiveCharacterTextSplitter/TextSplitterRecursiveCharacterTextSplitter.node.js +3 -3
- package/dist/nodes/text_splitters/TextSplitterRecursiveCharacterTextSplitter/TextSplitterRecursiveCharacterTextSplitter.node.js.map +1 -1
- package/dist/nodes/text_splitters/TextSplitterTokenSplitter/TextSplitterTokenSplitter.node.d.ts +1 -1
- package/dist/nodes/text_splitters/TextSplitterTokenSplitter/TextSplitterTokenSplitter.node.js +1 -2
- package/dist/nodes/text_splitters/TextSplitterTokenSplitter/TextSplitterTokenSplitter.node.js.map +1 -1
- package/dist/nodes/tools/ToolCode/ToolCode.node.d.ts +1 -1
- package/dist/nodes/tools/ToolCode/ToolCode.node.js +2 -3
- package/dist/nodes/tools/ToolCode/ToolCode.node.js.map +1 -1
- package/dist/nodes/tools/ToolGoogleCalendar/ToolGoogleCalendar.node.js +2 -0
- package/dist/nodes/tools/ToolGoogleCalendar/ToolGoogleCalendar.node.js.map +1 -0
- package/dist/nodes/tools/ToolGoogleCalendar/googleCalendar.svg +1 -0
- package/dist/nodes/tools/ToolSerpApi/ToolSerpApi.node.d.ts +1 -1
- package/dist/nodes/tools/ToolSerpApi/ToolSerpApi.node.js +1 -2
- package/dist/nodes/tools/ToolSerpApi/ToolSerpApi.node.js.map +1 -1
- package/dist/nodes/tools/ToolWorkflow/ToolWorkflow.node.d.ts +1 -1
- package/dist/nodes/tools/ToolWorkflow/ToolWorkflow.node.js +5 -6
- package/dist/nodes/tools/ToolWorkflow/ToolWorkflow.node.js.map +1 -1
- package/dist/nodes/vector_store/VectorStoreInMemoryInsert/VectorStoreInMemoryInsert.node.d.ts +5 -0
- package/dist/nodes/vector_store/VectorStoreInMemoryInsert/VectorStoreInMemoryInsert.node.js +85 -0
- package/dist/nodes/vector_store/VectorStoreInMemoryInsert/VectorStoreInMemoryInsert.node.js.map +1 -0
- package/dist/nodes/vector_store/VectorStoreInMemoryLoad/VectorStoreInMemoryLoad.node.d.ts +5 -0
- package/dist/nodes/vector_store/VectorStoreInMemoryLoad/VectorStoreInMemoryLoad.node.js +64 -0
- package/dist/nodes/vector_store/VectorStoreInMemoryLoad/VectorStoreInMemoryLoad.node.js.map +1 -0
- package/dist/nodes/vector_store/VectorStorePineconeInsert/VectorStorePineconeInsert.node.js +2 -12
- package/dist/nodes/vector_store/VectorStorePineconeInsert/VectorStorePineconeInsert.node.js.map +1 -1
- package/dist/nodes/vector_store/VectorStorePineconeLoad/VectorStorePineconeLoad.node.d.ts +1 -1
- package/dist/nodes/vector_store/VectorStorePineconeLoad/VectorStorePineconeLoad.node.js +4 -4
- package/dist/nodes/vector_store/VectorStorePineconeLoad/VectorStorePineconeLoad.node.js.map +1 -1
- package/dist/nodes/vector_store/VectorStoreSupabaseInsert/VectorStoreSupabaseInsert.node.js +2 -12
- package/dist/nodes/vector_store/VectorStoreSupabaseInsert/VectorStoreSupabaseInsert.node.js.map +1 -1
- package/dist/nodes/vector_store/VectorStoreSupabaseLoad/VectorStoreSupabaseLoad.node.d.ts +1 -1
- package/dist/nodes/vector_store/VectorStoreSupabaseLoad/VectorStoreSupabaseLoad.node.js +4 -4
- package/dist/nodes/vector_store/VectorStoreSupabaseLoad/VectorStoreSupabaseLoad.node.js.map +1 -1
- package/dist/nodes/vector_store/VectorStoreZepInsert/VectorStoreZepInsert.node.js +3 -12
- package/dist/nodes/vector_store/VectorStoreZepInsert/VectorStoreZepInsert.node.js.map +1 -1
- package/dist/nodes/vector_store/VectorStoreZepLoad/VectorStoreZepLoad.node.d.ts +1 -1
- package/dist/nodes/vector_store/VectorStoreZepLoad/VectorStoreZepLoad.node.js +4 -3
- package/dist/nodes/vector_store/VectorStoreZepLoad/VectorStoreZepLoad.node.js.map +1 -1
- package/dist/nodes/vector_store/shared/MemoryVectorStoreManager.d.ts +12 -0
- package/dist/nodes/vector_store/shared/MemoryVectorStoreManager.js +34 -0
- package/dist/nodes/vector_store/shared/MemoryVectorStoreManager.js.map +1 -0
- package/dist/nodes/vector_store/shared/processDocuments.d.ts +12 -0
- package/dist/nodes/vector_store/shared/processDocuments.js +23 -0
- package/dist/nodes/vector_store/shared/processDocuments.js.map +1 -0
- package/dist/types/nodes.json +13 -12
- package/dist/utils/logWrapper.d.ts +1 -2
- package/dist/utils/logWrapper.js +4 -2
- package/dist/utils/logWrapper.js.map +1 -1
- package/package.json +8 -5
- package/dist/nodes/agents/ConversationalAgent/ConversationalAgent.node.js +0 -2
- package/dist/nodes/agents/ConversationalAgent/ConversationalAgent.node.js.map +0 -1
- package/dist/nodes/retrievers/RetrieverContextualCompression copy/RetrieverContextualCompression.node.d.ts +0 -5
- package/dist/nodes/retrievers/RetrieverContextualCompression copy/RetrieverContextualCompression.node.js +0 -71
- package/dist/nodes/retrievers/RetrieverContextualCompression copy/RetrieverContextualCompression.node.js.map +0 -1
- package/dist/nodes/retrievers/RetrieverMultiQuery/RetrieverContextualCompression.node.d.ts +0 -5
- package/dist/nodes/retrievers/RetrieverMultiQuery/RetrieverContextualCompression.node.js +0 -71
- package/dist/nodes/retrievers/RetrieverMultiQuery/RetrieverContextualCompression.node.js.map +0 -1
- package/dist/nodes/retrievers/RetrieverMultiQuery copy/RetrieverMultiQuery.node.d.ts +0 -5
- package/dist/nodes/retrievers/RetrieverMultiQuery copy/RetrieverMultiQuery.node.js +0 -69
- package/dist/nodes/retrievers/RetrieverMultiQuery copy/RetrieverMultiQuery.node.js.map +0 -1
- package/dist/nodes/retrievers/RetrieverWorkflow/RetrieverMultiQuery.node.d.ts +0 -5
- package/dist/nodes/retrievers/RetrieverWorkflow/RetrieverMultiQuery.node.js +0 -69
- package/dist/nodes/retrievers/RetrieverWorkflow/RetrieverMultiQuery.node.js.map +0 -1
- package/dist/nodes/vector_store/VectorStoreInMemory/VectorStoreInMemory.node.d.ts +0 -5
- package/dist/nodes/vector_store/VectorStoreInMemory/VectorStoreInMemory.node.js +0 -66
- package/dist/nodes/vector_store/VectorStoreInMemory/VectorStoreInMemory.node.js.map +0 -1
- package/dist/tsconfig.build.tsbuildinfo +0 -1
- package/dist/tsconfig.tsbuildinfo +0 -1
- /package/dist/nodes/{agents/ConversationalAgent/ConversationalAgent.node.d.ts → tools/ToolGoogleCalendar/ToolGoogleCalendar.node.d.ts} +0 -0
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
{
|
|
2
|
+
"anthropicApi": {
|
|
3
|
+
"className": "AnthropicApi",
|
|
4
|
+
"sourcePath": "dist/credentials/AnthropicApi.credentials.js",
|
|
5
|
+
"nodesToTestWith": [
|
|
6
|
+
"lmChatAnthropic"
|
|
7
|
+
]
|
|
8
|
+
},
|
|
9
|
+
"cohereApi": {
|
|
10
|
+
"className": "CohereApi",
|
|
11
|
+
"sourcePath": "dist/credentials/CohereApi.credentials.js",
|
|
12
|
+
"nodesToTestWith": [
|
|
13
|
+
"embeddingsCohere",
|
|
14
|
+
"lmCohere"
|
|
15
|
+
]
|
|
16
|
+
},
|
|
17
|
+
"googlePalmApi": {
|
|
18
|
+
"className": "GooglePalmApi",
|
|
19
|
+
"sourcePath": "dist/credentials/GooglePalmApi.credentials.js",
|
|
20
|
+
"nodesToTestWith": [
|
|
21
|
+
"embeddingsGooglePalm",
|
|
22
|
+
"lmChatGooglePalm",
|
|
23
|
+
"lmGooglePalm"
|
|
24
|
+
]
|
|
25
|
+
},
|
|
26
|
+
"huggingFaceApi": {
|
|
27
|
+
"className": "HuggingFaceApi",
|
|
28
|
+
"sourcePath": "dist/credentials/HuggingFaceApi.credentials.js",
|
|
29
|
+
"nodesToTestWith": [
|
|
30
|
+
"embeddingsHuggingFaceInference",
|
|
31
|
+
"lmOpenHuggingFaceInference"
|
|
32
|
+
]
|
|
33
|
+
},
|
|
34
|
+
"motorheadApi": {
|
|
35
|
+
"className": "MotorheadApi",
|
|
36
|
+
"sourcePath": "dist/credentials/MotorheadApi.credentials.js",
|
|
37
|
+
"nodesToTestWith": [
|
|
38
|
+
"memoryMotorhead"
|
|
39
|
+
]
|
|
40
|
+
},
|
|
41
|
+
"ollamaApi": {
|
|
42
|
+
"className": "OllamaApi",
|
|
43
|
+
"sourcePath": "dist/credentials/OllamaApi.credentials.js",
|
|
44
|
+
"nodesToTestWith": [
|
|
45
|
+
"lmChatOllama",
|
|
46
|
+
"lmOllama"
|
|
47
|
+
]
|
|
48
|
+
},
|
|
49
|
+
"pineconeApi": {
|
|
50
|
+
"className": "PineconeApi",
|
|
51
|
+
"sourcePath": "dist/credentials/PineconeApi.credentials.js",
|
|
52
|
+
"nodesToTestWith": [
|
|
53
|
+
"vectorStorePineconeInsert",
|
|
54
|
+
"vectorStorePineconeLoad"
|
|
55
|
+
]
|
|
56
|
+
},
|
|
57
|
+
"serpApi": {
|
|
58
|
+
"className": "SerpApi",
|
|
59
|
+
"sourcePath": "dist/credentials/SerpApi.credentials.js",
|
|
60
|
+
"nodesToTestWith": [
|
|
61
|
+
"toolSerpApi"
|
|
62
|
+
]
|
|
63
|
+
},
|
|
64
|
+
"wolframAlphaApi": {
|
|
65
|
+
"className": "WolframAlphaApi",
|
|
66
|
+
"sourcePath": "dist/credentials/WolframAlphaApi.credentials.js",
|
|
67
|
+
"nodesToTestWith": [
|
|
68
|
+
"toolWolframAlpha"
|
|
69
|
+
]
|
|
70
|
+
},
|
|
71
|
+
"xataApi": {
|
|
72
|
+
"className": "XataApi",
|
|
73
|
+
"sourcePath": "dist/credentials/XataApi.credentials.js",
|
|
74
|
+
"nodesToTestWith": [
|
|
75
|
+
"memoryXata"
|
|
76
|
+
]
|
|
77
|
+
},
|
|
78
|
+
"zepApi": {
|
|
79
|
+
"className": "ZepApi",
|
|
80
|
+
"sourcePath": "dist/credentials/ZepApi.credentials.js",
|
|
81
|
+
"nodesToTestWith": [
|
|
82
|
+
"memoryZep",
|
|
83
|
+
"vectorStoreZepInsert",
|
|
84
|
+
"vectorStoreZepLoad"
|
|
85
|
+
]
|
|
86
|
+
}
|
|
87
|
+
}
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
{
|
|
2
|
+
"code": {
|
|
3
|
+
"className": "Code",
|
|
4
|
+
"sourcePath": "dist/nodes/code/Code.node.js"
|
|
5
|
+
},
|
|
6
|
+
"agent": {
|
|
7
|
+
"className": "Agent",
|
|
8
|
+
"sourcePath": "dist/nodes/agents/Agent/Agent.node.js"
|
|
9
|
+
},
|
|
10
|
+
"chainLlm": {
|
|
11
|
+
"className": "ChainLlm",
|
|
12
|
+
"sourcePath": "dist/nodes/chains/ChainLLM/ChainLlm.node.js"
|
|
13
|
+
},
|
|
14
|
+
"chainRetrievalQa": {
|
|
15
|
+
"className": "ChainRetrievalQa",
|
|
16
|
+
"sourcePath": "dist/nodes/chains/ChainRetrievalQA/ChainRetrievalQa.node.js"
|
|
17
|
+
},
|
|
18
|
+
"chainSummarization": {
|
|
19
|
+
"className": "ChainSummarization",
|
|
20
|
+
"sourcePath": "dist/nodes/chains/ChainSummarization/ChainSummarization.node.js"
|
|
21
|
+
},
|
|
22
|
+
"documentBinaryInputLoader": {
|
|
23
|
+
"className": "DocumentBinaryInputLoader",
|
|
24
|
+
"sourcePath": "dist/nodes/document_loaders/DocumentBinaryInputLoader/DocumentBinaryInputLoader.node.js"
|
|
25
|
+
},
|
|
26
|
+
"documentGithubLoader": {
|
|
27
|
+
"className": "DocumentGithubLoader",
|
|
28
|
+
"sourcePath": "dist/nodes/document_loaders/DocumentGithubLoader/DocumentGithubLoader.node.js"
|
|
29
|
+
},
|
|
30
|
+
"documentJsonInputLoader": {
|
|
31
|
+
"className": "DocumentJsonInputLoader",
|
|
32
|
+
"sourcePath": "dist/nodes/document_loaders/DocumentJSONInputLoader/DocumentJsonInputLoader.node.js"
|
|
33
|
+
},
|
|
34
|
+
"embeddingsCohere": {
|
|
35
|
+
"className": "EmbeddingsCohere",
|
|
36
|
+
"sourcePath": "dist/nodes/embeddings/EmbeddingsCohere/EmbeddingsCohere.node.js"
|
|
37
|
+
},
|
|
38
|
+
"embeddingsGooglePalm": {
|
|
39
|
+
"className": "EmbeddingsGooglePalm",
|
|
40
|
+
"sourcePath": "dist/nodes/embeddings/EmbeddingsGooglePalm/EmbeddingsGooglePalm.node.js"
|
|
41
|
+
},
|
|
42
|
+
"embeddingsHuggingFaceInference": {
|
|
43
|
+
"className": "EmbeddingsHuggingFaceInference",
|
|
44
|
+
"sourcePath": "dist/nodes/embeddings/EmbeddingsHuggingFaceInference/EmbeddingsHuggingFaceInference.node.js"
|
|
45
|
+
},
|
|
46
|
+
"embeddingsOpenAi": {
|
|
47
|
+
"className": "EmbeddingsOpenAi",
|
|
48
|
+
"sourcePath": "dist/nodes/embeddings/EmbeddingsOpenAI/EmbeddingsOpenAi.node.js"
|
|
49
|
+
},
|
|
50
|
+
"embeddingsTensorFlow": {
|
|
51
|
+
"className": "EmbeddingsTensorFlow",
|
|
52
|
+
"sourcePath": "dist/nodes/embeddings/EmbeddingsTensorFlow/EmbeddingsTensorFlow.node.js"
|
|
53
|
+
},
|
|
54
|
+
"lmChatAnthropic": {
|
|
55
|
+
"className": "LmChatAnthropic",
|
|
56
|
+
"sourcePath": "dist/nodes/llms/LMChatAnthropic/LmChatAnthropic.node.js"
|
|
57
|
+
},
|
|
58
|
+
"lmChatOllama": {
|
|
59
|
+
"className": "LmChatOllama",
|
|
60
|
+
"sourcePath": "dist/nodes/llms/LMChatOllama/LmChatOllama.node.js"
|
|
61
|
+
},
|
|
62
|
+
"lmChatOpenAi": {
|
|
63
|
+
"className": "LmChatOpenAi",
|
|
64
|
+
"sourcePath": "dist/nodes/llms/LMChatOpenAi/LmChatOpenAi.node.js"
|
|
65
|
+
},
|
|
66
|
+
"lmCohere": {
|
|
67
|
+
"className": "LmCohere",
|
|
68
|
+
"sourcePath": "dist/nodes/llms/LMCohere/LmCohere.node.js"
|
|
69
|
+
},
|
|
70
|
+
"lmOllama": {
|
|
71
|
+
"className": "LmOllama",
|
|
72
|
+
"sourcePath": "dist/nodes/llms/LMOllama/LmOllama.node.js"
|
|
73
|
+
},
|
|
74
|
+
"lmOpenAi": {
|
|
75
|
+
"className": "LmOpenAi",
|
|
76
|
+
"sourcePath": "dist/nodes/llms/LMOpenAi/LmOpenAi.node.js"
|
|
77
|
+
},
|
|
78
|
+
"lmOpenHuggingFaceInference": {
|
|
79
|
+
"className": "LmOpenHuggingFaceInference",
|
|
80
|
+
"sourcePath": "dist/nodes/llms/LMOpenHuggingFaceInference/LmOpenHuggingFaceInference.node.js"
|
|
81
|
+
},
|
|
82
|
+
"lmChatGooglePalm": {
|
|
83
|
+
"className": "LmChatGooglePalm",
|
|
84
|
+
"sourcePath": "dist/nodes/llms/LmChatGooglePalm/LmChatGooglePalm.node.js"
|
|
85
|
+
},
|
|
86
|
+
"lmGooglePalm": {
|
|
87
|
+
"className": "LmGooglePalm",
|
|
88
|
+
"sourcePath": "dist/nodes/llms/LmGooglePalm/LmGooglePalm.node.js"
|
|
89
|
+
},
|
|
90
|
+
"memoryBufferWindow": {
|
|
91
|
+
"className": "MemoryBufferWindow",
|
|
92
|
+
"sourcePath": "dist/nodes/memory/MemoryBufferWindow/MemoryBufferWindow.node.js"
|
|
93
|
+
},
|
|
94
|
+
"memoryChatRetriever": {
|
|
95
|
+
"className": "MemoryChatRetriever",
|
|
96
|
+
"sourcePath": "dist/nodes/memory/MemoryChatRetriever/MemoryChatRetriever.node.js"
|
|
97
|
+
},
|
|
98
|
+
"memoryMotorhead": {
|
|
99
|
+
"className": "MemoryMotorhead",
|
|
100
|
+
"sourcePath": "dist/nodes/memory/MemoryMotorhead/MemoryMotorhead.node.js"
|
|
101
|
+
},
|
|
102
|
+
"memoryRedisChat": {
|
|
103
|
+
"className": "MemoryRedisChat",
|
|
104
|
+
"sourcePath": "dist/nodes/memory/MemoryRedisChat/MemoryRedisChat.node.js"
|
|
105
|
+
},
|
|
106
|
+
"memoryXata": {
|
|
107
|
+
"className": "MemoryXata",
|
|
108
|
+
"sourcePath": "dist/nodes/memory/MemoryXata/MemoryXata.node.js"
|
|
109
|
+
},
|
|
110
|
+
"memoryZep": {
|
|
111
|
+
"className": "MemoryZep",
|
|
112
|
+
"sourcePath": "dist/nodes/memory/MemoryZep/MemoryZep.node.js"
|
|
113
|
+
},
|
|
114
|
+
"outputParserAutofixing": {
|
|
115
|
+
"className": "OutputParserAutofixing",
|
|
116
|
+
"sourcePath": "dist/nodes/output_parser/OutputParserAutofixing/OutputParserAutofixing.node.js"
|
|
117
|
+
},
|
|
118
|
+
"outputParserItemList": {
|
|
119
|
+
"className": "OutputParserItemList",
|
|
120
|
+
"sourcePath": "dist/nodes/output_parser/OutputParserItemList/OutputParserItemList.node.js"
|
|
121
|
+
},
|
|
122
|
+
"outputParserStructured": {
|
|
123
|
+
"className": "OutputParserStructured",
|
|
124
|
+
"sourcePath": "dist/nodes/output_parser/OutputParserStructured/OutputParserStructured.node.js"
|
|
125
|
+
},
|
|
126
|
+
"retrieverContextualCompression": {
|
|
127
|
+
"className": "RetrieverContextualCompression",
|
|
128
|
+
"sourcePath": "dist/nodes/retrievers/RetrieverContextualCompression/RetrieverContextualCompression.node.js"
|
|
129
|
+
},
|
|
130
|
+
"retrieverMultiQuery": {
|
|
131
|
+
"className": "RetrieverMultiQuery",
|
|
132
|
+
"sourcePath": "dist/nodes/retrievers/RetrieverMultiQuery/RetrieverMultiQuery.node.js"
|
|
133
|
+
},
|
|
134
|
+
"retrieverVectorStore": {
|
|
135
|
+
"className": "RetrieverVectorStore",
|
|
136
|
+
"sourcePath": "dist/nodes/retrievers/RetrieverVectorStore/RetrieverVectorStore.node.js"
|
|
137
|
+
},
|
|
138
|
+
"retrieverWorkflow": {
|
|
139
|
+
"className": "RetrieverWorkflow",
|
|
140
|
+
"sourcePath": "dist/nodes/retrievers/RetrieverWorkflow/RetrieverWorkflow.node.js"
|
|
141
|
+
},
|
|
142
|
+
"textSplitterCharacterTextSplitter": {
|
|
143
|
+
"className": "TextSplitterCharacterTextSplitter",
|
|
144
|
+
"sourcePath": "dist/nodes/text_splitters/TextSplitterCharacterTextSplitter/TextSplitterCharacterTextSplitter.node.js"
|
|
145
|
+
},
|
|
146
|
+
"textSplitterRecursiveCharacterTextSplitter": {
|
|
147
|
+
"className": "TextSplitterRecursiveCharacterTextSplitter",
|
|
148
|
+
"sourcePath": "dist/nodes/text_splitters/TextSplitterRecursiveCharacterTextSplitter/TextSplitterRecursiveCharacterTextSplitter.node.js"
|
|
149
|
+
},
|
|
150
|
+
"textSplitterTokenSplitter": {
|
|
151
|
+
"className": "TextSplitterTokenSplitter",
|
|
152
|
+
"sourcePath": "dist/nodes/text_splitters/TextSplitterTokenSplitter/TextSplitterTokenSplitter.node.js"
|
|
153
|
+
},
|
|
154
|
+
"toolCalculator": {
|
|
155
|
+
"className": "ToolCalculator",
|
|
156
|
+
"sourcePath": "dist/nodes/tools/ToolCalculator/ToolCalculator.node.js"
|
|
157
|
+
},
|
|
158
|
+
"toolCode": {
|
|
159
|
+
"className": "ToolCode",
|
|
160
|
+
"sourcePath": "dist/nodes/tools/ToolCode/ToolCode.node.js"
|
|
161
|
+
},
|
|
162
|
+
"toolSerpApi": {
|
|
163
|
+
"className": "ToolSerpApi",
|
|
164
|
+
"sourcePath": "dist/nodes/tools/ToolSerpApi/ToolSerpApi.node.js"
|
|
165
|
+
},
|
|
166
|
+
"toolWikipedia": {
|
|
167
|
+
"className": "ToolWikipedia",
|
|
168
|
+
"sourcePath": "dist/nodes/tools/ToolWikipedia/ToolWikipedia.node.js"
|
|
169
|
+
},
|
|
170
|
+
"toolWolframAlpha": {
|
|
171
|
+
"className": "ToolWolframAlpha",
|
|
172
|
+
"sourcePath": "dist/nodes/tools/ToolWolframAlpha/ToolWolframAlpha.node.js"
|
|
173
|
+
},
|
|
174
|
+
"toolWorkflow": {
|
|
175
|
+
"className": "ToolWorkflow",
|
|
176
|
+
"sourcePath": "dist/nodes/tools/ToolWorkflow/ToolWorkflow.node.js"
|
|
177
|
+
},
|
|
178
|
+
"manualChatTrigger": {
|
|
179
|
+
"className": "ManualChatTrigger",
|
|
180
|
+
"sourcePath": "dist/nodes/trigger/ManualChatTrigger/ManualChatTrigger.node.js"
|
|
181
|
+
},
|
|
182
|
+
"vectorStoreInMemoryInsert": {
|
|
183
|
+
"className": "VectorStoreInMemoryInsert",
|
|
184
|
+
"sourcePath": "dist/nodes/vector_store/VectorStoreInMemoryInsert/VectorStoreInMemoryInsert.node.js"
|
|
185
|
+
},
|
|
186
|
+
"vectorStoreInMemoryLoad": {
|
|
187
|
+
"className": "VectorStoreInMemoryLoad",
|
|
188
|
+
"sourcePath": "dist/nodes/vector_store/VectorStoreInMemoryLoad/VectorStoreInMemoryLoad.node.js"
|
|
189
|
+
},
|
|
190
|
+
"vectorStorePineconeInsert": {
|
|
191
|
+
"className": "VectorStorePineconeInsert",
|
|
192
|
+
"sourcePath": "dist/nodes/vector_store/VectorStorePineconeInsert/VectorStorePineconeInsert.node.js"
|
|
193
|
+
},
|
|
194
|
+
"vectorStorePineconeLoad": {
|
|
195
|
+
"className": "VectorStorePineconeLoad",
|
|
196
|
+
"sourcePath": "dist/nodes/vector_store/VectorStorePineconeLoad/VectorStorePineconeLoad.node.js"
|
|
197
|
+
},
|
|
198
|
+
"vectorStoreSupabaseInsert": {
|
|
199
|
+
"className": "VectorStoreSupabaseInsert",
|
|
200
|
+
"sourcePath": "dist/nodes/vector_store/VectorStoreSupabaseInsert/VectorStoreSupabaseInsert.node.js"
|
|
201
|
+
},
|
|
202
|
+
"vectorStoreSupabaseLoad": {
|
|
203
|
+
"className": "VectorStoreSupabaseLoad",
|
|
204
|
+
"sourcePath": "dist/nodes/vector_store/VectorStoreSupabaseLoad/VectorStoreSupabaseLoad.node.js"
|
|
205
|
+
},
|
|
206
|
+
"vectorStoreZepInsert": {
|
|
207
|
+
"className": "VectorStoreZepInsert",
|
|
208
|
+
"sourcePath": "dist/nodes/vector_store/VectorStoreZepInsert/VectorStoreZepInsert.node.js"
|
|
209
|
+
},
|
|
210
|
+
"vectorStoreZepLoad": {
|
|
211
|
+
"className": "VectorStoreZepLoad",
|
|
212
|
+
"sourcePath": "dist/nodes/vector_store/VectorStoreZepLoad/VectorStoreZepLoad.node.js"
|
|
213
|
+
}
|
|
214
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"description.js","sourceRoot":"","sources":["../../../../../../nodes/agents/Agent/agents/ConversationalAgent/description.ts"],"names":[],"mappings":";;;AACA,qCAAyD;AAE5C,QAAA,6BAA6B,GAAsB;IAC/D;QACC,WAAW,EAAE,MAAM;QACnB,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,QAAQ;QACd,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,KAAK,EAAE,CAAC,qBAAqB,CAAC;aAC9B;SACD;QACD,OAAO,EAAE,oBAAoB;KAC7B;IACD;QACC,WAAW,EAAE,SAAS;QACtB,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,YAAY;QAClB,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,KAAK,EAAE,CAAC,qBAAqB,CAAC;aAC9B;SACD;QACD,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,YAAY;QACzB,OAAO,EAAE;YACR;gBACC,WAAW,EAAE,eAAe;gBAC5B,IAAI,EAAE,cAAc;gBACpB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,sBAAa;gBACtB,WAAW,EAAE,qEAAqE;gBAClF,WAAW,EAAE;oBACZ,IAAI,EAAE,CAAC;iBACP;aACD;YACD;gBACC,WAAW,EAAE,gBAAgB;gBAC7B,IAAI,EAAE,eAAe;gBACrB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,uBAAc;gBACvB,WAAW,EAAE,2EAA2E;gBACxF,WAAW,EAAE;oBACZ,IAAI,EAAE,CAAC;iBACP;aACD;SACD;KACD;CACD,CAAC"}
|
|
1
|
+
{"version":3,"file":"description.js","sourceRoot":"","sources":["../../../../../../nodes/agents/Agent/agents/ConversationalAgent/description.ts"],"names":[],"mappings":";;;AACA,qCAAyD;AAE5C,QAAA,6BAA6B,GAAsB;IAC/D;QACC,WAAW,EAAE,MAAM;QACnB,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;QACd,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,KAAK,EAAE,CAAC,qBAAqB,CAAC;aAC9B;SACD;QACD,OAAO,EAAE,oBAAoB;KAC7B;IACD;QACC,WAAW,EAAE,SAAS;QACtB,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,YAAY;QAClB,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,KAAK,EAAE,CAAC,qBAAqB,CAAC;aAC9B;SACD;QACD,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,YAAY;QACzB,OAAO,EAAE;YACR;gBACC,WAAW,EAAE,eAAe;gBAC5B,IAAI,EAAE,cAAc;gBACpB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,sBAAa;gBACtB,WAAW,EAAE,qEAAqE;gBAClF,WAAW,EAAE;oBACZ,IAAI,EAAE,CAAC;iBACP;aACD;YACD;gBACC,WAAW,EAAE,gBAAgB;gBAC7B,IAAI,EAAE,eAAe;gBACrB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,uBAAc;gBACvB,WAAW,EAAE,2EAA2E;gBACxF,WAAW,EAAE;oBACZ,IAAI,EAAE,CAAC;iBACP;aACD;SACD;KACD;CACD,CAAC"}
|
|
@@ -44,6 +44,9 @@ async function conversationalAgentExecute() {
|
|
|
44
44
|
const items = this.getInputData();
|
|
45
45
|
for (let itemIndex = 0; itemIndex < items.length; itemIndex++) {
|
|
46
46
|
let input = this.getNodeParameter('text', itemIndex);
|
|
47
|
+
if (input === undefined) {
|
|
48
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'No value for the required parameter "Text" was returned.');
|
|
49
|
+
}
|
|
47
50
|
if (prompt) {
|
|
48
51
|
input = (await prompt.invoke({ input })).value;
|
|
49
52
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execute.js","sourceRoot":"","sources":["../../../../../../nodes/agents/Agent/agents/ConversationalAgent/execute.ts"],"names":[],"mappings":";;;AAAA,+CAKsB;AAEtB,6CAAsE;AACtE,qDAA2D;AAI3D,+CAAmD;AACnD,6DAAiE;AAE1D,KAAK,UAAU,0BAA0B;IAG/C,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,gCAAgC,CAAC,CAAC;IAEtD,MAAM,KAAK,GAAG,CAAC,MAAM,IAAI,CAAC,sBAAsB,qBAE/C,CAAC,CACD,CAAkB,CAAC;IAEpB,IAAI,CAAC,CAAC,KAAK,YAAY,oBAAa,CAAC,EAAE;QACtC,MAAM,IAAI,iC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QAC9D,IAAI,KAAK,GAAG,IAAI,CAAC,gBAAgB,CAAC,MAAM,EAAE,SAAS,CAAW,CAAC;QAE/D,IAAI,KAAK,KAAK,SAAS,EAAE;YACxB,MAAM,IAAI,iCAAkB,CAC3B,IAAI,CAAC,OAAO,EAAE,EACd,0DAA0D,CAC1D,CAAC;SACF;QAED,IAAI,MAAM,EAAE;YACX,KAAK,GAAG,CAAC,MAAM,MAAM,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC;SAC/C;QAED,IAAI,QAAQ,GAAG,MAAM,aAAa,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,aAAa,EAAE,CAAC,CAAC;QAElE,IAAI,YAAY,EAAE;YACjB,QAAQ,GAAG,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAgB,CAAC,EAAE,CAAC;SAC3E;QAED,UAAU,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC;KACpC;IAED,OAAO,IAAI,CAAC,iBAAiB,CAAC,UAAU,CAAC,CAAC;AAC3C,CAAC;AAtFD,gEAsFC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"description.js","sourceRoot":"","sources":["../../../../../../nodes/agents/Agent/agents/OpenAiFunctionsAgent/description.ts"],"names":[],"mappings":";;;AACA,qCAA0C;AAE7B,QAAA,8BAA8B,GAAsB;IAChE;QACC,WAAW,EAAE,MAAM;QACnB,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,QAAQ;QACd,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,KAAK,EAAE,CAAC,sBAAsB,CAAC;aAC/B;SACD;QACD,OAAO,EAAE,oBAAoB;KAC7B;IACD;QACC,WAAW,EAAE,SAAS;QACtB,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,YAAY;QAClB,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,KAAK,EAAE,CAAC,sBAAsB,CAAC;aAC/B;SACD;QACD,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,YAAY;QACzB,OAAO,EAAE;YACR;gBACC,WAAW,EAAE,gBAAgB;gBAC7B,IAAI,EAAE,eAAe;gBACrB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,uBAAc;gBACvB,WAAW,EAAE,2EAA2E;gBACxF,WAAW,EAAE;oBACZ,IAAI,EAAE,CAAC;iBACP;aACD;SACD;KACD;CACD,CAAC"}
|
|
1
|
+
{"version":3,"file":"description.js","sourceRoot":"","sources":["../../../../../../nodes/agents/Agent/agents/OpenAiFunctionsAgent/description.ts"],"names":[],"mappings":";;;AACA,qCAA0C;AAE7B,QAAA,8BAA8B,GAAsB;IAChE;QACC,WAAW,EAAE,MAAM;QACnB,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;QACd,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,KAAK,EAAE,CAAC,sBAAsB,CAAC;aAC/B;SACD;QACD,OAAO,EAAE,oBAAoB;KAC7B;IACD;QACC,WAAW,EAAE,SAAS;QACtB,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,YAAY;QAClB,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,KAAK,EAAE,CAAC,sBAAsB,CAAC;aAC/B;SACD;QACD,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,YAAY;QACzB,OAAO,EAAE;YACR;gBACC,WAAW,EAAE,gBAAgB;gBAC7B,IAAI,EAAE,eAAe;gBACrB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,uBAAc;gBACvB,WAAW,EAAE,2EAA2E;gBACxF,WAAW,EAAE;oBACZ,IAAI,EAAE,CAAC;iBACP;aACD;SACD;KACD;CACD,CAAC"}
|
|
@@ -47,6 +47,9 @@ async function openAiFunctionsAgentExecute() {
|
|
|
47
47
|
const items = this.getInputData();
|
|
48
48
|
for (let itemIndex = 0; itemIndex < items.length; itemIndex++) {
|
|
49
49
|
let input = this.getNodeParameter('text', itemIndex);
|
|
50
|
+
if (input === undefined) {
|
|
51
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'No value for the required parameter "Text" was returned.');
|
|
52
|
+
}
|
|
50
53
|
if (prompt) {
|
|
51
54
|
input = (await prompt.invoke({ input })).value;
|
|
52
55
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execute.js","sourceRoot":"","sources":["../../../../../../nodes/agents/Agent/agents/OpenAiFunctionsAgent/execute.ts"],"names":[],"mappings":";;;AAAA,+CAKsB;AAGtB,6CAA8D;AAG9D,+CAAmD;AACnD,6DAAiE;AACjE,6CAAqE;AACrE,yDAA0D;AAEnD,KAAK,UAAU,2BAA2B;IAGhD,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,kCAAkC,CAAC,CAAC;IACxD,MAAM,KAAK,GAAG,CAAC,MAAM,IAAI,CAAC,sBAAsB,qBAE/C,CAAC,CACD,CAAe,CAAC;IAEjB,IAAI,CAAC,CAAC,KAAK,YAAY,mBAAU,CAAC,EAAE;QACnC,MAAM,IAAI,iCAAkB,CAC3B,IAAI,CAAC,OAAO,EAAE,EACd,mDAAmD,CACnD,CAAC;KACF;IACD,MAAM,MAAM,GAAG,CAAC,MAAM,IAAI,CAAC,sBAAsB,cAA8B,CAAC,CAAC,CAErE,CAAC;IACb,MAAM,KAAK,GAAG,CAAC,MAAM,IAAI,CAAC,sBAAsB,YAA4B,CAAC,CAAC,CAAW,CAAC;IAC1F,MAAM,aAAa,GAAG,CAAC,MAAM,IAAI,CAAC,sBAAsB,oBAEvD,CAAC,CACD,CAAuB,CAAC;IACzB,MAAM,OAAO,GAAG,IAAI,CAAC,gBAAgB,CAAC,SAAS,EAAE,CAAC,EAAE,EAAE,CAErD,CAAC;IAEF,MAAM,WAAW,GAAuB;QACvC,IAAI,EAAE,CAAC,kBAAkB,CAAC;QAC1B,KAAK,EAAE,oBAAW,CAAC,eAAe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AAK,SAAS,EAAE;YACxB,MAAM,IAAI,iCAAkB,CAC3B,IAAI,CAAC,OAAO,EAAE,EACd,0DAA0D,CAC1D,CAAC;SACF;QAED,IAAI,MAAM,EAAE;YACX,KAAK,GAAG,CAAC,MAAM,MAAM,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC;SAC/C;QAED,IAAI,QAAQ,GAAG,MAAM,aAAa,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,aAAa,EAAE,CAAC,CAAC;QAElE,IAAI,YAAY,EAAE;YACjB,QAAQ,GAAG,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAgB,CAAC,EAAE,CAAC;SAC3E;QAED,UAAU,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC;KACpC;IAED,OAAO,IAAI,CAAC,iBAAiB,CAAC,UAAU,CAAC,CAAC;AAC3C,CAAC;AAvFD,kEAuFC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"description.js","sourceRoot":"","sources":["../../../../../../nodes/agents/Agent/agents/ReActAgent/description.ts"],"names":[],"mappings":";;;AACA,qCAA+E;AAElE,QAAA,yBAAyB,GAAsB;IAC3D;QACC,WAAW,EAAE,MAAM;QACnB,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,QAAQ;QACd,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,KAAK,EAAE,CAAC,YAAY,CAAC;aACrB;SACD;QACD,OAAO,EAAE,oBAAoB;KAC7B;IACD;QACC,WAAW,EAAE,SAAS;QACtB,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,YAAY;QAClB,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,KAAK,EAAE,CAAC,YAAY,CAAC;aACrB;SACD;QACD,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,YAAY;QACzB,OAAO,EAAE;YACR;gBACC,WAAW,EAAE,wBAAwB;gBACrC,IAAI,EAAE,sBAAsB;gBAC5B,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,+BAAsB;gBAC/B,WAAW,EAAE,sDAAsD;gBACnE,WAAW,EAAE;oBACZ,IAAI,EAAE,CAAC;iBACP;aACD;YACD;gBACC,WAAW,EAAE,gBAAgB;gBAC7B,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,eAAM;gBACf,WAAW,EAAE,wCAAwC;gBACrD,WAAW,EAAE;oBACZ,IAAI,EAAE,CAAC;iBACP;aACD;YACD;gBACC,WAAW,EAAE,+BAA+B;gBAC5C,IAAI,EAAE,YAAY;gBAClB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,oBAAW;gBACpB,WAAW,EACV,+EAA+E;gBAChF,WAAW,EAAE;oBACZ,IAAI,EAAE,CAAC;iBACP;aACD;YACD;gBACC,WAAW,EAAE,kCAAkC;gBAC/C,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,eAAM;gBACf,WAAW,EACV,kFAAkF;gBACnF,WAAW,EAAE;oBACZ,IAAI,EAAE,CAAC;iBACP;aACD;SACD;KACD;CACD,CAAC"}
|
|
1
|
+
{"version":3,"file":"description.js","sourceRoot":"","sources":["../../../../../../nodes/agents/Agent/agents/ReActAgent/description.ts"],"names":[],"mappings":";;;AACA,qCAA+E;AAElE,QAAA,yBAAyB,GAAsB;IAC3D;QACC,WAAW,EAAE,MAAM;QACnB,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;QACd,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,KAAK,EAAE,CAAC,YAAY,CAAC;aACrB;SACD;QACD,OAAO,EAAE,oBAAoB;KAC7B;IACD;QACC,WAAW,EAAE,SAAS;QACtB,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,YAAY;QAClB,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,KAAK,EAAE,CAAC,YAAY,CAAC;aACrB;SACD;QACD,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,YAAY;QACzB,OAAO,EAAE;YACR;gBACC,WAAW,EAAE,wBAAwB;gBACrC,IAAI,EAAE,sBAAsB;gBAC5B,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,+BAAsB;gBAC/B,WAAW,EAAE,sDAAsD;gBACnE,WAAW,EAAE;oBACZ,IAAI,EAAE,CAAC;iBACP;aACD;YACD;gBACC,WAAW,EAAE,gBAAgB;gBAC7B,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,eAAM;gBACf,WAAW,EAAE,wCAAwC;gBACrD,WAAW,EAAE;oBACZ,IAAI,EAAE,CAAC;iBACP;aACD;YACD;gBACC,WAAW,EAAE,+BAA+B;gBAC5C,IAAI,EAAE,YAAY;gBAClB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,oBAAW;gBACpB,WAAW,EACV,+EAA+E;gBAChF,WAAW,EAAE;oBACZ,IAAI,EAAE,CAAC;iBACP;aACD;YACD;gBACC,WAAW,EAAE,kCAAkC;gBAC/C,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,eAAM;gBACf,WAAW,EACV,kFAAkF;gBACnF,WAAW,EAAE;oBACZ,IAAI,EAAE,CAAC;iBACP;aACD;SACD;KACD;CACD,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.reActAgentAgentExecute = void 0;
|
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
4
5
|
const agents_1 = require("langchain/agents");
|
|
5
6
|
const prompts_1 = require("langchain/prompts");
|
|
6
7
|
const output_parsers_1 = require("langchain/output_parsers");
|
|
@@ -42,6 +43,9 @@ async function reActAgentAgentExecute() {
|
|
|
42
43
|
const items = this.getInputData();
|
|
43
44
|
for (let itemIndex = 0; itemIndex < items.length; itemIndex++) {
|
|
44
45
|
let input = this.getNodeParameter('text', itemIndex);
|
|
46
|
+
if (input === undefined) {
|
|
47
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'No value for the required parameter "Text" was returned.');
|
|
48
|
+
}
|
|
45
49
|
if (prompt) {
|
|
46
50
|
input = (await prompt.invoke({ input })).value;
|
|
47
51
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execute.js","sourceRoot":"","sources":["../../../../../../nodes/agents/Agent/agents/ReActAgent/execute.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"execute.js","sourceRoot":"","sources":["../../../../../../nodes/agents/Agent/agents/ReActAgent/execute.ts"],"names":[],"mappings":";;;AAAA,+CAKsB;AAEtB,6CAA2E;AAI3E,+CAAmD;AACnD,6DAAiE;AACjE,qDAA2D;AAEpD,KAAK,UAAU,sBAAsB;IAG3C,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,uBAAuB,CAAC,CAAC;IAE7C,MAAM,KAAK,GAAG,CAAC,MAAM,IAAI,CAAC,sBAAsB,qBAAqC,CAAC,CAAC,CAEvE,CAAC;IAEjB,MAAM,KAAK,GAAG,CAAC,MAAM,IAAI,CAAC,sBAAsB,YAA4B,CAAC,CAAC,CAAW,CAAC;IAE1F,MAAM,aAAa,GAAG,CAAC,MAAM,IAAI,CAAC,sBAAsB,oBAEvD,CAAC,CACD,CAAuB,CAAC;IAEzB,MAAM,OAAO,GAAG,IAAI,CAAC,gBAAgB,CAAC,SAAS,EAAE,CAAC,EAAE,EAAE,CAKrD,CAAC;IACF,IAAI,KAAgC,CAAC;IAErC,IAAI,KAAK,YAAY,oBAAa,EAAE;QACnC,KAAK,GAAG,kBAAS,CAAC,eAAe,CAAC,KAAK,EAAE,KAAK,EAAE;YAC/C,MAAM,EAAE,OAAO,CAAC,MAAM;YACtB,MAAM,EAAE,OAAO,CA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AAG,CAAC,MAAM,MAAM,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC;SAC/C;QAED,IAAI,QAAQ,GAAG,MAAM,aAAa,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,aAAa,EAAE,CAAC,CAAC;QAElE,IAAI,YAAY,EAAE;YACjB,QAAQ,GAAG,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAgB,CAAC,EAAE,CAAC;SAC3E;QAED,UAAU,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC;KACpC;IAED,OAAO,IAAI,CAAC,iBAAiB,CAAC,UAAU,CAAC,CAAC;AAC3C,CAAC;AAjFD,wDAiFC"}
|
|
@@ -21,6 +21,9 @@ async function sqlAgentAgentExecute() {
|
|
|
21
21
|
for (let i = 0; i < items.length; i++) {
|
|
22
22
|
const item = items[i];
|
|
23
23
|
const input = this.getNodeParameter('input', i);
|
|
24
|
+
if (input === undefined) {
|
|
25
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'No value for the required parameter "Prompt" was returned.');
|
|
26
|
+
}
|
|
24
27
|
const options = this.getNodeParameter('options', i, {});
|
|
25
28
|
const selectedDataSource = this.getNodeParameter('dataSource', i, 'sqlite');
|
|
26
29
|
const includedSampleRows = options.includedSampleRows;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execute.js","sourceRoot":"","sources":["../../../../../../nodes/agents/Agent/agents/SqlAgent/execute.ts"],"names":[],"mappings":";;;AAAA,+CAKsB;AAEtB,6CAA+C;AAE/C,uDAA2E;AAG3E,oDAA8D;AAC9D,wDAAkE;AAClE,6CAAyD;AACzD,kDAA4D;AAE5D,MAAM,iBAAiB,GAAG,CAAC,YAAoB,EAAE,EAAE,CAClD,YAAY;KACV,KAAK,CAAC,GAAG,CAAC;KACV,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,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CAAC,CAAC;KACpC;IAED,OAAO,IAAI,CAAC,iBAAiB,CAAC,UAAU,CAAC,CAAC;AAC3C,CAAC;AAlFD,oDAkFC"}
|
|
@@ -1,34 +1,32 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ChainLlm = void 0;
|
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
4
5
|
const prompts_1 = require("langchain/prompts");
|
|
5
6
|
const output_parsers_1 = require("langchain/output_parsers");
|
|
7
|
+
const chains_1 = require("langchain/chains");
|
|
8
|
+
async function createSimpleLLMChain(llm, query) {
|
|
9
|
+
const chain = new chains_1.LLMChain({
|
|
10
|
+
llm,
|
|
11
|
+
prompt: prompts_1.PromptTemplate.fromTemplate(query),
|
|
12
|
+
});
|
|
13
|
+
const response = (await chain.call({}));
|
|
14
|
+
return Array.isArray(response) ? response : [response];
|
|
15
|
+
}
|
|
6
16
|
async function getChain(context, query) {
|
|
7
17
|
const llm = (await context.getInputConnectionData("ai_languageModel", 0));
|
|
8
18
|
const outputParsers = (await context.getInputConnectionData("ai_outputParser", 0));
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
if (outputParsers.length) {
|
|
12
|
-
if (outputParsers.length === 1) {
|
|
13
|
-
outputParser = outputParsers[0];
|
|
14
|
-
}
|
|
15
|
-
else {
|
|
16
|
-
outputParser = new output_parsers_1.CombiningOutputParser(...outputParsers);
|
|
17
|
-
}
|
|
18
|
-
const formatInstructions = outputParser.getFormatInstructions();
|
|
19
|
-
prompt = new prompts_1.PromptTemplate({
|
|
20
|
-
template: query + '\n{formatInstructions}',
|
|
21
|
-
inputVariables: [],
|
|
22
|
-
partialVariables: { formatInstructions },
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
else {
|
|
26
|
-
prompt = prompts_1.PromptTemplate.fromTemplate(query);
|
|
27
|
-
}
|
|
28
|
-
let chain = prompt.pipe(llm);
|
|
29
|
-
if (outputParser) {
|
|
30
|
-
chain = chain.pipe(outputParser);
|
|
19
|
+
if (!outputParsers.length) {
|
|
20
|
+
return createSimpleLLMChain(llm, query);
|
|
31
21
|
}
|
|
22
|
+
const combinedOutputParser = outputParsers.length === 1 ? outputParsers[0] : new output_parsers_1.CombiningOutputParser(...outputParsers);
|
|
23
|
+
const formatInstructions = combinedOutputParser.getFormatInstructions();
|
|
24
|
+
const prompt = new prompts_1.PromptTemplate({
|
|
25
|
+
template: query + '\n{formatInstructions}',
|
|
26
|
+
inputVariables: [],
|
|
27
|
+
partialVariables: { formatInstructions },
|
|
28
|
+
});
|
|
29
|
+
const chain = prompt.pipe(llm).pipe(combinedOutputParser);
|
|
32
30
|
const response = (await chain.invoke({ query }));
|
|
33
31
|
return Array.isArray(response) ? response : [response];
|
|
34
32
|
}
|
|
@@ -80,6 +78,7 @@ class ChainLlm {
|
|
|
80
78
|
displayName: 'Prompt',
|
|
81
79
|
name: 'prompt',
|
|
82
80
|
type: 'string',
|
|
81
|
+
required: true,
|
|
83
82
|
default: '={{ $json.input }}',
|
|
84
83
|
},
|
|
85
84
|
],
|
|
@@ -91,6 +90,9 @@ class ChainLlm {
|
|
|
91
90
|
const returnData = [];
|
|
92
91
|
for (let i = 0; i < items.length; i++) {
|
|
93
92
|
const prompt = this.getNodeParameter('prompt', i);
|
|
93
|
+
if (prompt === undefined) {
|
|
94
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'No value for the required parameter "Prompt" was returned.');
|
|
95
|
+
}
|
|
94
96
|
const responses = await getChain(this, prompt);
|
|
95
97
|
responses.forEach((response) => {
|
|
96
98
|
let data;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChainLlm.node.js","sourceRoot":"","sources":["../../../../nodes/chains/ChainLLM/ChainLlm.node.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"ChainLlm.node.js","sourceRoot":"","sources":["../../../../nodes/chains/ChainLLM/ChainLlm.node.ts"],"names":[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;SACH;QAED,OAAO,CAAC,UAAU,CAAC,CAAC;IACrB,CAAC;CACD;AAtGD,4BAsGC"}
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ChainRetrievalQa = void 0;
|
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
4
5
|
const chains_1 = require("langchain/chains");
|
|
5
6
|
class ChainRetrievalQa {
|
|
6
7
|
constructor() {
|
|
7
8
|
this.description = {
|
|
8
|
-
displayName: 'Q&A Chain
|
|
9
|
+
displayName: 'Retrieval Q&A Chain',
|
|
9
10
|
name: 'chainRetrievalQa',
|
|
10
11
|
icon: 'fa:link',
|
|
11
12
|
group: ['transform'],
|
|
12
13
|
version: 1,
|
|
13
14
|
description: 'Retrieves answers to queries based on retrieved documents',
|
|
14
15
|
defaults: {
|
|
15
|
-
name: 'Retrieval
|
|
16
|
+
name: 'Retrieval Q&A Chain',
|
|
16
17
|
color: '#909298',
|
|
17
18
|
},
|
|
18
19
|
codex: {
|
|
@@ -51,6 +52,7 @@ class ChainRetrievalQa {
|
|
|
51
52
|
displayName: 'Query',
|
|
52
53
|
name: 'query',
|
|
53
54
|
type: 'string',
|
|
55
|
+
required: true,
|
|
54
56
|
default: '={{ $json.input }}',
|
|
55
57
|
},
|
|
56
58
|
],
|
|
@@ -65,6 +67,9 @@ class ChainRetrievalQa {
|
|
|
65
67
|
const returnData = [];
|
|
66
68
|
for (let itemIndex = 0; itemIndex < items.length; itemIndex++) {
|
|
67
69
|
const query = this.getNodeParameter('query', itemIndex);
|
|
70
|
+
if (query === undefined) {
|
|
71
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'No value for the required parameter "Query" was returned.');
|
|
72
|
+
}
|
|
68
73
|
const response = await chain.call({ query });
|
|
69
74
|
returnData.push({ json: { response } });
|
|
70
75
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChainRetrievalQa.node.js","sourceRoot":"","sources":["../../../../nodes/chains/ChainRetrievalQA/ChainRetrievalQa.node.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"ChainRetrievalQa.node.js","sourceRoot":"","sources":["../../../../nodes/chains/ChainRetrievalQA/ChainRetrievalQa.node.ts"],"names":[],"mappings":";;;AAAA,+CAOsB;AAEtB,6CAAoD;AAIpD,MAAa,gBAAgB;IAA7B;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,qBAAqB;YAClC,IAAI,EAAE,kBAAkB;YACxB,IAAI,EAAE,SAAS;YACf,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC;YACV,WAAW,EAAE,2DAA2D;YACxE,QAAQ,EAAE;gBACT,IAAI,EAAE,qBAAqB;gBAC3B,KAAK,EAAE,SAAS;aAChB;YACD,KAAK,EAAE;gBACN,KAAK,EAAE,CAAC,WAAW,CAAC;gBACpB,UAAU,EAAE,CAAC,IAAI,CAAC;gBAClB,aAAa,EAAE;oBACd,EAAE,EAAE,CAAC,QAAQ,CAAC;iBACd;gBACD,SAAS,EAAE;oBACV,oBAAoB,EAAE;wBACrB;4BACC,GAAG,EAAE,yGAAyG;yBAC9G;qBACD;iBACD;aACD;YAED,MAAM,EAAE;;gBAEP;oBACC,WAAW,EAAE,OAAO;oBACpB,cAAc,EAAE,CAAC;oBACjB,IAAI,oBAAoC;oBACxC,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,WAAW,EAAE,EAAE;YACf,UAAU,EAAE;gBACX;oBACC,WAAW,EAAE,OAAO;oBACpB,IAAI,EAAE,OAAO;oBACb,IAAI,EAAE,QAAQ;oBACd,QAAQ,EAAE,IAAI;oBACd,OAAO,EAAE,oBAAoB;iBAC7B;aACD;SACD,CAAC;IAoCH,CAAC;IAlCA,KAAK,CAAC,OAAO;QACZ,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,8BAA8B,CAAC,CAAC;QAEpD,MAAM,KAAK,GAAG,CAAC,MAAM,IAAI,CAAC,sBAAsB,qBAE/C,CAAC,CACD,CAAsB,CAAC;QAExB,MAAM,SAAS,GAAG,CAAC,MAAM,IAAI,CAAC,sBAAsB,iBAEnD,CAAC,CACD,CAAkB,CAAC;QAEpB,MAAM,KAAK,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC;QAClC,MAAM,KAAK,GAAG,yBAAgB,CAAC,OAAO,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;QAEzD,MAAM,UAAU,GAAyB,EAAE,CAAC;QAG5C,KAAK,IAAI,SAAS,GAAG,CAAC,EAAE,SAAS,GAAG,KAAK,CAAC,MAAM,EAAE,SAAS,EAAE,EAAE;YAC9D,MAAM,KAAK,GAAG,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE,SAAS,CAAW,CAAC;YAElE,IAAI,KAAK,KAAK,SAAS,EAAE;gBACxB,MAAM,IAAI,iCAAkB,CAC3B,IAAI,CAAC,OAAO,EAAE,EACd,2DAA2D,CAC3D,CAAC;aACF;YAED,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;YAC7C,UAAU,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAC;SACxC;QACD,OAAO,IAAI,CAAC,iBAAiB,CAAC,UAAU,CAAC,CAAC;IAC3C,CAAC;CACD;AAzFD,4CAyFC"}
|
|
@@ -3,5 +3,5 @@ export declare const vmResolver: import("@n8n/vm2").Resolver;
|
|
|
3
3
|
export declare class Code implements INodeType {
|
|
4
4
|
description: INodeTypeDescription;
|
|
5
5
|
execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
|
|
6
|
-
supplyData(this: IExecuteFunctions): Promise<SupplyData>;
|
|
6
|
+
supplyData(this: IExecuteFunctions, itemIndex: number): Promise<SupplyData>;
|
|
7
7
|
}
|