@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":"utils.js","sourceRoot":"","sources":["../../../../nodes/tools/ToolHttpRequest/utils.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6zBA,kDAOC;AAp0BD,sDAAmD;AACnD,iDAAmC;AACnC,+CAAuC;AACvC,iCAA8B;AAC9B,qDAA6B;AAC7B,qDAA6B;AAC7B,yDAAiC;AACjC,6FAAuG;AASvG,+CAAkF;AAClF,6BAAwB;AAYxB,MAAM,wBAAwB,GAAG,KAAK,EAAE,GAAyB,EAAE,SAAiB,EAAE,EAAE;IACvF,MAAM,WAAW,GAAG,GAAG,CAAC,gBAAgB,CAAC,iBAAiB,EAAE,SAAS,CAAW,CAAC;IAEjF,IAAI,WAAW,KAAK,eAAe,IAAI,WAAW,KAAK,gBAAgB,EAAE,CAAC;QACzE,MAAM,SAAS,GAAG,MAAM,GAAG,CAAC,cAAc,CAAC,eAAe,EAAE,SAAS,CAAC,CAAC;QACvE,MAAM,eAAe,GAAG,WAAW,KAAK,gBAAgB,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;QAE7E,OAAO,KAAK,EAAE,OAA4B,EAAE,EAAE;YAC7C,OAAO,CAAC,IAAI,GAAG;gBACd,QAAQ,EAAE,SAAS,CAAC,IAAc;gBAClC,QAAQ,EAAE,SAAS,CAAC,QAAkB;gBACtC,eAAe;aACf,CAAC;YACF,OAAO,MAAM,GAAG,CAAC,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;QAC/C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EAAE,CAAC;IAC5B,CAAC;IAED,IAAI,SAAS,CAAC,WAAW,EAAE,CAAC;QAC3B,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IACjD,CAAC;IAED,OAAO,MAAM,CAAC;AACf,CAAC;AAED,SAAgB,mBAAmB,CAAC,UAA2B;IAC9D,MAAM,aAAa,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC;QACnD,SAAS,CAAC,IAAI;QACd,sBAAsB,CAAC,SAAS,CAAC;KACjC,CAAC,CAAC;IAEH,OAAO,OAAC,CAAC,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC,CAAC;AACpD,CAAC"}
|
|
1
|
+
{"version":3,"sources":["../../../../nodes/tools/ToolHttpRequest/utils.ts"],"sourcesContent":["import { Readability } from '@mozilla/readability';\nimport * as cheerio from 'cheerio';\nimport { convert } from 'html-to-text';\nimport { JSDOM } from 'jsdom';\nimport get from 'lodash/get';\nimport set from 'lodash/set';\nimport unset from 'lodash/unset';\nimport { getOAuth2AdditionalParameters } from 'n8n-nodes-base/dist/nodes/HttpRequest/GenericFunctions';\nimport type {\n\tIDataObject,\n\tIHttpRequestOptions,\n\tIRequestOptionsSimplified,\n\tExecutionError,\n\tNodeApiError,\n\tISupplyDataFunctions,\n} from 'n8n-workflow';\nimport { NodeConnectionTypes, NodeOperationError, jsonParse } from 'n8n-workflow';\nimport { z } from 'zod';\n\nimport type {\n\tParameterInputType,\n\tParametersValues,\n\tPlaceholderDefinition,\n\tParametersValues as RawParametersValues,\n\tSendIn,\n\tToolParameter,\n} from './interfaces';\nimport type { DynamicZodObject } from '../../../types/zod.types';\n\nconst genericCredentialRequest = async (ctx: ISupplyDataFunctions, itemIndex: number) => {\n\tconst genericType = ctx.getNodeParameter('genericAuthType', itemIndex) as string;\n\n\tif (genericType === 'httpBasicAuth' || genericType === 'httpDigestAuth') {\n\t\tconst basicAuth = await ctx.getCredentials('httpBasicAuth', itemIndex);\n\t\tconst sendImmediately = genericType === 'httpDigestAuth' ? false : undefined;\n\n\t\treturn async (options: IHttpRequestOptions) => {\n\t\t\toptions.auth = {\n\t\t\t\tusername: basicAuth.user as string,\n\t\t\t\tpassword: basicAuth.password as string,\n\t\t\t\tsendImmediately,\n\t\t\t};\n\t\t\treturn await ctx.helpers.httpRequest(options);\n\t\t};\n\t}\n\n\tif (genericType === 'httpHeaderAuth') {\n\t\tconst headerAuth = await ctx.getCredentials('httpHeaderAuth', itemIndex);\n\n\t\treturn async (options: IHttpRequestOptions) => {\n\t\t\tif (!options.headers) options.headers = {};\n\t\t\toptions.headers[headerAuth.name as string] = headerAuth.value;\n\t\t\treturn await ctx.helpers.httpRequest(options);\n\t\t};\n\t}\n\n\tif (genericType === 'httpQueryAuth') {\n\t\tconst queryAuth = await ctx.getCredentials('httpQueryAuth', itemIndex);\n\n\t\treturn async (options: IHttpRequestOptions) => {\n\t\t\tif (!options.qs) options.qs = {};\n\t\t\toptions.qs[queryAuth.name as string] = queryAuth.value;\n\t\t\treturn await ctx.helpers.httpRequest(options);\n\t\t};\n\t}\n\n\tif (genericType === 'httpCustomAuth') {\n\t\tconst customAuth = await ctx.getCredentials('httpCustomAuth', itemIndex);\n\n\t\treturn async (options: IHttpRequestOptions) => {\n\t\t\tconst auth = jsonParse<IRequestOptionsSimplified>((customAuth.json as string) || '{}', {\n\t\t\t\terrorMessage: 'Invalid Custom Auth JSON',\n\t\t\t});\n\t\t\tif (auth.headers) {\n\t\t\t\toptions.headers = { ...options.headers, ...auth.headers };\n\t\t\t}\n\t\t\tif (auth.body) {\n\t\t\t\toptions.body = { ...(options.body as IDataObject), ...auth.body };\n\t\t\t}\n\t\t\tif (auth.qs) {\n\t\t\t\toptions.qs = { ...options.qs, ...auth.qs };\n\t\t\t}\n\t\t\treturn await ctx.helpers.httpRequest(options);\n\t\t};\n\t}\n\n\tif (genericType === 'oAuth1Api') {\n\t\treturn async (options: IHttpRequestOptions) => {\n\t\t\treturn await ctx.helpers.requestOAuth1.call(ctx, 'oAuth1Api', options);\n\t\t};\n\t}\n\n\tif (genericType === 'oAuth2Api') {\n\t\treturn async (options: IHttpRequestOptions) => {\n\t\t\treturn await ctx.helpers.requestOAuth2.call(ctx, 'oAuth2Api', options, {\n\t\t\t\ttokenType: 'Bearer',\n\t\t\t});\n\t\t};\n\t}\n\n\tthrow new NodeOperationError(ctx.getNode(), `The type ${genericType} is not supported`, {\n\t\titemIndex,\n\t});\n};\n\nconst predefinedCredentialRequest = async (ctx: ISupplyDataFunctions, itemIndex: number) => {\n\tconst predefinedType = ctx.getNodeParameter('nodeCredentialType', itemIndex) as string;\n\tconst additionalOptions = getOAuth2AdditionalParameters(predefinedType);\n\n\treturn async (options: IHttpRequestOptions) => {\n\t\treturn await ctx.helpers.httpRequestWithAuthentication.call(\n\t\t\tctx,\n\t\t\tpredefinedType,\n\t\t\toptions,\n\t\t\tadditionalOptions && { oauth2: additionalOptions },\n\t\t);\n\t};\n};\n\nexport const configureHttpRequestFunction = async (\n\tctx: ISupplyDataFunctions,\n\tcredentialsType: 'predefinedCredentialType' | 'genericCredentialType' | 'none',\n\titemIndex: number,\n) => {\n\tswitch (credentialsType) {\n\t\tcase 'genericCredentialType':\n\t\t\treturn await genericCredentialRequest(ctx, itemIndex);\n\t\tcase 'predefinedCredentialType':\n\t\t\treturn await predefinedCredentialRequest(ctx, itemIndex);\n\t\tdefault:\n\t\t\treturn async (options: IHttpRequestOptions) => {\n\t\t\t\treturn await ctx.helpers.httpRequest(options);\n\t\t\t};\n\t}\n};\n\nconst defaultOptimizer = <T>(response: T) => {\n\tif (typeof response === 'string') {\n\t\treturn response;\n\t}\n\tif (typeof response === 'object') {\n\t\treturn JSON.stringify(response, null, 2);\n\t}\n\n\treturn String(response);\n};\n\nfunction isBinary(data: unknown) {\n\t// Check if data is a Buffer\n\tif (Buffer.isBuffer(data)) {\n\t\treturn true;\n\t}\n\n\t// If data is a string, assume it's text unless it contains null characters.\n\tif (typeof data === 'string') {\n\t\t// If the string contains a null character, it's likely binary.\n\t\tif (data.includes('\\0')) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\t// For any other type, assume it's not binary.\n\treturn false;\n}\n\nconst htmlOptimizer = (ctx: ISupplyDataFunctions, itemIndex: number, maxLength: number) => {\n\tconst cssSelector = ctx.getNodeParameter('cssSelector', itemIndex, '') as string;\n\tconst onlyContent = ctx.getNodeParameter('onlyContent', itemIndex, false) as boolean;\n\tlet elementsToOmit: string[] = [];\n\n\tif (onlyContent) {\n\t\tconst elementsToOmitUi = ctx.getNodeParameter('elementsToOmit', itemIndex, '') as\n\t\t\t| string\n\t\t\t| string[];\n\n\t\tif (typeof elementsToOmitUi === 'string') {\n\t\t\telementsToOmit = elementsToOmitUi\n\t\t\t\t.split(',')\n\t\t\t\t.filter((s) => s)\n\t\t\t\t.map((s) => s.trim());\n\t\t}\n\t}\n\n\treturn <T>(response: T) => {\n\t\tif (typeof response !== 'string') {\n\t\t\tthrow new NodeOperationError(\n\t\t\t\tctx.getNode(),\n\t\t\t\t`The response type must be a string. Received: ${typeof response}`,\n\t\t\t\t{ itemIndex },\n\t\t\t);\n\t\t}\n\t\tconst returnData: string[] = [];\n\n\t\tconst html = cheerio.load(response);\n\t\tconst htmlElements = html(cssSelector);\n\n\t\thtmlElements.each((_, el) => {\n\t\t\tlet value = html(el).html() || '';\n\n\t\t\tif (onlyContent) {\n\t\t\t\tlet htmlToTextOptions;\n\n\t\t\t\tif (elementsToOmit?.length) {\n\t\t\t\t\thtmlToTextOptions = {\n\t\t\t\t\t\tselectors: elementsToOmit.map((selector) => ({\n\t\t\t\t\t\t\tselector,\n\t\t\t\t\t\t\tformat: 'skip',\n\t\t\t\t\t\t})),\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\tvalue = convert(value, htmlToTextOptions);\n\t\t\t}\n\n\t\t\tvalue = value\n\t\t\t\t.trim()\n\t\t\t\t.replace(/^\\s+|\\s+$/g, '')\n\t\t\t\t.replace(/(\\r\\n|\\n|\\r)/gm, '')\n\t\t\t\t.replace(/\\s+/g, ' ');\n\n\t\t\treturnData.push(value);\n\t\t});\n\n\t\tconst text = JSON.stringify(returnData, null, 2);\n\n\t\tif (maxLength > 0 && text.length > maxLength) {\n\t\t\treturn text.substring(0, maxLength);\n\t\t}\n\n\t\treturn text;\n\t};\n};\n\nconst textOptimizer = (ctx: ISupplyDataFunctions, itemIndex: number, maxLength: number) => {\n\treturn (response: string | IDataObject) => {\n\t\tif (typeof response === 'object') {\n\t\t\ttry {\n\t\t\t\tresponse = JSON.stringify(response, null, 2);\n\t\t\t} catch (error) {}\n\t\t}\n\n\t\tif (typeof response !== 'string') {\n\t\t\tthrow new NodeOperationError(\n\t\t\t\tctx.getNode(),\n\t\t\t\t`The response type must be a string. Received: ${typeof response}`,\n\t\t\t\t{ itemIndex },\n\t\t\t);\n\t\t}\n\n\t\tconst dom = new JSDOM(response);\n\t\tconst article = new Readability(dom.window.document, {\n\t\t\tkeepClasses: true,\n\t\t}).parse();\n\n\t\tconst text = article?.textContent || '';\n\n\t\tif (maxLength > 0 && text.length > maxLength) {\n\t\t\treturn text.substring(0, maxLength);\n\t\t}\n\n\t\treturn text;\n\t};\n};\n\nconst jsonOptimizer = (ctx: ISupplyDataFunctions, itemIndex: number) => {\n\treturn (response: string): string => {\n\t\tlet responseData: IDataObject | IDataObject[] | string = response;\n\n\t\tif (typeof responseData === 'string') {\n\t\t\tresponseData = jsonParse(response);\n\t\t}\n\n\t\tif (typeof responseData !== 'object' || !responseData) {\n\t\t\tthrow new NodeOperationError(\n\t\t\t\tctx.getNode(),\n\t\t\t\t'The response type must be an object or an array of objects',\n\t\t\t\t{ itemIndex },\n\t\t\t);\n\t\t}\n\n\t\tconst dataField = ctx.getNodeParameter('dataField', itemIndex, '') as string;\n\t\tlet returnData: IDataObject[] = [];\n\n\t\tif (!Array.isArray(responseData)) {\n\t\t\tif (dataField) {\n\t\t\t\tconst data = responseData[dataField] as IDataObject | IDataObject[];\n\t\t\t\tif (Array.isArray(data)) {\n\t\t\t\t\tresponseData = data;\n\t\t\t\t} else {\n\t\t\t\t\tresponseData = [data];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tresponseData = [responseData];\n\t\t\t}\n\t\t} else {\n\t\t\tif (dataField) {\n\t\t\t\tresponseData = responseData.map((data) => data[dataField]) as IDataObject[];\n\t\t\t}\n\t\t}\n\n\t\tconst fieldsToInclude = ctx.getNodeParameter('fieldsToInclude', itemIndex, 'all') as\n\t\t\t| 'all'\n\t\t\t| 'selected'\n\t\t\t| 'except';\n\n\t\tlet fields: string | string[] = [];\n\n\t\tif (fieldsToInclude !== 'all') {\n\t\t\tfields = ctx.getNodeParameter('fields', itemIndex, []) as string[] | string;\n\n\t\t\tif (typeof fields === 'string') {\n\t\t\t\tfields = fields.split(',').map((field) => field.trim());\n\t\t\t}\n\t\t} else {\n\t\t\treturnData = responseData;\n\t\t}\n\n\t\tif (fieldsToInclude === 'selected') {\n\t\t\tfor (const item of responseData) {\n\t\t\t\tconst newItem: IDataObject = {};\n\n\t\t\t\tfor (const field of fields) {\n\t\t\t\t\tset(newItem, field, get(item, field));\n\t\t\t\t}\n\n\t\t\t\treturnData.push(newItem);\n\t\t\t}\n\t\t}\n\n\t\tif (fieldsToInclude === 'except') {\n\t\t\tfor (const item of responseData) {\n\t\t\t\tfor (const field of fields) {\n\t\t\t\t\tunset(item, field);\n\t\t\t\t}\n\n\t\t\t\treturnData.push(item);\n\t\t\t}\n\t\t}\n\n\t\treturn JSON.stringify(returnData, null, 2);\n\t};\n};\n\nexport const configureResponseOptimizer = (ctx: ISupplyDataFunctions, itemIndex: number) => {\n\tconst optimizeResponse = ctx.getNodeParameter('optimizeResponse', itemIndex, false) as boolean;\n\n\tif (optimizeResponse) {\n\t\tconst responseType = ctx.getNodeParameter('responseType', itemIndex) as\n\t\t\t| 'json'\n\t\t\t| 'text'\n\t\t\t| 'html';\n\n\t\tlet maxLength = 0;\n\t\tconst truncateResponse = ctx.getNodeParameter('truncateResponse', itemIndex, false) as boolean;\n\n\t\tif (truncateResponse) {\n\t\t\tmaxLength = ctx.getNodeParameter('maxLength', itemIndex, 0) as number;\n\t\t}\n\n\t\tswitch (responseType) {\n\t\t\tcase 'html':\n\t\t\t\treturn htmlOptimizer(ctx, itemIndex, maxLength);\n\t\t\tcase 'text':\n\t\t\t\treturn textOptimizer(ctx, itemIndex, maxLength);\n\t\t\tcase 'json':\n\t\t\t\treturn jsonOptimizer(ctx, itemIndex);\n\t\t}\n\t}\n\n\treturn defaultOptimizer;\n};\n\nconst extractPlaceholders = (text: string): string[] => {\n\tconst placeholder = /(\\{[a-zA-Z0-9_-]+\\})/g;\n\tconst returnData: string[] = [];\n\n\tconst matches = text.matchAll(placeholder);\n\n\tfor (const match of matches) {\n\t\treturnData.push(match[0].replace(/{|}/g, ''));\n\t}\n\n\treturn returnData;\n};\n\nexport const extractParametersFromText = (\n\tplaceholders: PlaceholderDefinition[],\n\ttext: string,\n\tsendIn: SendIn,\n\tkey?: string,\n): ToolParameter[] => {\n\tif (typeof text !== 'string') return [];\n\n\tconst parameters = extractPlaceholders(text);\n\n\tif (parameters.length) {\n\t\t// eslint-disable-next-line @typescript-eslint/no-use-before-define\n\t\tconst inputParameters = prepareParameters(\n\t\t\tparameters.map((name) => ({\n\t\t\t\tname,\n\t\t\t\tvalueProvider: 'modelRequired',\n\t\t\t})),\n\t\t\tplaceholders,\n\t\t\t'keypair',\n\t\t\tsendIn,\n\t\t\t'',\n\t\t);\n\n\t\treturn key\n\t\t\t? inputParameters.parameters.map((p) => ({ ...p, key }))\n\t\t\t: inputParameters.parameters;\n\t}\n\n\treturn [];\n};\n\nfunction prepareParameters(\n\trawParameters: RawParametersValues,\n\tplaceholders: PlaceholderDefinition[],\n\tparametersInputType: 'model' | 'keypair' | 'json',\n\tsendIn: SendIn,\n\tmodelInputDescription: string,\n\tjsonWithPlaceholders?: string,\n): { parameters: ToolParameter[]; values: IDataObject } {\n\tconst parameters: ToolParameter[] = [];\n\tconst values: IDataObject = {};\n\n\tif (parametersInputType === 'model') {\n\t\treturn {\n\t\t\tparameters: [\n\t\t\t\t{\n\t\t\t\t\tname: sendIn,\n\t\t\t\t\trequired: true,\n\t\t\t\t\ttype: 'json',\n\t\t\t\t\tdescription: modelInputDescription,\n\t\t\t\t\tsendIn,\n\t\t\t\t},\n\t\t\t],\n\t\t\tvalues: {},\n\t\t};\n\t}\n\n\tif (parametersInputType === 'keypair') {\n\t\tfor (const entry of rawParameters) {\n\t\t\tif (entry.valueProvider.includes('model')) {\n\t\t\t\tconst placeholder = placeholders.find((p) => p.name === entry.name);\n\n\t\t\t\tconst parameter: ToolParameter = {\n\t\t\t\t\tname: entry.name,\n\t\t\t\t\trequired: entry.valueProvider === 'modelRequired',\n\t\t\t\t\tsendIn,\n\t\t\t\t};\n\n\t\t\t\tif (placeholder) {\n\t\t\t\t\tparameter.type = placeholder.type;\n\t\t\t\t\tparameter.description = placeholder.description;\n\t\t\t\t}\n\n\t\t\t\tparameters.push(parameter);\n\t\t\t} else if (entry.value) {\n\t\t\t\t// if value has placeholders push them to parameters\n\t\t\t\tparameters.push(\n\t\t\t\t\t...extractParametersFromText(placeholders, entry.value, sendIn, entry.name),\n\t\t\t\t);\n\t\t\t\tvalues[entry.name] = entry.value; //push to user provided values\n\t\t\t}\n\t\t}\n\t}\n\n\tif (parametersInputType === 'json' && jsonWithPlaceholders) {\n\t\tparameters.push(\n\t\t\t...extractParametersFromText(placeholders, jsonWithPlaceholders, sendIn, `${sendIn + 'Raw'}`),\n\t\t);\n\t}\n\n\treturn {\n\t\tparameters,\n\t\tvalues,\n\t};\n}\n\nconst MODEL_INPUT_DESCRIPTION = {\n\tqs: 'Query parameters for request as key value pairs',\n\theaders: 'Headers parameters for request as key value pairs',\n\tbody: 'Body parameters for request as key value pairs',\n};\n\nexport const updateParametersAndOptions = (options: {\n\tctx: ISupplyDataFunctions;\n\titemIndex: number;\n\ttoolParameters: ToolParameter[];\n\tplaceholdersDefinitions: PlaceholderDefinition[];\n\trequestOptions: IHttpRequestOptions;\n\trawRequestOptions: { [key: string]: string };\n\trequestOptionsProperty: 'headers' | 'qs' | 'body';\n\tinputTypePropertyName: string;\n\tjsonPropertyName: string;\n\tparametersPropertyName: string;\n}) => {\n\tconst {\n\t\tctx,\n\t\titemIndex,\n\t\ttoolParameters,\n\t\tplaceholdersDefinitions,\n\t\trequestOptions,\n\t\trawRequestOptions,\n\t\trequestOptionsProperty,\n\t\tinputTypePropertyName,\n\t\tjsonPropertyName,\n\t\tparametersPropertyName,\n\t} = options;\n\n\tconst inputType = ctx.getNodeParameter(\n\t\tinputTypePropertyName,\n\t\titemIndex,\n\t\t'keypair',\n\t) as ParameterInputType;\n\n\tlet parametersValues: ParametersValues = [];\n\n\tif (inputType === 'json') {\n\t\trawRequestOptions[requestOptionsProperty] = ctx.getNodeParameter(\n\t\t\tjsonPropertyName,\n\t\t\titemIndex,\n\t\t\t'',\n\t\t) as string;\n\t} else {\n\t\tparametersValues = ctx.getNodeParameter(\n\t\t\tparametersPropertyName,\n\t\t\titemIndex,\n\t\t\t[],\n\t\t) as ParametersValues;\n\t}\n\n\tconst inputParameters = prepareParameters(\n\t\tparametersValues,\n\t\tplaceholdersDefinitions,\n\t\tinputType,\n\t\trequestOptionsProperty,\n\t\tMODEL_INPUT_DESCRIPTION[requestOptionsProperty],\n\t\trawRequestOptions[requestOptionsProperty],\n\t);\n\n\ttoolParameters.push(...inputParameters.parameters);\n\n\trequestOptions[requestOptionsProperty] = {\n\t\t...(requestOptions[requestOptionsProperty] as IDataObject),\n\t\t...inputParameters.values,\n\t};\n};\n\nconst getParametersDescription = (parameters: ToolParameter[]) =>\n\tparameters\n\t\t.map(\n\t\t\t(p) =>\n\t\t\t\t`${p.name}: (description: ${p.description ?? ''}, type: ${p.type ?? 'string'}, required: ${!!p.required})`,\n\t\t)\n\t\t.join(',\\n ');\n\nexport const prepareToolDescription = (\n\ttoolDescription: string,\n\ttoolParameters: ToolParameter[],\n) => {\n\tlet description = `${toolDescription}`;\n\n\tif (toolParameters.length) {\n\t\tdescription += `\n\tTool expects valid stringified JSON object with ${toolParameters.length} properties.\n\tProperty names with description, type and required status:\n\t${getParametersDescription(toolParameters)}\n\tALL parameters marked as required must be provided`;\n\t}\n\n\treturn description;\n};\n\nexport const configureToolFunction = (\n\tctx: ISupplyDataFunctions,\n\titemIndex: number,\n\ttoolParameters: ToolParameter[],\n\trequestOptions: IHttpRequestOptions,\n\trawRequestOptions: { [key: string]: string },\n\thttpRequest: (options: IHttpRequestOptions) => Promise<any>,\n\toptimizeResponse: (response: string) => string,\n) => {\n\treturn async (query: string | IDataObject): Promise<string> => {\n\t\tconst { index } = ctx.addInputData(NodeConnectionTypes.AiTool, [[{ json: { query } }]]);\n\n\t\t// Clone options and rawRequestOptions to avoid mutating the original objects\n\t\tconst options: IHttpRequestOptions | null = structuredClone(requestOptions);\n\t\tconst clonedRawRequestOptions: { [key: string]: string } = structuredClone(rawRequestOptions);\n\t\tlet fullResponse: any;\n\t\tlet response: string = '';\n\t\tlet executionError: Error | undefined = undefined;\n\n\t\tif (!toolParameters.length) {\n\t\t\tquery = '{}';\n\t\t}\n\n\t\ttry {\n\t\t\tif (query) {\n\t\t\t\tlet dataFromModel;\n\n\t\t\t\tif (typeof query === 'string') {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tdataFromModel = jsonParse<IDataObject>(query);\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\tif (toolParameters.length === 1) {\n\t\t\t\t\t\t\tdataFromModel = { [toolParameters[0].name]: query };\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthrow new NodeOperationError(\n\t\t\t\t\t\t\t\tctx.getNode(),\n\t\t\t\t\t\t\t\t`Input is not a valid JSON: ${error.message}`,\n\t\t\t\t\t\t\t\t{ itemIndex },\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tdataFromModel = query;\n\t\t\t\t}\n\n\t\t\t\tfor (const parameter of toolParameters) {\n\t\t\t\t\tif (\n\t\t\t\t\t\tparameter.required &&\n\t\t\t\t\t\t(dataFromModel[parameter.name] === undefined || dataFromModel[parameter.name] === null)\n\t\t\t\t\t) {\n\t\t\t\t\t\tthrow new NodeOperationError(\n\t\t\t\t\t\t\tctx.getNode(),\n\t\t\t\t\t\t\t`Model did not provide parameter '${parameter.name}' which is required and must be present in the input`,\n\t\t\t\t\t\t\t{ itemIndex },\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tfor (const parameter of toolParameters) {\n\t\t\t\t\tlet argument = dataFromModel[parameter.name];\n\n\t\t\t\t\tif (\n\t\t\t\t\t\targument &&\n\t\t\t\t\t\tparameter.type === 'json' &&\n\t\t\t\t\t\t!['qsRaw', 'headersRaw', 'bodyRaw'].includes(parameter.key ?? '') &&\n\t\t\t\t\t\ttypeof argument !== 'object'\n\t\t\t\t\t) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\targument = jsonParse(String(argument));\n\t\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\t\tthrow new NodeOperationError(\n\t\t\t\t\t\t\t\tctx.getNode(),\n\t\t\t\t\t\t\t\t`Parameter ${parameter.name} is not a valid JSON: ${error.message}`,\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\titemIndex,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (parameter.sendIn === 'path') {\n\t\t\t\t\t\targument = String(argument);\n\n\t\t\t\t\t\t//remove \" or ' from start or end\n\t\t\t\t\t\targument = argument.replace(/^['\"]+|['\"]+$/g, '');\n\n\t\t\t\t\t\toptions.url = options.url.replace(`{${parameter.name}}`, argument);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (parameter.sendIn === parameter.name) {\n\t\t\t\t\t\tset(options, [parameter.sendIn], argument);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (['qsRaw', 'headersRaw', 'bodyRaw'].includes(parameter.key ?? '')) {\n\t\t\t\t\t\t//enclose string in quotes as user and model could omit them\n\t\t\t\t\t\tif (parameter.type === 'string') {\n\t\t\t\t\t\t\targument = String(argument);\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t!argument.startsWith('\"') &&\n\t\t\t\t\t\t\t\t!clonedRawRequestOptions[parameter.sendIn].includes(`\"{${parameter.name}}\"`)\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\targument = `\"${argument}\"`;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (typeof argument === 'object') {\n\t\t\t\t\t\t\targument = JSON.stringify(argument);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tclonedRawRequestOptions[parameter.sendIn] = clonedRawRequestOptions[\n\t\t\t\t\t\t\tparameter.sendIn\n\t\t\t\t\t\t].replace(`{${parameter.name}}`, String(argument));\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (parameter.key) {\n\t\t\t\t\t\tlet requestOptionsValue = get(options, [parameter.sendIn, parameter.key]);\n\n\t\t\t\t\t\tif (typeof requestOptionsValue === 'string') {\n\t\t\t\t\t\t\trequestOptionsValue = requestOptionsValue.replace(\n\t\t\t\t\t\t\t\t`{${parameter.name}}`,\n\t\t\t\t\t\t\t\tString(argument),\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tset(options, [parameter.sendIn, parameter.key], requestOptionsValue);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tset(options, [parameter.sendIn, parameter.name], argument);\n\t\t\t\t}\n\n\t\t\t\tfor (const [key, value] of Object.entries(clonedRawRequestOptions)) {\n\t\t\t\t\tif (value) {\n\t\t\t\t\t\tlet parsedValue;\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tparsedValue = jsonParse<IDataObject>(value);\n\t\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\t\tlet recoveredData = '';\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\trecoveredData = value\n\t\t\t\t\t\t\t\t\t.replace(/'/g, '\"') // Replace single quotes with double quotes\n\t\t\t\t\t\t\t\t\t.replace(/(['\"])?([a-zA-Z0-9_]+)(['\"])?:/g, '\"$2\":') // Wrap keys in double quotes\n\t\t\t\t\t\t\t\t\t.replace(/,\\s*([\\]}])/g, '$1') // Remove trailing commas from objects\n\t\t\t\t\t\t\t\t\t.replace(/,+$/, ''); // Remove trailing comma\n\t\t\t\t\t\t\t\tparsedValue = jsonParse<IDataObject>(recoveredData);\n\t\t\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t\t\tthrow new NodeOperationError(\n\t\t\t\t\t\t\t\t\tctx.getNode(),\n\t\t\t\t\t\t\t\t\t`Could not replace placeholders in ${key}: ${error.message}`,\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\toptions[key as 'qs' | 'headers' | 'body'] = parsedValue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (options) {\n\t\t\t\toptions.url = encodeURI(options.url);\n\n\t\t\t\tif (options.headers && !Object.keys(options.headers).length) {\n\t\t\t\t\tdelete options.headers;\n\t\t\t\t}\n\t\t\t\tif (options.qs && !Object.keys(options.qs).length) {\n\t\t\t\t\tdelete options.qs;\n\t\t\t\t}\n\t\t\t\tif (options.body && !Object.keys(options.body).length) {\n\t\t\t\t\tdelete options.body;\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tconst errorMessage = 'Input provided by model is not valid';\n\n\t\t\tif (error instanceof NodeOperationError) {\n\t\t\t\texecutionError = error;\n\t\t\t} else {\n\t\t\t\texecutionError = new NodeOperationError(ctx.getNode(), errorMessage, {\n\t\t\t\t\titemIndex,\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tresponse = errorMessage;\n\t\t}\n\n\t\tif (options) {\n\t\t\ttry {\n\t\t\t\tfullResponse = await httpRequest(options);\n\t\t\t} catch (error) {\n\t\t\t\tconst httpCode = (error as NodeApiError).httpCode;\n\t\t\t\tresponse = `${httpCode ? `HTTP ${httpCode} ` : ''}There was an error: \"${error.message}\"`;\n\t\t\t}\n\n\t\t\tif (!response) {\n\t\t\t\ttry {\n\t\t\t\t\t// Check if the response is binary data\n\t\t\t\t\tif (fullResponse.body && isBinary(fullResponse.body)) {\n\t\t\t\t\t\tthrow new NodeOperationError(ctx.getNode(), 'Binary data is not supported');\n\t\t\t\t\t}\n\n\t\t\t\t\tresponse = optimizeResponse(fullResponse.body ?? fullResponse);\n\t\t\t\t} catch (error) {\n\t\t\t\t\tresponse = `There was an error: \"${error.message}\"`;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (typeof response !== 'string') {\n\t\t\texecutionError = new NodeOperationError(ctx.getNode(), 'Wrong output type returned', {\n\t\t\t\tdescription: `The response property should be a string, but it is an ${typeof response}`,\n\t\t\t});\n\t\t\tresponse = `There was an error: \"${executionError.message}\"`;\n\t\t}\n\n\t\tif (executionError) {\n\t\t\tvoid ctx.addOutputData(NodeConnectionTypes.AiTool, index, executionError as ExecutionError);\n\t\t} else {\n\t\t\tvoid ctx.addOutputData(NodeConnectionTypes.AiTool, index, [[{ json: { response } }]]);\n\t\t}\n\n\t\treturn response;\n\t};\n};\n\nfunction makeParameterZodSchema(parameter: ToolParameter) {\n\tlet schema: z.ZodTypeAny;\n\n\tif (parameter.type === 'string') {\n\t\tschema = z.string();\n\t} else if (parameter.type === 'number') {\n\t\tschema = z.number();\n\t} else if (parameter.type === 'boolean') {\n\t\tschema = z.boolean();\n\t} else if (parameter.type === 'json') {\n\t\tschema = z.record(z.any());\n\t} else {\n\t\tschema = z.string();\n\t}\n\n\tif (!parameter.required) {\n\t\tschema = schema.optional();\n\t}\n\n\tif (parameter.description) {\n\t\tschema = schema.describe(parameter.description);\n\t}\n\n\treturn schema;\n}\n\nexport function makeToolInputSchema(parameters: ToolParameter[]): DynamicZodObject {\n\tconst schemaEntries = parameters.map((parameter) => [\n\t\tparameter.name,\n\t\tmakeParameterZodSchema(parameter),\n\t]);\n\n\treturn z.object(Object.fromEntries(schemaEntries));\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,yBAA4B;AAC5B,cAAyB;AACzB,0BAAwB;AACxB,mBAAsB;AACtB,iBAAgB;AAChB,iBAAgB;AAChB,mBAAkB;AAClB,8BAA8C;AAS9C,0BAAmE;AACnE,iBAAkB;AAYlB,MAAM,2BAA2B,OAAO,KAA2B,cAAsB;AACxF,QAAM,cAAc,IAAI,iBAAiB,mBAAmB,SAAS;AAErE,MAAI,gBAAgB,mBAAmB,gBAAgB,kBAAkB;AACxE,UAAM,YAAY,MAAM,IAAI,eAAe,iBAAiB,SAAS;AACrE,UAAM,kBAAkB,gBAAgB,mBAAmB,QAAQ;AAEnE,WAAO,OAAO,YAAiC;AAC9C,cAAQ,OAAO;AAAA,QACd,UAAU,UAAU;AAAA,QACpB,UAAU,UAAU;AAAA,QACpB;AAAA,MACD;AACA,aAAO,MAAM,IAAI,QAAQ,YAAY,OAAO;AAAA,IAC7C;AAAA,EACD;AAEA,MAAI,gBAAgB,kBAAkB;AACrC,UAAM,aAAa,MAAM,IAAI,eAAe,kBAAkB,SAAS;AAEvE,WAAO,OAAO,YAAiC;AAC9C,UAAI,CAAC,QAAQ,QAAS,SAAQ,UAAU,CAAC;AACzC,cAAQ,QAAQ,WAAW,IAAc,IAAI,WAAW;AACxD,aAAO,MAAM,IAAI,QAAQ,YAAY,OAAO;AAAA,IAC7C;AAAA,EACD;AAE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
|
-
|
|
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 ToolSerpApi_node_exports = {};
|
|
20
|
+
__export(ToolSerpApi_node_exports, {
|
|
21
|
+
ToolSerpApi: () => ToolSerpApi
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(ToolSerpApi_node_exports);
|
|
24
|
+
var import_serpapi = require("@langchain/community/tools/serpapi");
|
|
25
|
+
var import_n8n_workflow = require("n8n-workflow");
|
|
26
|
+
var import_logWrapper = require("../../../utils/logWrapper");
|
|
27
|
+
var import_sharedFields = require("../../../utils/sharedFields");
|
|
8
28
|
class ToolSerpApi {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
29
|
+
constructor() {
|
|
30
|
+
this.description = {
|
|
31
|
+
displayName: "SerpApi (Google Search)",
|
|
32
|
+
name: "toolSerpApi",
|
|
33
|
+
icon: "file:serpApi.svg",
|
|
34
|
+
group: ["transform"],
|
|
35
|
+
version: 1,
|
|
36
|
+
description: "Search in Google using SerpAPI",
|
|
37
|
+
defaults: {
|
|
38
|
+
name: "SerpAPI"
|
|
39
|
+
},
|
|
40
|
+
codex: {
|
|
41
|
+
categories: ["AI"],
|
|
42
|
+
subcategories: {
|
|
43
|
+
AI: ["Tools"],
|
|
44
|
+
Tools: ["Other Tools"]
|
|
45
|
+
},
|
|
46
|
+
resources: {
|
|
47
|
+
primaryDocumentation: [
|
|
48
|
+
{
|
|
49
|
+
url: "https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.toolserpapi/"
|
|
50
|
+
}
|
|
51
|
+
]
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
// eslint-disable-next-line n8n-nodes-base/node-class-description-inputs-wrong-regular-node
|
|
55
|
+
inputs: [],
|
|
56
|
+
// eslint-disable-next-line n8n-nodes-base/node-class-description-outputs-wrong
|
|
57
|
+
outputs: [import_n8n_workflow.NodeConnectionTypes.AiTool],
|
|
58
|
+
outputNames: ["Tool"],
|
|
59
|
+
credentials: [
|
|
60
|
+
{
|
|
61
|
+
name: "serpApi",
|
|
62
|
+
required: true
|
|
63
|
+
}
|
|
64
|
+
],
|
|
65
|
+
properties: [
|
|
66
|
+
(0, import_sharedFields.getConnectionHintNoticeField)([import_n8n_workflow.NodeConnectionTypes.AiAgent]),
|
|
67
|
+
{
|
|
68
|
+
displayName: "Options",
|
|
69
|
+
name: "options",
|
|
70
|
+
type: "collection",
|
|
71
|
+
placeholder: "Add Option",
|
|
72
|
+
default: {},
|
|
73
|
+
options: [
|
|
74
|
+
{
|
|
75
|
+
displayName: "Country",
|
|
76
|
+
name: "gl",
|
|
77
|
+
type: "string",
|
|
78
|
+
default: "us",
|
|
79
|
+
description: 'Defines the country to use for search. Head to <a href="https://serpapi.com/google-countries">Google countries page</a> for a full list of supported countries.'
|
|
19
80
|
},
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
},
|
|
26
|
-
resources: {
|
|
27
|
-
primaryDocumentation: [
|
|
28
|
-
{
|
|
29
|
-
url: 'https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.toolserpapi/',
|
|
30
|
-
},
|
|
31
|
-
],
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
inputs: [],
|
|
35
|
-
outputs: [n8n_workflow_1.NodeConnectionTypes.AiTool],
|
|
36
|
-
outputNames: ['Tool'],
|
|
37
|
-
credentials: [
|
|
81
|
+
{
|
|
82
|
+
displayName: "Device",
|
|
83
|
+
name: "device",
|
|
84
|
+
type: "options",
|
|
85
|
+
options: [
|
|
38
86
|
{
|
|
39
|
-
|
|
40
|
-
|
|
87
|
+
name: "Desktop",
|
|
88
|
+
value: "desktop"
|
|
41
89
|
},
|
|
42
|
-
],
|
|
43
|
-
properties: [
|
|
44
|
-
(0, sharedFields_1.getConnectionHintNoticeField)([n8n_workflow_1.NodeConnectionTypes.AiAgent]),
|
|
45
90
|
{
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
type: 'collection',
|
|
49
|
-
placeholder: 'Add Option',
|
|
50
|
-
default: {},
|
|
51
|
-
options: [
|
|
52
|
-
{
|
|
53
|
-
displayName: 'Country',
|
|
54
|
-
name: 'gl',
|
|
55
|
-
type: 'string',
|
|
56
|
-
default: 'us',
|
|
57
|
-
description: 'Defines the country to use for search. Head to <a href="https://serpapi.com/google-countries">Google countries page</a> for a full list of supported countries.',
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
displayName: 'Device',
|
|
61
|
-
name: 'device',
|
|
62
|
-
type: 'options',
|
|
63
|
-
options: [
|
|
64
|
-
{
|
|
65
|
-
name: 'Desktop',
|
|
66
|
-
value: 'desktop',
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
name: 'Mobile',
|
|
70
|
-
value: 'mobile',
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
name: 'Tablet',
|
|
74
|
-
value: 'tablet',
|
|
75
|
-
},
|
|
76
|
-
],
|
|
77
|
-
default: 'desktop',
|
|
78
|
-
description: 'Device to use to get the results',
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
displayName: 'Explicit Array',
|
|
82
|
-
name: 'no_cache',
|
|
83
|
-
type: 'boolean',
|
|
84
|
-
default: false,
|
|
85
|
-
description: 'Whether to force SerpApi to fetch the Google results even if a cached version is already present. Cache expires after 1h. Cached searches are free, and are not counted towards your searches per month.',
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
displayName: 'Google Domain',
|
|
89
|
-
name: 'google_domain',
|
|
90
|
-
type: 'string',
|
|
91
|
-
default: 'google.com',
|
|
92
|
-
description: 'Defines the domain to use for search. Head to <a href="https://serpapi.com/google-domains">Google domains page</a> for a full list of supported domains.',
|
|
93
|
-
},
|
|
94
|
-
{
|
|
95
|
-
displayName: 'Language',
|
|
96
|
-
name: 'hl',
|
|
97
|
-
type: 'string',
|
|
98
|
-
default: 'en',
|
|
99
|
-
description: 'Defines the language to use. It\'s a two-letter language code. (e.g., `en` for English, `es` for Spanish, or `fr` for French). Head to <a href="https://serpapi.com/google-languages">Google languages page</a> for a full list of supported languages.',
|
|
100
|
-
},
|
|
101
|
-
],
|
|
91
|
+
name: "Mobile",
|
|
92
|
+
value: "mobile"
|
|
102
93
|
},
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
94
|
+
{
|
|
95
|
+
name: "Tablet",
|
|
96
|
+
value: "tablet"
|
|
97
|
+
}
|
|
98
|
+
],
|
|
99
|
+
default: "desktop",
|
|
100
|
+
description: "Device to use to get the results"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
displayName: "Explicit Array",
|
|
104
|
+
name: "no_cache",
|
|
105
|
+
type: "boolean",
|
|
106
|
+
default: false,
|
|
107
|
+
description: "Whether to force SerpApi to fetch the Google results even if a cached version is already present. Cache expires after 1h. Cached searches are free, and are not counted towards your searches per month."
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
displayName: "Google Domain",
|
|
111
|
+
name: "google_domain",
|
|
112
|
+
type: "string",
|
|
113
|
+
default: "google.com",
|
|
114
|
+
description: 'Defines the domain to use for search. Head to <a href="https://serpapi.com/google-domains">Google domains page</a> for a full list of supported domains.'
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
displayName: "Language",
|
|
118
|
+
name: "hl",
|
|
119
|
+
type: "string",
|
|
120
|
+
default: "en",
|
|
121
|
+
description: 'Defines the language to use. It\'s a two-letter language code. (e.g., `en` for English, `es` for Spanish, or `fr` for French). Head to <a href="https://serpapi.com/google-languages">Google languages page</a> for a full list of supported languages.'
|
|
122
|
+
}
|
|
123
|
+
]
|
|
124
|
+
}
|
|
125
|
+
]
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
async supplyData(itemIndex) {
|
|
129
|
+
const credentials = await this.getCredentials("serpApi");
|
|
130
|
+
const options = this.getNodeParameter("options", itemIndex);
|
|
131
|
+
return {
|
|
132
|
+
response: (0, import_logWrapper.logWrapper)(new import_serpapi.SerpAPI(credentials.apiKey, options), this)
|
|
133
|
+
};
|
|
134
|
+
}
|
|
113
135
|
}
|
|
114
|
-
|
|
136
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
137
|
+
0 && (module.exports = {
|
|
138
|
+
ToolSerpApi
|
|
139
|
+
});
|
|
115
140
|
//# sourceMappingURL=ToolSerpApi.node.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["../../../../nodes/tools/ToolSerpApi/ToolSerpApi.node.ts"],"sourcesContent":["/* eslint-disable n8n-nodes-base/node-dirname-against-convention */\nimport { SerpAPI } from '@langchain/community/tools/serpapi';\nimport {\n\tNodeConnectionTypes,\n\ttype INodeType,\n\ttype INodeTypeDescription,\n\ttype ISupplyDataFunctions,\n\ttype SupplyData,\n} from 'n8n-workflow';\n\nimport { logWrapper } from '@utils/logWrapper';\nimport { getConnectionHintNoticeField } from '@utils/sharedFields';\n\nexport class ToolSerpApi implements INodeType {\n\tdescription: INodeTypeDescription = {\n\t\tdisplayName: 'SerpApi (Google Search)',\n\t\tname: 'toolSerpApi',\n\t\ticon: 'file:serpApi.svg',\n\t\tgroup: ['transform'],\n\t\tversion: 1,\n\t\tdescription: 'Search in Google using SerpAPI',\n\t\tdefaults: {\n\t\t\tname: 'SerpAPI',\n\t\t},\n\t\tcodex: {\n\t\t\tcategories: ['AI'],\n\t\t\tsubcategories: {\n\t\t\t\tAI: ['Tools'],\n\t\t\t\tTools: ['Other Tools'],\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/sub-nodes/n8n-nodes-langchain.toolserpapi/',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t},\n\t\t},\n\t\t// eslint-disable-next-line n8n-nodes-base/node-class-description-inputs-wrong-regular-node\n\t\tinputs: [],\n\t\t// eslint-disable-next-line n8n-nodes-base/node-class-description-outputs-wrong\n\t\toutputs: [NodeConnectionTypes.AiTool],\n\t\toutputNames: ['Tool'],\n\t\tcredentials: [\n\t\t\t{\n\t\t\t\tname: 'serpApi',\n\t\t\t\trequired: true,\n\t\t\t},\n\t\t],\n\t\tproperties: [\n\t\t\tgetConnectionHintNoticeField([NodeConnectionTypes.AiAgent]),\n\t\t\t{\n\t\t\t\tdisplayName: 'Options',\n\t\t\t\tname: 'options',\n\t\t\t\ttype: 'collection',\n\t\t\t\tplaceholder: 'Add Option',\n\t\t\t\tdefault: {},\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Country',\n\t\t\t\t\t\tname: 'gl',\n\t\t\t\t\t\ttype: 'string',\n\t\t\t\t\t\tdefault: 'us',\n\t\t\t\t\t\tdescription:\n\t\t\t\t\t\t\t'Defines the country to use for search. Head to <a href=\"https://serpapi.com/google-countries\">Google countries page</a> for a full list of supported countries.',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Device',\n\t\t\t\t\t\tname: 'device',\n\t\t\t\t\t\ttype: 'options',\n\t\t\t\t\t\toptions: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tname: 'Desktop',\n\t\t\t\t\t\t\t\tvalue: 'desktop',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tname: 'Mobile',\n\t\t\t\t\t\t\t\tvalue: 'mobile',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tname: 'Tablet',\n\t\t\t\t\t\t\t\tvalue: 'tablet',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t],\n\t\t\t\t\t\tdefault: 'desktop',\n\t\t\t\t\t\tdescription: 'Device to use to get the results',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Explicit Array',\n\t\t\t\t\t\tname: 'no_cache',\n\t\t\t\t\t\ttype: 'boolean',\n\t\t\t\t\t\tdefault: false,\n\t\t\t\t\t\tdescription:\n\t\t\t\t\t\t\t'Whether to force SerpApi to fetch the Google results even if a cached version is already present. Cache expires after 1h. Cached searches are free, and are not counted towards your searches per month.',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Google Domain',\n\t\t\t\t\t\tname: 'google_domain',\n\t\t\t\t\t\ttype: 'string',\n\t\t\t\t\t\tdefault: 'google.com',\n\t\t\t\t\t\tdescription:\n\t\t\t\t\t\t\t'Defines the domain to use for search. Head to <a href=\"https://serpapi.com/google-domains\">Google domains page</a> for a full list of supported domains.',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Language',\n\t\t\t\t\t\tname: 'hl',\n\t\t\t\t\t\ttype: 'string',\n\t\t\t\t\t\tdefault: 'en',\n\t\t\t\t\t\tdescription:\n\t\t\t\t\t\t\t'Defines the language to use. It\\'s a two-letter language code. (e.g., `en` for English, `es` for Spanish, or `fr` for French). Head to <a href=\"https://serpapi.com/google-languages\">Google languages page</a> for a full list of supported languages.',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t},\n\t\t],\n\t};\n\n\tasync supplyData(this: ISupplyDataFunctions, itemIndex: number): Promise<SupplyData> {\n\t\tconst credentials = await this.getCredentials('serpApi');\n\n\t\tconst options = this.getNodeParameter('options', itemIndex) as object;\n\n\t\treturn {\n\t\t\tresponse: logWrapper(new SerpAPI(credentials.apiKey as string, options), this),\n\t\t};\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,qBAAwB;AACxB,0BAMO;AAEP,wBAA2B;AAC3B,0BAA6C;AAEtC,MAAM,YAAiC;AAAA,EAAvC;AACN,uBAAoC;AAAA,MACnC,aAAa;AAAA,MACb,MAAM;AAAA,MACN,MAAM;AAAA,MACN,OAAO,CAAC,WAAW;AAAA,MACnB,SAAS;AAAA,MACT,aAAa;AAAA,MACb,UAAU;AAAA,QACT,MAAM;AAAA,MACP;AAAA,MACA,OAAO;AAAA,QACN,YAAY,CAAC,IAAI;AAAA,QACjB,eAAe;AAAA,UACd,IAAI,CAAC,OAAO;AAAA,UACZ,OAAO,CAAC,aAAa;AAAA,QACtB;AAAA,QACA,WAAW;AAAA,UACV,sBAAsB;AAAA,YACrB;AAAA,cACC,KAAK;AAAA,YACN;AAAA,UACD;AAAA,QACD;AAAA,MACD;AAAA;AAAA,MAEA,QAAQ,CAAC;AAAA;AAAA,MAET,SAAS,CAAC,wCAAoB,MAAM;AAAA,MACpC,aAAa,CAAC,MAAM;AAAA,MACpB,aAAa;AAAA,QACZ;AAAA,UACC,MAAM;AAAA,U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[]}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use strict";
|
|
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 ToolThink_node_exports = {};
|
|
20
|
+
__export(ToolThink_node_exports, {
|
|
21
|
+
ToolThink: () => ToolThink
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(ToolThink_node_exports);
|
|
24
|
+
var import_tools = require("langchain/tools");
|
|
25
|
+
var import_n8n_workflow = require("n8n-workflow");
|
|
26
|
+
var import_logWrapper = require("../../../utils/logWrapper");
|
|
27
|
+
var import_sharedFields = require("../../../utils/sharedFields");
|
|
28
|
+
const defaultToolDescription = "Use the tool to think about something. It will not obtain new information or change the database, but just append the thought to the log. Use it when complex reasoning or some cache memory is needed.";
|
|
29
|
+
class ToolThink {
|
|
30
|
+
constructor() {
|
|
31
|
+
this.description = {
|
|
32
|
+
displayName: "Think Tool",
|
|
33
|
+
name: "toolThink",
|
|
34
|
+
icon: "fa:brain",
|
|
35
|
+
iconColor: "black",
|
|
36
|
+
group: ["transform"],
|
|
37
|
+
version: 1,
|
|
38
|
+
description: "Invite the AI agent to do some thinking",
|
|
39
|
+
defaults: {
|
|
40
|
+
name: "Think"
|
|
41
|
+
},
|
|
42
|
+
codex: {
|
|
43
|
+
categories: ["AI"],
|
|
44
|
+
subcategories: {
|
|
45
|
+
AI: ["Tools"],
|
|
46
|
+
Tools: ["Other Tools"]
|
|
47
|
+
},
|
|
48
|
+
resources: {
|
|
49
|
+
primaryDocumentation: [
|
|
50
|
+
{
|
|
51
|
+
url: "https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.toolthink/"
|
|
52
|
+
}
|
|
53
|
+
]
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
inputs: [],
|
|
57
|
+
outputs: [import_n8n_workflow.NodeConnectionTypes.AiTool],
|
|
58
|
+
outputNames: ["Tool"],
|
|
59
|
+
properties: [
|
|
60
|
+
(0, import_sharedFields.getConnectionHintNoticeField)([import_n8n_workflow.NodeConnectionTypes.AiAgent]),
|
|
61
|
+
{
|
|
62
|
+
displayName: "Think Tool Description",
|
|
63
|
+
name: "description",
|
|
64
|
+
type: "string",
|
|
65
|
+
default: defaultToolDescription,
|
|
66
|
+
placeholder: "[Describe your thinking tool here, explaining how it will help the AI think]",
|
|
67
|
+
description: "The thinking tool's description",
|
|
68
|
+
typeOptions: {
|
|
69
|
+
rows: 3
|
|
70
|
+
},
|
|
71
|
+
required: true
|
|
72
|
+
}
|
|
73
|
+
]
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
async supplyData(itemIndex) {
|
|
77
|
+
const description = this.getNodeParameter("description", itemIndex);
|
|
78
|
+
const tool = new import_tools.DynamicTool({
|
|
79
|
+
name: "thinking_tool",
|
|
80
|
+
description,
|
|
81
|
+
func: async (subject) => {
|
|
82
|
+
return subject;
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
return {
|
|
86
|
+
response: (0, import_logWrapper.logWrapper)(tool, this)
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
91
|
+
0 && (module.exports = {
|
|
92
|
+
ToolThink
|
|
93
|
+
});
|
|
94
|
+
//# sourceMappingURL=ToolThink.node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../nodes/tools/ToolThink/ToolThink.node.ts"],"sourcesContent":["/* eslint-disable n8n-nodes-base/node-dirname-against-convention */\nimport { DynamicTool } from 'langchain/tools';\nimport {\n\tNodeConnectionTypes,\n\ttype INodeType,\n\ttype INodeTypeDescription,\n\ttype ISupplyDataFunctions,\n\ttype SupplyData,\n} from 'n8n-workflow';\n\nimport { logWrapper } from '@utils/logWrapper';\nimport { getConnectionHintNoticeField } from '@utils/sharedFields';\n\n// A thinking tool, see https://www.anthropic.com/engineering/claude-think-tool\n\nconst defaultToolDescription =\n\t'Use the tool to think about something. It will not obtain new information or change the database, but just append the thought to the log. Use it when complex reasoning or some cache memory is needed.';\n\nexport class ToolThink implements INodeType {\n\tdescription: INodeTypeDescription = {\n\t\tdisplayName: 'Think Tool',\n\t\tname: 'toolThink',\n\t\ticon: 'fa:brain',\n\t\ticonColor: 'black',\n\t\tgroup: ['transform'],\n\t\tversion: 1,\n\t\tdescription: 'Invite the AI agent to do some thinking',\n\t\tdefaults: {\n\t\t\tname: 'Think',\n\t\t},\n\t\tcodex: {\n\t\t\tcategories: ['AI'],\n\t\t\tsubcategories: {\n\t\t\t\tAI: ['Tools'],\n\t\t\t\tTools: ['Other Tools'],\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/sub-nodes/n8n-nodes-langchain.toolthink/',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t},\n\t\t},\n\t\tinputs: [],\n\t\toutputs: [NodeConnectionTypes.AiTool],\n\t\toutputNames: ['Tool'],\n\t\tproperties: [\n\t\t\tgetConnectionHintNoticeField([NodeConnectionTypes.AiAgent]),\n\t\t\t{\n\t\t\t\tdisplayName: 'Think Tool Description',\n\t\t\t\tname: 'description',\n\t\t\t\ttype: 'string',\n\t\t\t\tdefault: defaultToolDescription,\n\t\t\t\tplaceholder: '[Describe your thinking tool here, explaining how it will help the AI think]',\n\t\t\t\tdescription: \"The thinking tool's description\",\n\t\t\t\ttypeOptions: {\n\t\t\t\t\trows: 3,\n\t\t\t\t},\n\t\t\t\trequired: true,\n\t\t\t},\n\t\t],\n\t};\n\n\tasync supplyData(this: ISupplyDataFunctions, itemIndex: number): Promise<SupplyData> {\n\t\tconst description = this.getNodeParameter('description', itemIndex) as string;\n\t\tconst tool = new DynamicTool({\n\t\t\tname: 'thinking_tool',\n\t\t\tdescription,\n\t\t\tfunc: async (subject: string) => {\n\t\t\t\treturn subject;\n\t\t\t},\n\t\t});\n\n\t\treturn {\n\t\t\tresponse: logWrapper(tool, this),\n\t\t};\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,mBAA4B;AAC5B,0BAMO;AAEP,wBAA2B;AAC3B,0BAA6C;AAI7C,MAAM,yBACL;AAEM,MAAM,UAA+B;AAAA,EAArC;AACN,uBAAoC;AAAA,MACnC,aAAa;AAAA,MACb,MAAM;AAAA,MACN,MAAM;AAAA,MACN,WAAW;AAAA,MACX,OAAO,CAAC,WAAW;AAAA,MACnB,SAAS;AAAA,MACT,aAAa;AAAA,MACb,UAAU;AAAA,QACT,MAAM;AAAA,MACP;AAAA,MACA,OAAO;AAAA,QACN,YAAY,CAAC,IAAI;AAAA,QACjB,eAAe;AAAA,UACd,IAAI,CAAC,OAAO;AAAA,UACZ,OAAO,CAAC,aAAa;AAAA,QACtB;AAAA,QACA,WAAW;AAAA,UACV,sBAAsB;AAAA,YACrB;AAAA,cACC,KAAK;AAAA,YACN;AAAA,UACD;AAAA,QACD;AAAA,MACD;AAAA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