@n8n/n8n-nodes-langchain 1.85.3 → 1.87.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/credentials/AnthropicApi.credentials.js +64 -41
- package/dist/credentials/AnthropicApi.credentials.js.map +1 -1
- package/dist/credentials/AzureOpenAiApi.credentials.js +70 -47
- package/dist/credentials/AzureOpenAiApi.credentials.js.map +1 -1
- package/dist/credentials/CohereApi.credentials.js +55 -32
- package/dist/credentials/CohereApi.credentials.js.map +1 -1
- package/dist/credentials/DeepSeekApi.credentials.js +61 -38
- package/dist/credentials/DeepSeekApi.credentials.js.map +1 -1
- package/dist/credentials/GooglePalmApi.credentials.js +61 -38
- package/dist/credentials/GooglePalmApi.credentials.js.map +1 -1
- package/dist/credentials/GroqApi.credentials.js +55 -32
- package/dist/credentials/GroqApi.credentials.js.map +1 -1
- package/dist/credentials/HuggingFaceApi.credentials.js +55 -32
- package/dist/credentials/HuggingFaceApi.credentials.js.map +1 -1
- package/dist/credentials/MistralCloudApi.credentials.js +56 -33
- package/dist/credentials/MistralCloudApi.credentials.js.map +1 -1
- package/dist/credentials/MotorheadApi.credentials.js +68 -45
- package/dist/credentials/MotorheadApi.credentials.js.map +1 -1
- package/dist/credentials/OllamaApi.credentials.js +47 -24
- package/dist/credentials/OllamaApi.credentials.js.map +1 -1
- package/dist/credentials/OpenRouterApi.credentials.js +61 -38
- package/dist/credentials/OpenRouterApi.credentials.js.map +1 -1
- package/dist/credentials/PineconeApi.credentials.js +57 -34
- package/dist/credentials/PineconeApi.credentials.js.map +1 -1
- package/dist/credentials/QdrantApi.credentials.js +64 -41
- package/dist/credentials/QdrantApi.credentials.js.map +1 -1
- package/dist/credentials/SerpApi.credentials.js +55 -32
- package/dist/credentials/SerpApi.credentials.js.map +1 -1
- package/dist/credentials/WolframAlphaApi.credentials.js +59 -36
- package/dist/credentials/WolframAlphaApi.credentials.js.map +1 -1
- package/dist/credentials/XAiApi.credentials.js +61 -38
- package/dist/credentials/XAiApi.credentials.js.map +1 -1
- package/dist/credentials/XataApi.credentials.js +69 -46
- package/dist/credentials/XataApi.credentials.js.map +1 -1
- package/dist/credentials/ZepApi.credentials.js +74 -51
- package/dist/credentials/ZepApi.credentials.js.map +1 -1
- package/dist/known/nodes.json +12 -0
- package/dist/nodes/agents/Agent/Agent.node.js +426 -405
- package/dist/nodes/agents/Agent/Agent.node.js.map +1 -1
- package/dist/nodes/agents/Agent/agents/ConversationalAgent/description.js +111 -87
- package/dist/nodes/agents/Agent/agents/ConversationalAgent/description.js.map +1 -1
- package/dist/nodes/agents/Agent/agents/ConversationalAgent/execute.js +99 -75
- package/dist/nodes/agents/Agent/agents/ConversationalAgent/execute.js.map +1 -1
- package/dist/nodes/agents/Agent/agents/ConversationalAgent/prompt.js +30 -4
- package/dist/nodes/agents/Agent/agents/ConversationalAgent/prompt.js.map +1 -1
- package/dist/nodes/agents/Agent/agents/OpenAiFunctionsAgent/description.js +101 -77
- package/dist/nodes/agents/Agent/agents/OpenAiFunctionsAgent/description.js.map +1 -1
- package/dist/nodes/agents/Agent/agents/OpenAiFunctionsAgent/execute.js +108 -83
- package/dist/nodes/agents/Agent/agents/OpenAiFunctionsAgent/execute.js.map +1 -1
- package/dist/nodes/agents/Agent/agents/OpenAiFunctionsAgent/prompt.js +27 -3
- package/dist/nodes/agents/Agent/agents/OpenAiFunctionsAgent/prompt.js.map +1 -1
- package/dist/nodes/agents/Agent/agents/PlanAndExecuteAgent/description.js +87 -63
- package/dist/nodes/agents/Agent/agents/PlanAndExecuteAgent/description.js.map +1 -1
- package/dist/nodes/agents/Agent/agents/PlanAndExecuteAgent/execute.js +90 -67
- package/dist/nodes/agents/Agent/agents/PlanAndExecuteAgent/execute.js.map +1 -1
- package/dist/nodes/agents/Agent/agents/PlanAndExecuteAgent/prompt.js +27 -3
- package/dist/nodes/agents/Agent/agents/PlanAndExecuteAgent/prompt.js.map +1 -1
- package/dist/nodes/agents/Agent/agents/ReActAgent/description.js +131 -107
- package/dist/nodes/agents/Agent/agents/ReActAgent/description.js.map +1 -1
- package/dist/nodes/agents/Agent/agents/ReActAgent/execute.js +101 -82
- package/dist/nodes/agents/Agent/agents/ReActAgent/execute.js.map +1 -1
- package/dist/nodes/agents/Agent/agents/ReActAgent/prompt.js +36 -6
- package/dist/nodes/agents/Agent/agents/ReActAgent/prompt.js.map +1 -1
- package/dist/nodes/agents/Agent/agents/SqlAgent/description.js +206 -181
- package/dist/nodes/agents/Agent/agents/SqlAgent/description.js.map +1 -1
- package/dist/nodes/agents/Agent/agents/SqlAgent/execute.js +130 -104
- package/dist/nodes/agents/Agent/agents/SqlAgent/execute.js.map +1 -1
- package/dist/nodes/agents/Agent/agents/SqlAgent/other/handlers/mysql.js +40 -16
- package/dist/nodes/agents/Agent/agents/SqlAgent/other/handlers/mysql.js.map +1 -1
- package/dist/nodes/agents/Agent/agents/SqlAgent/other/handlers/postgres.js +41 -17
- 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 +67 -67
- package/dist/nodes/agents/Agent/agents/SqlAgent/other/handlers/sqlite.js.map +1 -1
- package/dist/nodes/agents/Agent/agents/SqlAgent/other/prompts.js +30 -4
- package/dist/nodes/agents/Agent/agents/SqlAgent/other/prompts.js.map +1 -1
- package/dist/nodes/agents/Agent/agents/ToolsAgent/description.js +72 -48
- package/dist/nodes/agents/Agent/agents/ToolsAgent/description.js.map +1 -1
- package/dist/nodes/agents/Agent/agents/ToolsAgent/execute.js +262 -216
- package/dist/nodes/agents/Agent/agents/ToolsAgent/execute.js.map +1 -1
- package/dist/nodes/agents/Agent/agents/ToolsAgent/prompt.js +27 -3
- package/dist/nodes/agents/Agent/agents/ToolsAgent/prompt.js.map +1 -1
- package/dist/nodes/agents/Agent/agents/utils.js +48 -17
- package/dist/nodes/agents/Agent/agents/utils.js.map +1 -1
- package/dist/nodes/agents/OpenAiAssistant/OpenAiAssistant.node.js +377 -355
- package/dist/nodes/agents/OpenAiAssistant/OpenAiAssistant.node.js.map +1 -1
- package/dist/nodes/agents/OpenAiAssistant/utils.js +53 -27
- package/dist/nodes/agents/OpenAiAssistant/utils.js.map +1 -1
- package/dist/nodes/chains/ChainLLM/ChainLlm.node.js +126 -95
- package/dist/nodes/chains/ChainLLM/ChainLlm.node.js.map +1 -1
- package/dist/nodes/chains/ChainLLM/methods/chainExecutor.js +101 -69
- package/dist/nodes/chains/ChainLLM/methods/chainExecutor.js.map +1 -1
- package/dist/nodes/chains/ChainLLM/methods/config.js +268 -243
- package/dist/nodes/chains/ChainLLM/methods/config.js.map +1 -1
- package/dist/nodes/chains/ChainLLM/methods/imageUtils.js +94 -60
- package/dist/nodes/chains/ChainLLM/methods/imageUtils.js.map +1 -1
- package/dist/nodes/chains/ChainLLM/methods/index.js +35 -9
- package/dist/nodes/chains/ChainLLM/methods/index.js.map +1 -1
- package/dist/nodes/chains/ChainLLM/methods/promptUtils.js +100 -60
- package/dist/nodes/chains/ChainLLM/methods/promptUtils.js.map +1 -1
- package/dist/nodes/chains/ChainLLM/methods/responseFormatter.js +46 -22
- package/dist/nodes/chains/ChainLLM/methods/responseFormatter.js.map +1 -1
- package/dist/nodes/chains/ChainLLM/methods/types.js +15 -1
- package/dist/nodes/chains/ChainLLM/methods/types.js.map +1 -1
- package/dist/nodes/chains/ChainRetrievalQA/ChainRetrievalQa.node.js +260 -233
- package/dist/nodes/chains/ChainRetrievalQA/ChainRetrievalQa.node.js.map +1 -1
- package/dist/nodes/chains/ChainSummarization/ChainSummarization.node.js +60 -37
- package/dist/nodes/chains/ChainSummarization/ChainSummarization.node.js.map +1 -1
- package/dist/nodes/chains/ChainSummarization/V1/ChainSummarizationV1.node.js +234 -208
- package/dist/nodes/chains/ChainSummarization/V1/ChainSummarizationV1.node.js.map +1 -1
- package/dist/nodes/chains/ChainSummarization/V2/ChainSummarizationV2.node.js +379 -334
- package/dist/nodes/chains/ChainSummarization/V2/ChainSummarizationV2.node.js.map +1 -1
- package/dist/nodes/chains/ChainSummarization/helpers.js +67 -43
- package/dist/nodes/chains/ChainSummarization/helpers.js.map +1 -1
- package/dist/nodes/chains/ChainSummarization/prompt.js +30 -4
- package/dist/nodes/chains/ChainSummarization/prompt.js.map +1 -1
- package/dist/nodes/chains/InformationExtractor/InformationExtractor.node.js +261 -229
- package/dist/nodes/chains/InformationExtractor/InformationExtractor.node.js.map +1 -1
- package/dist/nodes/chains/InformationExtractor/helpers.js +48 -28
- package/dist/nodes/chains/InformationExtractor/helpers.js.map +1 -1
- package/dist/nodes/chains/InformationExtractor/types.js +15 -1
- package/dist/nodes/chains/InformationExtractor/types.js.map +1 -1
- package/dist/nodes/chains/SentimentAnalysis/SentimentAnalysis.node.js +227 -197
- package/dist/nodes/chains/SentimentAnalysis/SentimentAnalysis.node.js.map +1 -1
- package/dist/nodes/chains/TextClassifier/TextClassifier.node.js +242 -215
- package/dist/nodes/chains/TextClassifier/TextClassifier.node.js.map +1 -1
- package/dist/nodes/code/Code.node.js +308 -267
- package/dist/nodes/code/Code.node.js.map +1 -1
- package/dist/nodes/document_loaders/DocumentBinaryInputLoader/DocumentBinaryInputLoader.node.js +199 -166
- package/dist/nodes/document_loaders/DocumentBinaryInputLoader/DocumentBinaryInputLoader.node.js.map +1 -1
- package/dist/nodes/document_loaders/DocumentDefaultDataLoader/DocumentDefaultDataLoader.node.js +303 -277
- package/dist/nodes/document_loaders/DocumentDefaultDataLoader/DocumentDefaultDataLoader.node.js.map +1 -1
- package/dist/nodes/document_loaders/DocumentGithubLoader/DocumentGithubLoader.node.js +136 -110
- package/dist/nodes/document_loaders/DocumentGithubLoader/DocumentGithubLoader.node.js.map +1 -1
- package/dist/nodes/document_loaders/DocumentJSONInputLoader/DocumentJsonInputLoader.node.js +107 -77
- package/dist/nodes/document_loaders/DocumentJSONInputLoader/DocumentJsonInputLoader.node.js.map +1 -1
- package/dist/nodes/embeddings/EmbeddingsAwsBedrock/EmbeddingsAwsBedrock.node.js +135 -110
- package/dist/nodes/embeddings/EmbeddingsAwsBedrock/EmbeddingsAwsBedrock.node.js.map +1 -1
- package/dist/nodes/embeddings/EmbeddingsAzureOpenAi/EmbeddingsAzureOpenAi.node.js +152 -126
- package/dist/nodes/embeddings/EmbeddingsAzureOpenAi/EmbeddingsAzureOpenAi.node.js.map +1 -1
- package/dist/nodes/embeddings/EmbeddingsCohere/EmbeddingsCohere.node.js +126 -101
- package/dist/nodes/embeddings/EmbeddingsCohere/EmbeddingsCohere.node.js.map +1 -1
- package/dist/nodes/embeddings/EmbeddingsGoogleGemini/EmbeddingsGoogleGemini.node.js +146 -117
- package/dist/nodes/embeddings/EmbeddingsGoogleGemini/EmbeddingsGoogleGemini.node.js.map +1 -1
- package/dist/nodes/embeddings/EmbeddingsGoogleVertex/EmbeddingsGoogleVertex.node.js +166 -0
- package/dist/nodes/embeddings/EmbeddingsGoogleVertex/EmbeddingsGoogleVertex.node.js.map +1 -0
- package/dist/nodes/embeddings/EmbeddingsGoogleVertex/google.svg +1 -0
- package/dist/nodes/embeddings/EmbeddingsHuggingFaceInference/EmbeddingsHuggingFaceInference.node.js +118 -89
- package/dist/nodes/embeddings/EmbeddingsHuggingFaceInference/EmbeddingsHuggingFaceInference.node.js.map +1 -1
- package/dist/nodes/embeddings/EmbeddingsMistralCloud/EmbeddingsMistralCloud.node.js +165 -136
- package/dist/nodes/embeddings/EmbeddingsMistralCloud/EmbeddingsMistralCloud.node.js.map +1 -1
- package/dist/nodes/embeddings/EmbeddingsOllama/EmbeddingsOllama.node.js +76 -51
- package/dist/nodes/embeddings/EmbeddingsOllama/EmbeddingsOllama.node.js.map +1 -1
- package/dist/nodes/embeddings/EmbeddingsOpenAI/EmbeddingsOpenAi.node.js +228 -201
- package/dist/nodes/embeddings/EmbeddingsOpenAI/EmbeddingsOpenAi.node.js.map +1 -1
- package/dist/nodes/llms/LMChatAnthropic/LmChatAnthropic.node.js +306 -272
- package/dist/nodes/llms/LMChatAnthropic/LmChatAnthropic.node.js.map +1 -1
- package/dist/nodes/llms/LMChatAnthropic/methods/searchModels.js +58 -36
- package/dist/nodes/llms/LMChatAnthropic/methods/searchModels.js.map +1 -1
- package/dist/nodes/llms/LMChatOllama/LmChatOllama.node.js +87 -61
- package/dist/nodes/llms/LMChatOllama/LmChatOllama.node.js.map +1 -1
- package/dist/nodes/llms/LMChatOpenAi/LmChatOpenAi.node.js +340 -316
- package/dist/nodes/llms/LMChatOpenAi/LmChatOpenAi.node.js.map +1 -1
- package/dist/nodes/llms/LMChatOpenAi/methods/loadModels.js +54 -30
- package/dist/nodes/llms/LMChatOpenAi/methods/loadModels.js.map +1 -1
- package/dist/nodes/llms/LMCohere/LmCohere.node.js +119 -93
- package/dist/nodes/llms/LMCohere/LmCohere.node.js.map +1 -1
- package/dist/nodes/llms/LMOllama/LmOllama.node.js +86 -60
- package/dist/nodes/llms/LMOllama/LmOllama.node.js.map +1 -1
- package/dist/nodes/llms/LMOllama/description.js +235 -207
- package/dist/nodes/llms/LMOllama/description.js.map +1 -1
- package/dist/nodes/llms/LMOpenAi/LmOpenAi.node.js +239 -214
- package/dist/nodes/llms/LMOpenAi/LmOpenAi.node.js.map +1 -1
- package/dist/nodes/llms/LMOpenHuggingFaceInference/LmOpenHuggingFaceInference.node.js +159 -133
- package/dist/nodes/llms/LMOpenHuggingFaceInference/LmOpenHuggingFaceInference.node.js.map +1 -1
- package/dist/nodes/llms/LmChatAwsBedrock/LmChatAwsBedrock.node.js +167 -140
- package/dist/nodes/llms/LmChatAwsBedrock/LmChatAwsBedrock.node.js.map +1 -1
- package/dist/nodes/llms/LmChatAzureOpenAi/LmChatAzureOpenAi.node.js +193 -168
- package/dist/nodes/llms/LmChatAzureOpenAi/LmChatAzureOpenAi.node.js.map +1 -1
- package/dist/nodes/llms/LmChatDeepSeek/LmChatDeepSeek.node.js +236 -212
- package/dist/nodes/llms/LmChatDeepSeek/LmChatDeepSeek.node.js.map +1 -1
- package/dist/nodes/llms/LmChatGoogleGemini/LmChatGoogleGemini.node.js +163 -133
- package/dist/nodes/llms/LmChatGoogleGemini/LmChatGoogleGemini.node.js.map +1 -1
- package/dist/nodes/llms/LmChatGoogleVertex/LmChatGoogleVertex.node.js +194 -164
- package/dist/nodes/llms/LmChatGoogleVertex/LmChatGoogleVertex.node.js.map +1 -1
- package/dist/nodes/llms/LmChatGoogleVertex/error-handling.js +36 -14
- package/dist/nodes/llms/LmChatGoogleVertex/error-handling.js.map +1 -1
- package/dist/nodes/llms/LmChatGroq/LmChatGroq.node.js +160 -134
- package/dist/nodes/llms/LmChatGroq/LmChatGroq.node.js.map +1 -1
- package/dist/nodes/llms/LmChatMistralCloud/LmChatMistralCloud.node.js +205 -179
- package/dist/nodes/llms/LmChatMistralCloud/LmChatMistralCloud.node.js.map +1 -1
- package/dist/nodes/llms/LmChatOpenRouter/LmChatOpenRouter.node.js +235 -212
- package/dist/nodes/llms/LmChatOpenRouter/LmChatOpenRouter.node.js.map +1 -1
- package/dist/nodes/llms/LmChatXAiGrok/LmChatXAiGrok.node.js +236 -212
- package/dist/nodes/llms/LmChatXAiGrok/LmChatXAiGrok.node.js.map +1 -1
- package/dist/nodes/llms/N8nLlmTracing.js +162 -127
- package/dist/nodes/llms/N8nLlmTracing.js.map +1 -1
- package/dist/nodes/llms/gemini-common/additional-options.js +103 -78
- package/dist/nodes/llms/gemini-common/additional-options.js.map +1 -1
- package/dist/nodes/llms/gemini-common/safety-options.js +75 -49
- package/dist/nodes/llms/gemini-common/safety-options.js.map +1 -1
- package/dist/nodes/llms/n8nDefaultFailedAttemptHandler.js +60 -24
- package/dist/nodes/llms/n8nDefaultFailedAttemptHandler.js.map +1 -1
- package/dist/nodes/llms/n8nLlmFailedAttemptHandler.js +46 -24
- package/dist/nodes/llms/n8nLlmFailedAttemptHandler.js.map +1 -1
- package/dist/nodes/memory/MemoryBufferWindow/MemoryBufferWindow.node.js +153 -130
- package/dist/nodes/memory/MemoryBufferWindow/MemoryBufferWindow.node.js.map +1 -1
- package/dist/nodes/memory/MemoryChatRetriever/MemoryChatRetriever.node.js +109 -84
- package/dist/nodes/memory/MemoryChatRetriever/MemoryChatRetriever.node.js.map +1 -1
- package/dist/nodes/memory/MemoryManager/MemoryManager.node.js +358 -318
- package/dist/nodes/memory/MemoryManager/MemoryManager.node.js.map +1 -1
- package/dist/nodes/memory/MemoryMongoDbChat/MemoryMongoDbChat.node.js +155 -0
- package/dist/nodes/memory/MemoryMongoDbChat/MemoryMongoDbChat.node.js.map +1 -0
- package/dist/nodes/memory/MemoryMongoDbChat/mongodb.dark.svg +3 -0
- package/dist/nodes/memory/MemoryMongoDbChat/mongodb.svg +3 -0
- package/dist/nodes/memory/MemoryMotorhead/MemoryMotorhead.node.js +128 -104
- package/dist/nodes/memory/MemoryMotorhead/MemoryMotorhead.node.js.map +1 -1
- package/dist/nodes/memory/MemoryPostgresChat/MemoryPostgresChat.node.js +120 -97
- package/dist/nodes/memory/MemoryPostgresChat/MemoryPostgresChat.node.js.map +1 -1
- package/dist/nodes/memory/MemoryRedisChat/MemoryRedisChat.node.js +172 -150
- package/dist/nodes/memory/MemoryRedisChat/MemoryRedisChat.node.js.map +1 -1
- package/dist/nodes/memory/MemoryXata/MemoryXata.node.js +153 -125
- package/dist/nodes/memory/MemoryXata/MemoryXata.node.js.map +1 -1
- package/dist/nodes/memory/MemoryZep/MemoryZep.node.js +159 -133
- package/dist/nodes/memory/MemoryZep/MemoryZep.node.js.map +1 -1
- package/dist/nodes/memory/descriptions.js +78 -48
- package/dist/nodes/memory/descriptions.js.map +1 -1
- package/dist/nodes/output_parser/OutputParserAutofixing/OutputParserAutofixing.node.js +129 -90
- package/dist/nodes/output_parser/OutputParserAutofixing/OutputParserAutofixing.node.js.map +1 -1
- package/dist/nodes/output_parser/OutputParserAutofixing/prompt.js +27 -3
- package/dist/nodes/output_parser/OutputParserAutofixing/prompt.js.map +1 -1
- package/dist/nodes/output_parser/OutputParserItemList/OutputParserItemList.node.js +103 -68
- package/dist/nodes/output_parser/OutputParserItemList/OutputParserItemList.node.js.map +1 -1
- package/dist/nodes/output_parser/OutputParserStructured/OutputParserStructured.node.js +129 -102
- package/dist/nodes/output_parser/OutputParserStructured/OutputParserStructured.node.js.map +1 -1
- package/dist/nodes/retrievers/RetrieverContextualCompression/RetrieverContextualCompression.node.js +99 -69
- package/dist/nodes/retrievers/RetrieverContextualCompression/RetrieverContextualCompression.node.js.map +1 -1
- package/dist/nodes/retrievers/RetrieverMultiQuery/RetrieverMultiQuery.node.js +118 -88
- package/dist/nodes/retrievers/RetrieverMultiQuery/RetrieverMultiQuery.node.js.map +1 -1
- package/dist/nodes/retrievers/RetrieverVectorStore/RetrieverVectorStore.node.js +88 -60
- package/dist/nodes/retrievers/RetrieverVectorStore/RetrieverVectorStore.node.js.map +1 -1
- package/dist/nodes/retrievers/RetrieverWorkflow/RetrieverWorkflow.node.js +400 -356
- package/dist/nodes/retrievers/RetrieverWorkflow/RetrieverWorkflow.node.js.map +1 -1
- package/dist/nodes/text_splitters/TextSplitterCharacterTextSplitter/TextSplitterCharacterTextSplitter.node.js +99 -74
- package/dist/nodes/text_splitters/TextSplitterCharacterTextSplitter/TextSplitterCharacterTextSplitter.node.js.map +1 -1
- package/dist/nodes/text_splitters/TextSplitterRecursiveCharacterTextSplitter/TextSplitterRecursiveCharacterTextSplitter.node.js +132 -103
- package/dist/nodes/text_splitters/TextSplitterRecursiveCharacterTextSplitter/TextSplitterRecursiveCharacterTextSplitter.node.js.map +1 -1
- package/dist/nodes/text_splitters/TextSplitterTokenSplitter/TextSplitterTokenSplitter.node.js +96 -68
- package/dist/nodes/text_splitters/TextSplitterTokenSplitter/TextSplitterTokenSplitter.node.js.map +1 -1
- package/dist/nodes/tools/ToolCalculator/ToolCalculator.node.js +69 -44
- package/dist/nodes/tools/ToolCalculator/ToolCalculator.node.js.map +1 -1
- package/dist/nodes/tools/ToolCode/ToolCode.node.js +261 -235
- package/dist/nodes/tools/ToolCode/ToolCode.node.js.map +1 -1
- package/dist/nodes/tools/ToolHttpRequest/ToolHttpRequest.node.js +384 -328
- package/dist/nodes/tools/ToolHttpRequest/ToolHttpRequest.node.js.map +1 -1
- package/dist/nodes/tools/ToolHttpRequest/descriptions.js +394 -357
- package/dist/nodes/tools/ToolHttpRequest/descriptions.js.map +1 -1
- package/dist/nodes/tools/ToolHttpRequest/interfaces.js +15 -1
- package/dist/nodes/tools/ToolHttpRequest/interfaces.js.map +1 -1
- package/dist/nodes/tools/ToolHttpRequest/utils.js +587 -551
- package/dist/nodes/tools/ToolHttpRequest/utils.js.map +1 -1
- package/dist/nodes/tools/ToolSerpApi/ToolSerpApi.node.js +131 -106
- package/dist/nodes/tools/ToolSerpApi/ToolSerpApi.node.js.map +1 -1
- package/dist/nodes/tools/ToolThink/ToolThink.node.js +94 -0
- package/dist/nodes/tools/ToolThink/ToolThink.node.js.map +1 -0
- package/dist/nodes/tools/ToolVectorStore/ToolVectorStore.node.js +131 -100
- package/dist/nodes/tools/ToolVectorStore/ToolVectorStore.node.js.map +1 -1
- package/dist/nodes/tools/ToolWikipedia/ToolWikipedia.node.js +70 -46
- package/dist/nodes/tools/ToolWikipedia/ToolWikipedia.node.js.map +1 -1
- package/dist/nodes/tools/ToolWolframAlpha/ToolWolframAlpha.node.js +75 -50
- package/dist/nodes/tools/ToolWolframAlpha/ToolWolframAlpha.node.js.map +1 -1
- package/dist/nodes/tools/ToolWorkflow/ToolWorkflow.node.js +64 -41
- package/dist/nodes/tools/ToolWorkflow/ToolWorkflow.node.js.map +1 -1
- package/dist/nodes/tools/ToolWorkflow/v1/ToolWorkflowV1.node.js +193 -185
- package/dist/nodes/tools/ToolWorkflow/v1/ToolWorkflowV1.node.js.map +1 -1
- package/dist/nodes/tools/ToolWorkflow/v1/versionDescription.js +326 -287
- package/dist/nodes/tools/ToolWorkflow/v1/versionDescription.js.map +1 -1
- package/dist/nodes/tools/ToolWorkflow/v2/ToolWorkflowV2.node.js +50 -27
- package/dist/nodes/tools/ToolWorkflow/v2/ToolWorkflowV2.node.js.map +1 -1
- package/dist/nodes/tools/ToolWorkflow/v2/methods/index.js +36 -35
- package/dist/nodes/tools/ToolWorkflow/v2/methods/index.js.map +1 -1
- package/dist/nodes/tools/ToolWorkflow/v2/methods/localResourceMapping.js +40 -18
- package/dist/nodes/tools/ToolWorkflow/v2/methods/localResourceMapping.js.map +1 -1
- package/dist/nodes/tools/ToolWorkflow/v2/utils/WorkflowToolService.js +256 -201
- package/dist/nodes/tools/ToolWorkflow/v2/utils/WorkflowToolService.js.map +1 -1
- package/dist/nodes/tools/ToolWorkflow/v2/versionDescription.js +159 -126
- package/dist/nodes/tools/ToolWorkflow/v2/versionDescription.js.map +1 -1
- package/dist/nodes/trigger/ChatTrigger/ChatTrigger.node.js +513 -489
- package/dist/nodes/trigger/ChatTrigger/ChatTrigger.node.js.map +1 -1
- package/dist/nodes/trigger/ChatTrigger/GenericFunctions.js +70 -41
- package/dist/nodes/trigger/ChatTrigger/GenericFunctions.js.map +1 -1
- package/dist/nodes/trigger/ChatTrigger/constants.js +27 -3
- package/dist/nodes/trigger/ChatTrigger/constants.js.map +1 -1
- package/dist/nodes/trigger/ChatTrigger/error.js +39 -17
- package/dist/nodes/trigger/ChatTrigger/error.js.map +1 -1
- package/dist/nodes/trigger/ChatTrigger/templates.js +73 -33
- package/dist/nodes/trigger/ChatTrigger/templates.js.map +1 -1
- package/dist/nodes/trigger/ChatTrigger/types.js +15 -1
- package/dist/nodes/trigger/ChatTrigger/types.js.map +1 -1
- package/dist/nodes/trigger/ManualChatTrigger/ManualChatTrigger.node.js +87 -63
- package/dist/nodes/trigger/ManualChatTrigger/ManualChatTrigger.node.js.map +1 -1
- package/dist/nodes/vector_store/VectorStoreInMemory/VectorStoreInMemory.node.js +75 -52
- package/dist/nodes/vector_store/VectorStoreInMemory/VectorStoreInMemory.node.js.map +1 -1
- package/dist/nodes/vector_store/VectorStoreInMemoryInsert/VectorStoreInMemoryInsert.node.js +117 -83
- package/dist/nodes/vector_store/VectorStoreInMemoryInsert/VectorStoreInMemoryInsert.node.js.map +1 -1
- package/dist/nodes/vector_store/VectorStoreInMemoryLoad/VectorStoreInMemoryLoad.node.js +91 -62
- package/dist/nodes/vector_store/VectorStoreInMemoryLoad/VectorStoreInMemoryLoad.node.js.map +1 -1
- package/dist/nodes/vector_store/VectorStoreMongoDBAtlas/VectorStoreMongoDBAtlas.node.js +240 -213
- package/dist/nodes/vector_store/VectorStoreMongoDBAtlas/VectorStoreMongoDBAtlas.node.js.map +1 -1
- package/dist/nodes/vector_store/VectorStorePGVector/VectorStorePGVector.node.js +256 -221
- package/dist/nodes/vector_store/VectorStorePGVector/VectorStorePGVector.node.js.map +1 -1
- package/dist/nodes/vector_store/VectorStorePinecone/VectorStorePinecone.node.js +131 -109
- package/dist/nodes/vector_store/VectorStorePinecone/VectorStorePinecone.node.js.map +1 -1
- package/dist/nodes/vector_store/VectorStorePineconeInsert/VectorStorePineconeInsert.node.js +137 -107
- package/dist/nodes/vector_store/VectorStorePineconeInsert/VectorStorePineconeInsert.node.js.map +1 -1
- package/dist/nodes/vector_store/VectorStorePineconeLoad/VectorStorePineconeLoad.node.js +125 -98
- package/dist/nodes/vector_store/VectorStorePineconeLoad/VectorStorePineconeLoad.node.js.map +1 -1
- package/dist/nodes/vector_store/VectorStoreQdrant/VectorStoreQdrant.node.js +124 -100
- package/dist/nodes/vector_store/VectorStoreQdrant/VectorStoreQdrant.node.js.map +1 -1
- package/dist/nodes/vector_store/VectorStoreSupabase/VectorStoreSupabase.node.js +116 -95
- package/dist/nodes/vector_store/VectorStoreSupabase/VectorStoreSupabase.node.js.map +1 -1
- package/dist/nodes/vector_store/VectorStoreSupabaseInsert/VectorStoreSupabaseInsert.node.js +129 -99
- package/dist/nodes/vector_store/VectorStoreSupabaseInsert/VectorStoreSupabaseInsert.node.js.map +1 -1
- package/dist/nodes/vector_store/VectorStoreSupabaseLoad/VectorStoreSupabaseLoad.node.js +121 -94
- package/dist/nodes/vector_store/VectorStoreSupabaseLoad/VectorStoreSupabaseLoad.node.js.map +1 -1
- package/dist/nodes/vector_store/VectorStoreZep/VectorStoreZep.node.js +133 -113
- package/dist/nodes/vector_store/VectorStoreZep/VectorStoreZep.node.js.map +1 -1
- package/dist/nodes/vector_store/VectorStoreZepInsert/VectorStoreZepInsert.node.js +141 -111
- package/dist/nodes/vector_store/VectorStoreZepInsert/VectorStoreZepInsert.node.js.map +1 -1
- package/dist/nodes/vector_store/VectorStoreZepLoad/VectorStoreZepLoad.node.js +121 -94
- package/dist/nodes/vector_store/VectorStoreZepLoad/VectorStoreZepLoad.node.js.map +1 -1
- package/dist/nodes/vector_store/shared/MemoryManager/MemoryCalculator.js +65 -37
- package/dist/nodes/vector_store/shared/MemoryManager/MemoryCalculator.js.map +1 -1
- package/dist/nodes/vector_store/shared/MemoryManager/MemoryVectorStoreManager.js +220 -159
- package/dist/nodes/vector_store/shared/MemoryManager/MemoryVectorStoreManager.js.map +1 -1
- package/dist/nodes/vector_store/shared/MemoryManager/StoreCleanupService.js +120 -87
- package/dist/nodes/vector_store/shared/MemoryManager/StoreCleanupService.js.map +1 -1
- package/dist/nodes/vector_store/shared/MemoryManager/config.js +50 -26
- package/dist/nodes/vector_store/shared/MemoryManager/config.js.map +1 -1
- package/dist/nodes/vector_store/shared/MemoryManager/types.js +15 -1
- package/dist/nodes/vector_store/shared/MemoryManager/types.js.map +1 -1
- package/dist/nodes/vector_store/shared/createVectorStoreNode/constants.js +67 -41
- package/dist/nodes/vector_store/shared/createVectorStoreNode/constants.js.map +1 -1
- package/dist/nodes/vector_store/shared/createVectorStoreNode/createVectorStoreNode.js +240 -194
- package/dist/nodes/vector_store/shared/createVectorStoreNode/createVectorStoreNode.js.map +1 -1
- package/dist/nodes/vector_store/shared/createVectorStoreNode/methods/listSearch.js +75 -50
- package/dist/nodes/vector_store/shared/createVectorStoreNode/methods/listSearch.js.map +1 -1
- package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/index.js +28 -19
- package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/index.js.map +1 -1
- package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/insertOperation.js +58 -29
- package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/insertOperation.js.map +1 -1
- package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/loadOperation.js +62 -29
- package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/loadOperation.js.map +1 -1
- package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/retrieveAsToolOperation.js +72 -38
- package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/retrieveAsToolOperation.js.map +1 -1
- package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/retrieveOperation.js +36 -12
- package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/retrieveOperation.js.map +1 -1
- package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/updateOperation.js +64 -34
- package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/updateOperation.js.map +1 -1
- package/dist/nodes/vector_store/shared/createVectorStoreNode/types.js +15 -1
- package/dist/nodes/vector_store/shared/createVectorStoreNode/types.js.map +1 -1
- package/dist/nodes/vector_store/shared/createVectorStoreNode/utils.js +40 -12
- package/dist/nodes/vector_store/shared/createVectorStoreNode/utils.js.map +1 -1
- package/dist/nodes/vector_store/shared/descriptions.js +93 -65
- package/dist/nodes/vector_store/shared/descriptions.js.map +1 -1
- package/dist/nodes/vector_store/shared/processDocuments.js +58 -35
- package/dist/nodes/vector_store/shared/processDocuments.js.map +1 -1
- package/dist/nodes/vendors/OpenAi/OpenAi.node.js +39 -16
- package/dist/nodes/vendors/OpenAi/OpenAi.node.js.map +1 -1
- package/dist/nodes/vendors/OpenAi/actions/assistant/create.operation.js +267 -228
- package/dist/nodes/vendors/OpenAi/actions/assistant/create.operation.js.map +1 -1
- package/dist/nodes/vendors/OpenAi/actions/assistant/deleteAssistant.operation.js +49 -24
- package/dist/nodes/vendors/OpenAi/actions/assistant/deleteAssistant.operation.js.map +1 -1
- package/dist/nodes/vendors/OpenAi/actions/assistant/index.js +100 -94
- package/dist/nodes/vendors/OpenAi/actions/assistant/index.js.map +1 -1
- package/dist/nodes/vendors/OpenAi/actions/assistant/list.operation.js +83 -59
- package/dist/nodes/vendors/OpenAi/actions/assistant/list.operation.js.map +1 -1
- package/dist/nodes/vendors/OpenAi/actions/assistant/message.operation.js +255 -227
- package/dist/nodes/vendors/OpenAi/actions/assistant/message.operation.js.map +1 -1
- package/dist/nodes/vendors/OpenAi/actions/assistant/update.operation.js +216 -171
- package/dist/nodes/vendors/OpenAi/actions/assistant/update.operation.js.map +1 -1
- package/dist/nodes/vendors/OpenAi/actions/audio/generate.operation.js +186 -157
- package/dist/nodes/vendors/OpenAi/actions/audio/generate.operation.js.map +1 -1
- package/dist/nodes/vendors/OpenAi/actions/audio/index.js +92 -88
- package/dist/nodes/vendors/OpenAi/actions/audio/index.js.map +1 -1
- package/dist/nodes/vendors/OpenAi/actions/audio/transcribe.operation.js +108 -76
- package/dist/nodes/vendors/OpenAi/actions/audio/transcribe.operation.js.map +1 -1
- package/dist/nodes/vendors/OpenAi/actions/audio/translate.operation.js +99 -67
- package/dist/nodes/vendors/OpenAi/actions/audio/translate.operation.js.map +1 -1
- package/dist/nodes/vendors/OpenAi/actions/descriptions.js +75 -50
- package/dist/nodes/vendors/OpenAi/actions/descriptions.js.map +1 -1
- package/dist/nodes/vendors/OpenAi/actions/file/deleteFile.operation.js +75 -50
- package/dist/nodes/vendors/OpenAi/actions/file/deleteFile.operation.js.map +1 -1
- package/dist/nodes/vendors/OpenAi/actions/file/index.js +80 -76
- package/dist/nodes/vendors/OpenAi/actions/file/index.js.map +1 -1
- package/dist/nodes/vendors/OpenAi/actions/file/list.operation.js +74 -49
- package/dist/nodes/vendors/OpenAi/actions/file/list.operation.js.map +1 -1
- package/dist/nodes/vendors/OpenAi/actions/file/upload.operation.js +108 -78
- package/dist/nodes/vendors/OpenAi/actions/file/upload.operation.js.map +1 -1
- package/dist/nodes/vendors/OpenAi/actions/image/analyze.operation.js +206 -187
- package/dist/nodes/vendors/OpenAi/actions/image/analyze.operation.js.map +1 -1
- package/dist/nodes/vendors/OpenAi/actions/image/generate.operation.js +240 -213
- package/dist/nodes/vendors/OpenAi/actions/image/generate.operation.js.map +1 -1
- package/dist/nodes/vendors/OpenAi/actions/image/index.js +70 -67
- package/dist/nodes/vendors/OpenAi/actions/image/index.js.map +1 -1
- package/dist/nodes/vendors/OpenAi/actions/node.type.js +15 -1
- package/dist/nodes/vendors/OpenAi/actions/node.type.js.map +1 -1
- package/dist/nodes/vendors/OpenAi/actions/router.js +100 -97
- package/dist/nodes/vendors/OpenAi/actions/router.js.map +1 -1
- package/dist/nodes/vendors/OpenAi/actions/text/classify.operation.js +93 -70
- package/dist/nodes/vendors/OpenAi/actions/text/classify.operation.js.map +1 -1
- package/dist/nodes/vendors/OpenAi/actions/text/index.js +71 -67
- package/dist/nodes/vendors/OpenAi/actions/text/index.js.map +1 -1
- package/dist/nodes/vendors/OpenAi/actions/text/message.operation.js +307 -278
- package/dist/nodes/vendors/OpenAi/actions/text/message.operation.js.map +1 -1
- package/dist/nodes/vendors/OpenAi/actions/versionDescription.js +143 -141
- package/dist/nodes/vendors/OpenAi/actions/versionDescription.js.map +1 -1
- package/dist/nodes/vendors/OpenAi/helpers/constants.js +47 -23
- package/dist/nodes/vendors/OpenAi/helpers/constants.js.map +1 -1
- package/dist/nodes/vendors/OpenAi/helpers/error-handling.js +42 -17
- package/dist/nodes/vendors/OpenAi/helpers/error-handling.js.map +1 -1
- package/dist/nodes/vendors/OpenAi/helpers/interfaces.js +15 -1
- package/dist/nodes/vendors/OpenAi/helpers/interfaces.js.map +1 -1
- package/dist/nodes/vendors/OpenAi/helpers/utils.js +56 -29
- package/dist/nodes/vendors/OpenAi/helpers/utils.js.map +1 -1
- package/dist/nodes/vendors/OpenAi/methods/index.js +39 -36
- package/dist/nodes/vendors/OpenAi/methods/index.js.map +1 -1
- package/dist/nodes/vendors/OpenAi/methods/listSearch.js +118 -95
- package/dist/nodes/vendors/OpenAi/methods/listSearch.js.map +1 -1
- package/dist/nodes/vendors/OpenAi/methods/loadOptions.js +36 -12
- package/dist/nodes/vendors/OpenAi/methods/loadOptions.js.map +1 -1
- package/dist/nodes/vendors/OpenAi/transport/index.js +44 -20
- package/dist/nodes/vendors/OpenAi/transport/index.js.map +1 -1
- package/dist/types/nodes.json +9 -6
- package/dist/types/types.js.map +1 -1
- package/dist/types/zod.types.js +15 -1
- package/dist/types/zod.types.js.map +1 -1
- package/dist/utils/N8nBinaryLoader.js +186 -142
- package/dist/utils/N8nBinaryLoader.js.map +1 -1
- package/dist/utils/N8nJsonLoader.js +82 -59
- package/dist/utils/N8nJsonLoader.js.map +1 -1
- package/dist/utils/N8nTool.js +95 -75
- package/dist/utils/N8nTool.js.map +1 -1
- package/dist/utils/descriptions.js +128 -92
- package/dist/utils/descriptions.js.map +1 -1
- package/dist/utils/helpers.js +153 -137
- package/dist/utils/helpers.js.map +1 -1
- package/dist/utils/logWrapper.js +328 -285
- package/dist/utils/logWrapper.js.map +1 -1
- package/dist/utils/output_parsers/N8nItemListOutputParser.js +57 -35
- package/dist/utils/output_parsers/N8nItemListOutputParser.js.map +1 -1
- package/dist/utils/output_parsers/N8nOutputFixingParser.js +94 -62
- package/dist/utils/output_parsers/N8nOutputFixingParser.js.map +1 -1
- package/dist/utils/output_parsers/N8nOutputParser.js +44 -15
- package/dist/utils/output_parsers/N8nOutputParser.js.map +1 -1
- package/dist/utils/output_parsers/N8nStructuredOutputParser.js +109 -79
- package/dist/utils/output_parsers/N8nStructuredOutputParser.js.map +1 -1
- package/dist/utils/output_parsers/prompt.js +48 -0
- package/dist/utils/output_parsers/prompt.js.map +1 -0
- package/dist/utils/schemaParsing.js +43 -14
- package/dist/utils/schemaParsing.js.map +1 -1
- package/dist/utils/sharedFields.js +130 -104
- package/dist/utils/sharedFields.js.map +1 -1
- package/dist/utils/tracing.js +37 -15
- package/dist/utils/tracing.js.map +1 -1
- package/package.json +14 -9
- package/dist/build.tsbuildinfo +0 -1
- package/dist/credentials/AnthropicApi.credentials.d.ts +0 -9
- package/dist/credentials/AzureOpenAiApi.credentials.d.ts +0 -8
- package/dist/credentials/CohereApi.credentials.d.ts +0 -9
- package/dist/credentials/DeepSeekApi.credentials.d.ts +0 -9
- package/dist/credentials/GooglePalmApi.credentials.d.ts +0 -9
- package/dist/credentials/GroqApi.credentials.d.ts +0 -9
- package/dist/credentials/HuggingFaceApi.credentials.d.ts +0 -9
- package/dist/credentials/MistralCloudApi.credentials.d.ts +0 -9
- package/dist/credentials/MotorheadApi.credentials.d.ts +0 -9
- package/dist/credentials/OllamaApi.credentials.d.ts +0 -8
- package/dist/credentials/OpenRouterApi.credentials.d.ts +0 -9
- package/dist/credentials/PineconeApi.credentials.d.ts +0 -9
- package/dist/credentials/QdrantApi.credentials.d.ts +0 -9
- package/dist/credentials/SerpApi.credentials.d.ts +0 -9
- package/dist/credentials/WolframAlphaApi.credentials.d.ts +0 -9
- package/dist/credentials/XAiApi.credentials.d.ts +0 -9
- package/dist/credentials/XataApi.credentials.d.ts +0 -9
- package/dist/credentials/ZepApi.credentials.d.ts +0 -9
- package/dist/nodes/agents/Agent/Agent.node.d.ts +0 -5
- package/dist/nodes/agents/Agent/agents/ConversationalAgent/description.d.ts +0 -2
- package/dist/nodes/agents/Agent/agents/ConversationalAgent/execute.d.ts +0 -2
- package/dist/nodes/agents/Agent/agents/ConversationalAgent/prompt.d.ts +0 -2
- package/dist/nodes/agents/Agent/agents/OpenAiFunctionsAgent/description.d.ts +0 -2
- package/dist/nodes/agents/Agent/agents/OpenAiFunctionsAgent/execute.d.ts +0 -2
- package/dist/nodes/agents/Agent/agents/OpenAiFunctionsAgent/prompt.d.ts +0 -1
- package/dist/nodes/agents/Agent/agents/PlanAndExecuteAgent/description.d.ts +0 -2
- package/dist/nodes/agents/Agent/agents/PlanAndExecuteAgent/execute.d.ts +0 -2
- package/dist/nodes/agents/Agent/agents/PlanAndExecuteAgent/prompt.d.ts +0 -1
- package/dist/nodes/agents/Agent/agents/ReActAgent/description.d.ts +0 -2
- package/dist/nodes/agents/Agent/agents/ReActAgent/execute.d.ts +0 -2
- package/dist/nodes/agents/Agent/agents/ReActAgent/prompt.d.ts +0 -4
- package/dist/nodes/agents/Agent/agents/SqlAgent/description.d.ts +0 -2
- package/dist/nodes/agents/Agent/agents/SqlAgent/execute.d.ts +0 -2
- package/dist/nodes/agents/Agent/agents/SqlAgent/other/handlers/mysql.d.ts +0 -3
- package/dist/nodes/agents/Agent/agents/SqlAgent/other/handlers/postgres.d.ts +0 -3
- package/dist/nodes/agents/Agent/agents/SqlAgent/other/handlers/sqlite.d.ts +0 -3
- package/dist/nodes/agents/Agent/agents/SqlAgent/other/prompts.d.ts +0 -2
- package/dist/nodes/agents/Agent/agents/ToolsAgent/description.d.ts +0 -2
- package/dist/nodes/agents/Agent/agents/ToolsAgent/execute.d.ts +0 -31
- package/dist/nodes/agents/Agent/agents/ToolsAgent/prompt.d.ts +0 -1
- package/dist/nodes/agents/Agent/agents/utils.d.ts +0 -8
- package/dist/nodes/agents/OpenAiAssistant/OpenAiAssistant.node.d.ts +0 -5
- package/dist/nodes/agents/OpenAiAssistant/utils.d.ts +0 -5
- package/dist/nodes/chains/ChainLLM/ChainLlm.node.d.ts +0 -5
- package/dist/nodes/chains/ChainLLM/methods/chainExecutor.d.ts +0 -19
- package/dist/nodes/chains/ChainLLM/methods/config.d.ts +0 -3
- package/dist/nodes/chains/ChainLLM/methods/imageUtils.d.ts +0 -12
- package/dist/nodes/chains/ChainLLM/methods/index.d.ts +0 -4
- package/dist/nodes/chains/ChainLLM/methods/promptUtils.d.ts +0 -3
- package/dist/nodes/chains/ChainLLM/methods/responseFormatter.d.ts +0 -2
- package/dist/nodes/chains/ChainLLM/methods/types.d.ts +0 -28
- package/dist/nodes/chains/ChainRetrievalQA/ChainRetrievalQa.node.d.ts +0 -5
- package/dist/nodes/chains/ChainSummarization/ChainSummarization.node.d.ts +0 -4
- package/dist/nodes/chains/ChainSummarization/V1/ChainSummarizationV1.node.d.ts +0 -6
- package/dist/nodes/chains/ChainSummarization/V2/ChainSummarizationV2.node.d.ts +0 -6
- package/dist/nodes/chains/ChainSummarization/helpers.d.ts +0 -9
- package/dist/nodes/chains/ChainSummarization/prompt.d.ts +0 -2
- package/dist/nodes/chains/InformationExtractor/InformationExtractor.node.d.ts +0 -5
- package/dist/nodes/chains/InformationExtractor/helpers.d.ts +0 -7
- package/dist/nodes/chains/InformationExtractor/types.d.ts +0 -6
- package/dist/nodes/chains/SentimentAnalysis/SentimentAnalysis.node.d.ts +0 -5
- package/dist/nodes/chains/TextClassifier/TextClassifier.node.d.ts +0 -5
- package/dist/nodes/code/Code.node.d.ts +0 -7
- package/dist/nodes/document_loaders/DocumentBinaryInputLoader/DocumentBinaryInputLoader.node.d.ts +0 -8
- package/dist/nodes/document_loaders/DocumentDefaultDataLoader/DocumentDefaultDataLoader.node.d.ts +0 -8
- package/dist/nodes/document_loaders/DocumentGithubLoader/DocumentGithubLoader.node.d.ts +0 -5
- package/dist/nodes/document_loaders/DocumentJSONInputLoader/DocumentJsonInputLoader.node.d.ts +0 -5
- package/dist/nodes/embeddings/EmbeddingsAwsBedrock/EmbeddingsAwsBedrock.node.d.ts +0 -5
- package/dist/nodes/embeddings/EmbeddingsAzureOpenAi/EmbeddingsAzureOpenAi.node.d.ts +0 -5
- package/dist/nodes/embeddings/EmbeddingsCohere/EmbeddingsCohere.node.d.ts +0 -5
- package/dist/nodes/embeddings/EmbeddingsGoogleGemini/EmbeddingsGoogleGemini.node.d.ts +0 -5
- package/dist/nodes/embeddings/EmbeddingsHuggingFaceInference/EmbeddingsHuggingFaceInference.node.d.ts +0 -5
- package/dist/nodes/embeddings/EmbeddingsMistralCloud/EmbeddingsMistralCloud.node.d.ts +0 -5
- package/dist/nodes/embeddings/EmbeddingsOllama/EmbeddingsOllama.node.d.ts +0 -5
- package/dist/nodes/embeddings/EmbeddingsOpenAI/EmbeddingsOpenAi.node.d.ts +0 -5
- package/dist/nodes/llms/LMChatAnthropic/LmChatAnthropic.node.d.ts +0 -11
- package/dist/nodes/llms/LMChatAnthropic/methods/searchModels.d.ts +0 -8
- package/dist/nodes/llms/LMChatOllama/LmChatOllama.node.d.ts +0 -5
- package/dist/nodes/llms/LMChatOpenAi/LmChatOpenAi.node.d.ts +0 -11
- package/dist/nodes/llms/LMChatOpenAi/methods/loadModels.d.ts +0 -2
- package/dist/nodes/llms/LMCohere/LmCohere.node.d.ts +0 -5
- package/dist/nodes/llms/LMOllama/LmOllama.node.d.ts +0 -5
- package/dist/nodes/llms/LMOllama/description.d.ts +0 -4
- package/dist/nodes/llms/LMOpenAi/LmOpenAi.node.d.ts +0 -15
- package/dist/nodes/llms/LMOpenHuggingFaceInference/LmOpenHuggingFaceInference.node.d.ts +0 -5
- package/dist/nodes/llms/LmChatAwsBedrock/LmChatAwsBedrock.node.d.ts +0 -5
- package/dist/nodes/llms/LmChatAzureOpenAi/LmChatAzureOpenAi.node.d.ts +0 -5
- package/dist/nodes/llms/LmChatDeepSeek/LmChatDeepSeek.node.d.ts +0 -5
- package/dist/nodes/llms/LmChatGoogleGemini/LmChatGoogleGemini.node.d.ts +0 -5
- package/dist/nodes/llms/LmChatGoogleVertex/LmChatGoogleVertex.node.d.ts +0 -15
- package/dist/nodes/llms/LmChatGoogleVertex/error-handling.d.ts +0 -8
- package/dist/nodes/llms/LmChatGroq/LmChatGroq.node.d.ts +0 -5
- package/dist/nodes/llms/LmChatMistralCloud/LmChatMistralCloud.node.d.ts +0 -5
- package/dist/nodes/llms/LmChatOpenRouter/LmChatOpenRouter.node.d.ts +0 -5
- package/dist/nodes/llms/LmChatXAiGrok/LmChatXAiGrok.node.d.ts +0 -5
- package/dist/nodes/llms/N8nLlmTracing.d.ts +0 -44
- package/dist/nodes/llms/gemini-common/additional-options.d.ts +0 -2
- package/dist/nodes/llms/gemini-common/safety-options.d.ts +0 -3
- package/dist/nodes/llms/n8nDefaultFailedAttemptHandler.d.ts +0 -1
- package/dist/nodes/llms/n8nLlmFailedAttemptHandler.d.ts +0 -3
- package/dist/nodes/memory/MemoryBufferWindow/MemoryBufferWindow.node.d.ts +0 -5
- package/dist/nodes/memory/MemoryChatRetriever/MemoryChatRetriever.node.d.ts +0 -5
- package/dist/nodes/memory/MemoryManager/MemoryManager.node.d.ts +0 -5
- package/dist/nodes/memory/MemoryMotorhead/MemoryMotorhead.node.d.ts +0 -5
- package/dist/nodes/memory/MemoryPostgresChat/MemoryPostgresChat.node.d.ts +0 -11
- package/dist/nodes/memory/MemoryRedisChat/MemoryRedisChat.node.d.ts +0 -5
- package/dist/nodes/memory/MemoryXata/MemoryXata.node.d.ts +0 -5
- package/dist/nodes/memory/MemoryZep/MemoryZep.node.d.ts +0 -5
- package/dist/nodes/memory/descriptions.d.ts +0 -5
- package/dist/nodes/output_parser/OutputParserAutofixing/OutputParserAutofixing.node.d.ts +0 -5
- package/dist/nodes/output_parser/OutputParserAutofixing/prompt.d.ts +0 -1
- package/dist/nodes/output_parser/OutputParserItemList/OutputParserItemList.node.d.ts +0 -5
- package/dist/nodes/output_parser/OutputParserStructured/OutputParserStructured.node.d.ts +0 -5
- package/dist/nodes/retrievers/RetrieverContextualCompression/RetrieverContextualCompression.node.d.ts +0 -5
- package/dist/nodes/retrievers/RetrieverMultiQuery/RetrieverMultiQuery.node.d.ts +0 -5
- package/dist/nodes/retrievers/RetrieverVectorStore/RetrieverVectorStore.node.d.ts +0 -5
- package/dist/nodes/retrievers/RetrieverWorkflow/RetrieverWorkflow.node.d.ts +0 -5
- package/dist/nodes/text_splitters/TextSplitterCharacterTextSplitter/TextSplitterCharacterTextSplitter.node.d.ts +0 -5
- package/dist/nodes/text_splitters/TextSplitterRecursiveCharacterTextSplitter/TextSplitterRecursiveCharacterTextSplitter.node.d.ts +0 -5
- package/dist/nodes/text_splitters/TextSplitterTokenSplitter/TextSplitterTokenSplitter.node.d.ts +0 -5
- package/dist/nodes/tools/ToolCalculator/ToolCalculator.node.d.ts +0 -5
- package/dist/nodes/tools/ToolCode/ToolCode.node.d.ts +0 -5
- package/dist/nodes/tools/ToolHttpRequest/ToolHttpRequest.node.d.ts +0 -5
- package/dist/nodes/tools/ToolHttpRequest/descriptions.d.ts +0 -7
- package/dist/nodes/tools/ToolHttpRequest/interfaces.d.ts +0 -20
- package/dist/nodes/tools/ToolHttpRequest/utils.d.ts +0 -25
- package/dist/nodes/tools/ToolSerpApi/ToolSerpApi.node.d.ts +0 -5
- package/dist/nodes/tools/ToolVectorStore/ToolVectorStore.node.d.ts +0 -5
- package/dist/nodes/tools/ToolWikipedia/ToolWikipedia.node.d.ts +0 -5
- package/dist/nodes/tools/ToolWolframAlpha/ToolWolframAlpha.node.d.ts +0 -5
- package/dist/nodes/tools/ToolWorkflow/ToolWorkflow.node.d.ts +0 -4
- package/dist/nodes/tools/ToolWorkflow/v1/ToolWorkflowV1.node.d.ts +0 -6
- package/dist/nodes/tools/ToolWorkflow/v1/versionDescription.d.ts +0 -2
- package/dist/nodes/tools/ToolWorkflow/v2/ToolWorkflowV2.node.d.ts +0 -10
- package/dist/nodes/tools/ToolWorkflow/v2/methods/index.d.ts +0 -1
- package/dist/nodes/tools/ToolWorkflow/v2/methods/localResourceMapping.d.ts +0 -2
- package/dist/nodes/tools/ToolWorkflow/v2/utils/WorkflowToolService.d.ts +0 -26
- package/dist/nodes/tools/ToolWorkflow/v2/versionDescription.d.ts +0 -2
- package/dist/nodes/trigger/ChatTrigger/ChatTrigger.node.d.ts +0 -7
- package/dist/nodes/trigger/ChatTrigger/GenericFunctions.d.ts +0 -2
- package/dist/nodes/trigger/ChatTrigger/constants.d.ts +0 -1
- package/dist/nodes/trigger/ChatTrigger/error.d.ts +0 -5
- package/dist/nodes/trigger/ChatTrigger/templates.d.ts +0 -16
- package/dist/nodes/trigger/ChatTrigger/types.d.ts +0 -2
- package/dist/nodes/trigger/ManualChatTrigger/ManualChatTrigger.node.d.ts +0 -5
- package/dist/nodes/vector_store/VectorStoreInMemory/VectorStoreInMemory.node.d.ts +0 -15
- package/dist/nodes/vector_store/VectorStoreInMemoryInsert/VectorStoreInMemoryInsert.node.d.ts +0 -5
- package/dist/nodes/vector_store/VectorStoreInMemoryLoad/VectorStoreInMemoryLoad.node.d.ts +0 -5
- package/dist/nodes/vector_store/VectorStoreMongoDBAtlas/VectorStoreMongoDBAtlas.node.d.ts +0 -16
- package/dist/nodes/vector_store/VectorStorePGVector/VectorStorePGVector.node.d.ts +0 -15
- package/dist/nodes/vector_store/VectorStorePinecone/VectorStorePinecone.node.d.ts +0 -15
- package/dist/nodes/vector_store/VectorStorePineconeInsert/VectorStorePineconeInsert.node.d.ts +0 -11
- package/dist/nodes/vector_store/VectorStorePineconeLoad/VectorStorePineconeLoad.node.d.ts +0 -11
- package/dist/nodes/vector_store/VectorStoreQdrant/VectorStoreQdrant.node.d.ts +0 -15
- package/dist/nodes/vector_store/VectorStoreSupabase/VectorStoreSupabase.node.d.ts +0 -15
- package/dist/nodes/vector_store/VectorStoreSupabaseInsert/VectorStoreSupabaseInsert.node.d.ts +0 -11
- package/dist/nodes/vector_store/VectorStoreSupabaseLoad/VectorStoreSupabaseLoad.node.d.ts +0 -11
- package/dist/nodes/vector_store/VectorStoreZep/VectorStoreZep.node.d.ts +0 -15
- package/dist/nodes/vector_store/VectorStoreZepInsert/VectorStoreZepInsert.node.d.ts +0 -5
- package/dist/nodes/vector_store/VectorStoreZepLoad/VectorStoreZepLoad.node.d.ts +0 -5
- package/dist/nodes/vector_store/shared/MemoryManager/MemoryCalculator.d.ts +0 -7
- package/dist/nodes/vector_store/shared/MemoryManager/MemoryVectorStoreManager.d.ts +0 -32
- package/dist/nodes/vector_store/shared/MemoryManager/StoreCleanupService.d.ts +0 -16
- package/dist/nodes/vector_store/shared/MemoryManager/config.d.ts +0 -4
- package/dist/nodes/vector_store/shared/MemoryManager/types.d.ts +0 -39
- package/dist/nodes/vector_store/shared/createVectorStoreNode/constants.d.ts +0 -4
- package/dist/nodes/vector_store/shared/createVectorStoreNode/createVectorStoreNode.d.ts +0 -15
- package/dist/nodes/vector_store/shared/createVectorStoreNode/methods/listSearch.d.ts +0 -19
- package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/index.d.ts +0 -5
- package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/insertOperation.d.ts +0 -5
- package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/loadOperation.d.ts +0 -5
- package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/retrieveAsToolOperation.d.ts +0 -5
- package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/retrieveOperation.d.ts +0 -5
- package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/updateOperation.d.ts +0 -5
- package/dist/nodes/vector_store/shared/createVectorStoreNode/types.d.ts +0 -31
- package/dist/nodes/vector_store/shared/createVectorStoreNode/utils.d.ts +0 -6
- package/dist/nodes/vector_store/shared/descriptions.d.ts +0 -4
- package/dist/nodes/vector_store/shared/processDocuments.d.ts +0 -25
- package/dist/nodes/vendors/OpenAi/OpenAi.node.d.ts +0 -10
- package/dist/nodes/vendors/OpenAi/actions/assistant/create.operation.d.ts +0 -26
- package/dist/nodes/vendors/OpenAi/actions/assistant/deleteAssistant.operation.d.ts +0 -26
- package/dist/nodes/vendors/OpenAi/actions/assistant/index.d.ts +0 -8
- package/dist/nodes/vendors/OpenAi/actions/assistant/list.operation.d.ts +0 -26
- package/dist/nodes/vendors/OpenAi/actions/assistant/message.operation.d.ts +0 -26
- package/dist/nodes/vendors/OpenAi/actions/assistant/update.operation.d.ts +0 -26
- package/dist/nodes/vendors/OpenAi/actions/audio/generate.operation.d.ts +0 -26
- package/dist/nodes/vendors/OpenAi/actions/audio/index.d.ts +0 -6
- package/dist/nodes/vendors/OpenAi/actions/audio/transcribe.operation.d.ts +0 -26
- package/dist/nodes/vendors/OpenAi/actions/audio/translate.operation.d.ts +0 -26
- package/dist/nodes/vendors/OpenAi/actions/descriptions.d.ts +0 -3
- package/dist/nodes/vendors/OpenAi/actions/file/deleteFile.operation.d.ts +0 -26
- package/dist/nodes/vendors/OpenAi/actions/file/index.d.ts +0 -6
- package/dist/nodes/vendors/OpenAi/actions/file/list.operation.d.ts +0 -26
- package/dist/nodes/vendors/OpenAi/actions/file/upload.operation.d.ts +0 -26
- package/dist/nodes/vendors/OpenAi/actions/image/analyze.operation.d.ts +0 -26
- package/dist/nodes/vendors/OpenAi/actions/image/generate.operation.d.ts +0 -26
- package/dist/nodes/vendors/OpenAi/actions/image/index.d.ts +0 -5
- package/dist/nodes/vendors/OpenAi/actions/node.type.d.ts +0 -10
- package/dist/nodes/vendors/OpenAi/actions/router.d.ts +0 -2
- package/dist/nodes/vendors/OpenAi/actions/text/classify.operation.d.ts +0 -26
- package/dist/nodes/vendors/OpenAi/actions/text/index.d.ts +0 -5
- package/dist/nodes/vendors/OpenAi/actions/text/message.operation.d.ts +0 -26
- package/dist/nodes/vendors/OpenAi/actions/versionDescription.d.ts +0 -2
- package/dist/nodes/vendors/OpenAi/helpers/constants.d.ts +0 -1
- package/dist/nodes/vendors/OpenAi/helpers/error-handling.d.ts +0 -4
- package/dist/nodes/vendors/OpenAi/helpers/interfaces.d.ts +0 -55
- package/dist/nodes/vendors/OpenAi/helpers/utils.d.ts +0 -8
- package/dist/nodes/vendors/OpenAi/methods/index.d.ts +0 -2
- package/dist/nodes/vendors/OpenAi/methods/listSearch.d.ts +0 -5
- package/dist/nodes/vendors/OpenAi/methods/loadOptions.d.ts +0 -2
- package/dist/nodes/vendors/OpenAi/transport/index.d.ts +0 -10
- package/dist/types/types.d.ts +0 -4
- package/dist/types/zod.types.d.ts +0 -2
- package/dist/utils/N8nBinaryLoader.d.ts +0 -18
- package/dist/utils/N8nJsonLoader.d.ts +0 -11
- package/dist/utils/N8nTool.d.ts +0 -10
- package/dist/utils/descriptions.d.ts +0 -13
- package/dist/utils/helpers.d.ts +0 -23
- package/dist/utils/logWrapper.d.ts +0 -27
- package/dist/utils/output_parsers/N8nItemListOutputParser.d.ts +0 -13
- package/dist/utils/output_parsers/N8nOutputFixingParser.d.ts +0 -18
- package/dist/utils/output_parsers/N8nOutputParser.d.ts +0 -7
- package/dist/utils/output_parsers/N8nStructuredOutputParser.d.ts +0 -12
- package/dist/utils/schemaParsing.d.ts +0 -6
- package/dist/utils/sharedFields.d.ts +0 -6
- package/dist/utils/tracing.d.ts +0 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Agent.node.js","sourceRoot":"","sources":["../../../../nodes/agents/Agent/Agent.node.ts"],"names":[],"mappings":";;;AAAA,+CAAuE;AAYvE,sDAAyF;AAEzF,0EAAyF;AACzF,kEAAkF;AAClF,2EAA2F;AAC3F,mEAAoF;AACpF,0EAAyF;AACzF,kEAAkF;AAClF,iEAA4E;AAC5E,yDAAqE;AACrE,+DAAwE;AACxE,uDAAiE;AACjE,iEAAuE;AACvE,yDAAgE;AAIhE,SAAS,SAAS,CACjB,KAMa,EACb,eAAyB;IAQzB,MAAM,YAAY,GAAG,CACpB,MAAsB,EACgC,EAAE;QACxD,MAAM,YAAY,GAA8B;YAC/C,gBAAgB,EAAE,OAAO;YACzB,SAAS,EAAE,QAAQ;YACnB,OAAO,EAAE,MAAM;YACf,eAAe,EAAE,eAAe;SAChC,CAAC;QAEF,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE;YACtC,MAAM,WAAW,GAAG,IAAI,KAAM,kBAAyC,CAAC;YACxE,IAAI,WAAW,GAAG,IAAI,IAAI,YAAY,CAAC,CAAC,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;YACxE,IACC,WAAW;gBACX,CAAC,sBAAsB,EAAE,YAAY,EAAE,qBAAqB,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,EAC5E,CAAC;gBACF,WAAW,GAAG,YAAY,CAAC;YAC5B,CAAC;YACD,MAAM,KAAK,GAA4B;gB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es, NodeOperationError } from 'n8n-workflow';\nimport type {\n\tINodeInputConfiguration,\n\tINodeInputFilter,\n\tIExecuteFunctions,\n\tINodeExecutionData,\n\tINodeType,\n\tINodeTypeDescription,\n\tINodeProperties,\n\tNodeConnectionType,\n} from 'n8n-workflow';\n\nimport { promptTypeOptions, textFromPreviousNode, textInput } from '@utils/descriptions';\n\nimport { conversationalAgentProperties } from './agents/ConversationalAgent/description';\nimport { conversationalAgentExecute } from './agents/ConversationalAgent/execute';\nimport { openAiFunctionsAgentProperties } from './agents/OpenAiFunctionsAgent/description';\nimport { openAiFunctionsAgentExecute } from './agents/OpenAiFunctionsAgent/execute';\nimport { planAndExecuteAgentProperties } from './agents/PlanAndExecuteAgent/description';\nimport { planAndExecuteAgentExecute } from './agents/PlanAndExecuteAgent/execute';\nimport { reActAgentAgentProperties } from './agents/ReActAgent/description';\nimport { reActAgentAgentExecute } from './agents/ReActAgent/execute';\nimport { sqlAgentAgentProperties } from './agents/SqlAgent/description';\nimport { sqlAgentAgentExecute } from './agents/SqlAgent/execute';\nimport { toolsAgentProperties } from './agents/ToolsAgent/description';\nimport { toolsAgentExecute } from './agents/ToolsAgent/execute';\n\n// Function used in the inputs expression to figure out which inputs to\n// display based on the agent type\nfunction getInputs(\n\tagent:\n\t\t| 'toolsAgent'\n\t\t| 'conversationalAgent'\n\t\t| 'openAiFunctionsAgent'\n\t\t| 'planAndExecuteAgent'\n\t\t| 'reActAgent'\n\t\t| 'sqlAgent',\n\thasOutputParser?: boolean,\n): Array<NodeConnectionType | INodeInputConfiguration> {\n\tinterface SpecialInput {\n\t\ttype: NodeConnectionType;\n\t\tfilter?: INodeInputFilter;\n\t\trequired?: boolean;\n\t}\n\n\tconst getInputData = (\n\t\tinputs: SpecialInput[],\n\t): Array<NodeConnectionType | INodeInputConfiguration> => {\n\t\tconst displayNames: { [key: string]: string } = {\n\t\t\tai_languageModel: 'Model',\n\t\t\tai_memory: 'Memory',\n\t\t\tai_tool: 'Tool',\n\t\t\tai_outputParser: 'Output Parser',\n\t\t};\n\n\t\treturn inputs.map(({ type, filter }) => {\n\t\t\tconst isModelType = type === ('ai_languageModel' as NodeConnectionType);\n\t\t\tlet displayName = type in displayNames ? displayNames[type] : undefined;\n\t\t\tif (\n\t\t\t\tisModelType &&\n\t\t\t\t['openAiFunctionsAgent', 'toolsAgent', 'conversationalAgent'].includes(agent)\n\t\t\t) {\n\t\t\t\tdisplayName = 'Chat Model';\n\t\t\t}\n\t\t\tconst input: INodeInputConfiguration = {\n\t\t\t\ttype,\n\t\t\t\tdisplayName,\n\t\t\t\trequired: isModelType,\n\t\t\t\tmaxConnections: ['ai_languageModel', 'ai_memory', 'ai_outputParser'].includes(\n\t\t\t\t\ttype as NodeConnectionType,\n\t\t\t\t)\n\t\t\t\t\t? 1\n\t\t\t\t\t: undefined,\n\t\t\t};\n\n\t\t\tif (filter) {\n\t\t\t\tinput.filter = filter;\n\t\t\t}\n\n\t\t\treturn input;\n\t\t});\n\t};\n\n\tlet specialInputs: SpecialInput[] = [];\n\n\tif (agent === 'conversationalAgent') {\n\t\tspecialInputs = [\n\t\t\t{\n\t\t\t\ttype: 'ai_languageModel',\n\t\t\t\tfilter: {\n\t\t\t\t\tnodes: [\n\t\t\t\t\t\t'@n8n/n8n-nodes-langchain.lmChatAnthropic',\n\t\t\t\t\t\t'@n8n/n8n-nodes-langchain.lmChatAwsBedrock',\n\t\t\t\t\t\t'@n8n/n8n-nodes-langchain.lmChatGroq',\n\t\t\t\t\t\t'@n8n/n8n-nodes-langchain.lmChatOllama',\n\t\t\t\t\t\t'@n8n/n8n-nodes-langchain.lmChatOpenAi',\n\t\t\t\t\t\t'@n8n/n8n-nodes-langchain.lmChatGoogleGemini',\n\t\t\t\t\t\t'@n8n/n8n-nodes-langchain.lmChatGoogleVertex',\n\t\t\t\t\t\t'@n8n/n8n-nodes-langchain.lmChatMistralCloud',\n\t\t\t\t\t\t'@n8n/n8n-nodes-langchain.lmChatAzureOpenAi',\n\t\t\t\t\t\t'@n8n/n8n-nodes-langchain.lmChatDeepSeek',\n\t\t\t\t\t\t'@n8n/n8n-nodes-langchain.lmChatOpenRouter',\n\t\t\t\t\t\t'@n8n/n8n-nodes-langchain.lmChatXAiGrok',\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: 'ai_memory',\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: 'ai_tool',\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: 'ai_outputParser',\n\t\t\t},\n\t\t];\n\t} else if (agent === 'toolsAgent') {\n\t\tspecialInputs = [\n\t\t\t{\n\t\t\t\ttype: 'ai_languageModel',\n\t\t\t\tfilter: {\n\t\t\t\t\tnodes: [\n\t\t\t\t\t\t'@n8n/n8n-nodes-langchain.lmChatAnthropic',\n\t\t\t\t\t\t'@n8n/n8n-nodes-langchain.lmChatAzureOpenAi',\n\t\t\t\t\t\t'@n8n/n8n-nodes-langchain.lmChatAwsBedrock',\n\t\t\t\t\t\t'@n8n/n8n-nodes-langchain.lmChatMistralCloud',\n\t\t\t\t\t\t'@n8n/n8n-nodes-langchain.lmChatOllama',\n\t\t\t\t\t\t'@n8n/n8n-nodes-langchain.lmChatOpenAi',\n\t\t\t\t\t\t'@n8n/n8n-nodes-langchain.lmChatGroq',\n\t\t\t\t\t\t'@n8n/n8n-nodes-langchain.lmChatGoogleVertex',\n\t\t\t\t\t\t'@n8n/n8n-nodes-langchain.lmChatGoogleGemini',\n\t\t\t\t\t\t'@n8n/n8n-nodes-langchain.lmChatDeepSeek',\n\t\t\t\t\t\t'@n8n/n8n-nodes-langchain.lmChatOpenRouter',\n\t\t\t\t\t\t'@n8n/n8n-nodes-langchain.lmChatXAiGrok',\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: 'ai_memory',\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: 'ai_tool',\n\t\t\t\trequired: true,\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: 'ai_outputParser',\n\t\t\t},\n\t\t];\n\t} else if (agent === 'openAiFunctionsAgent') {\n\t\tspecialInputs = [\n\t\t\t{\n\t\t\t\ttype: 'ai_languageModel',\n\t\t\t\tfilter: {\n\t\t\t\t\tnodes: [\n\t\t\t\t\t\t'@n8n/n8n-nodes-langchain.lmChatOpenAi',\n\t\t\t\t\t\t'@n8n/n8n-nodes-langchain.lmChatAzureOpenAi',\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: 'ai_memory',\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: 'ai_tool',\n\t\t\t\trequired: true,\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: 'ai_outputParser',\n\t\t\t},\n\t\t];\n\t} else if (agent === 'reActAgent') {\n\t\tspecialInputs = [\n\t\t\t{\n\t\t\t\ttype: 'ai_languageModel',\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: 'ai_tool',\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: 'ai_outputParser',\n\t\t\t},\n\t\t];\n\t} else if (agent === 'sqlAgent') {\n\t\tspecialInputs = [\n\t\t\t{\n\t\t\t\ttype: 'ai_languageModel',\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: 'ai_memory',\n\t\t\t},\n\t\t];\n\t} else if (agent === 'planAndExecuteAgent') {\n\t\tspecialInputs = [\n\t\t\t{\n\t\t\t\ttype: 'ai_languageModel',\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: 'ai_tool',\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: 'ai_outputParser',\n\t\t\t},\n\t\t];\n\t}\n\n\tif (hasOutputParser === false) {\n\t\tspecialInputs = specialInputs.filter((input) => input.type !== 'ai_outputParser');\n\t}\n\treturn ['main', ...getInputData(specialInputs)];\n}\n\nconst agentTypeProperty: INodeProperties = {\n\tdisplayName: 'Agent',\n\tname: 'agent',\n\ttype: 'options',\n\tnoDataExpression: true,\n\t// eslint-disable-next-line n8n-nodes-base/node-param-options-type-unsorted-items\n\toptions: [\n\t\t{\n\t\t\tname: 'Tools Agent',\n\t\t\tvalue: 'toolsAgent',\n\t\t\tdescription:\n\t\t\t\t'Utilizes structured tool schemas for precise and reliable tool selection and execution. Recommended for complex tasks requiring accurate and consistent tool usage, but only usable with models that support tool calling.',\n\t\t},\n\t\t{\n\t\t\tname: 'Conversational Agent',\n\t\t\tvalue: 'conversationalAgent',\n\t\t\tdescription:\n\t\t\t\t'Describes tools in the system prompt and parses JSON responses for tool calls. More flexible but potentially less reliable than the Tools Agent. Suitable for simpler interactions or with models not supporting structured schemas.',\n\t\t},\n\t\t{\n\t\t\tname: 'OpenAI Functions Agent',\n\t\t\tvalue: 'openAiFunctionsAgent',\n\t\t\tdescription:\n\t\t\t\t\"Leverages OpenAI's function calling capabilities to precisely select and execute tools. Excellent for tasks requiring structured outputs when working with OpenAI models.\",\n\t\t},\n\t\t{\n\t\t\tname: 'Plan and Execute Agent',\n\t\t\tvalue: 'planAndExecuteAgent',\n\t\t\tdescription:\n\t\t\t\t'Creates a high-level plan for complex tasks and then executes each step. Suitable for multi-stage problems or when a strategic approach is needed.',\n\t\t},\n\t\t{\n\t\t\tname: 'ReAct Agent',\n\t\t\tvalue: 'reActAgent',\n\t\t\tdescription:\n\t\t\t\t'Combines reasoning and action in an iterative process. Effective for tasks that require careful analysis and step-by-step problem-solving.',\n\t\t},\n\t\t{\n\t\t\tname: 'SQL Agent',\n\t\t\tvalue: 'sqlAgent',\n\t\t\tdescription:\n\t\t\t\t'Specializes in interacting with SQL databases. Ideal for data analysis tasks, generating queries, or extracting insights from structured data.',\n\t\t},\n\t],\n\tdefault: '',\n};\n\nexport class Agent implements INodeType {\n\tdescription: INodeTypeDescription = {\n\t\tdisplayName: 'AI Agent',\n\t\tname: 'agent',\n\t\ticon: 'fa:robot',\n\t\ticonColor: 'black',\n\t\tgroup: ['transform'],\n\t\tversion: [1, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8],\n\t\tdescription: 'Generates an action plan and executes it. Can use external tools.',\n\t\tsubtitle:\n\t\t\t\"={{ {\ttoolsAgent: 'Tools Agent', conversationalAgent: 'Conversational Agent', openAiFunctionsAgent: 'OpenAI Functions Agent', reActAgent: 'ReAct Agent', sqlAgent: 'SQL Agent', planAndExecuteAgent: 'Plan and Execute Agent' }[$parameter.agent] }}\",\n\t\tdefaults: {\n\t\t\tname: 'AI Agent',\n\t\t\tcolor: '#404040',\n\t\t},\n\t\tcodex: {\n\t\t\talias: ['LangChain', 'Chat', 'Conversational', 'Plan and Execute', 'ReAct', 'Tools'],\n\t\t\tcategories: ['AI'],\n\t\t\tsubcategories: {\n\t\t\t\tAI: ['Agents', 'Root Nodes'],\n\t\t\t},\n\t\t\tresources: {\n\t\t\t\tprimaryDocumentation: [\n\t\t\t\t\t{\n\t\t\t\t\t\turl: 'https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.agent/',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t},\n\t\t},\n\t\tinputs: `={{\n\t\t\t((agent, hasOutputParser) => {\n\t\t\t\t${getInputs.toString()};\n\t\t\t\treturn getInputs(agent, hasOutputParser)\n\t\t\t})($parameter.agent, $parameter.hasOutputParser === undefined || $parameter.hasOutputParser === true)\n\t\t}}`,\n\t\toutputs: [NodeConnectionTypes.Main],\n\t\tcredentials: [\n\t\t\t{\n\t\t\t\t// eslint-disable-next-line n8n-nodes-base/node-class-description-credentials-name-unsuffixed\n\t\t\t\tname: 'mySql',\n\t\t\t\trequired: true,\n\t\t\t\ttestedBy: 'mysqlConnectionTest',\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\tagent: ['sqlAgent'],\n\t\t\t\t\t\t'/dataSource': ['mysql'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: 'postgres',\n\t\t\t\trequired: true,\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\tagent: ['sqlAgent'],\n\t\t\t\t\t\t'/dataSource': ['postgres'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t],\n\t\tproperties: [\n\t\t\t{\n\t\t\t\tdisplayName:\n\t\t\t\t\t'Tip: Get a feel for agents with our quick <a href=\"https://docs.n8n.io/advanced-ai/intro-tutorial/\" target=\"_blank\">tutorial</a> or see an <a href=\"/templates/1954\" target=\"_blank\">example</a> of how this node works',\n\t\t\t\tname: 'notice_tip',\n\t\t\t\ttype: 'notice',\n\t\t\t\tdefault: '',\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\tagent: ['conversationalAgent', 'toolsAgent'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName:\n\t\t\t\t\t\"This node is using Agent that has been deprecated. Please switch to using 'Tools Agent' instead.\",\n\t\t\t\tname: 'deprecated',\n\t\t\t\ttype: 'notice',\n\t\t\t\tdefault: '',\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\tagent: [\n\t\t\t\t\t\t\t'conversationalAgent',\n\t\t\t\t\t\t\t'openAiFunctionsAgent',\n\t\t\t\t\t\t\t'planAndExecuteAgent',\n\t\t\t\t\t\t\t'reActAgent',\n\t\t\t\t\t\t\t'sqlAgent',\n\t\t\t\t\t\t],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\t// Make Conversational Agent the default agent for versions 1.5 and below\n\t\t\t{\n\t\t\t\t...agentTypeProperty,\n\t\t\t\toptions: agentTypeProperty?.options?.filter(\n\t\t\t\t\t(o) => 'value' in o && o.value !== 'toolsAgent',\n\t\t\t\t),\n\t\t\t\tdisplayOptions: { show: { '@version': [{ _cnd: { lte: 1.5 } }] } },\n\t\t\t\tdefault: 'conversationalAgent',\n\t\t\t},\n\t\t\t// Make Tools Agent the default agent for versions 1.6 and 1.7\n\t\t\t{\n\t\t\t\t...agentTypeProperty,\n\t\t\t\tdisplayOptions: { show: { '@version': [{ _cnd: { between: { from: 1.6, to: 1.7 } } }] } },\n\t\t\t\tdefault: 'toolsAgent',\n\t\t\t},\n\t\t\t// Make Tools Agent the only agent option for versions 1.8 and above\n\t\t\t{\n\t\t\t\t...agentTypeProperty,\n\t\t\t\ttype: 'hidden',\n\t\t\t\tdisplayOptions: { show: { '@version': [{ _cnd: { gte: 1.8 } }] } },\n\t\t\t\tdefault: 'toolsAgent',\n\t\t\t},\n\t\t\t{\n\t\t\t\t...promptTypeOptions,\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\thide: {\n\t\t\t\t\t\t'@version': [{ _cnd: { lte: 1.2 } }],\n\t\t\t\t\t\tagent: ['sqlAgent'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\t...textFromPreviousNode,\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: { promptType: ['auto'], '@version': [{ _cnd: { gte: 1.7 } }] },\n\t\t\t\t\t// SQL Agent has data source and credentials parameters so we need to include this input there manually\n\t\t\t\t\t// to preserve the order\n\t\t\t\t\thide: {\n\t\t\t\t\t\tagent: ['sqlAgent'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\t...textInput,\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\tpromptType: ['define'],\n\t\t\t\t\t},\n\t\t\t\t\thide: {\n\t\t\t\t\t\tagent: ['sqlAgent'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'For more reliable structured output parsing, consider using the Tools agent',\n\t\t\t\tname: 'notice',\n\t\t\t\ttype: 'notice',\n\t\t\t\tdefault: '',\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\thasOutputParser: [true],\n\t\t\t\t\t\tagent: [\n\t\t\t\t\t\t\t'conversationalAgent',\n\t\t\t\t\t\t\t'reActAgent',\n\t\t\t\t\t\t\t'planAndExecuteAgent',\n\t\t\t\t\t\t\t'openAiFunctionsAgent',\n\t\t\t\t\t\t],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Require Specific Output Format',\n\t\t\t\tname: 'hasOutputParser',\n\t\t\t\ttype: 'boolean',\n\t\t\t\tdefault: false,\n\t\t\t\tnoDataExpression: true,\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\thide: {\n\t\t\t\t\t\t'@version': [{ _cnd: { lte: 1.2 } }],\n\t\t\t\t\t\tagent: ['sqlAgent'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: `Connect an <a data-action='openSelectiveNodeCreator' data-action-parameter-connectiontype='${NodeConnectionTypes.AiOutputParser}'>output parser</a> on the canvas to specify the output format you require`,\n\t\t\t\tname: 'notice',\n\t\t\t\ttype: 'notice',\n\t\t\t\tdefault: '',\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\thasOutputParser: [true],\n\t\t\t\t\t\tagent: ['toolsAgent'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\n\t\t\t...toolsAgentProperties,\n\t\t\t...conversationalAgentProperties,\n\t\t\t...openAiFunctionsAgentProperties,\n\t\t\t...reActAgentAgentProperties,\n\t\t\t...sqlAgentAgentProperties,\n\t\t\t...planAndExecuteAgentProperties,\n\t\t],\n\t};\n\n\tasync execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {\n\t\tconst agentType = this.getNodeParameter('agent', 0, '') as string;\n\t\tconst nodeVersion = this.getNode().typeVersion;\n\n\t\tif (agentType === 'conversationalAgent') {\n\t\t\treturn await conversationalAgentExecute.call(this, nodeVersion);\n\t\t} else if (agentType === 'toolsAgent') {\n\t\t\treturn await toolsAgentExecute.call(this);\n\t\t} else if (agentType === 'openAiFunctionsAgent') {\n\t\t\treturn await openAiFunctionsAgentExecute.call(this, nodeVersion);\n\t\t} else if (agentType === 'reActAgent') {\n\t\t\treturn await reActAgentAgentExecute.call(this, nodeVersion);\n\t\t} else if (agentType === 'sqlAgent') {\n\t\t\treturn await sqlAgentAgentExecute.call(this);\n\t\t} else if (agentType === 'planAndExecuteAgent') {\n\t\t\treturn await planAndExecuteAgentExecute.call(this, nodeVersion);\n\t\t}\n\n\t\tthrow new NodeOperationError(this.getNode(), `The agent type \"${agentType}\" is not supported`);\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAAwD;AAYxD,0BAAmE;AAEnE,yBAA8C;AAC9C,qBAA2C;AAC3C,IAAAA,sBAA+C;AAC/C,IAAAC,kBAA4C;AAC5C,IAAAD,sBAA8C;AAC9C,IAAAC,kBAA2C;AAC3C,IAAAD,sBAA0C;AAC1C,IAAAC,kBAAuC;AACvC,IAAAD,sBAAwC;AACxC,IAAAC,kBAAqC;AACrC,IAAAD,sBAAqC;AACrC,IAAAC,kBAAkC;AAIlC,SAAS,UACR,OAOA,iBACsD;AAOtD,QAAM,eAAe,CACpB,WACyD;AACzD,UAAM,eAA0C;AAAA,MAC/C,kBAAkB;AAAA,MAClB,WAAW;AAAA,MACX,SAAS;AAAA,MACT,iBAAiB;AAAA,IAClB;AAEA,WAAO,OAAO,IAAI,CAAC,EAAE,MAAM,OAAO,MAAM;AACvC,YAAM,cAAc,SAAU;AAC9B,UAAI,cAAc,QAAQ,eAAe,aAAa,IAAI,IAAI;AAC9D,UACC,eACA,CAAC,wBAAwB,cAAc,qBAAqB,EAAE,SAAS,KAAK,GAC3E;AACD,sBAAc;AAAA,MACf;AACA,YAAM,QAAiC;AAAA,QACtC;AAAA,QACA;AAAA,QACA,UAAU;AAAA,QACV,gBAAgB,CAAC,oBAAoB,aAAa,iBAAiB,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AG;AAAA,MACJ;AAAA,IACD;AAAA;AAAA,EAEA,MAAM,UAAkE;AACvE,UAAM,YAAY,KAAK,iBAAiB,SAAS,GAAG,EAAE;AACtD,UAAM,cAAc,KAAK,QAAQ,EAAE;AAEnC,QAAI,cAAc,uBAAuB;AACxC,aAAO,MAAM,0CAA2B,KAAK,MAAM,WAAW;AAAA,IAC/D,WAAW,cAAc,cAAc;AACtC,aAAO,MAAM,kCAAkB,KAAK,IAAI;AAAA,IACzC,WAAW,cAAc,wBAAwB;AAChD,aAAO,MAAM,4CAA4B,KAAK,MAAM,WAAW;AAAA,IAChE,WAAW,cAAc,cAAc;AACtC,aAAO,MAAM,uCAAuB,KAAK,MAAM,WAAW;AAAA,IAC3D,WAAW,cAAc,YAAY;AACpC,aAAO,MAAM,qCAAqB,KAAK,IAAI;AAAA,IAC5C,WAAW,cAAc,uBAAuB;AAC/C,aAAO,MAAM,2CAA2B,KAAK,MAAM,WAAW;AAAA,IAC/D;AAEA,UAAM,IAAI,uCAAmB,KAAK,QAAQ,GAAG,mBAAmB,SAAS,oBAAoB;AAAA,EAC9F;AACD;","names":["import_description","import_execute"]}
|
|
@@ -1,94 +1,118 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var description_exports = {};
|
|
20
|
+
__export(description_exports, {
|
|
21
|
+
conversationalAgentProperties: () => conversationalAgentProperties
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(description_exports);
|
|
24
|
+
var import_prompt = require("./prompt");
|
|
25
|
+
const conversationalAgentProperties = [
|
|
26
|
+
{
|
|
27
|
+
displayName: "Text",
|
|
28
|
+
name: "text",
|
|
29
|
+
type: "string",
|
|
30
|
+
required: true,
|
|
31
|
+
displayOptions: {
|
|
32
|
+
show: {
|
|
33
|
+
agent: ["conversationalAgent"],
|
|
34
|
+
"@version": [1]
|
|
35
|
+
}
|
|
18
36
|
},
|
|
19
|
-
{
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
37
|
+
default: "={{ $json.input }}"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
displayName: "Text",
|
|
41
|
+
name: "text",
|
|
42
|
+
type: "string",
|
|
43
|
+
required: true,
|
|
44
|
+
displayOptions: {
|
|
45
|
+
show: {
|
|
46
|
+
agent: ["conversationalAgent"],
|
|
47
|
+
"@version": [1.1]
|
|
48
|
+
}
|
|
31
49
|
},
|
|
32
|
-
{
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
50
|
+
default: "={{ $json.chat_input }}"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
displayName: "Text",
|
|
54
|
+
name: "text",
|
|
55
|
+
type: "string",
|
|
56
|
+
required: true,
|
|
57
|
+
displayOptions: {
|
|
58
|
+
show: {
|
|
59
|
+
agent: ["conversationalAgent"],
|
|
60
|
+
"@version": [1.2]
|
|
61
|
+
}
|
|
44
62
|
},
|
|
45
|
-
{
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
placeholder: 'Add Option',
|
|
56
|
-
options: [
|
|
57
|
-
{
|
|
58
|
-
displayName: 'Human Message',
|
|
59
|
-
name: 'humanMessage',
|
|
60
|
-
type: 'string',
|
|
61
|
-
default: prompt_1.HUMAN_MESSAGE,
|
|
62
|
-
description: 'The message that will provide the agent with a list of tools to use',
|
|
63
|
-
typeOptions: {
|
|
64
|
-
rows: 6,
|
|
65
|
-
},
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
displayName: 'System Message',
|
|
69
|
-
name: 'systemMessage',
|
|
70
|
-
type: 'string',
|
|
71
|
-
default: prompt_1.SYSTEM_MESSAGE,
|
|
72
|
-
description: 'The message that will be sent to the agent before the conversation starts',
|
|
73
|
-
typeOptions: {
|
|
74
|
-
rows: 6,
|
|
75
|
-
},
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
displayName: 'Max Iterations',
|
|
79
|
-
name: 'maxIterations',
|
|
80
|
-
type: 'number',
|
|
81
|
-
default: 10,
|
|
82
|
-
description: 'The maximum number of iterations the agent will run before stopping',
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
displayName: 'Return Intermediate Steps',
|
|
86
|
-
name: 'returnIntermediateSteps',
|
|
87
|
-
type: 'boolean',
|
|
88
|
-
default: false,
|
|
89
|
-
description: 'Whether or not the output should include intermediate steps the agent took',
|
|
90
|
-
},
|
|
91
|
-
],
|
|
63
|
+
default: "={{ $json.chatInput }}"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
displayName: "Options",
|
|
67
|
+
name: "options",
|
|
68
|
+
type: "collection",
|
|
69
|
+
displayOptions: {
|
|
70
|
+
show: {
|
|
71
|
+
agent: ["conversationalAgent"]
|
|
72
|
+
}
|
|
92
73
|
},
|
|
74
|
+
default: {},
|
|
75
|
+
placeholder: "Add Option",
|
|
76
|
+
options: [
|
|
77
|
+
{
|
|
78
|
+
displayName: "Human Message",
|
|
79
|
+
name: "humanMessage",
|
|
80
|
+
type: "string",
|
|
81
|
+
default: import_prompt.HUMAN_MESSAGE,
|
|
82
|
+
description: "The message that will provide the agent with a list of tools to use",
|
|
83
|
+
typeOptions: {
|
|
84
|
+
rows: 6
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
displayName: "System Message",
|
|
89
|
+
name: "systemMessage",
|
|
90
|
+
type: "string",
|
|
91
|
+
default: import_prompt.SYSTEM_MESSAGE,
|
|
92
|
+
description: "The message that will be sent to the agent before the conversation starts",
|
|
93
|
+
typeOptions: {
|
|
94
|
+
rows: 6
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
displayName: "Max Iterations",
|
|
99
|
+
name: "maxIterations",
|
|
100
|
+
type: "number",
|
|
101
|
+
default: 10,
|
|
102
|
+
description: "The maximum number of iterations the agent will run before stopping"
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
displayName: "Return Intermediate Steps",
|
|
106
|
+
name: "returnIntermediateSteps",
|
|
107
|
+
type: "boolean",
|
|
108
|
+
default: false,
|
|
109
|
+
description: "Whether or not the output should include intermediate steps the agent took"
|
|
110
|
+
}
|
|
111
|
+
]
|
|
112
|
+
}
|
|
93
113
|
];
|
|
114
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
115
|
+
0 && (module.exports = {
|
|
116
|
+
conversationalAgentProperties
|
|
117
|
+
});
|
|
94
118
|
//# sourceMappingURL=description.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["../../../../../../nodes/agents/Agent/agents/ConversationalAgent/description.ts"],"sourcesContent":["import type { INodeProperties } from 'n8n-workflow';\n\nimport { SYSTEM_MESSAGE, HUMAN_MESSAGE } from './prompt';\n\nexport const conversationalAgentProperties: INodeProperties[] = [\n\t{\n\t\tdisplayName: 'Text',\n\t\tname: 'text',\n\t\ttype: 'string',\n\t\trequired: true,\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\tagent: ['conversationalAgent'],\n\t\t\t\t'@version': [1],\n\t\t\t},\n\t\t},\n\t\tdefault: '={{ $json.input }}',\n\t},\n\t{\n\t\tdisplayName: 'Text',\n\t\tname: 'text',\n\t\ttype: 'string',\n\t\trequired: true,\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\tagent: ['conversationalAgent'],\n\t\t\t\t'@version': [1.1],\n\t\t\t},\n\t\t},\n\t\tdefault: '={{ $json.chat_input }}',\n\t},\n\t{\n\t\tdisplayName: 'Text',\n\t\tname: 'text',\n\t\ttype: 'string',\n\t\trequired: true,\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\tagent: ['conversationalAgent'],\n\t\t\t\t'@version': [1.2],\n\t\t\t},\n\t\t},\n\t\tdefault: '={{ $json.chatInput }}',\n\t},\n\t{\n\t\tdisplayName: 'Options',\n\t\tname: 'options',\n\t\ttype: 'collection',\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\tagent: ['conversationalAgent'],\n\t\t\t},\n\t\t},\n\t\tdefault: {},\n\t\tplaceholder: 'Add Option',\n\t\toptions: [\n\t\t\t{\n\t\t\t\tdisplayName: 'Human Message',\n\t\t\t\tname: 'humanMessage',\n\t\t\t\ttype: 'string',\n\t\t\t\tdefault: HUMAN_MESSAGE,\n\t\t\t\tdescription: 'The message that will provide the agent with a list of tools to use',\n\t\t\t\ttypeOptions: {\n\t\t\t\t\trows: 6,\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'System Message',\n\t\t\t\tname: 'systemMessage',\n\t\t\t\ttype: 'string',\n\t\t\t\tdefault: SYSTEM_MESSAGE,\n\t\t\t\tdescription: 'The message that will be sent to the agent before the conversation starts',\n\t\t\t\ttypeOptions: {\n\t\t\t\t\trows: 6,\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Max Iterations',\n\t\t\t\tname: 'maxIterations',\n\t\t\t\ttype: 'number',\n\t\t\t\tdefault: 10,\n\t\t\t\tdescription: 'The maximum number of iterations the agent will run before stopping',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Return Intermediate Steps',\n\t\t\t\tname: 'returnIntermediateSteps',\n\t\t\t\ttype: 'boolean',\n\t\t\t\tdefault: false,\n\t\t\t\tdescription: 'Whether or not the output should include intermediate steps the agent took',\n\t\t\t},\n\t\t],\n\t},\n];\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,oBAA8C;AAEvC,MAAM,gCAAmD;AAAA,EAC/D;AAAA,IACC,aAAa;AAAA,IACb,MAAM;AAAA,IACN,MAAM;AAAA,IACN,UAAU;AAAA,IACV,gBAAgB;AAAA,MACf,MAAM;AAAA,QACL,OAAO,CAAC,qBAAqB;AAAA,QAC7B,YAAY,CAAC,CAAC;AAAA,MACf;AAAA,IACD;AAAA,IACA,SAAS;AAAA,EACV;AAAA,EACA;AAAA,IACC,aAAa;AAAA,IACb,MAAM;AAAA,IACN,MAAM;AAAA,IACN,UAAU;AAAA,IACV,gBAAgB;AAAA,MACf,MAAM;AAAA,QACL,OAAO,CAAC,qBAAqB;AAAA,QAC7B,YAAY,CAAC,GAAG;AAAA,MACjB;AAAA,IACD;AAAA,IACA,SAAS;AAAA,EACV;AAAA,EACA;AAAA,IACC,aAAa;AAAA,IACb,MAAM;AAAA,IACN,MAAM;AAAA,IACN,UAAU;AAAA,IACV,gBAAgB;AAAA,MACf,MAAM;AAAA,QACL,OAAO,CAAC,qBAAqB;AAAA,QAC7B,YAAY,CAAC,GAAG;AAAA,MACjB;AAAA,IACD;AAAA,IACA,SAAS;AAAA,EACV;AAAA,EACA;AAAA,IACC,aAAa;AAAA,IACb,MAAM;AAAA,IACN,MAAM;AAAA,IACN,gBAAgB;AAAA,MACf,MAAM;AAAA,QACL,OAAO,CAAC,qBAAqB;AAAA,MAC9B;AAAA,IACD;AAAA,IACA,SAAS,CAAC;AAAA,IACV,aAAa;AAAA,IACb,SAAS;AAAA,MACR;AAAA,QACC,aAAa;AAAA,QACb,MAAM;AAAA,QACN,MAAM;AAAA,QACN,SAAS;AAAA,QACT,aAAa;AAAA,QACb,aAAa;AAAA,UACZ,MAAM;AAAA,QACP;AAAA,MACD;AAAA,MACA;AAAA,QACC,aAAa;AAAA,QACb,MAAM;AAAA,QACN,MAAM;AAAA,QACN,SAAS;AAAA,QACT,aAAa;AAAA,QACb,aAAa;AAAA,UACZ,MAAM;AAAA,QACP;AAAA,MACD;AAAA,MACA;AAAA,QACC,aAAa;AAAA,QACb,MAAM;AAAA,QACN,MAAM;AAAA,QACN,SAAS;AAAA,QACT,aAAa;AAAA,MACd;AAAA,MACA;AAAA,QACC,aAAa;AAAA,QACb,MAAM;AAAA,QACN,MAAM;AAAA,QACN,SAAS;AAAA,QACT,aAAa;AAAA,MACd;AAAA,IACD;AAAA,EACD;AACD;","names":[]}
|
|
@@ -1,83 +1,107 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var execute_exports = {};
|
|
20
|
+
__export(execute_exports, {
|
|
21
|
+
conversationalAgentExecute: () => conversationalAgentExecute
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(execute_exports);
|
|
24
|
+
var import_prompts = require("@langchain/core/prompts");
|
|
25
|
+
var import_agents = require("langchain/agents");
|
|
26
|
+
var import_n8n_workflow = require("n8n-workflow");
|
|
27
|
+
var import_helpers = require("../../../../../utils/helpers");
|
|
28
|
+
var import_N8nOutputParser = require("../../../../../utils/output_parsers/N8nOutputParser");
|
|
29
|
+
var import_schemaParsing = require("../../../../../utils/schemaParsing");
|
|
30
|
+
var import_tracing = require("../../../../../utils/tracing");
|
|
31
|
+
var import_utils = require("../utils");
|
|
12
32
|
async function conversationalAgentExecute(nodeVersion) {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
33
|
+
this.logger.debug("Executing Conversational Agent");
|
|
34
|
+
const model = await this.getInputConnectionData(import_n8n_workflow.NodeConnectionTypes.AiLanguageModel, 0);
|
|
35
|
+
if (!(0, import_helpers.isChatInstance)(model)) {
|
|
36
|
+
throw new import_n8n_workflow.NodeOperationError(this.getNode(), "Conversational Agent requires Chat Model");
|
|
37
|
+
}
|
|
38
|
+
const memory = await this.getInputConnectionData(import_n8n_workflow.NodeConnectionTypes.AiMemory, 0);
|
|
39
|
+
const tools = await (0, import_helpers.getConnectedTools)(this, nodeVersion >= 1.5, true, true);
|
|
40
|
+
const outputParser = await (0, import_N8nOutputParser.getOptionalOutputParser)(this);
|
|
41
|
+
await (0, import_utils.checkForStructuredTools)(tools, this.getNode(), "Conversational Agent");
|
|
42
|
+
const options = this.getNodeParameter("options", 0, {});
|
|
43
|
+
const agentExecutor = await (0, import_agents.initializeAgentExecutorWithOptions)(tools, model, {
|
|
44
|
+
// Passing "chat-conversational-react-description" as the agent type
|
|
45
|
+
// automatically creates and uses BufferMemory with the executor.
|
|
46
|
+
// If you would like to override this, you can pass in a custom
|
|
47
|
+
// memory option, but the memoryKey set on it must be "chat_history".
|
|
48
|
+
agentType: "chat-conversational-react-description",
|
|
49
|
+
memory,
|
|
50
|
+
returnIntermediateSteps: options?.returnIntermediateSteps === true,
|
|
51
|
+
maxIterations: options.maxIterations ?? 10,
|
|
52
|
+
agentArgs: {
|
|
53
|
+
systemMessage: options.systemMessage,
|
|
54
|
+
humanMessage: options.humanMessage
|
|
17
55
|
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
maxIterations: options.maxIterations ?? 10,
|
|
28
|
-
agentArgs: {
|
|
29
|
-
systemMessage: options.systemMessage,
|
|
30
|
-
humanMessage: options.humanMessage,
|
|
31
|
-
},
|
|
56
|
+
});
|
|
57
|
+
const returnData = [];
|
|
58
|
+
let prompt;
|
|
59
|
+
if (outputParser) {
|
|
60
|
+
const formatInstructions = outputParser.getFormatInstructions();
|
|
61
|
+
prompt = new import_prompts.PromptTemplate({
|
|
62
|
+
template: "{input}\n{formatInstructions}",
|
|
63
|
+
inputVariables: ["input"],
|
|
64
|
+
partialVariables: { formatInstructions }
|
|
32
65
|
});
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
66
|
+
}
|
|
67
|
+
const items = this.getInputData();
|
|
68
|
+
for (let itemIndex = 0; itemIndex < items.length; itemIndex++) {
|
|
69
|
+
try {
|
|
70
|
+
let input;
|
|
71
|
+
if (this.getNode().typeVersion <= 1.2) {
|
|
72
|
+
input = this.getNodeParameter("text", itemIndex);
|
|
73
|
+
} else {
|
|
74
|
+
input = (0, import_helpers.getPromptInputByType)({
|
|
75
|
+
ctx: this,
|
|
76
|
+
i: itemIndex,
|
|
77
|
+
inputKey: "text",
|
|
78
|
+
promptTypeKey: "promptType"
|
|
41
79
|
});
|
|
80
|
+
}
|
|
81
|
+
if (input === void 0) {
|
|
82
|
+
throw new import_n8n_workflow.NodeOperationError(this.getNode(), "The \u2018text parameter is empty.");
|
|
83
|
+
}
|
|
84
|
+
if (prompt) {
|
|
85
|
+
input = (await prompt.invoke({ input })).value;
|
|
86
|
+
}
|
|
87
|
+
const response = await agentExecutor.withConfig((0, import_tracing.getTracingConfig)(this)).invoke({ input, outputParser });
|
|
88
|
+
if (outputParser) {
|
|
89
|
+
response.output = await (0, import_utils.extractParsedOutput)(this, outputParser, response.output);
|
|
90
|
+
}
|
|
91
|
+
returnData.push({ json: response });
|
|
92
|
+
} catch (error) {
|
|
93
|
+
(0, import_schemaParsing.throwIfToolSchema)(this, error);
|
|
94
|
+
if (this.continueOnFail()) {
|
|
95
|
+
returnData.push({ json: { error: error.message }, pairedItem: { item: itemIndex } });
|
|
96
|
+
continue;
|
|
97
|
+
}
|
|
98
|
+
throw error;
|
|
42
99
|
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
try {
|
|
46
|
-
let input;
|
|
47
|
-
if (this.getNode().typeVersion <= 1.2) {
|
|
48
|
-
input = this.getNodeParameter('text', itemIndex);
|
|
49
|
-
}
|
|
50
|
-
else {
|
|
51
|
-
input = (0, helpers_1.getPromptInputByType)({
|
|
52
|
-
ctx: this,
|
|
53
|
-
i: itemIndex,
|
|
54
|
-
inputKey: 'text',
|
|
55
|
-
promptTypeKey: 'promptType',
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
if (input === undefined) {
|
|
59
|
-
throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'The ‘text parameter is empty.');
|
|
60
|
-
}
|
|
61
|
-
if (prompt) {
|
|
62
|
-
input = (await prompt.invoke({ input })).value;
|
|
63
|
-
}
|
|
64
|
-
const response = await agentExecutor
|
|
65
|
-
.withConfig((0, tracing_1.getTracingConfig)(this))
|
|
66
|
-
.invoke({ input, outputParser });
|
|
67
|
-
if (outputParser) {
|
|
68
|
-
response.output = await (0, utils_1.extractParsedOutput)(this, outputParser, response.output);
|
|
69
|
-
}
|
|
70
|
-
returnData.push({ json: response });
|
|
71
|
-
}
|
|
72
|
-
catch (error) {
|
|
73
|
-
(0, schemaParsing_1.throwIfToolSchema)(this, error);
|
|
74
|
-
if (this.continueOnFail()) {
|
|
75
|
-
returnData.push({ json: { error: error.message }, pairedItem: { item: itemIndex } });
|
|
76
|
-
continue;
|
|
77
|
-
}
|
|
78
|
-
throw error;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
return [returnData];
|
|
100
|
+
}
|
|
101
|
+
return [returnData];
|
|
82
102
|
}
|
|
103
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
104
|
+
0 && (module.exports = {
|
|
105
|
+
conversationalAgentExecute
|
|
106
|
+
});
|
|
83
107
|
//# sourceMappingURL=execute.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["../../../../../../nodes/agents/Agent/agents/ConversationalAgent/execute.ts"],"sourcesContent":["import type { BaseChatMemory } from '@langchain/community/memory/chat_memory';\nimport { PromptTemplate } from '@langchain/core/prompts';\nimport { initializeAgentExecutorWithOptions } from 'langchain/agents';\nimport type { IExecuteFunctions, INodeExecutionData } from 'n8n-workflow';\nimport { NodeConnectionTypes, NodeOperationError } from 'n8n-workflow';\n\nimport { isChatInstance, getPromptInputByType, getConnectedTools } from '@utils/helpers';\nimport { getOptionalOutputParser } from '@utils/output_parsers/N8nOutputParser';\nimport { throwIfToolSchema } from '@utils/schemaParsing';\nimport { getTracingConfig } from '@utils/tracing';\n\nimport { checkForStructuredTools, extractParsedOutput } from '../utils';\n\nexport async function conversationalAgentExecute(\n\tthis: IExecuteFunctions,\n\tnodeVersion: number,\n): Promise<INodeExecutionData[][]> {\n\tthis.logger.debug('Executing Conversational Agent');\n\tconst model = await this.getInputConnectionData(NodeConnectionTypes.AiLanguageModel, 0);\n\n\tif (!isChatInstance(model)) {\n\t\tthrow new NodeOperationError(this.getNode(), 'Conversational Agent requires Chat Model');\n\t}\n\n\tconst memory = (await this.getInputConnectionData(NodeConnectionTypes.AiMemory, 0)) as\n\t\t| BaseChatMemory\n\t\t| undefined;\n\n\tconst tools = await getConnectedTools(this, nodeVersion >= 1.5, true, true);\n\tconst outputParser = await getOptionalOutputParser(this);\n\n\tawait checkForStructuredTools(tools, this.getNode(), 'Conversational Agent');\n\n\t// TODO: Make it possible in the future to use values for other items than just 0\n\tconst options = this.getNodeParameter('options', 0, {}) as {\n\t\tsystemMessage?: string;\n\t\thumanMessage?: string;\n\t\tmaxIterations?: number;\n\t\treturnIntermediateSteps?: boolean;\n\t};\n\n\tconst agentExecutor = await initializeAgentExecutorWithOptions(tools, model, {\n\t\t// Passing \"chat-conversational-react-description\" as the agent type\n\t\t// automatically creates and uses BufferMemory with the executor.\n\t\t// If you would like to override this, you can pass in a custom\n\t\t// memory option, but the memoryKey set on it must be \"chat_history\".\n\t\tagentType: 'chat-conversational-react-description',\n\t\tmemory,\n\t\treturnIntermediateSteps: options?.returnIntermediateSteps === true,\n\t\tmaxIterations: options.maxIterations ?? 10,\n\t\tagentArgs: {\n\t\t\tsystemMessage: options.systemMessage,\n\t\t\thumanMessage: options.humanMessage,\n\t\t},\n\t});\n\n\tconst returnData: INodeExecutionData[] = [];\n\n\tlet prompt: PromptTemplate | undefined;\n\tif (outputParser) {\n\t\tconst formatInstructions = outputParser.getFormatInstructions();\n\n\t\tprompt = new PromptTemplate({\n\t\t\ttemplate: '{input}\\n{formatInstructions}',\n\t\t\tinputVariables: ['input'],\n\t\t\tpartialVariables: { formatInstructions },\n\t\t});\n\t}\n\n\tconst items = this.getInputData();\n\tfor (let itemIndex = 0; itemIndex < items.length; itemIndex++) {\n\t\ttry {\n\t\t\tlet input;\n\n\t\t\tif (this.getNode().typeVersion <= 1.2) {\n\t\t\t\tinput = this.getNodeParameter('text', itemIndex) as string;\n\t\t\t} else {\n\t\t\t\tinput = getPromptInputByType({\n\t\t\t\t\tctx: this,\n\t\t\t\t\ti: itemIndex,\n\t\t\t\t\tinputKey: 'text',\n\t\t\t\t\tpromptTypeKey: 'promptType',\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (input === undefined) {\n\t\t\t\tthrow new NodeOperationError(this.getNode(), 'The ‘text parameter is empty.');\n\t\t\t}\n\n\t\t\tif (prompt) {\n\t\t\t\tinput = (await prompt.invoke({ input })).value;\n\t\t\t}\n\n\t\t\tconst response = await agentExecutor\n\t\t\t\t.withConfig(getTracingConfig(this))\n\t\t\t\t.invoke({ input, outputParser });\n\n\t\t\tif (outputParser) {\n\t\t\t\tresponse.output = await extractParsedOutput(this, outputParser, response.output as string);\n\t\t\t}\n\n\t\t\treturnData.push({ json: response });\n\t\t} catch (error) {\n\t\t\tthrowIfToolSchema(this, error);\n\n\t\t\tif (this.continueOnFail()) {\n\t\t\t\treturnData.push({ json: { error: error.message }, pairedItem: { item: itemIndex } });\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tthrow error;\n\t\t}\n\t}\n\n\treturn [returnData];\n}\n"],"mappings":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Y,MAAM,QAAQ,aAAa;AAC9D,QAAI;AACH,UAAI;AAEJ,UAAI,KAAK,QAAQ,EAAE,eAAe,KAAK;AACtC,gBAAQ,KAAK,iBAAiB,QAAQ,SAAS;AAAA,MAChD,OAAO;AACN,oBAAQ,qCAAqB;AAAA,UAC5B,KAAK;AAAA,UACL,GAAG;AAAA,UACH,UAAU;AAAA,UACV,eAAe;AAAA,QAChB,CAAC;AAAA,MACF;AAEA,UAAI,UAAU,QAAW;AACxB,cAAM,IAAI,uCAAmB,KAAK,QAAQ,GAAG,oCAA+B;AAAA,MAC7E;AAEA,UAAI,QAAQ;AACX,iBAAS,MAAM,OAAO,OAAO,EAAE,MAAM,CAAC,GAAG;AAAA,MAC1C;AAEA,YAAM,WAAW,MAAM,cACrB,eAAW,iCAAiB,IAAI,CAAC,EACjC,OAAO,EAAE,OAAO,aAAa,CAAC;AAEhC,UAAI,cAAc;AACjB,iBAAS,SAAS,UAAM,kCAAoB,MAAM,cAAc,SAAS,MAAgB;AAAA,MAC1F;AAEA,iBAAW,KAAK,EAAE,MAAM,SAAS,CAAC;AAAA,IACnC,SAAS,OAAO;AACf,kDAAkB,MAAM,KAAK;AAE7B,UAAI,KAAK,eAAe,GAAG;AAC1B,mBAAW,KAAK,EAAE,MAAM,EAAE,OAAO,MAAM,QAAQ,GAAG,YAAY,EAAE,MAAM,UAAU,EAAE,CAAC;AACnF;AAAA,MACD;AAEA,YAAM;AAAA,IACP;AAAA,EACD;AAEA,SAAO,CAAC,UAAU;AACnB;","names":[]}
|
|
@@ -1,14 +1,35 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var prompt_exports = {};
|
|
20
|
+
__export(prompt_exports, {
|
|
21
|
+
HUMAN_MESSAGE: () => HUMAN_MESSAGE,
|
|
22
|
+
SYSTEM_MESSAGE: () => SYSTEM_MESSAGE
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(prompt_exports);
|
|
25
|
+
const SYSTEM_MESSAGE = `Assistant is a large language model trained by OpenAI.
|
|
5
26
|
|
|
6
27
|
Assistant is designed to be able to assist with a wide range of tasks, from answering simple questions to providing in-depth explanations and discussions on a wide range of topics. As a language model, Assistant is able to generate human-like text based on the input it receives, allowing it to engage in natural-sounding conversations and provide responses that are coherent and relevant to the topic at hand.
|
|
7
28
|
|
|
8
29
|
Assistant is constantly learning and improving, and its capabilities are constantly evolving. It is able to process and understand large amounts of text, and can use this knowledge to provide accurate and informative responses to a wide range of questions. Additionally, Assistant is able to generate its own text based on the input it receives, allowing it to engage in discussions and provide explanations and descriptions on a wide range of topics.
|
|
9
30
|
|
|
10
31
|
Overall, Assistant is a powerful system that can help with a wide range of tasks and provide valuable insights and information on a wide range of topics. Whether you need help with a specific question or just want to have a conversation about a particular topic, Assistant is here to assist.`;
|
|
11
|
-
|
|
32
|
+
const HUMAN_MESSAGE = `TOOLS
|
|
12
33
|
------
|
|
13
34
|
Assistant can ask the user to use tools to look up information that may be helpful in answering the users original question. The tools the human can use are:
|
|
14
35
|
|
|
@@ -21,4 +42,9 @@ USER'S INPUT
|
|
|
21
42
|
Here is the user's input (remember to respond with a markdown code snippet of a json blob with a single action, and NOTHING else):
|
|
22
43
|
|
|
23
44
|
{{input}}`;
|
|
45
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
46
|
+
0 && (module.exports = {
|
|
47
|
+
HUMAN_MESSAGE,
|
|
48
|
+
SYSTEM_MESSAGE
|
|
49
|
+
});
|
|
24
50
|
//# sourceMappingURL=prompt.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["../../../../../../nodes/agents/Agent/agents/ConversationalAgent/prompt.ts"],"sourcesContent":["export const SYSTEM_MESSAGE = `Assistant is a large language model trained by OpenAI.\n\nAssistant is designed to be able to assist with a wide range of tasks, from answering simple questions to providing in-depth explanations and discussions on a wide range of topics. As a language model, Assistant is able to generate human-like text based on the input it receives, allowing it to engage in natural-sounding conversations and provide responses that are coherent and relevant to the topic at hand.\n\nAssistant is constantly learning and improving, and its capabilities are constantly evolving. It is able to process and understand large amounts of text, and can use this knowledge to provide accurate and informative responses to a wide range of questions. Additionally, Assistant is able to generate its own text based on the input it receives, allowing it to engage in discussions and provide explanations and descriptions on a wide range of topics.\n\nOverall, Assistant is a powerful system that can help with a wide range of tasks and provide valuable insights and information on a wide range of topics. Whether you need help with a specific question or just want to have a conversation about a particular topic, Assistant is here to assist.`;\n\nexport const HUMAN_MESSAGE = `TOOLS\n------\nAssistant can ask the user to use tools to look up information that may be helpful in answering the users original question. The tools the human can use are:\n\n{tools}\n\n{format_instructions}\n\nUSER'S INPUT\n--------------------\nHere is the user's input (remember to respond with a markdown code snippet of a json blob with a single action, and NOTHING else):\n\n{{input}}`;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,MAAM,iBAAiB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQvB,MAAM,gBAAgB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;","names":[]}
|