@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
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import type { IAuthenticateGeneric, ICredentialType, INodeProperties } from 'n8n-workflow';
|
|
1
|
+
import type { IAuthenticateGeneric, ICredentialTestRequest, ICredentialType, INodeProperties } from 'n8n-workflow';
|
|
2
2
|
export declare class PineconeApi implements ICredentialType {
|
|
3
3
|
name: string;
|
|
4
4
|
displayName: string;
|
|
5
5
|
documentationUrl: string;
|
|
6
6
|
properties: INodeProperties[];
|
|
7
7
|
authenticate: IAuthenticateGeneric;
|
|
8
|
+
test: ICredentialTestRequest;
|
|
8
9
|
}
|
|
@@ -31,6 +31,14 @@ class PineconeApi {
|
|
|
31
31
|
},
|
|
32
32
|
},
|
|
33
33
|
};
|
|
34
|
+
this.test = {
|
|
35
|
+
request: {
|
|
36
|
+
baseURL: '=https://controller.{{$credentials.environment}}.pinecone.io/databases',
|
|
37
|
+
headers: {
|
|
38
|
+
accept: 'application/json; charset=utf-8',
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
};
|
|
34
42
|
}
|
|
35
43
|
}
|
|
36
44
|
exports.PineconeApi = PineconeApi;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PineconeApi.credentials.js","sourceRoot":"","sources":["../../credentials/PineconeApi.credentials.ts"],"names":[],"mappings":";;;AAOA,MAAa,WAAW;IAAxB;QACC,SAAI,GAAG,aAAa,CAAC;QAErB,gBAAW,GAAG,aAAa,CAAC;QAE5B,qBAAgB,GAAG,UAAU,CAAC;QAE9B,eAAU,GAAsB;YAC/B;gBACC,WAAW,EAAE,SAAS;gBACtB,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;gBAC/B,QAAQ,EAAE,IAAI;gBACd,OAAO,EAAE,EAAE;aACX;YACD;gBACC,WAAW,EAAE,aAAa;gBAC1B,IAAI,EAAE,aAAa;gBACnB,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,IAAI;gBACd,OAAO,EAAE,iBAAiB;aAC1B;SACD,CAAC;QAEF,iBAAY,GAAyB;YACpC,IAAI,EAAE,SAAS;YACf,UAAU,EAAE;gBACX,OAAO,EAAE;oBACR,SAAS,EAAE,0BAA0B;iBACrC;aACD;SACD,CAAC;IACH,CAAC;CAAA;
|
|
1
|
+
{"version":3,"file":"PineconeApi.credentials.js","sourceRoot":"","sources":["../../credentials/PineconeApi.credentials.ts"],"names":[],"mappings":";;;AAOA,MAAa,WAAW;IAAxB;QACC,SAAI,GAAG,aAAa,CAAC;QAErB,gBAAW,GAAG,aAAa,CAAC;QAE5B,qBAAgB,GAAG,UAAU,CAAC;QAE9B,eAAU,GAAsB;YAC/B;gBACC,WAAW,EAAE,SAAS;gBACtB,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;gBAC/B,QAAQ,EAAE,IAAI;gBACd,OAAO,EAAE,EAAE;aACX;YACD;gBACC,WAAW,EAAE,aAAa;gBAC1B,IAAI,EAAE,aAAa;gBACnB,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,IAAI;gBACd,OAAO,EAAE,iBAAiB;aAC1B;SACD,CAAC;QAEF,iBAAY,GAAyB;YACpC,IAAI,EAAE,SAAS;YACf,UAAU,EAAE;gBACX,OAAO,EAAE;oBACR,SAAS,EAAE,0BAA0B;iBACrC;aACD;SACD,CAAC;QAEF,SAAI,GAA2B;YAC9B,OAAO,EAAE;gBACR,OAAO,EAAE,wEAAwE;gBACjF,OAAO,EAAE;oBACR,MAAM,EAAE,iCAAiC;iBACzC;aACD;SACD,CAAC;IACH,CAAC;CAAA;AA1CD,kCA0CC"}
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
"anthropicApi": {
|
|
3
3
|
"className": "AnthropicApi",
|
|
4
4
|
"sourcePath": "dist/credentials/AnthropicApi.credentials.js",
|
|
5
|
-
"
|
|
5
|
+
"supportedNodes": [
|
|
6
6
|
"lmChatAnthropic"
|
|
7
7
|
]
|
|
8
8
|
},
|
|
9
9
|
"cohereApi": {
|
|
10
10
|
"className": "CohereApi",
|
|
11
11
|
"sourcePath": "dist/credentials/CohereApi.credentials.js",
|
|
12
|
-
"
|
|
12
|
+
"supportedNodes": [
|
|
13
13
|
"embeddingsCohere",
|
|
14
14
|
"lmCohere"
|
|
15
15
|
]
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"googlePalmApi": {
|
|
18
18
|
"className": "GooglePalmApi",
|
|
19
19
|
"sourcePath": "dist/credentials/GooglePalmApi.credentials.js",
|
|
20
|
-
"
|
|
20
|
+
"supportedNodes": [
|
|
21
21
|
"embeddingsGooglePalm",
|
|
22
22
|
"lmChatGooglePalm",
|
|
23
23
|
"lmGooglePalm"
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"huggingFaceApi": {
|
|
27
27
|
"className": "HuggingFaceApi",
|
|
28
28
|
"sourcePath": "dist/credentials/HuggingFaceApi.credentials.js",
|
|
29
|
-
"
|
|
29
|
+
"supportedNodes": [
|
|
30
30
|
"embeddingsHuggingFaceInference",
|
|
31
31
|
"lmOpenHuggingFaceInference"
|
|
32
32
|
]
|
|
@@ -34,14 +34,14 @@
|
|
|
34
34
|
"motorheadApi": {
|
|
35
35
|
"className": "MotorheadApi",
|
|
36
36
|
"sourcePath": "dist/credentials/MotorheadApi.credentials.js",
|
|
37
|
-
"
|
|
37
|
+
"supportedNodes": [
|
|
38
38
|
"memoryMotorhead"
|
|
39
39
|
]
|
|
40
40
|
},
|
|
41
41
|
"ollamaApi": {
|
|
42
42
|
"className": "OllamaApi",
|
|
43
43
|
"sourcePath": "dist/credentials/OllamaApi.credentials.js",
|
|
44
|
-
"
|
|
44
|
+
"supportedNodes": [
|
|
45
45
|
"lmChatOllama",
|
|
46
46
|
"lmOllama"
|
|
47
47
|
]
|
|
@@ -49,7 +49,8 @@
|
|
|
49
49
|
"pineconeApi": {
|
|
50
50
|
"className": "PineconeApi",
|
|
51
51
|
"sourcePath": "dist/credentials/PineconeApi.credentials.js",
|
|
52
|
-
"
|
|
52
|
+
"supportedNodes": [
|
|
53
|
+
"vectorStorePinecone",
|
|
53
54
|
"vectorStorePineconeInsert",
|
|
54
55
|
"vectorStorePineconeLoad"
|
|
55
56
|
]
|
|
@@ -57,29 +58,30 @@
|
|
|
57
58
|
"serpApi": {
|
|
58
59
|
"className": "SerpApi",
|
|
59
60
|
"sourcePath": "dist/credentials/SerpApi.credentials.js",
|
|
60
|
-
"
|
|
61
|
+
"supportedNodes": [
|
|
61
62
|
"toolSerpApi"
|
|
62
63
|
]
|
|
63
64
|
},
|
|
64
65
|
"wolframAlphaApi": {
|
|
65
66
|
"className": "WolframAlphaApi",
|
|
66
67
|
"sourcePath": "dist/credentials/WolframAlphaApi.credentials.js",
|
|
67
|
-
"
|
|
68
|
+
"supportedNodes": [
|
|
68
69
|
"toolWolframAlpha"
|
|
69
70
|
]
|
|
70
71
|
},
|
|
71
72
|
"xataApi": {
|
|
72
73
|
"className": "XataApi",
|
|
73
74
|
"sourcePath": "dist/credentials/XataApi.credentials.js",
|
|
74
|
-
"
|
|
75
|
+
"supportedNodes": [
|
|
75
76
|
"memoryXata"
|
|
76
77
|
]
|
|
77
78
|
},
|
|
78
79
|
"zepApi": {
|
|
79
80
|
"className": "ZepApi",
|
|
80
81
|
"sourcePath": "dist/credentials/ZepApi.credentials.js",
|
|
81
|
-
"
|
|
82
|
+
"supportedNodes": [
|
|
82
83
|
"memoryZep",
|
|
84
|
+
"vectorStoreZep",
|
|
83
85
|
"vectorStoreZepInsert",
|
|
84
86
|
"vectorStoreZepLoad"
|
|
85
87
|
]
|
package/dist/known/nodes.json
CHANGED
|
@@ -7,6 +7,10 @@
|
|
|
7
7
|
"className": "Agent",
|
|
8
8
|
"sourcePath": "dist/nodes/agents/Agent/Agent.node.js"
|
|
9
9
|
},
|
|
10
|
+
"openAiAssistant": {
|
|
11
|
+
"className": "OpenAiAssistant",
|
|
12
|
+
"sourcePath": "dist/nodes/agents/OpenAiAssistant/OpenAiAssistant.node.js"
|
|
13
|
+
},
|
|
10
14
|
"chainLlm": {
|
|
11
15
|
"className": "ChainLlm",
|
|
12
16
|
"sourcePath": "dist/nodes/chains/ChainLLM/ChainLlm.node.js"
|
|
@@ -23,6 +27,10 @@
|
|
|
23
27
|
"className": "DocumentBinaryInputLoader",
|
|
24
28
|
"sourcePath": "dist/nodes/document_loaders/DocumentBinaryInputLoader/DocumentBinaryInputLoader.node.js"
|
|
25
29
|
},
|
|
30
|
+
"documentDefaultDataLoader": {
|
|
31
|
+
"className": "DocumentDefaultDataLoader",
|
|
32
|
+
"sourcePath": "dist/nodes/document_loaders/DocumentDefaultDataLoader/DocumentDefaultDataLoader.node.js"
|
|
33
|
+
},
|
|
26
34
|
"documentGithubLoader": {
|
|
27
35
|
"className": "DocumentGithubLoader",
|
|
28
36
|
"sourcePath": "dist/nodes/document_loaders/DocumentGithubLoader/DocumentGithubLoader.node.js"
|
|
@@ -31,6 +39,10 @@
|
|
|
31
39
|
"className": "DocumentJsonInputLoader",
|
|
32
40
|
"sourcePath": "dist/nodes/document_loaders/DocumentJSONInputLoader/DocumentJsonInputLoader.node.js"
|
|
33
41
|
},
|
|
42
|
+
"embeddingsAwsBedrock": {
|
|
43
|
+
"className": "EmbeddingsAwsBedrock",
|
|
44
|
+
"sourcePath": "dist/nodes/embeddings/EmbeddingsAwsBedrock/EmbeddingsAwsBedrock.node.js"
|
|
45
|
+
},
|
|
34
46
|
"embeddingsCohere": {
|
|
35
47
|
"className": "EmbeddingsCohere",
|
|
36
48
|
"sourcePath": "dist/nodes/embeddings/EmbeddingsCohere/EmbeddingsCohere.node.js"
|
|
@@ -79,6 +91,10 @@
|
|
|
79
91
|
"className": "LmOpenHuggingFaceInference",
|
|
80
92
|
"sourcePath": "dist/nodes/llms/LMOpenHuggingFaceInference/LmOpenHuggingFaceInference.node.js"
|
|
81
93
|
},
|
|
94
|
+
"lmChatAwsBedrock": {
|
|
95
|
+
"className": "LmChatAwsBedrock",
|
|
96
|
+
"sourcePath": "dist/nodes/llms/LmChatAwsBedrock/LmChatAwsBedrock.node.js"
|
|
97
|
+
},
|
|
82
98
|
"lmChatGooglePalm": {
|
|
83
99
|
"className": "LmChatGooglePalm",
|
|
84
100
|
"sourcePath": "dist/nodes/llms/LmChatGooglePalm/LmChatGooglePalm.node.js"
|
|
@@ -191,6 +207,10 @@
|
|
|
191
207
|
"className": "VectorStoreInMemoryLoad",
|
|
192
208
|
"sourcePath": "dist/nodes/vector_store/VectorStoreInMemoryLoad/VectorStoreInMemoryLoad.node.js"
|
|
193
209
|
},
|
|
210
|
+
"vectorStorePinecone": {
|
|
211
|
+
"className": "VectorStorePinecone",
|
|
212
|
+
"sourcePath": "dist/nodes/vector_store/VectorStorePinecone/VectorStorePinecone.node.js"
|
|
213
|
+
},
|
|
194
214
|
"vectorStorePineconeInsert": {
|
|
195
215
|
"className": "VectorStorePineconeInsert",
|
|
196
216
|
"sourcePath": "dist/nodes/vector_store/VectorStorePineconeInsert/VectorStorePineconeInsert.node.js"
|
|
@@ -199,6 +219,10 @@
|
|
|
199
219
|
"className": "VectorStorePineconeLoad",
|
|
200
220
|
"sourcePath": "dist/nodes/vector_store/VectorStorePineconeLoad/VectorStorePineconeLoad.node.js"
|
|
201
221
|
},
|
|
222
|
+
"vectorStoreSupabase": {
|
|
223
|
+
"className": "VectorStoreSupabase",
|
|
224
|
+
"sourcePath": "dist/nodes/vector_store/VectorStoreSupabase/VectorStoreSupabase.node.js"
|
|
225
|
+
},
|
|
202
226
|
"vectorStoreSupabaseInsert": {
|
|
203
227
|
"className": "VectorStoreSupabaseInsert",
|
|
204
228
|
"sourcePath": "dist/nodes/vector_store/VectorStoreSupabaseInsert/VectorStoreSupabaseInsert.node.js"
|
|
@@ -207,6 +231,10 @@
|
|
|
207
231
|
"className": "VectorStoreSupabaseLoad",
|
|
208
232
|
"sourcePath": "dist/nodes/vector_store/VectorStoreSupabaseLoad/VectorStoreSupabaseLoad.node.js"
|
|
209
233
|
},
|
|
234
|
+
"vectorStoreZep": {
|
|
235
|
+
"className": "VectorStoreZep",
|
|
236
|
+
"sourcePath": "dist/nodes/vector_store/VectorStoreZep/VectorStoreZep.node.js"
|
|
237
|
+
},
|
|
210
238
|
"vectorStoreZepInsert": {
|
|
211
239
|
"className": "VectorStoreZepInsert",
|
|
212
240
|
"sourcePath": "dist/nodes/vector_store/VectorStoreZepInsert/VectorStoreZepInsert.node.js"
|
|
@@ -2,14 +2,17 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Agent = void 0;
|
|
4
4
|
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
+
const sharedFields_1 = require("../../../utils/sharedFields");
|
|
5
6
|
const description_1 = require("./agents/ConversationalAgent/description");
|
|
6
7
|
const execute_1 = require("./agents/ConversationalAgent/execute");
|
|
7
8
|
const description_2 = require("./agents/OpenAiFunctionsAgent/description");
|
|
8
9
|
const execute_2 = require("./agents/OpenAiFunctionsAgent/execute");
|
|
9
|
-
const description_3 = require("./agents/
|
|
10
|
-
const execute_3 = require("./agents/
|
|
11
|
-
const description_4 = require("./agents/
|
|
12
|
-
const execute_4 = require("./agents/
|
|
10
|
+
const description_3 = require("./agents/PlanAndExecuteAgent/description");
|
|
11
|
+
const execute_3 = require("./agents/PlanAndExecuteAgent/execute");
|
|
12
|
+
const description_4 = require("./agents/ReActAgent/description");
|
|
13
|
+
const execute_4 = require("./agents/ReActAgent/execute");
|
|
14
|
+
const description_5 = require("./agents/SqlAgent/description");
|
|
15
|
+
const execute_5 = require("./agents/SqlAgent/execute");
|
|
13
16
|
function getInputs(agent) {
|
|
14
17
|
const getInputData = (inputs) => {
|
|
15
18
|
const displayNames = {
|
|
@@ -97,20 +100,33 @@ function getInputs(agent) {
|
|
|
97
100
|
},
|
|
98
101
|
];
|
|
99
102
|
}
|
|
103
|
+
else if (agent === 'planAndExecuteAgent') {
|
|
104
|
+
specialInputs = [
|
|
105
|
+
{
|
|
106
|
+
type: "ai_languageModel",
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
type: "ai_tool",
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
type: "ai_outputParser",
|
|
113
|
+
},
|
|
114
|
+
];
|
|
115
|
+
}
|
|
100
116
|
return ["main", ...getInputData(specialInputs)];
|
|
101
117
|
}
|
|
102
118
|
class Agent {
|
|
103
119
|
constructor() {
|
|
104
120
|
this.description = {
|
|
105
|
-
displayName: 'Agent',
|
|
121
|
+
displayName: 'AI Agent',
|
|
106
122
|
name: 'agent',
|
|
107
123
|
icon: 'fa:robot',
|
|
108
124
|
group: ['transform'],
|
|
109
|
-
version: 1,
|
|
110
|
-
description: '
|
|
125
|
+
version: [1, 1.1],
|
|
126
|
+
description: 'Generates an action plan and executes it. Can use external tools.',
|
|
111
127
|
subtitle: "={{ { conversationalAgent: 'Conversational Agent', openAiFunctionsAgent: 'OpenAI Functions Agent', reactAgent: 'ReAct Agent', sqlAgent: 'SQL Agent' }[$parameter.agent] }}",
|
|
112
128
|
defaults: {
|
|
113
|
-
name: 'Agent',
|
|
129
|
+
name: 'AI Agent',
|
|
114
130
|
color: '#404040',
|
|
115
131
|
},
|
|
116
132
|
codex: {
|
|
@@ -153,6 +169,14 @@ class Agent {
|
|
|
153
169
|
},
|
|
154
170
|
],
|
|
155
171
|
properties: [
|
|
172
|
+
{
|
|
173
|
+
...(0, sharedFields_1.getTemplateNoticeField)(1954),
|
|
174
|
+
displayOptions: {
|
|
175
|
+
show: {
|
|
176
|
+
agent: ['conversationalAgent'],
|
|
177
|
+
},
|
|
178
|
+
},
|
|
179
|
+
},
|
|
156
180
|
{
|
|
157
181
|
displayName: 'Agent',
|
|
158
182
|
name: 'agent',
|
|
@@ -169,6 +193,11 @@ class Agent {
|
|
|
169
193
|
value: 'openAiFunctionsAgent',
|
|
170
194
|
description: "Utilizes OpenAI's Function Calling feature to select the appropriate tool and arguments for execution",
|
|
171
195
|
},
|
|
196
|
+
{
|
|
197
|
+
name: 'Plan and Execute Agent',
|
|
198
|
+
value: 'planAndExecuteAgent',
|
|
199
|
+
description: 'Plan and execute agents accomplish an objective by first planning what to do, then executing the sub tasks',
|
|
200
|
+
},
|
|
172
201
|
{
|
|
173
202
|
name: 'ReAct Agent',
|
|
174
203
|
value: 'reActAgent',
|
|
@@ -184,8 +213,9 @@ class Agent {
|
|
|
184
213
|
},
|
|
185
214
|
...description_1.conversationalAgentProperties,
|
|
186
215
|
...description_2.openAiFunctionsAgentProperties,
|
|
187
|
-
...
|
|
188
|
-
...
|
|
216
|
+
...description_4.reActAgentAgentProperties,
|
|
217
|
+
...description_5.sqlAgentAgentProperties,
|
|
218
|
+
...description_3.planAndExecuteAgentProperties,
|
|
189
219
|
],
|
|
190
220
|
};
|
|
191
221
|
}
|
|
@@ -198,10 +228,13 @@ class Agent {
|
|
|
198
228
|
return execute_2.openAiFunctionsAgentExecute.call(this);
|
|
199
229
|
}
|
|
200
230
|
else if (agentType === 'reActAgent') {
|
|
201
|
-
return
|
|
231
|
+
return execute_4.reActAgentAgentExecute.call(this);
|
|
202
232
|
}
|
|
203
233
|
else if (agentType === 'sqlAgent') {
|
|
204
|
-
return
|
|
234
|
+
return execute_5.sqlAgentAgentExecute.call(this);
|
|
235
|
+
}
|
|
236
|
+
else if (agentType === 'planAndExecuteAgent') {
|
|
237
|
+
return execute_3.planAndExecuteAgentExecute.call(this);
|
|
205
238
|
}
|
|
206
239
|
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `The agent type "${agentType}" is not supported`);
|
|
207
240
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Agent.node.js","sourceRoot":"","sources":["../../../../nodes/agents/Agent/Agent.node.ts"],"names":[],"mappings":";;;AAAA,+CAAsE;AAUtE,0EAAyF;AACzF,kEAAkF;AAElF,2EAA2F;AAC3F,mEAAoF;AACpF,iEAA4E;AAC5E,yDAAqE;AACrE,+DAAwE;AACxE,uDAAiE;
|
|
1
|
+
{"version":3,"file":"Agent.node.js","sourceRoot":"","sources":["../../../../nodes/agents/Agent/Agent.node.ts"],"names":[],"mappings":";;;AAAA,+CAAsE;AAUtE,8DAAqE;AACrE,0EAAyF;AACzF,kEAAkF;AAElF,2EAA2F;AAC3F,mEAAoF;AACpF,0EAAyF;AACzF,kEAAkF;AAClF,iEAA4E;AAC5E,yDAAqE;AACrE,+DAAwE;AACxE,uDAAiE;AAGjE,SAAS,SAAS,CACjB,KAAiF;IAOjF,MAAM,YAAY,GAAG,CACpB,MAAsB,EAC6B,EAAE;QACrD,MAAM,YAAY,GAA8B;YAC/C,oBAAoC,EAAE,OAAO;YAC7C,aAA6B,EAAE,QAAQ;YACvC,WAA2B,EAAE,MAAM;YACnC,mBA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AAG,qCAAuB;gBAC1B,GAAG,2CAA6B;aAChC;SACD,CAAC;IAmBH,CAAC;IAjBA,KAAK,CAAC,OAAO;QACZ,MAAM,SAAS,GAAG,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE,CAAC,EAAE,EAAE,CAAW,CAAC;QAElE,IAAI,SAAS,KAAK,qBAAqB,EAAE,CAAC;YACzC,OAAO,oCAA0B,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC9C,CAAC;aAAM,IAAI,SAAS,KAAK,sBAAsB,EAAE,CAAC;YACjD,OAAO,qCAA2B,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC/C,CAAC;aAAM,IAAI,SAAS,KAAK,YAAY,EAAE,CAAC;YACvC,OAAO,gCAAsB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC1C,CAAC;aAAM,IAAI,SAAS,KAAK,UAAU,EAAE,CAAC;YACrC,OAAO,8BAAoB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACxC,CAAC;aAAM,IAAI,SAAS,KAAK,qBAAqB,EAAE,CAAC;YAChD,OAAO,oCAA0B,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC9C,CAAC;QAED,MAAM,IAAI,iCAAkB,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,mBAAmB,SAAS,oBAAoB,CAAC,CAAC;IAChG,CAAC;CACD;AA9HD,sBA8HC"}
|
|
@@ -11,10 +11,24 @@ exports.conversationalAgentProperties = [
|
|
|
11
11
|
displayOptions: {
|
|
12
12
|
show: {
|
|
13
13
|
agent: ['conversationalAgent'],
|
|
14
|
+
'@version': [1],
|
|
14
15
|
},
|
|
15
16
|
},
|
|
16
17
|
default: '={{ $json.input }}',
|
|
17
18
|
},
|
|
19
|
+
{
|
|
20
|
+
displayName: 'Text',
|
|
21
|
+
name: 'text',
|
|
22
|
+
type: 'string',
|
|
23
|
+
required: true,
|
|
24
|
+
displayOptions: {
|
|
25
|
+
show: {
|
|
26
|
+
agent: ['conversationalAgent'],
|
|
27
|
+
'@version': [1.1],
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
default: '={{ $json.chat_input }}',
|
|
31
|
+
},
|
|
18
32
|
{
|
|
19
33
|
displayName: 'Options',
|
|
20
34
|
name: 'options',
|
|
@@ -47,6 +61,13 @@ exports.conversationalAgentProperties = [
|
|
|
47
61
|
rows: 6,
|
|
48
62
|
},
|
|
49
63
|
},
|
|
64
|
+
{
|
|
65
|
+
displayName: 'Max Iterations',
|
|
66
|
+
name: 'maxIterations',
|
|
67
|
+
type: 'number',
|
|
68
|
+
default: 10,
|
|
69
|
+
description: 'The maximum number of iterations the agent will run before stopping',
|
|
70
|
+
},
|
|
50
71
|
],
|
|
51
72
|
},
|
|
52
73
|
];
|
|
@@ -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,QAAQ,EAAE,IAAI;QACd,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,KAAK,EAAE,CAAC,qBAAqB,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;gBAC9B,UAAU,EAAE,CAAC,CAAC,CAAC;aACf;SACD;QACD,OAAO,EAAE,oBAAoB;KAC7B;IACD;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;gBAC9B,UAAU,EAAE,CAAC,GAAG,CAAC;aACjB;SACD;QACD,OAAO,EAAE,yBAAyB;KAClC;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;YACD;gBACC,WAAW,EAAE,gBAAgB;gBAC7B,IAAI,EAAE,eAAe;gBACrB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE,qEAAqE;aAClF;SACD;KACD;CACD,CAAC"}
|
|
@@ -7,6 +7,7 @@ const base_1 = require("langchain/chat_models/base");
|
|
|
7
7
|
const prompts_1 = require("langchain/prompts");
|
|
8
8
|
const output_parsers_1 = require("langchain/output_parsers");
|
|
9
9
|
async function conversationalAgentExecute() {
|
|
10
|
+
var _a;
|
|
10
11
|
this.logger.verbose('Executing Conversational Agent');
|
|
11
12
|
const model = (await this.getInputConnectionData("ai_languageModel", 0));
|
|
12
13
|
if (!(model instanceof base_1.BaseChatModel)) {
|
|
@@ -19,6 +20,7 @@ async function conversationalAgentExecute() {
|
|
|
19
20
|
const agentExecutor = await (0, agents_1.initializeAgentExecutorWithOptions)(tools, model, {
|
|
20
21
|
agentType: 'chat-conversational-react-description',
|
|
21
22
|
memory,
|
|
23
|
+
maxIterations: (_a = options.maxIterations) !== null && _a !== void 0 ? _a : 10,
|
|
22
24
|
agentArgs: {
|
|
23
25
|
systemMessage: options.systemMessage,
|
|
24
26
|
humanMessage: options.humanMessage,
|
|
@@ -34,18 +36,20 @@ async function conversationalAgentExecute() {
|
|
|
34
36
|
else {
|
|
35
37
|
outputParser = new output_parsers_1.CombiningOutputParser(...outputParsers);
|
|
36
38
|
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
39
|
+
if (outputParser) {
|
|
40
|
+
const formatInstructions = outputParser.getFormatInstructions();
|
|
41
|
+
prompt = new prompts_1.PromptTemplate({
|
|
42
|
+
template: '{input}\n{formatInstructions}',
|
|
43
|
+
inputVariables: ['input'],
|
|
44
|
+
partialVariables: { formatInstructions },
|
|
45
|
+
});
|
|
46
|
+
}
|
|
43
47
|
}
|
|
44
48
|
const items = this.getInputData();
|
|
45
49
|
for (let itemIndex = 0; itemIndex < items.length; itemIndex++) {
|
|
46
50
|
let input = this.getNodeParameter('text', itemIndex);
|
|
47
51
|
if (input === undefined) {
|
|
48
|
-
throw new n8n_workflow_1.NodeOperationError(this.getNode(), '
|
|
52
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'The ‘text parameter is empty.');
|
|
49
53
|
}
|
|
50
54
|
if (prompt) {
|
|
51
55
|
input = (await prompt.invoke({ input })).value;
|
|
@@ -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
|
|
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,CAAC;QACvC,MAAM,IAAI,iCAAkB,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,0CAA0C,CAAC,CAAC;IAC1F,CAAC;IAED,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;IAGzB,MAAM,OAAO,GAAG,IAAI,CAAC,gBAAgB,CAAC,SAAS,EAAE,CAAC,EAAE,EAAE,CAIrD,CAAC;IAEF,MAAM,aAAa,GAAG,MAAM,IAAA,2CAAkC,EAAC,KAAK,EAAE,KAAK,EAAE;QAK5E,SAAS,EAAE,uCAAuC;QAClD,MAAM;QACN,aAAa,EAAE,MAAA,OAAO,CAAC,aAAa,mCAAI,EAAE;QAC1C,SAAS,EAAE;YACV,aAAa,EAAE,OAAO,CAAC,aAAa;Y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AAI,CAAC,EAAE,KAAK,EAAE,aAAa,EAAE,CAAC,CAAC;QAElE,IAAI,YAAY,EAAE,CAAC;YAClB,QAAQ,GAAG,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAgB,CAAC,EAAE,CAAC;QAC5E,CAAC;QAED,UAAU,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC;IACrC,CAAC;IAED,OAAO,IAAI,CAAC,iBAAiB,CAAC,UAAU,CAAC,CAAC;AAC3C,CAAC;AAxFD,gEAwFC"}
|
|
@@ -11,10 +11,24 @@ exports.openAiFunctionsAgentProperties = [
|
|
|
11
11
|
displayOptions: {
|
|
12
12
|
show: {
|
|
13
13
|
agent: ['openAiFunctionsAgent'],
|
|
14
|
+
'@version': [1],
|
|
14
15
|
},
|
|
15
16
|
},
|
|
16
17
|
default: '={{ $json.input }}',
|
|
17
18
|
},
|
|
19
|
+
{
|
|
20
|
+
displayName: 'Text',
|
|
21
|
+
name: 'text',
|
|
22
|
+
type: 'string',
|
|
23
|
+
required: true,
|
|
24
|
+
displayOptions: {
|
|
25
|
+
show: {
|
|
26
|
+
agent: ['openAiFunctionsAgent'],
|
|
27
|
+
'@version': [1.1],
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
default: '={{ $json.chat_input }}',
|
|
31
|
+
},
|
|
18
32
|
{
|
|
19
33
|
displayName: 'Options',
|
|
20
34
|
name: 'options',
|
|
@@ -37,6 +51,13 @@ exports.openAiFunctionsAgentProperties = [
|
|
|
37
51
|
rows: 6,
|
|
38
52
|
},
|
|
39
53
|
},
|
|
54
|
+
{
|
|
55
|
+
displayName: 'Max Iterations',
|
|
56
|
+
name: 'maxIterations',
|
|
57
|
+
type: 'number',
|
|
58
|
+
default: 10,
|
|
59
|
+
description: 'The maximum number of iterations the agent will run before stopping',
|
|
60
|
+
},
|
|
40
61
|
],
|
|
41
62
|
},
|
|
42
63
|
];
|
|
@@ -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,QAAQ,EAAE,IAAI;QACd,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,KAAK,EAAE,CAAC,sBAAsB,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;gBAC/B,UAAU,EAAE,CAAC,CAAC,CAAC;aACf;SACD;QACD,OAAO,EAAE,oBAAoB;KAC7B;IACD;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;gBAC/B,UAAU,EAAE,CAAC,GAAG,CAAC;aACjB;SACD;QACD,OAAO,EAAE,yBAAyB;KAClC;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;YACD;gBACC,WAAW,EAAE,gBAAgB;gBAC7B,IAAI,EAAE,eAAe;gBACrB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE,qEAAqE;aAClF;SACD;KACD;CACD,CAAC"}
|
|
@@ -8,6 +8,7 @@ const output_parsers_1 = require("langchain/output_parsers");
|
|
|
8
8
|
const memory_1 = require("langchain/memory");
|
|
9
9
|
const openai_1 = require("langchain/chat_models/openai");
|
|
10
10
|
async function openAiFunctionsAgentExecute() {
|
|
11
|
+
var _a;
|
|
11
12
|
this.logger.verbose('Executing OpenAi Functions Agent');
|
|
12
13
|
const model = (await this.getInputConnectionData("ai_languageModel", 0));
|
|
13
14
|
if (!(model instanceof openai_1.ChatOpenAI)) {
|
|
@@ -23,6 +24,7 @@ async function openAiFunctionsAgentExecute() {
|
|
|
23
24
|
prefix: options.systemMessage,
|
|
24
25
|
}),
|
|
25
26
|
tools,
|
|
27
|
+
maxIterations: (_a = options.maxIterations) !== null && _a !== void 0 ? _a : 10,
|
|
26
28
|
memory: memory !== null && memory !== void 0 ? memory : new memory_1.BufferMemory({
|
|
27
29
|
returnMessages: true,
|
|
28
30
|
memoryKey: 'chat_history',
|
|
@@ -48,7 +50,7 @@ async function openAiFunctionsAgentExecute() {
|
|
|
48
50
|
for (let itemIndex = 0; itemIndex < items.length; itemIndex++) {
|
|
49
51
|
let input = this.getNodeParameter('text', itemIndex);
|
|
50
52
|
if (input === undefined) {
|
|
51
|
-
throw new n8n_workflow_1.NodeOperationError(this.getNode(), '
|
|
53
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'The ‘text‘ parameter is empty.');
|
|
52
54
|
}
|
|
53
55
|
if (prompt) {
|
|
54
56
|
input = (await prompt.invoke({ input })).value;
|
|
@@ -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
|
|
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,CAAC;QACpC,MAAM,IAAI,iCAAkB,CAC3B,IAAI,CAAC,OAAO,EAAE,EACd,mDAAmD,CACnD,CAAC;IACH,CAAC;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,CAGrD,CAAC;IAEF,MAAM,WAAW,GAAuB;QACvC,IAAI,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AE/D,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;YACzB,MAAM,IAAI,iCAAkB,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,gCAAgC,CAAC,CAAC;QAChF,CAAC;QAED,IAAI,MAAM,EAAE,CAAC;YACZ,KAAK,GAAG,CAAC,MAAM,MAAM,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC;QAChD,CAAC;QAED,IAAI,QAAQ,GAAG,MAAM,aAAa,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,aAAa,EAAE,CAAC,CAAC;QAElE,IAAI,YAAY,EAAE,CAAC;YAClB,QAAQ,GAAG,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAgB,CAAC,EAAE,CAAC;QAC5E,CAAC;QAED,UAAU,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC;IACrC,CAAC;IAED,OAAO,IAAI,CAAC,iBAAiB,CAAC,UAAU,CAAC,CAAC;AAC3C,CAAC;AAtFD,kEAsFC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.planAndExecuteAgentProperties = void 0;
|
|
4
|
+
const prompt_1 = require("./prompt");
|
|
5
|
+
exports.planAndExecuteAgentProperties = [
|
|
6
|
+
{
|
|
7
|
+
displayName: 'Text',
|
|
8
|
+
name: 'text',
|
|
9
|
+
type: 'string',
|
|
10
|
+
required: true,
|
|
11
|
+
displayOptions: {
|
|
12
|
+
show: {
|
|
13
|
+
agent: ['planAndExecuteAgent'],
|
|
14
|
+
'@version': [1],
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
default: '={{ $json.input }}',
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
displayName: 'Text',
|
|
21
|
+
name: 'text',
|
|
22
|
+
type: 'string',
|
|
23
|
+
required: true,
|
|
24
|
+
displayOptions: {
|
|
25
|
+
show: {
|
|
26
|
+
agent: ['planAndExecuteAgent'],
|
|
27
|
+
'@version': [1.1],
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
default: '={{ $json.chat_input }}',
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
displayName: 'Options',
|
|
34
|
+
name: 'options',
|
|
35
|
+
type: 'collection',
|
|
36
|
+
displayOptions: {
|
|
37
|
+
show: {
|
|
38
|
+
agent: ['planAndExecuteAgent'],
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
default: {},
|
|
42
|
+
placeholder: 'Add Option',
|
|
43
|
+
options: [
|
|
44
|
+
{
|
|
45
|
+
displayName: 'Human Message Template',
|
|
46
|
+
name: 'humanMessageTemplate',
|
|
47
|
+
type: 'string',
|
|
48
|
+
default: prompt_1.DEFAULT_STEP_EXECUTOR_HUMAN_CHAT_MESSAGE_TEMPLATE,
|
|
49
|
+
description: 'The message that will be sent to the agent during each step execution',
|
|
50
|
+
typeOptions: {
|
|
51
|
+
rows: 6,
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
],
|
|
55
|
+
},
|
|
56
|
+
];
|
|
57
|
+
//# sourceMappingURL=description.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"description.js","sourceRoot":"","sources":["../../../../../../nodes/agents/Agent/agents/PlanAndExecuteAgent/description.ts"],"names":[],"mappings":";;;AACA,qCAA6E;AAEhE,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;gBAC9B,UAAU,EAAE,CAAC,CAAC,CAAC;aACf;SACD;QACD,OAAO,EAAE,oBAAoB;KAC7B;IACD;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;gBAC9B,UAAU,EAAE,CAAC,GAAG,CAAC;aACjB;SACD;QACD,OAAO,EAAE,yBAAyB;KAClC;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,wBAAwB;gBACrC,IAAI,EAAE,sBAAsB;gBAC5B,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,0DAAiD;gBAC1D,WAAW,EAAE,uEAAuE;gBACpF,WAAW,EAAE;oBACZ,IAAI,EAAE,CAAC;iBACP;aACD;SACD;KACD;CACD,CAAC"}
|