@atom8n/n8n-nodes-langchain 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -0
- package/dist/credentials/AnthropicApi.credentials.js +106 -0
- package/dist/credentials/AnthropicApi.credentials.js.map +1 -0
- package/dist/credentials/AzureAiSearchApi.credentials.js +75 -0
- package/dist/credentials/AzureAiSearchApi.credentials.js.map +1 -0
- package/dist/credentials/AzureEntraCognitiveServicesOAuth2Api.credentials.js +133 -0
- package/dist/credentials/AzureEntraCognitiveServicesOAuth2Api.credentials.js.map +1 -0
- package/dist/credentials/AzureOpenAiApi.credentials.js +74 -0
- package/dist/credentials/AzureOpenAiApi.credentials.js.map +1 -0
- package/dist/credentials/CohereApi.credentials.js +65 -0
- package/dist/credentials/CohereApi.credentials.js.map +1 -0
- package/dist/credentials/DeepSeekApi.credentials.js +65 -0
- package/dist/credentials/DeepSeekApi.credentials.js.map +1 -0
- package/dist/credentials/GooglePalmApi.credentials.js +65 -0
- package/dist/credentials/GooglePalmApi.credentials.js.map +1 -0
- package/dist/credentials/GroqApi.credentials.js +59 -0
- package/dist/credentials/GroqApi.credentials.js.map +1 -0
- package/dist/credentials/HuggingFaceApi.credentials.js +59 -0
- package/dist/credentials/HuggingFaceApi.credentials.js.map +1 -0
- package/dist/credentials/LemonadeApi.credentials.js +70 -0
- package/dist/credentials/LemonadeApi.credentials.js.map +1 -0
- package/dist/credentials/McpOAuth2Api.credentials.js +44 -0
- package/dist/credentials/McpOAuth2Api.credentials.js.map +1 -0
- package/dist/credentials/MilvusApi.credentials.js +72 -0
- package/dist/credentials/MilvusApi.credentials.js.map +1 -0
- package/dist/credentials/MistralCloudApi.credentials.js +60 -0
- package/dist/credentials/MistralCloudApi.credentials.js.map +1 -0
- package/dist/credentials/MotorheadApi.credentials.js +72 -0
- package/dist/credentials/MotorheadApi.credentials.js.map +1 -0
- package/dist/credentials/OllamaApi.credentials.js +68 -0
- package/dist/credentials/OllamaApi.credentials.js.map +1 -0
- package/dist/credentials/OpenRouterApi.credentials.js +65 -0
- package/dist/credentials/OpenRouterApi.credentials.js.map +1 -0
- package/dist/credentials/PineconeApi.credentials.js +61 -0
- package/dist/credentials/PineconeApi.credentials.js.map +1 -0
- package/dist/credentials/QdrantApi.credentials.js +66 -0
- package/dist/credentials/QdrantApi.credentials.js.map +1 -0
- package/dist/credentials/SearXngApi.credentials.js +44 -0
- package/dist/credentials/SearXngApi.credentials.js.map +1 -0
- package/dist/credentials/SerpApi.credentials.js +59 -0
- package/dist/credentials/SerpApi.credentials.js.map +1 -0
- package/dist/credentials/VercelAiGatewayApi.credentials.js +81 -0
- package/dist/credentials/VercelAiGatewayApi.credentials.js.map +1 -0
- package/dist/credentials/WeaviateApi.credentials.js +164 -0
- package/dist/credentials/WeaviateApi.credentials.js.map +1 -0
- package/dist/credentials/WolframAlphaApi.credentials.js +63 -0
- package/dist/credentials/WolframAlphaApi.credentials.js.map +1 -0
- package/dist/credentials/XAiApi.credentials.js +65 -0
- package/dist/credentials/XAiApi.credentials.js.map +1 -0
- package/dist/credentials/XataApi.credentials.js +73 -0
- package/dist/credentials/XataApi.credentials.js.map +1 -0
- package/dist/credentials/ZepApi.credentials.js +84 -0
- package/dist/credentials/ZepApi.credentials.js.map +1 -0
- package/dist/known/credentials.json +210 -0
- package/dist/known/nodes.json +426 -0
- package/dist/methods/defined.json +11 -0
- package/dist/methods/referenced.json +11 -0
- package/dist/nodes/Guardrails/Guardrails.node.js +62 -0
- package/dist/nodes/Guardrails/Guardrails.node.js.map +1 -0
- package/dist/nodes/Guardrails/actions/checks/jailbreak.js +50 -0
- package/dist/nodes/Guardrails/actions/checks/jailbreak.js.map +1 -0
- package/dist/nodes/Guardrails/actions/checks/keywords.js +84 -0
- package/dist/nodes/Guardrails/actions/checks/keywords.js.map +1 -0
- package/dist/nodes/Guardrails/actions/checks/nsfw.js +53 -0
- package/dist/nodes/Guardrails/actions/checks/nsfw.js.map +1 -0
- package/dist/nodes/Guardrails/actions/checks/pii.js +232 -0
- package/dist/nodes/Guardrails/actions/checks/pii.js.map +1 -0
- package/dist/nodes/Guardrails/actions/checks/secretKeys.js +201 -0
- package/dist/nodes/Guardrails/actions/checks/secretKeys.js.map +1 -0
- package/dist/nodes/Guardrails/actions/checks/topicalAlignment.js +38 -0
- package/dist/nodes/Guardrails/actions/checks/topicalAlignment.js.map +1 -0
- package/dist/nodes/Guardrails/actions/checks/urls.js +245 -0
- package/dist/nodes/Guardrails/actions/checks/urls.js.map +1 -0
- package/dist/nodes/Guardrails/actions/execute.js +68 -0
- package/dist/nodes/Guardrails/actions/execute.js.map +1 -0
- package/dist/nodes/Guardrails/actions/process.js +223 -0
- package/dist/nodes/Guardrails/actions/process.js.map +1 -0
- package/dist/nodes/Guardrails/actions/types.js +35 -0
- package/dist/nodes/Guardrails/actions/types.js.map +1 -0
- package/dist/nodes/Guardrails/description.js +415 -0
- package/dist/nodes/Guardrails/description.js.map +1 -0
- package/dist/nodes/Guardrails/guardrails.svg +11 -0
- package/dist/nodes/Guardrails/helpers/base.js +67 -0
- package/dist/nodes/Guardrails/helpers/base.js.map +1 -0
- package/dist/nodes/Guardrails/helpers/common.js +45 -0
- package/dist/nodes/Guardrails/helpers/common.js.map +1 -0
- package/dist/nodes/Guardrails/helpers/configureNodeInputs.js +84 -0
- package/dist/nodes/Guardrails/helpers/configureNodeInputs.js.map +1 -0
- package/dist/nodes/Guardrails/helpers/mappers.js +100 -0
- package/dist/nodes/Guardrails/helpers/mappers.js.map +1 -0
- package/dist/nodes/Guardrails/helpers/model.js +144 -0
- package/dist/nodes/Guardrails/helpers/model.js.map +1 -0
- package/dist/nodes/Guardrails/helpers/preflight.js +61 -0
- package/dist/nodes/Guardrails/helpers/preflight.js.map +1 -0
- package/dist/nodes/Guardrails/v1/GuardrailsV1.node.js +59 -0
- package/dist/nodes/Guardrails/v1/GuardrailsV1.node.js.map +1 -0
- package/dist/nodes/Guardrails/v2/GuardrailsV2.node.js +59 -0
- package/dist/nodes/Guardrails/v2/GuardrailsV2.node.js.map +1 -0
- package/dist/nodes/ModelSelector/ModelSelector.node.js +188 -0
- package/dist/nodes/ModelSelector/ModelSelector.node.js.map +1 -0
- package/dist/nodes/ModelSelector/helpers.js +85 -0
- package/dist/nodes/ModelSelector/helpers.js.map +1 -0
- package/dist/nodes/ToolExecutor/ToolExecutor.node.js +105 -0
- package/dist/nodes/ToolExecutor/ToolExecutor.node.js.map +1 -0
- package/dist/nodes/ToolExecutor/ToolExecutor.node.json +17 -0
- package/dist/nodes/ToolExecutor/utils/convertToSchema.js +64 -0
- package/dist/nodes/ToolExecutor/utils/convertToSchema.js.map +1 -0
- package/dist/nodes/ToolExecutor/utils/executeTool.js +39 -0
- package/dist/nodes/ToolExecutor/utils/executeTool.js.map +1 -0
- package/dist/nodes/agents/Agent/Agent.node.js +79 -0
- package/dist/nodes/agents/Agent/Agent.node.js.map +1 -0
- package/dist/nodes/agents/Agent/AgentTool.node.js +59 -0
- package/dist/nodes/agents/Agent/AgentTool.node.js.map +1 -0
- package/dist/nodes/agents/Agent/V1/AgentV1.node.js +449 -0
- package/dist/nodes/agents/Agent/V1/AgentV1.node.js.map +1 -0
- package/dist/nodes/agents/Agent/V2/AgentToolV2.node.js +104 -0
- package/dist/nodes/agents/Agent/V2/AgentToolV2.node.js.map +1 -0
- package/dist/nodes/agents/Agent/V2/AgentV2.node.js +153 -0
- package/dist/nodes/agents/Agent/V2/AgentV2.node.js.map +1 -0
- package/dist/nodes/agents/Agent/V2/utils.js +92 -0
- package/dist/nodes/agents/Agent/V2/utils.js.map +1 -0
- package/dist/nodes/agents/Agent/V3/AgentToolV3.node.js +99 -0
- package/dist/nodes/agents/Agent/V3/AgentToolV3.node.js.map +1 -0
- package/dist/nodes/agents/Agent/V3/AgentV3.node.js +141 -0
- package/dist/nodes/agents/Agent/V3/AgentV3.node.js.map +1 -0
- package/dist/nodes/agents/Agent/agents/ConversationalAgent/description.js +118 -0
- package/dist/nodes/agents/Agent/agents/ConversationalAgent/description.js.map +1 -0
- package/dist/nodes/agents/Agent/agents/ConversationalAgent/execute.js +107 -0
- package/dist/nodes/agents/Agent/agents/ConversationalAgent/execute.js.map +1 -0
- package/dist/nodes/agents/Agent/agents/ConversationalAgent/prompt.js +50 -0
- package/dist/nodes/agents/Agent/agents/ConversationalAgent/prompt.js.map +1 -0
- package/dist/nodes/agents/Agent/agents/OpenAiFunctionsAgent/description.js +108 -0
- package/dist/nodes/agents/Agent/agents/OpenAiFunctionsAgent/description.js.map +1 -0
- package/dist/nodes/agents/Agent/agents/OpenAiFunctionsAgent/execute.js +32 -0
- package/dist/nodes/agents/Agent/agents/OpenAiFunctionsAgent/execute.js.map +1 -0
- package/dist/nodes/agents/Agent/agents/OpenAiFunctionsAgent/prompt.js +29 -0
- package/dist/nodes/agents/Agent/agents/OpenAiFunctionsAgent/prompt.js.map +1 -0
- package/dist/nodes/agents/Agent/agents/PlanAndExecuteAgent/description.js +94 -0
- package/dist/nodes/agents/Agent/agents/PlanAndExecuteAgent/description.js.map +1 -0
- package/dist/nodes/agents/Agent/agents/PlanAndExecuteAgent/execute.js +97 -0
- package/dist/nodes/agents/Agent/agents/PlanAndExecuteAgent/execute.js.map +1 -0
- package/dist/nodes/agents/Agent/agents/PlanAndExecuteAgent/prompt.js +35 -0
- package/dist/nodes/agents/Agent/agents/PlanAndExecuteAgent/prompt.js.map +1 -0
- package/dist/nodes/agents/Agent/agents/ReActAgent/description.js +138 -0
- package/dist/nodes/agents/Agent/agents/ReActAgent/description.js.map +1 -0
- package/dist/nodes/agents/Agent/agents/ReActAgent/execute.js +108 -0
- package/dist/nodes/agents/Agent/agents/ReActAgent/execute.js.map +1 -0
- package/dist/nodes/agents/Agent/agents/ReActAgent/prompt.js +41 -0
- package/dist/nodes/agents/Agent/agents/ReActAgent/prompt.js.map +1 -0
- package/dist/nodes/agents/Agent/agents/SqlAgent/description.js +227 -0
- package/dist/nodes/agents/Agent/agents/SqlAgent/description.js.map +1 -0
- package/dist/nodes/agents/Agent/agents/SqlAgent/execute.js +137 -0
- package/dist/nodes/agents/Agent/agents/SqlAgent/execute.js.map +1 -0
- package/dist/nodes/agents/Agent/agents/SqlAgent/other/handlers/mysql.js +44 -0
- package/dist/nodes/agents/Agent/agents/SqlAgent/other/handlers/mysql.js.map +1 -0
- package/dist/nodes/agents/Agent/agents/SqlAgent/other/handlers/postgres.js +45 -0
- package/dist/nodes/agents/Agent/agents/SqlAgent/other/handlers/postgres.js.map +1 -0
- package/dist/nodes/agents/Agent/agents/SqlAgent/other/handlers/sqlite.js +72 -0
- package/dist/nodes/agents/Agent/agents/SqlAgent/other/handlers/sqlite.js.map +1 -0
- package/dist/nodes/agents/Agent/agents/SqlAgent/other/prompts.js +49 -0
- package/dist/nodes/agents/Agent/agents/SqlAgent/other/prompts.js.map +1 -0
- package/dist/nodes/agents/Agent/agents/ToolsAgent/V1/description.js +44 -0
- package/dist/nodes/agents/Agent/agents/ToolsAgent/V1/description.js.map +1 -0
- package/dist/nodes/agents/Agent/agents/ToolsAgent/V1/execute.js +129 -0
- package/dist/nodes/agents/Agent/agents/ToolsAgent/V1/execute.js.map +1 -0
- package/dist/nodes/agents/Agent/agents/ToolsAgent/V2/description.js +71 -0
- package/dist/nodes/agents/Agent/agents/ToolsAgent/V2/description.js.map +1 -0
- package/dist/nodes/agents/Agent/agents/ToolsAgent/V2/execute.js +295 -0
- package/dist/nodes/agents/Agent/agents/ToolsAgent/V2/execute.js.map +1 -0
- package/dist/nodes/agents/Agent/agents/ToolsAgent/V3/description.js +57 -0
- package/dist/nodes/agents/Agent/agents/ToolsAgent/V3/description.js.map +1 -0
- package/dist/nodes/agents/Agent/agents/ToolsAgent/V3/execute.js +64 -0
- package/dist/nodes/agents/Agent/agents/ToolsAgent/V3/execute.js.map +1 -0
- package/dist/nodes/agents/Agent/agents/ToolsAgent/V3/helpers/buildExecutionContext.js +74 -0
- package/dist/nodes/agents/Agent/agents/ToolsAgent/V3/helpers/buildExecutionContext.js.map +1 -0
- package/dist/nodes/agents/Agent/agents/ToolsAgent/V3/helpers/buildResponseMetadata.js +37 -0
- package/dist/nodes/agents/Agent/agents/ToolsAgent/V3/helpers/buildResponseMetadata.js.map +1 -0
- package/dist/nodes/agents/Agent/agents/ToolsAgent/V3/helpers/checkMaxIterations.js +40 -0
- package/dist/nodes/agents/Agent/agents/ToolsAgent/V3/helpers/checkMaxIterations.js.map +1 -0
- package/dist/nodes/agents/Agent/agents/ToolsAgent/V3/helpers/createAgentSequence.js +61 -0
- package/dist/nodes/agents/Agent/agents/ToolsAgent/V3/helpers/createAgentSequence.js.map +1 -0
- package/dist/nodes/agents/Agent/agents/ToolsAgent/V3/helpers/executeBatch.js +92 -0
- package/dist/nodes/agents/Agent/agents/ToolsAgent/V3/helpers/executeBatch.js.map +1 -0
- package/dist/nodes/agents/Agent/agents/ToolsAgent/V3/helpers/finalizeResult.js +58 -0
- package/dist/nodes/agents/Agent/agents/ToolsAgent/V3/helpers/finalizeResult.js.map +1 -0
- package/dist/nodes/agents/Agent/agents/ToolsAgent/V3/helpers/index.js +50 -0
- package/dist/nodes/agents/Agent/agents/ToolsAgent/V3/helpers/index.js.map +1 -0
- package/dist/nodes/agents/Agent/agents/ToolsAgent/V3/helpers/prepareItemContext.js +66 -0
- package/dist/nodes/agents/Agent/agents/ToolsAgent/V3/helpers/prepareItemContext.js.map +1 -0
- package/dist/nodes/agents/Agent/agents/ToolsAgent/V3/helpers/runAgent.js +91 -0
- package/dist/nodes/agents/Agent/agents/ToolsAgent/V3/helpers/runAgent.js.map +1 -0
- package/dist/nodes/agents/Agent/agents/ToolsAgent/V3/types.js +17 -0
- package/dist/nodes/agents/Agent/agents/ToolsAgent/V3/types.js.map +1 -0
- package/dist/nodes/agents/Agent/agents/ToolsAgent/common.js +265 -0
- package/dist/nodes/agents/Agent/agents/ToolsAgent/common.js.map +1 -0
- package/dist/nodes/agents/Agent/agents/ToolsAgent/options.js +62 -0
- package/dist/nodes/agents/Agent/agents/ToolsAgent/options.js.map +1 -0
- package/dist/nodes/agents/Agent/agents/ToolsAgent/prompt.js +29 -0
- package/dist/nodes/agents/Agent/agents/ToolsAgent/prompt.js.map +1 -0
- package/dist/nodes/agents/Agent/agents/utils.js +54 -0
- package/dist/nodes/agents/Agent/agents/utils.js.map +1 -0
- package/dist/nodes/agents/Agent/utils.js +92 -0
- package/dist/nodes/agents/Agent/utils.js.map +1 -0
- package/dist/nodes/agents/OpenAiAssistant/OpenAiAssistant.node.js +397 -0
- package/dist/nodes/agents/OpenAiAssistant/OpenAiAssistant.node.js.map +1 -0
- package/dist/nodes/agents/OpenAiAssistant/utils.js +61 -0
- package/dist/nodes/agents/OpenAiAssistant/utils.js.map +1 -0
- package/dist/nodes/chains/ChainLLM/ChainLlm.node.js +152 -0
- package/dist/nodes/chains/ChainLLM/ChainLlm.node.js.map +1 -0
- package/dist/nodes/chains/ChainLLM/methods/chainExecutor.js +148 -0
- package/dist/nodes/chains/ChainLLM/methods/chainExecutor.js.map +1 -0
- package/dist/nodes/chains/ChainLLM/methods/config.js +328 -0
- package/dist/nodes/chains/ChainLLM/methods/config.js.map +1 -0
- package/dist/nodes/chains/ChainLLM/methods/imageUtils.js +100 -0
- package/dist/nodes/chains/ChainLLM/methods/imageUtils.js.map +1 -0
- package/dist/nodes/chains/ChainLLM/methods/index.js +37 -0
- package/dist/nodes/chains/ChainLLM/methods/index.js.map +1 -0
- package/dist/nodes/chains/ChainLLM/methods/processItem.js +98 -0
- package/dist/nodes/chains/ChainLLM/methods/processItem.js.map +1 -0
- package/dist/nodes/chains/ChainLLM/methods/promptUtils.js +142 -0
- package/dist/nodes/chains/ChainLLM/methods/promptUtils.js.map +1 -0
- package/dist/nodes/chains/ChainLLM/methods/responseFormatter.js +53 -0
- package/dist/nodes/chains/ChainLLM/methods/responseFormatter.js.map +1 -0
- package/dist/nodes/chains/ChainLLM/methods/types.js +17 -0
- package/dist/nodes/chains/ChainLLM/methods/types.js.map +1 -0
- package/dist/nodes/chains/ChainRetrievalQA/ChainRetrievalQa.node.js +264 -0
- package/dist/nodes/chains/ChainRetrievalQA/ChainRetrievalQa.node.js.map +1 -0
- package/dist/nodes/chains/ChainRetrievalQA/constants.js +49 -0
- package/dist/nodes/chains/ChainRetrievalQA/constants.js.map +1 -0
- package/dist/nodes/chains/ChainRetrievalQA/processItem.js +91 -0
- package/dist/nodes/chains/ChainRetrievalQA/processItem.js.map +1 -0
- package/dist/nodes/chains/ChainSummarization/ChainSummarization.node.js +64 -0
- package/dist/nodes/chains/ChainSummarization/ChainSummarization.node.js.map +1 -0
- package/dist/nodes/chains/ChainSummarization/V1/ChainSummarizationV1.node.js +242 -0
- package/dist/nodes/chains/ChainSummarization/V1/ChainSummarizationV1.node.js.map +1 -0
- package/dist/nodes/chains/ChainSummarization/V2/ChainSummarizationV2.node.js +378 -0
- package/dist/nodes/chains/ChainSummarization/V2/ChainSummarizationV2.node.js.map +1 -0
- package/dist/nodes/chains/ChainSummarization/V2/processItem.js +95 -0
- package/dist/nodes/chains/ChainSummarization/V2/processItem.js.map +1 -0
- package/dist/nodes/chains/ChainSummarization/helpers.js +74 -0
- package/dist/nodes/chains/ChainSummarization/helpers.js.map +1 -0
- package/dist/nodes/chains/ChainSummarization/prompt.js +49 -0
- package/dist/nodes/chains/ChainSummarization/prompt.js.map +1 -0
- package/dist/nodes/chains/InformationExtractor/InformationExtractor.node.js +315 -0
- package/dist/nodes/chains/InformationExtractor/InformationExtractor.node.js.map +1 -0
- package/dist/nodes/chains/InformationExtractor/constants.js +31 -0
- package/dist/nodes/chains/InformationExtractor/constants.js.map +1 -0
- package/dist/nodes/chains/InformationExtractor/helpers.js +54 -0
- package/dist/nodes/chains/InformationExtractor/helpers.js.map +1 -0
- package/dist/nodes/chains/InformationExtractor/processItem.js +56 -0
- package/dist/nodes/chains/InformationExtractor/processItem.js.map +1 -0
- package/dist/nodes/chains/InformationExtractor/types.js +17 -0
- package/dist/nodes/chains/InformationExtractor/types.js.map +1 -0
- package/dist/nodes/chains/SentimentAnalysis/SentimentAnalysis.node.js +366 -0
- package/dist/nodes/chains/SentimentAnalysis/SentimentAnalysis.node.js.map +1 -0
- package/dist/nodes/chains/TextClassifier/TextClassifier.node.js +303 -0
- package/dist/nodes/chains/TextClassifier/TextClassifier.node.js.map +1 -0
- package/dist/nodes/chains/TextClassifier/constants.js +29 -0
- package/dist/nodes/chains/TextClassifier/constants.js.map +1 -0
- package/dist/nodes/chains/TextClassifier/processItem.js +65 -0
- package/dist/nodes/chains/TextClassifier/processItem.js.map +1 -0
- package/dist/nodes/code/Code.node.js +413 -0
- package/dist/nodes/code/Code.node.js.map +1 -0
- package/dist/nodes/document_loaders/DocumentBinaryInputLoader/DocumentBinaryInputLoader.node.js +203 -0
- package/dist/nodes/document_loaders/DocumentBinaryInputLoader/DocumentBinaryInputLoader.node.js.map +1 -0
- package/dist/nodes/document_loaders/DocumentBinaryInputLoader/binary.svg +1 -0
- package/dist/nodes/document_loaders/DocumentDefaultDataLoader/DocumentDefaultDataLoader.node.js +348 -0
- package/dist/nodes/document_loaders/DocumentDefaultDataLoader/DocumentDefaultDataLoader.node.js.map +1 -0
- package/dist/nodes/document_loaders/DocumentDefaultDataLoader/binary.svg +1 -0
- package/dist/nodes/document_loaders/DocumentGithubLoader/DocumentGithubLoader.node.js +182 -0
- package/dist/nodes/document_loaders/DocumentGithubLoader/DocumentGithubLoader.node.js.map +1 -0
- package/dist/nodes/document_loaders/DocumentGithubLoader/github.svg +1 -0
- package/dist/nodes/document_loaders/DocumentJSONInputLoader/DocumentJsonInputLoader.node.js +109 -0
- package/dist/nodes/document_loaders/DocumentJSONInputLoader/DocumentJsonInputLoader.node.js.map +1 -0
- package/dist/nodes/document_loaders/DocumentJSONInputLoader/json.svg +1 -0
- package/dist/nodes/embeddings/EmbeddingsAwsBedrock/EmbeddingsAwsBedrock.node.js +155 -0
- package/dist/nodes/embeddings/EmbeddingsAwsBedrock/EmbeddingsAwsBedrock.node.js.map +1 -0
- package/dist/nodes/embeddings/EmbeddingsAwsBedrock/bedrock.svg +1 -0
- package/dist/nodes/embeddings/EmbeddingsAzureOpenAi/EmbeddingsAzureOpenAi.node.js +171 -0
- package/dist/nodes/embeddings/EmbeddingsAzureOpenAi/EmbeddingsAzureOpenAi.node.js.map +1 -0
- package/dist/nodes/embeddings/EmbeddingsAzureOpenAi/azure.svg +1 -0
- package/dist/nodes/embeddings/EmbeddingsCohere/EmbeddingsCohere.node.js +131 -0
- package/dist/nodes/embeddings/EmbeddingsCohere/EmbeddingsCohere.node.js.map +1 -0
- package/dist/nodes/embeddings/EmbeddingsCohere/cohere.dark.svg +5 -0
- package/dist/nodes/embeddings/EmbeddingsCohere/cohere.svg +5 -0
- package/dist/nodes/embeddings/EmbeddingsGoogleGemini/EmbeddingsGoogleGemini.node.js +152 -0
- package/dist/nodes/embeddings/EmbeddingsGoogleGemini/EmbeddingsGoogleGemini.node.js.map +1 -0
- package/dist/nodes/embeddings/EmbeddingsGoogleGemini/google.svg +1 -0
- package/dist/nodes/embeddings/EmbeddingsGoogleVertex/EmbeddingsGoogleVertex.node.js +164 -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 +134 -0
- package/dist/nodes/embeddings/EmbeddingsHuggingFaceInference/EmbeddingsHuggingFaceInference.node.js.map +1 -0
- package/dist/nodes/embeddings/EmbeddingsHuggingFaceInference/huggingface.svg +1 -0
- package/dist/nodes/embeddings/EmbeddingsLemonade/EmbeddingsLemonade.node.js +87 -0
- package/dist/nodes/embeddings/EmbeddingsLemonade/EmbeddingsLemonade.node.js.map +1 -0
- package/dist/nodes/embeddings/EmbeddingsLemonade/lemonade.svg +53 -0
- package/dist/nodes/embeddings/EmbeddingsMistralCloud/EmbeddingsMistralCloud.node.js +170 -0
- package/dist/nodes/embeddings/EmbeddingsMistralCloud/EmbeddingsMistralCloud.node.js.map +1 -0
- package/dist/nodes/embeddings/EmbeddingsMistralCloud/mistral.svg +262 -0
- package/dist/nodes/embeddings/EmbeddingsOllama/EmbeddingsOllama.node.js +82 -0
- package/dist/nodes/embeddings/EmbeddingsOllama/EmbeddingsOllama.node.js.map +1 -0
- package/dist/nodes/embeddings/EmbeddingsOllama/ollama.svg +1 -0
- package/dist/nodes/embeddings/EmbeddingsOpenAI/EmbeddingsOpenAi.node.js +274 -0
- package/dist/nodes/embeddings/EmbeddingsOpenAI/EmbeddingsOpenAi.node.js.map +1 -0
- package/dist/nodes/embeddings/EmbeddingsOpenAI/openAiLight.dark.svg +3 -0
- package/dist/nodes/embeddings/EmbeddingsOpenAI/openAiLight.svg +3 -0
- package/dist/nodes/llms/LMChatAnthropic/LmChatAnthropic.node.js +344 -0
- package/dist/nodes/llms/LMChatAnthropic/LmChatAnthropic.node.js.map +1 -0
- package/dist/nodes/llms/LMChatAnthropic/anthropic.png +0 -0
- package/dist/nodes/llms/LMChatAnthropic/anthropic.svg +1 -0
- package/dist/nodes/llms/LMChatAnthropic/methods/searchModels.js +66 -0
- package/dist/nodes/llms/LMChatAnthropic/methods/searchModels.js.map +1 -0
- package/dist/nodes/llms/LMChatLemonade/LmChatLemonade.node.js +106 -0
- package/dist/nodes/llms/LMChatLemonade/LmChatLemonade.node.js.map +1 -0
- package/dist/nodes/llms/LMChatLemonade/lemonade.svg +53 -0
- package/dist/nodes/llms/LMChatOllama/LmChatOllama.node.js +92 -0
- package/dist/nodes/llms/LMChatOllama/LmChatOllama.node.js.map +1 -0
- package/dist/nodes/llms/LMChatOllama/ollama.svg +1 -0
- package/dist/nodes/llms/LMChatOpenAi/LmChatOpenAi.node.js +800 -0
- package/dist/nodes/llms/LMChatOpenAi/LmChatOpenAi.node.js.map +1 -0
- package/dist/nodes/llms/LMChatOpenAi/common.js +155 -0
- package/dist/nodes/llms/LMChatOpenAi/common.js.map +1 -0
- package/dist/nodes/llms/LMChatOpenAi/methods/loadModels.js +71 -0
- package/dist/nodes/llms/LMChatOpenAi/methods/loadModels.js.map +1 -0
- package/dist/nodes/llms/LMChatOpenAi/openAiLight.dark.svg +3 -0
- package/dist/nodes/llms/LMChatOpenAi/openAiLight.svg +3 -0
- package/dist/nodes/llms/LMChatOpenAi/types.js +17 -0
- package/dist/nodes/llms/LMChatOpenAi/types.js.map +1 -0
- package/dist/nodes/llms/LMCohere/LmCohere.node.js +122 -0
- package/dist/nodes/llms/LMCohere/LmCohere.node.js.map +1 -0
- package/dist/nodes/llms/LMCohere/cohere.dark.svg +5 -0
- package/dist/nodes/llms/LMCohere/cohere.svg +5 -0
- package/dist/nodes/llms/LMLemonade/LmLemonade.node.js +107 -0
- package/dist/nodes/llms/LMLemonade/LmLemonade.node.js.map +1 -0
- package/dist/nodes/llms/LMLemonade/description.js +147 -0
- package/dist/nodes/llms/LMLemonade/description.js.map +1 -0
- package/dist/nodes/llms/LMLemonade/lemonade.svg +53 -0
- package/dist/nodes/llms/LMOllama/LmOllama.node.js +91 -0
- package/dist/nodes/llms/LMOllama/LmOllama.node.js.map +1 -0
- package/dist/nodes/llms/LMOllama/description.js +242 -0
- package/dist/nodes/llms/LMOllama/description.js.map +1 -0
- package/dist/nodes/llms/LMOllama/ollama.svg +1 -0
- package/dist/nodes/llms/LMOpenAi/LmOpenAi.node.js +255 -0
- package/dist/nodes/llms/LMOpenAi/LmOpenAi.node.js.map +1 -0
- package/dist/nodes/llms/LMOpenAi/openAiLight.dark.svg +3 -0
- package/dist/nodes/llms/LMOpenAi/openAiLight.svg +3 -0
- package/dist/nodes/llms/LMOpenHuggingFaceInference/LmOpenHuggingFaceInference.node.js +162 -0
- package/dist/nodes/llms/LMOpenHuggingFaceInference/LmOpenHuggingFaceInference.node.js.map +1 -0
- package/dist/nodes/llms/LMOpenHuggingFaceInference/huggingface.svg +1 -0
- package/dist/nodes/llms/LmChatAwsBedrock/LmChatAwsBedrock.node.js +272 -0
- package/dist/nodes/llms/LmChatAwsBedrock/LmChatAwsBedrock.node.js.map +1 -0
- package/dist/nodes/llms/LmChatAwsBedrock/bedrock.svg +1 -0
- package/dist/nodes/llms/LmChatAzureOpenAi/LmChatAzureOpenAi.node.js +149 -0
- package/dist/nodes/llms/LmChatAzureOpenAi/LmChatAzureOpenAi.node.js.map +1 -0
- package/dist/nodes/llms/LmChatAzureOpenAi/azure.svg +1 -0
- package/dist/nodes/llms/LmChatAzureOpenAi/credentials/N8nOAuth2TokenCredential.js +75 -0
- package/dist/nodes/llms/LmChatAzureOpenAi/credentials/N8nOAuth2TokenCredential.js.map +1 -0
- package/dist/nodes/llms/LmChatAzureOpenAi/credentials/api-key.js +53 -0
- package/dist/nodes/llms/LmChatAzureOpenAi/credentials/api-key.js.map +1 -0
- package/dist/nodes/llms/LmChatAzureOpenAi/credentials/oauth2.js +54 -0
- package/dist/nodes/llms/LmChatAzureOpenAi/credentials/oauth2.js.map +1 -0
- package/dist/nodes/llms/LmChatAzureOpenAi/properties.js +155 -0
- package/dist/nodes/llms/LmChatAzureOpenAi/properties.js.map +1 -0
- package/dist/nodes/llms/LmChatAzureOpenAi/types.js +42 -0
- package/dist/nodes/llms/LmChatAzureOpenAi/types.js.map +1 -0
- package/dist/nodes/llms/LmChatCohere/LmChatCohere.node.js +181 -0
- package/dist/nodes/llms/LmChatCohere/LmChatCohere.node.js.map +1 -0
- package/dist/nodes/llms/LmChatCohere/cohere.dark.svg +5 -0
- package/dist/nodes/llms/LmChatCohere/cohere.svg +5 -0
- package/dist/nodes/llms/LmChatDeepSeek/LmChatDeepSeek.node.js +248 -0
- package/dist/nodes/llms/LmChatDeepSeek/LmChatDeepSeek.node.js.map +1 -0
- package/dist/nodes/llms/LmChatDeepSeek/deepseek.svg +1 -0
- package/dist/nodes/llms/LmChatGoogleGemini/LmChatGoogleGemini.node.js +171 -0
- package/dist/nodes/llms/LmChatGoogleGemini/LmChatGoogleGemini.node.js.map +1 -0
- package/dist/nodes/llms/LmChatGoogleGemini/google.svg +1 -0
- package/dist/nodes/llms/LmChatGoogleVertex/LmChatGoogleVertex.node.js +214 -0
- package/dist/nodes/llms/LmChatGoogleVertex/LmChatGoogleVertex.node.js.map +1 -0
- package/dist/nodes/llms/LmChatGoogleVertex/error-handling.js +40 -0
- package/dist/nodes/llms/LmChatGoogleVertex/error-handling.js.map +1 -0
- package/dist/nodes/llms/LmChatGoogleVertex/google.svg +1 -0
- package/dist/nodes/llms/LmChatGroq/LmChatGroq.node.js +166 -0
- package/dist/nodes/llms/LmChatGroq/LmChatGroq.node.js.map +1 -0
- package/dist/nodes/llms/LmChatGroq/groq.svg +20 -0
- package/dist/nodes/llms/LmChatMistralCloud/LmChatMistralCloud.node.js +222 -0
- package/dist/nodes/llms/LmChatMistralCloud/LmChatMistralCloud.node.js.map +1 -0
- package/dist/nodes/llms/LmChatMistralCloud/mistral.svg +262 -0
- package/dist/nodes/llms/LmChatOpenRouter/LmChatOpenRouter.node.js +248 -0
- package/dist/nodes/llms/LmChatOpenRouter/LmChatOpenRouter.node.js.map +1 -0
- package/dist/nodes/llms/LmChatOpenRouter/openrouter.dark.svg +1 -0
- package/dist/nodes/llms/LmChatOpenRouter/openrouter.svg +1 -0
- package/dist/nodes/llms/LmChatVercelAiGateway/LmChatVercelAiGateway.node.js +248 -0
- package/dist/nodes/llms/LmChatVercelAiGateway/LmChatVercelAiGateway.node.js.map +1 -0
- package/dist/nodes/llms/LmChatVercelAiGateway/vercel.dark.svg +1 -0
- package/dist/nodes/llms/LmChatVercelAiGateway/vercel.svg +6 -0
- package/dist/nodes/llms/LmChatXAiGrok/LmChatXAiGrok.node.js +251 -0
- package/dist/nodes/llms/LmChatXAiGrok/LmChatXAiGrok.node.js.map +1 -0
- package/dist/nodes/llms/LmChatXAiGrok/logo.dark.svg +1 -0
- package/dist/nodes/llms/LmChatXAiGrok/logo.svg +1 -0
- package/dist/nodes/llms/N8nLlmTracing.js +202 -0
- package/dist/nodes/llms/N8nLlmTracing.js.map +1 -0
- package/dist/nodes/llms/N8nNonEstimatingTracing.js +167 -0
- package/dist/nodes/llms/N8nNonEstimatingTracing.js.map +1 -0
- package/dist/nodes/llms/gemini-common/additional-options.js +126 -0
- package/dist/nodes/llms/gemini-common/additional-options.js.map +1 -0
- package/dist/nodes/llms/gemini-common/safety-options.js +79 -0
- package/dist/nodes/llms/gemini-common/safety-options.js.map +1 -0
- package/dist/nodes/llms/n8nDefaultFailedAttemptHandler.js +66 -0
- package/dist/nodes/llms/n8nDefaultFailedAttemptHandler.js.map +1 -0
- package/dist/nodes/llms/n8nLlmFailedAttemptHandler.js +50 -0
- package/dist/nodes/llms/n8nLlmFailedAttemptHandler.js.map +1 -0
- package/dist/nodes/mcp/McpClient/McpClient.node.js +335 -0
- package/dist/nodes/mcp/McpClient/McpClient.node.js.map +1 -0
- package/dist/nodes/mcp/McpClient/listSearch.js +58 -0
- package/dist/nodes/mcp/McpClient/listSearch.js.map +1 -0
- package/dist/nodes/mcp/McpClient/resourceMapping.js +61 -0
- package/dist/nodes/mcp/McpClient/resourceMapping.js.map +1 -0
- package/dist/nodes/mcp/McpClient/utils.js +248 -0
- package/dist/nodes/mcp/McpClient/utils.js.map +1 -0
- package/dist/nodes/mcp/McpClientTool/McpClientTool.node.js +402 -0
- package/dist/nodes/mcp/McpClientTool/McpClientTool.node.js.map +1 -0
- package/dist/nodes/mcp/McpClientTool/loadOptions.js +61 -0
- package/dist/nodes/mcp/McpClientTool/loadOptions.js.map +1 -0
- package/dist/nodes/mcp/McpClientTool/types.js +17 -0
- package/dist/nodes/mcp/McpClientTool/types.js.map +1 -0
- package/dist/nodes/mcp/McpClientTool/utils.js +120 -0
- package/dist/nodes/mcp/McpClientTool/utils.js.map +1 -0
- package/dist/nodes/mcp/McpTrigger/FlushingTransport.js +60 -0
- package/dist/nodes/mcp/McpTrigger/FlushingTransport.js.map +1 -0
- package/dist/nodes/mcp/McpTrigger/McpServer.js +255 -0
- package/dist/nodes/mcp/McpTrigger/McpServer.js.map +1 -0
- package/dist/nodes/mcp/McpTrigger/McpTrigger.node.js +199 -0
- package/dist/nodes/mcp/McpTrigger/McpTrigger.node.js.map +1 -0
- package/dist/nodes/mcp/mcp.dark.svg +7 -0
- package/dist/nodes/mcp/mcp.svg +7 -0
- package/dist/nodes/mcp/shared/descriptions.js +89 -0
- package/dist/nodes/mcp/shared/descriptions.js.map +1 -0
- package/dist/nodes/mcp/shared/types.js +17 -0
- package/dist/nodes/mcp/shared/types.js.map +1 -0
- package/dist/nodes/mcp/shared/utils.js +231 -0
- package/dist/nodes/mcp/shared/utils.js.map +1 -0
- package/dist/nodes/memory/MemoryBufferWindow/MemoryBufferWindow.node.js +163 -0
- package/dist/nodes/memory/MemoryBufferWindow/MemoryBufferWindow.node.js.map +1 -0
- package/dist/nodes/memory/MemoryChatRetriever/MemoryChatRetriever.node.js +116 -0
- package/dist/nodes/memory/MemoryChatRetriever/MemoryChatRetriever.node.js.map +1 -0
- package/dist/nodes/memory/MemoryManager/MemoryManager.node.js +387 -0
- package/dist/nodes/memory/MemoryManager/MemoryManager.node.js.map +1 -0
- package/dist/nodes/memory/MemoryMongoDbChat/MemoryMongoDbChat.node.js +156 -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 +134 -0
- package/dist/nodes/memory/MemoryMotorhead/MemoryMotorhead.node.js.map +1 -0
- package/dist/nodes/memory/MemoryPostgresChat/MemoryPostgresChat.node.js +123 -0
- package/dist/nodes/memory/MemoryPostgresChat/MemoryPostgresChat.node.js.map +1 -0
- package/dist/nodes/memory/MemoryPostgresChat/postgres.svg +1 -0
- package/dist/nodes/memory/MemoryRedisChat/MemoryRedisChat.node.js +179 -0
- package/dist/nodes/memory/MemoryRedisChat/MemoryRedisChat.node.js.map +1 -0
- package/dist/nodes/memory/MemoryRedisChat/redis.svg +1 -0
- package/dist/nodes/memory/MemoryXata/MemoryXata.node.js +160 -0
- package/dist/nodes/memory/MemoryXata/MemoryXata.node.js.map +1 -0
- package/dist/nodes/memory/MemoryXata/xata.svg +1 -0
- package/dist/nodes/memory/MemoryZep/MemoryZep.node.js +175 -0
- package/dist/nodes/memory/MemoryZep/MemoryZep.node.js.map +1 -0
- package/dist/nodes/memory/MemoryZep/zep.png +0 -0
- package/dist/nodes/memory/descriptions.js +85 -0
- package/dist/nodes/memory/descriptions.js.map +1 -0
- package/dist/nodes/output_parser/OutputParserAutofixing/OutputParserAutofixing.node.js +133 -0
- package/dist/nodes/output_parser/OutputParserAutofixing/OutputParserAutofixing.node.js.map +1 -0
- package/dist/nodes/output_parser/OutputParserAutofixing/prompt.js +44 -0
- package/dist/nodes/output_parser/OutputParserAutofixing/prompt.js.map +1 -0
- package/dist/nodes/output_parser/OutputParserItemList/OutputParserItemList.node.js +106 -0
- package/dist/nodes/output_parser/OutputParserItemList/OutputParserItemList.node.js.map +1 -0
- package/dist/nodes/output_parser/OutputParserStructured/OutputParserStructured.node.js +239 -0
- package/dist/nodes/output_parser/OutputParserStructured/OutputParserStructured.node.js.map +1 -0
- package/dist/nodes/output_parser/OutputParserStructured/prompt.js +44 -0
- package/dist/nodes/output_parser/OutputParserStructured/prompt.js.map +1 -0
- package/dist/nodes/rerankers/RerankerCohere/RerankerCohere.node.js +116 -0
- package/dist/nodes/rerankers/RerankerCohere/RerankerCohere.node.js.map +1 -0
- package/dist/nodes/rerankers/RerankerCohere/cohere.dark.svg +5 -0
- package/dist/nodes/rerankers/RerankerCohere/cohere.svg +5 -0
- package/dist/nodes/retrievers/RetrieverContextualCompression/RetrieverContextualCompression.node.js +102 -0
- package/dist/nodes/retrievers/RetrieverContextualCompression/RetrieverContextualCompression.node.js.map +1 -0
- package/dist/nodes/retrievers/RetrieverMultiQuery/RetrieverMultiQuery.node.js +121 -0
- package/dist/nodes/retrievers/RetrieverMultiQuery/RetrieverMultiQuery.node.js.map +1 -0
- package/dist/nodes/retrievers/RetrieverVectorStore/RetrieverVectorStore.node.js +100 -0
- package/dist/nodes/retrievers/RetrieverVectorStore/RetrieverVectorStore.node.js.map +1 -0
- package/dist/nodes/retrievers/RetrieverWorkflow/RetrieverWorkflow.node.js +429 -0
- package/dist/nodes/retrievers/RetrieverWorkflow/RetrieverWorkflow.node.js.map +1 -0
- package/dist/nodes/text_splitters/TextSplitterCharacterTextSplitter/TextSplitterCharacterTextSplitter.node.js +103 -0
- package/dist/nodes/text_splitters/TextSplitterCharacterTextSplitter/TextSplitterCharacterTextSplitter.node.js.map +1 -0
- package/dist/nodes/text_splitters/TextSplitterRecursiveCharacterTextSplitter/TextSplitterRecursiveCharacterTextSplitter.node.js +139 -0
- package/dist/nodes/text_splitters/TextSplitterRecursiveCharacterTextSplitter/TextSplitterRecursiveCharacterTextSplitter.node.js.map +1 -0
- package/dist/nodes/text_splitters/TextSplitterTokenSplitter/TextSplitterTokenSplitter.node.js +97 -0
- package/dist/nodes/text_splitters/TextSplitterTokenSplitter/TextSplitterTokenSplitter.node.js.map +1 -0
- package/dist/nodes/text_splitters/TextSplitterTokenSplitter/TokenTextSplitter.js +86 -0
- package/dist/nodes/text_splitters/TextSplitterTokenSplitter/TokenTextSplitter.js.map +1 -0
- package/dist/nodes/tools/ToolCalculator/ToolCalculator.node.js +94 -0
- package/dist/nodes/tools/ToolCalculator/ToolCalculator.node.js.map +1 -0
- package/dist/nodes/tools/ToolCode/ToolCode.node.js +325 -0
- package/dist/nodes/tools/ToolCode/ToolCode.node.js.map +1 -0
- package/dist/nodes/tools/ToolHttpRequest/ToolHttpRequest.node.js +396 -0
- package/dist/nodes/tools/ToolHttpRequest/ToolHttpRequest.node.js.map +1 -0
- package/dist/nodes/tools/ToolHttpRequest/descriptions.js +426 -0
- package/dist/nodes/tools/ToolHttpRequest/descriptions.js.map +1 -0
- package/dist/nodes/tools/ToolHttpRequest/httprequest.dark.svg +3 -0
- package/dist/nodes/tools/ToolHttpRequest/httprequest.svg +1 -0
- package/dist/nodes/tools/ToolHttpRequest/interfaces.js +17 -0
- package/dist/nodes/tools/ToolHttpRequest/interfaces.js.map +1 -0
- package/dist/nodes/tools/ToolHttpRequest/utils.js +651 -0
- package/dist/nodes/tools/ToolHttpRequest/utils.js.map +1 -0
- package/dist/nodes/tools/ToolSearXng/ToolSearXng.node.js +155 -0
- package/dist/nodes/tools/ToolSearXng/ToolSearXng.node.js.map +1 -0
- package/dist/nodes/tools/ToolSearXng/searXng.svg +1 -0
- package/dist/nodes/tools/ToolSerpApi/ToolSerpApi.node.js +163 -0
- package/dist/nodes/tools/ToolSerpApi/ToolSerpApi.node.js.map +1 -0
- package/dist/nodes/tools/ToolSerpApi/serpApi.svg +1 -0
- package/dist/nodes/tools/ToolThink/ToolThink.node.js +118 -0
- package/dist/nodes/tools/ToolThink/ToolThink.node.js.map +1 -0
- package/dist/nodes/tools/ToolVectorStore/ToolVectorStore.node.js +161 -0
- package/dist/nodes/tools/ToolVectorStore/ToolVectorStore.node.js.map +1 -0
- package/dist/nodes/tools/ToolWikipedia/ToolWikipedia.node.js +93 -0
- package/dist/nodes/tools/ToolWikipedia/ToolWikipedia.node.js.map +1 -0
- package/dist/nodes/tools/ToolWikipedia/wikipedia.svg +1 -0
- package/dist/nodes/tools/ToolWolframAlpha/ToolWolframAlpha.node.js +95 -0
- package/dist/nodes/tools/ToolWolframAlpha/ToolWolframAlpha.node.js.map +1 -0
- package/dist/nodes/tools/ToolWolframAlpha/wolfram-alpha.svg +1 -0
- package/dist/nodes/tools/ToolWorkflow/ToolWorkflow.node.js +68 -0
- package/dist/nodes/tools/ToolWorkflow/ToolWorkflow.node.js.map +1 -0
- package/dist/nodes/tools/ToolWorkflow/v1/ToolWorkflowV1.node.js +202 -0
- package/dist/nodes/tools/ToolWorkflow/v1/ToolWorkflowV1.node.js.map +1 -0
- package/dist/nodes/tools/ToolWorkflow/v1/versionDescription.js +347 -0
- package/dist/nodes/tools/ToolWorkflow/v1/versionDescription.js.map +1 -0
- package/dist/nodes/tools/ToolWorkflow/v2/ToolWorkflowV2.node.js +87 -0
- package/dist/nodes/tools/ToolWorkflow/v2/ToolWorkflowV2.node.js.map +1 -0
- package/dist/nodes/tools/ToolWorkflow/v2/methods/index.js +39 -0
- package/dist/nodes/tools/ToolWorkflow/v2/methods/index.js.map +1 -0
- package/dist/nodes/tools/ToolWorkflow/v2/methods/localResourceMapping.js +47 -0
- package/dist/nodes/tools/ToolWorkflow/v2/methods/localResourceMapping.js.map +1 -0
- package/dist/nodes/tools/ToolWorkflow/v2/utils/WorkflowToolService.js +308 -0
- package/dist/nodes/tools/ToolWorkflow/v2/utils/WorkflowToolService.js.map +1 -0
- package/dist/nodes/tools/ToolWorkflow/v2/versionDescription.js +172 -0
- package/dist/nodes/tools/ToolWorkflow/v2/versionDescription.js.map +1 -0
- package/dist/nodes/trigger/ChatTrigger/Chat.node.js +277 -0
- package/dist/nodes/trigger/ChatTrigger/Chat.node.js.map +1 -0
- package/dist/nodes/trigger/ChatTrigger/ChatTrigger.node.js +813 -0
- package/dist/nodes/trigger/ChatTrigger/ChatTrigger.node.js.map +1 -0
- package/dist/nodes/trigger/ChatTrigger/GenericFunctions.js +78 -0
- package/dist/nodes/trigger/ChatTrigger/GenericFunctions.js.map +1 -0
- package/dist/nodes/trigger/ChatTrigger/constants.js +149 -0
- package/dist/nodes/trigger/ChatTrigger/constants.js.map +1 -0
- package/dist/nodes/trigger/ChatTrigger/error.js +43 -0
- package/dist/nodes/trigger/ChatTrigger/error.js.map +1 -0
- package/dist/nodes/trigger/ChatTrigger/templates.js +175 -0
- package/dist/nodes/trigger/ChatTrigger/templates.js.map +1 -0
- package/dist/nodes/trigger/ChatTrigger/types.js +38 -0
- package/dist/nodes/trigger/ChatTrigger/types.js.map +1 -0
- package/dist/nodes/trigger/ChatTrigger/util.js +82 -0
- package/dist/nodes/trigger/ChatTrigger/util.js.map +1 -0
- package/dist/nodes/trigger/ManualChatTrigger/ManualChatTrigger.node.js +91 -0
- package/dist/nodes/trigger/ManualChatTrigger/ManualChatTrigger.node.js.map +1 -0
- package/dist/nodes/vector_store/VectorStoreAzureAISearch/VectorStoreAzureAISearch.node.js +388 -0
- package/dist/nodes/vector_store/VectorStoreAzureAISearch/VectorStoreAzureAISearch.node.js.map +1 -0
- package/dist/nodes/vector_store/VectorStoreAzureAISearch/azure-aisearch.svg +1 -0
- package/dist/nodes/vector_store/VectorStoreInMemory/VectorStoreInMemory.node.js +179 -0
- package/dist/nodes/vector_store/VectorStoreInMemory/VectorStoreInMemory.node.js.map +1 -0
- package/dist/nodes/vector_store/VectorStoreInMemoryInsert/VectorStoreInMemoryInsert.node.js +120 -0
- package/dist/nodes/vector_store/VectorStoreInMemoryInsert/VectorStoreInMemoryInsert.node.js.map +1 -0
- package/dist/nodes/vector_store/VectorStoreInMemoryLoad/VectorStoreInMemoryLoad.node.js +94 -0
- package/dist/nodes/vector_store/VectorStoreInMemoryLoad/VectorStoreInMemoryLoad.node.js.map +1 -0
- package/dist/nodes/vector_store/VectorStoreMilvus/VectorStoreMilvus.node.js +106 -0
- package/dist/nodes/vector_store/VectorStoreMilvus/VectorStoreMilvus.node.js.map +1 -0
- package/dist/nodes/vector_store/VectorStoreMilvus/milvus-icon-black.svg +1 -0
- package/dist/nodes/vector_store/VectorStoreMilvus/milvus-icon-white.svg +1 -0
- package/dist/nodes/vector_store/VectorStoreMongoDBAtlas/VectorStoreMongoDBAtlas.node.js +380 -0
- package/dist/nodes/vector_store/VectorStoreMongoDBAtlas/VectorStoreMongoDBAtlas.node.js.map +1 -0
- package/dist/nodes/vector_store/VectorStoreMongoDBAtlas/mongodb.dark.svg +3 -0
- package/dist/nodes/vector_store/VectorStoreMongoDBAtlas/mongodb.svg +3 -0
- package/dist/nodes/vector_store/VectorStorePGVector/VectorStorePGVector.node.js +283 -0
- package/dist/nodes/vector_store/VectorStorePGVector/VectorStorePGVector.node.js.map +1 -0
- package/dist/nodes/vector_store/VectorStorePGVector/postgres.svg +1 -0
- package/dist/nodes/vector_store/VectorStorePinecone/VectorStorePinecone.node.js +141 -0
- package/dist/nodes/vector_store/VectorStorePinecone/VectorStorePinecone.node.js.map +1 -0
- package/dist/nodes/vector_store/VectorStorePinecone/pinecone.dark.svg +21 -0
- package/dist/nodes/vector_store/VectorStorePinecone/pinecone.svg +21 -0
- package/dist/nodes/vector_store/VectorStorePineconeInsert/VectorStorePineconeInsert.node.js +143 -0
- package/dist/nodes/vector_store/VectorStorePineconeInsert/VectorStorePineconeInsert.node.js.map +1 -0
- package/dist/nodes/vector_store/VectorStorePineconeInsert/pinecone.svg +1 -0
- package/dist/nodes/vector_store/VectorStorePineconeLoad/VectorStorePineconeLoad.node.js +129 -0
- package/dist/nodes/vector_store/VectorStorePineconeLoad/VectorStorePineconeLoad.node.js.map +1 -0
- package/dist/nodes/vector_store/VectorStorePineconeLoad/pinecone.svg +1 -0
- package/dist/nodes/vector_store/VectorStoreQdrant/Qdrant.utils.js +54 -0
- package/dist/nodes/vector_store/VectorStoreQdrant/Qdrant.utils.js.map +1 -0
- package/dist/nodes/vector_store/VectorStoreQdrant/VectorStoreQdrant.node.js +172 -0
- package/dist/nodes/vector_store/VectorStoreQdrant/VectorStoreQdrant.node.js.map +1 -0
- package/dist/nodes/vector_store/VectorStoreQdrant/qdrant.svg +25 -0
- package/dist/nodes/vector_store/VectorStoreRedis/VectorStoreRedis.node.js +339 -0
- package/dist/nodes/vector_store/VectorStoreRedis/VectorStoreRedis.node.js.map +1 -0
- package/dist/nodes/vector_store/VectorStoreRedis/redis.dark.svg +37 -0
- package/dist/nodes/vector_store/VectorStoreRedis/redis.svg +37 -0
- package/dist/nodes/vector_store/VectorStoreSupabase/VectorStoreSupabase.node.js +129 -0
- package/dist/nodes/vector_store/VectorStoreSupabase/VectorStoreSupabase.node.js.map +1 -0
- package/dist/nodes/vector_store/VectorStoreSupabase/supabase.svg +1 -0
- package/dist/nodes/vector_store/VectorStoreSupabaseInsert/VectorStoreSupabaseInsert.node.js +133 -0
- package/dist/nodes/vector_store/VectorStoreSupabaseInsert/VectorStoreSupabaseInsert.node.js.map +1 -0
- package/dist/nodes/vector_store/VectorStoreSupabaseInsert/supabase.svg +1 -0
- package/dist/nodes/vector_store/VectorStoreSupabaseLoad/VectorStoreSupabaseLoad.node.js +125 -0
- package/dist/nodes/vector_store/VectorStoreSupabaseLoad/VectorStoreSupabaseLoad.node.js.map +1 -0
- package/dist/nodes/vector_store/VectorStoreSupabaseLoad/supabase.svg +1 -0
- package/dist/nodes/vector_store/VectorStoreWeaviate/VectorStoreWeaviate.node.js +242 -0
- package/dist/nodes/vector_store/VectorStoreWeaviate/VectorStoreWeaviate.node.js.map +1 -0
- package/dist/nodes/vector_store/VectorStoreWeaviate/Weaviate.utils.js +127 -0
- package/dist/nodes/vector_store/VectorStoreWeaviate/Weaviate.utils.js.map +1 -0
- package/dist/nodes/vector_store/VectorStoreWeaviate/weaviate.svg +2 -0
- package/dist/nodes/vector_store/VectorStoreZep/VectorStoreZep.node.js +151 -0
- package/dist/nodes/vector_store/VectorStoreZep/VectorStoreZep.node.js.map +1 -0
- package/dist/nodes/vector_store/VectorStoreZep/zep.png +0 -0
- package/dist/nodes/vector_store/VectorStoreZepInsert/VectorStoreZepInsert.node.js +152 -0
- package/dist/nodes/vector_store/VectorStoreZepInsert/VectorStoreZepInsert.node.js.map +1 -0
- package/dist/nodes/vector_store/VectorStoreZepInsert/zep.png +0 -0
- package/dist/nodes/vector_store/VectorStoreZepLoad/VectorStoreZepLoad.node.js +132 -0
- package/dist/nodes/vector_store/VectorStoreZepLoad/VectorStoreZepLoad.node.js.map +1 -0
- package/dist/nodes/vector_store/VectorStoreZepLoad/zep.png +0 -0
- package/dist/nodes/vector_store/shared/MemoryManager/MemoryCalculator.js +78 -0
- package/dist/nodes/vector_store/shared/MemoryManager/MemoryCalculator.js.map +1 -0
- package/dist/nodes/vector_store/shared/MemoryManager/MemoryVectorStoreManager.js +237 -0
- package/dist/nodes/vector_store/shared/MemoryManager/MemoryVectorStoreManager.js.map +1 -0
- package/dist/nodes/vector_store/shared/MemoryManager/StoreCleanupService.js +128 -0
- package/dist/nodes/vector_store/shared/MemoryManager/StoreCleanupService.js.map +1 -0
- package/dist/nodes/vector_store/shared/MemoryManager/config.js +62 -0
- package/dist/nodes/vector_store/shared/MemoryManager/config.js.map +1 -0
- package/dist/nodes/vector_store/shared/MemoryManager/types.js +17 -0
- package/dist/nodes/vector_store/shared/MemoryManager/types.js.map +1 -0
- package/dist/nodes/vector_store/shared/createVectorStoreNode/constants.js +71 -0
- package/dist/nodes/vector_store/shared/createVectorStoreNode/constants.js.map +1 -0
- package/dist/nodes/vector_store/shared/createVectorStoreNode/createVectorStoreNode.js +320 -0
- package/dist/nodes/vector_store/shared/createVectorStoreNode/createVectorStoreNode.js.map +1 -0
- package/dist/nodes/vector_store/shared/createVectorStoreNode/methods/listSearch.js +109 -0
- package/dist/nodes/vector_store/shared/createVectorStoreNode/methods/listSearch.js.map +1 -0
- package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/index.js +33 -0
- package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/index.js.map +1 -0
- package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/insertOperation.js +64 -0
- package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/insertOperation.js.map +1 -0
- package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/loadOperation.js +80 -0
- package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/loadOperation.js.map +1 -0
- package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/retrieveAsToolExecuteOperation.js +98 -0
- package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/retrieveAsToolExecuteOperation.js.map +1 -0
- package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/retrieveAsToolOperation.js +95 -0
- package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/retrieveAsToolOperation.js.map +1 -0
- package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/retrieveOperation.js +55 -0
- package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/retrieveOperation.js.map +1 -0
- package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/updateOperation.js +69 -0
- package/dist/nodes/vector_store/shared/createVectorStoreNode/operations/updateOperation.js.map +1 -0
- package/dist/nodes/vector_store/shared/createVectorStoreNode/types.js +17 -0
- package/dist/nodes/vector_store/shared/createVectorStoreNode/types.js.map +1 -0
- package/dist/nodes/vector_store/shared/createVectorStoreNode/utils.js +48 -0
- package/dist/nodes/vector_store/shared/createVectorStoreNode/utils.js.map +1 -0
- package/dist/nodes/vector_store/shared/descriptions.js +146 -0
- package/dist/nodes/vector_store/shared/descriptions.js.map +1 -0
- package/dist/nodes/vector_store/shared/processDocuments.js +65 -0
- package/dist/nodes/vector_store/shared/processDocuments.js.map +1 -0
- package/dist/nodes/vendors/Anthropic/Anthropic.node.js +42 -0
- package/dist/nodes/vendors/Anthropic/Anthropic.node.js.map +1 -0
- package/dist/nodes/vendors/Anthropic/actions/descriptions.js +52 -0
- package/dist/nodes/vendors/Anthropic/actions/descriptions.js.map +1 -0
- package/dist/nodes/vendors/Anthropic/actions/document/analyze.operation.js +125 -0
- package/dist/nodes/vendors/Anthropic/actions/document/analyze.operation.js.map +1 -0
- package/dist/nodes/vendors/Anthropic/actions/document/index.js +64 -0
- package/dist/nodes/vendors/Anthropic/actions/document/index.js.map +1 -0
- package/dist/nodes/vendors/Anthropic/actions/file/delete.operation.js +61 -0
- package/dist/nodes/vendors/Anthropic/actions/file/delete.operation.js.map +1 -0
- package/dist/nodes/vendors/Anthropic/actions/file/get.operation.js +63 -0
- package/dist/nodes/vendors/Anthropic/actions/file/get.operation.js.map +1 -0
- package/dist/nodes/vendors/Anthropic/actions/file/index.js +94 -0
- package/dist/nodes/vendors/Anthropic/actions/file/index.js.map +1 -0
- package/dist/nodes/vendors/Anthropic/actions/file/list.operation.js +108 -0
- package/dist/nodes/vendors/Anthropic/actions/file/list.operation.js.map +1 -0
- package/dist/nodes/vendors/Anthropic/actions/file/upload.operation.js +126 -0
- package/dist/nodes/vendors/Anthropic/actions/file/upload.operation.js.map +1 -0
- package/dist/nodes/vendors/Anthropic/actions/image/analyze.operation.js +125 -0
- package/dist/nodes/vendors/Anthropic/actions/image/analyze.operation.js.map +1 -0
- package/dist/nodes/vendors/Anthropic/actions/image/index.js +64 -0
- package/dist/nodes/vendors/Anthropic/actions/image/index.js.map +1 -0
- package/dist/nodes/vendors/Anthropic/actions/node.type.js +17 -0
- package/dist/nodes/vendors/Anthropic/actions/node.type.js.map +1 -0
- package/dist/nodes/vendors/Anthropic/actions/prompt/generate.operation.js +87 -0
- package/dist/nodes/vendors/Anthropic/actions/prompt/generate.operation.js.map +1 -0
- package/dist/nodes/vendors/Anthropic/actions/prompt/improve.operation.js +154 -0
- package/dist/nodes/vendors/Anthropic/actions/prompt/improve.operation.js.map +1 -0
- package/dist/nodes/vendors/Anthropic/actions/prompt/index.js +95 -0
- package/dist/nodes/vendors/Anthropic/actions/prompt/index.js.map +1 -0
- package/dist/nodes/vendors/Anthropic/actions/prompt/templatize.operation.js +146 -0
- package/dist/nodes/vendors/Anthropic/actions/prompt/templatize.operation.js.map +1 -0
- package/dist/nodes/vendors/Anthropic/actions/router.js +93 -0
- package/dist/nodes/vendors/Anthropic/actions/router.js.map +1 -0
- package/dist/nodes/vendors/Anthropic/actions/text/index.js +64 -0
- package/dist/nodes/vendors/Anthropic/actions/text/index.js.map +1 -0
- package/dist/nodes/vendors/Anthropic/actions/text/message.operation.js +540 -0
- package/dist/nodes/vendors/Anthropic/actions/text/message.operation.js.map +1 -0
- package/dist/nodes/vendors/Anthropic/actions/versionDescription.js +125 -0
- package/dist/nodes/vendors/Anthropic/actions/versionDescription.js.map +1 -0
- package/dist/nodes/vendors/Anthropic/anthropic.svg +1 -0
- package/dist/nodes/vendors/Anthropic/helpers/baseAnalyze.js +109 -0
- package/dist/nodes/vendors/Anthropic/helpers/baseAnalyze.js.map +1 -0
- package/dist/nodes/vendors/Anthropic/helpers/interfaces.js +17 -0
- package/dist/nodes/vendors/Anthropic/helpers/interfaces.js.map +1 -0
- package/dist/nodes/vendors/Anthropic/helpers/utils.js +84 -0
- package/dist/nodes/vendors/Anthropic/helpers/utils.js.map +1 -0
- package/dist/nodes/vendors/Anthropic/methods/index.js +39 -0
- package/dist/nodes/vendors/Anthropic/methods/index.js.map +1 -0
- package/dist/nodes/vendors/Anthropic/methods/listSearch.js +42 -0
- package/dist/nodes/vendors/Anthropic/methods/listSearch.js.map +1 -0
- package/dist/nodes/vendors/Anthropic/transport/index.js +61 -0
- package/dist/nodes/vendors/Anthropic/transport/index.js.map +1 -0
- package/dist/nodes/vendors/GoogleGemini/GoogleGemini.node.js +42 -0
- package/dist/nodes/vendors/GoogleGemini/GoogleGemini.node.js.map +1 -0
- package/dist/nodes/vendors/GoogleGemini/actions/audio/analyze.operation.js +125 -0
- package/dist/nodes/vendors/GoogleGemini/actions/audio/analyze.operation.js.map +1 -0
- package/dist/nodes/vendors/GoogleGemini/actions/audio/index.js +74 -0
- package/dist/nodes/vendors/GoogleGemini/actions/audio/index.js.map +1 -0
- package/dist/nodes/vendors/GoogleGemini/actions/audio/transcribe.operation.js +184 -0
- package/dist/nodes/vendors/GoogleGemini/actions/audio/transcribe.operation.js.map +1 -0
- package/dist/nodes/vendors/GoogleGemini/actions/descriptions.js +52 -0
- package/dist/nodes/vendors/GoogleGemini/actions/descriptions.js.map +1 -0
- package/dist/nodes/vendors/GoogleGemini/actions/document/analyze.operation.js +125 -0
- package/dist/nodes/vendors/GoogleGemini/actions/document/analyze.operation.js.map +1 -0
- package/dist/nodes/vendors/GoogleGemini/actions/document/index.js +64 -0
- package/dist/nodes/vendors/GoogleGemini/actions/document/index.js.map +1 -0
- package/dist/nodes/vendors/GoogleGemini/actions/file/index.js +64 -0
- package/dist/nodes/vendors/GoogleGemini/actions/file/index.js.map +1 -0
- package/dist/nodes/vendors/GoogleGemini/actions/file/upload.operation.js +102 -0
- package/dist/nodes/vendors/GoogleGemini/actions/file/upload.operation.js.map +1 -0
- package/dist/nodes/vendors/GoogleGemini/actions/fileSearch/createStore.operation.js +64 -0
- package/dist/nodes/vendors/GoogleGemini/actions/fileSearch/createStore.operation.js.map +1 -0
- package/dist/nodes/vendors/GoogleGemini/actions/fileSearch/deleteStore.operation.js +72 -0
- package/dist/nodes/vendors/GoogleGemini/actions/fileSearch/deleteStore.operation.js.map +1 -0
- package/dist/nodes/vendors/GoogleGemini/actions/fileSearch/index.js +94 -0
- package/dist/nodes/vendors/GoogleGemini/actions/fileSearch/index.js.map +1 -0
- package/dist/nodes/vendors/GoogleGemini/actions/fileSearch/listStores.operation.js +75 -0
- package/dist/nodes/vendors/GoogleGemini/actions/fileSearch/listStores.operation.js.map +1 -0
- package/dist/nodes/vendors/GoogleGemini/actions/fileSearch/uploadToStore.operation.js +129 -0
- package/dist/nodes/vendors/GoogleGemini/actions/fileSearch/uploadToStore.operation.js.map +1 -0
- package/dist/nodes/vendors/GoogleGemini/actions/image/analyze.operation.js +125 -0
- package/dist/nodes/vendors/GoogleGemini/actions/image/analyze.operation.js.map +1 -0
- package/dist/nodes/vendors/GoogleGemini/actions/image/edit.operation.js +211 -0
- package/dist/nodes/vendors/GoogleGemini/actions/image/edit.operation.js.map +1 -0
- package/dist/nodes/vendors/GoogleGemini/actions/image/generate.operation.js +168 -0
- package/dist/nodes/vendors/GoogleGemini/actions/image/generate.operation.js.map +1 -0
- package/dist/nodes/vendors/GoogleGemini/actions/image/index.js +84 -0
- package/dist/nodes/vendors/GoogleGemini/actions/image/index.js.map +1 -0
- package/dist/nodes/vendors/GoogleGemini/actions/node.type.js +17 -0
- package/dist/nodes/vendors/GoogleGemini/actions/node.type.js.map +1 -0
- package/dist/nodes/vendors/GoogleGemini/actions/router.js +101 -0
- package/dist/nodes/vendors/GoogleGemini/actions/router.js.map +1 -0
- package/dist/nodes/vendors/GoogleGemini/actions/text/index.js +64 -0
- package/dist/nodes/vendors/GoogleGemini/actions/text/index.js.map +1 -0
- package/dist/nodes/vendors/GoogleGemini/actions/text/message.operation.js +547 -0
- package/dist/nodes/vendors/GoogleGemini/actions/text/message.operation.js.map +1 -0
- package/dist/nodes/vendors/GoogleGemini/actions/versionDescription.js +138 -0
- package/dist/nodes/vendors/GoogleGemini/actions/versionDescription.js.map +1 -0
- package/dist/nodes/vendors/GoogleGemini/actions/video/analyze.operation.js +125 -0
- package/dist/nodes/vendors/GoogleGemini/actions/video/analyze.operation.js.map +1 -0
- package/dist/nodes/vendors/GoogleGemini/actions/video/download.operation.js +88 -0
- package/dist/nodes/vendors/GoogleGemini/actions/video/download.operation.js.map +1 -0
- package/dist/nodes/vendors/GoogleGemini/actions/video/generate.operation.js +228 -0
- package/dist/nodes/vendors/GoogleGemini/actions/video/generate.operation.js.map +1 -0
- package/dist/nodes/vendors/GoogleGemini/actions/video/index.js +84 -0
- package/dist/nodes/vendors/GoogleGemini/actions/video/index.js.map +1 -0
- package/dist/nodes/vendors/GoogleGemini/gemini.svg +1 -0
- package/dist/nodes/vendors/GoogleGemini/helpers/baseAnalyze.js +106 -0
- package/dist/nodes/vendors/GoogleGemini/helpers/baseAnalyze.js.map +1 -0
- package/dist/nodes/vendors/GoogleGemini/helpers/interfaces.js +29 -0
- package/dist/nodes/vendors/GoogleGemini/helpers/interfaces.js.map +1 -0
- package/dist/nodes/vendors/GoogleGemini/helpers/utils.js +272 -0
- package/dist/nodes/vendors/GoogleGemini/helpers/utils.js.map +1 -0
- package/dist/nodes/vendors/GoogleGemini/methods/index.js +39 -0
- package/dist/nodes/vendors/GoogleGemini/methods/index.js.map +1 -0
- package/dist/nodes/vendors/GoogleGemini/methods/listSearch.js +94 -0
- package/dist/nodes/vendors/GoogleGemini/methods/listSearch.js.map +1 -0
- package/dist/nodes/vendors/GoogleGemini/transport/index.js +48 -0
- package/dist/nodes/vendors/GoogleGemini/transport/index.js.map +1 -0
- package/dist/nodes/vendors/Ollama/Ollama.node.js +42 -0
- package/dist/nodes/vendors/Ollama/Ollama.node.js.map +1 -0
- package/dist/nodes/vendors/Ollama/actions/descriptions.js +52 -0
- package/dist/nodes/vendors/Ollama/actions/descriptions.js.map +1 -0
- package/dist/nodes/vendors/Ollama/actions/image/analyze.operation.js +412 -0
- package/dist/nodes/vendors/Ollama/actions/image/analyze.operation.js.map +1 -0
- package/dist/nodes/vendors/Ollama/actions/image/index.js +64 -0
- package/dist/nodes/vendors/Ollama/actions/image/index.js.map +1 -0
- package/dist/nodes/vendors/Ollama/actions/node.type.js +17 -0
- package/dist/nodes/vendors/Ollama/actions/node.type.js.map +1 -0
- package/dist/nodes/vendors/Ollama/actions/router.js +78 -0
- package/dist/nodes/vendors/Ollama/actions/router.js.map +1 -0
- package/dist/nodes/vendors/Ollama/actions/text/index.js +64 -0
- package/dist/nodes/vendors/Ollama/actions/text/index.js.map +1 -0
- package/dist/nodes/vendors/Ollama/actions/text/message.operation.js +440 -0
- package/dist/nodes/vendors/Ollama/actions/text/message.operation.js.map +1 -0
- package/dist/nodes/vendors/Ollama/actions/versionDescription.js +107 -0
- package/dist/nodes/vendors/Ollama/actions/versionDescription.js.map +1 -0
- package/dist/nodes/vendors/Ollama/helpers/index.js +17 -0
- package/dist/nodes/vendors/Ollama/helpers/index.js.map +1 -0
- package/dist/nodes/vendors/Ollama/helpers/interfaces.js +17 -0
- package/dist/nodes/vendors/Ollama/helpers/interfaces.js.map +1 -0
- package/dist/nodes/vendors/Ollama/methods/index.js +39 -0
- package/dist/nodes/vendors/Ollama/methods/index.js.map +1 -0
- package/dist/nodes/vendors/Ollama/methods/listSearch.js +39 -0
- package/dist/nodes/vendors/Ollama/methods/listSearch.js.map +1 -0
- package/dist/nodes/vendors/Ollama/ollama.svg +1 -0
- package/dist/nodes/vendors/Ollama/transport/index.js +56 -0
- package/dist/nodes/vendors/Ollama/transport/index.js.map +1 -0
- package/dist/nodes/vendors/OpenAi/OpenAi.node.js +83 -0
- package/dist/nodes/vendors/OpenAi/OpenAi.node.js.map +1 -0
- package/dist/nodes/vendors/OpenAi/helpers/binary-data.js +38 -0
- package/dist/nodes/vendors/OpenAi/helpers/binary-data.js.map +1 -0
- package/dist/nodes/vendors/OpenAi/helpers/constants.js +50 -0
- package/dist/nodes/vendors/OpenAi/helpers/constants.js.map +1 -0
- package/dist/nodes/vendors/OpenAi/helpers/description.js +75 -0
- package/dist/nodes/vendors/OpenAi/helpers/description.js.map +1 -0
- package/dist/nodes/vendors/OpenAi/helpers/error-handling.js +52 -0
- package/dist/nodes/vendors/OpenAi/helpers/error-handling.js.map +1 -0
- package/dist/nodes/vendors/OpenAi/helpers/interfaces.js +17 -0
- package/dist/nodes/vendors/OpenAi/helpers/interfaces.js.map +1 -0
- package/dist/nodes/vendors/OpenAi/helpers/modelFiltering.js +34 -0
- package/dist/nodes/vendors/OpenAi/helpers/modelFiltering.js.map +1 -0
- package/dist/nodes/vendors/OpenAi/helpers/polling.js +52 -0
- package/dist/nodes/vendors/OpenAi/helpers/polling.js.map +1 -0
- package/dist/nodes/vendors/OpenAi/helpers/utils.js +98 -0
- package/dist/nodes/vendors/OpenAi/helpers/utils.js.map +1 -0
- package/dist/nodes/vendors/OpenAi/methods/index.js +42 -0
- package/dist/nodes/vendors/OpenAi/methods/index.js.map +1 -0
- package/dist/nodes/vendors/OpenAi/methods/listSearch.js +138 -0
- package/dist/nodes/vendors/OpenAi/methods/listSearch.js.map +1 -0
- package/dist/nodes/vendors/OpenAi/methods/loadOptions.js +40 -0
- package/dist/nodes/vendors/OpenAi/methods/loadOptions.js.map +1 -0
- package/dist/nodes/vendors/OpenAi/openAi.dark.svg +3 -0
- package/dist/nodes/vendors/OpenAi/openAi.svg +3 -0
- package/dist/nodes/vendors/OpenAi/transport/index.js +55 -0
- package/dist/nodes/vendors/OpenAi/transport/index.js.map +1 -0
- package/dist/nodes/vendors/OpenAi/v1/OpenAiV1.node.js +110 -0
- package/dist/nodes/vendors/OpenAi/v1/OpenAiV1.node.js.map +1 -0
- package/dist/nodes/vendors/OpenAi/v1/actions/assistant/create.operation.js +284 -0
- package/dist/nodes/vendors/OpenAi/v1/actions/assistant/create.operation.js.map +1 -0
- package/dist/nodes/vendors/OpenAi/v1/actions/assistant/deleteAssistant.operation.js +55 -0
- package/dist/nodes/vendors/OpenAi/v1/actions/assistant/deleteAssistant.operation.js.map +1 -0
- package/dist/nodes/vendors/OpenAi/v1/actions/assistant/index.js +104 -0
- package/dist/nodes/vendors/OpenAi/v1/actions/assistant/index.js.map +1 -0
- package/dist/nodes/vendors/OpenAi/v1/actions/assistant/list.operation.js +92 -0
- package/dist/nodes/vendors/OpenAi/v1/actions/assistant/list.operation.js.map +1 -0
- package/dist/nodes/vendors/OpenAi/v1/actions/assistant/message.operation.js +278 -0
- package/dist/nodes/vendors/OpenAi/v1/actions/assistant/message.operation.js.map +1 -0
- package/dist/nodes/vendors/OpenAi/v1/actions/assistant/update.operation.js +230 -0
- package/dist/nodes/vendors/OpenAi/v1/actions/assistant/update.operation.js.map +1 -0
- package/dist/nodes/vendors/OpenAi/v1/actions/audio/generate.operation.js +197 -0
- package/dist/nodes/vendors/OpenAi/v1/actions/audio/generate.operation.js.map +1 -0
- package/dist/nodes/vendors/OpenAi/v1/actions/audio/index.js +96 -0
- package/dist/nodes/vendors/OpenAi/v1/actions/audio/index.js.map +1 -0
- package/dist/nodes/vendors/OpenAi/v1/actions/audio/transcribe.operation.js +121 -0
- package/dist/nodes/vendors/OpenAi/v1/actions/audio/transcribe.operation.js.map +1 -0
- package/dist/nodes/vendors/OpenAi/v1/actions/audio/translate.operation.js +111 -0
- package/dist/nodes/vendors/OpenAi/v1/actions/audio/translate.operation.js.map +1 -0
- package/dist/nodes/vendors/OpenAi/v1/actions/descriptions.js +79 -0
- package/dist/nodes/vendors/OpenAi/v1/actions/descriptions.js.map +1 -0
- package/dist/nodes/vendors/OpenAi/v1/actions/file/deleteFile.operation.js +84 -0
- package/dist/nodes/vendors/OpenAi/v1/actions/file/deleteFile.operation.js.map +1 -0
- package/dist/nodes/vendors/OpenAi/v1/actions/file/index.js +84 -0
- package/dist/nodes/vendors/OpenAi/v1/actions/file/index.js.map +1 -0
- package/dist/nodes/vendors/OpenAi/v1/actions/file/list.operation.js +83 -0
- package/dist/nodes/vendors/OpenAi/v1/actions/file/list.operation.js.map +1 -0
- package/dist/nodes/vendors/OpenAi/v1/actions/file/upload.operation.js +122 -0
- package/dist/nodes/vendors/OpenAi/v1/actions/file/upload.operation.js.map +1 -0
- package/dist/nodes/vendors/OpenAi/v1/actions/image/analyze.operation.js +221 -0
- package/dist/nodes/vendors/OpenAi/v1/actions/image/analyze.operation.js.map +1 -0
- package/dist/nodes/vendors/OpenAi/v1/actions/image/generate.operation.js +319 -0
- package/dist/nodes/vendors/OpenAi/v1/actions/image/generate.operation.js.map +1 -0
- package/dist/nodes/vendors/OpenAi/v1/actions/image/index.js +74 -0
- package/dist/nodes/vendors/OpenAi/v1/actions/image/index.js.map +1 -0
- package/dist/nodes/vendors/OpenAi/v1/actions/node.type.js +17 -0
- package/dist/nodes/vendors/OpenAi/v1/actions/node.type.js.map +1 -0
- package/dist/nodes/vendors/OpenAi/v1/actions/router.js +107 -0
- package/dist/nodes/vendors/OpenAi/v1/actions/router.js.map +1 -0
- package/dist/nodes/vendors/OpenAi/v1/actions/text/classify.operation.js +102 -0
- package/dist/nodes/vendors/OpenAi/v1/actions/text/classify.operation.js.map +1 -0
- package/dist/nodes/vendors/OpenAi/v1/actions/text/index.js +75 -0
- package/dist/nodes/vendors/OpenAi/v1/actions/text/index.js.map +1 -0
- package/dist/nodes/vendors/OpenAi/v1/actions/text/message.operation.js +352 -0
- package/dist/nodes/vendors/OpenAi/v1/actions/text/message.operation.js.map +1 -0
- package/dist/nodes/vendors/OpenAi/v2/OpenAiV2.node.js +116 -0
- package/dist/nodes/vendors/OpenAi/v2/OpenAiV2.node.js.map +1 -0
- package/dist/nodes/vendors/OpenAi/v2/actions/audio/generate.operation.js +197 -0
- package/dist/nodes/vendors/OpenAi/v2/actions/audio/generate.operation.js.map +1 -0
- package/dist/nodes/vendors/OpenAi/v2/actions/audio/index.js +96 -0
- package/dist/nodes/vendors/OpenAi/v2/actions/audio/index.js.map +1 -0
- package/dist/nodes/vendors/OpenAi/v2/actions/audio/transcribe.operation.js +121 -0
- package/dist/nodes/vendors/OpenAi/v2/actions/audio/transcribe.operation.js.map +1 -0
- package/dist/nodes/vendors/OpenAi/v2/actions/audio/translate.operation.js +111 -0
- package/dist/nodes/vendors/OpenAi/v2/actions/audio/translate.operation.js.map +1 -0
- package/dist/nodes/vendors/OpenAi/v2/actions/conversation/create.operation.js +120 -0
- package/dist/nodes/vendors/OpenAi/v2/actions/conversation/create.operation.js.map +1 -0
- package/dist/nodes/vendors/OpenAi/v2/actions/conversation/get.operation.js +60 -0
- package/dist/nodes/vendors/OpenAi/v2/actions/conversation/get.operation.js.map +1 -0
- package/dist/nodes/vendors/OpenAi/v2/actions/conversation/index.js +94 -0
- package/dist/nodes/vendors/OpenAi/v2/actions/conversation/index.js.map +1 -0
- package/dist/nodes/vendors/OpenAi/v2/actions/conversation/remove.operation.js +60 -0
- package/dist/nodes/vendors/OpenAi/v2/actions/conversation/remove.operation.js.map +1 -0
- package/dist/nodes/vendors/OpenAi/v2/actions/conversation/update.operation.js +75 -0
- package/dist/nodes/vendors/OpenAi/v2/actions/conversation/update.operation.js.map +1 -0
- package/dist/nodes/vendors/OpenAi/v2/actions/descriptions.js +279 -0
- package/dist/nodes/vendors/OpenAi/v2/actions/descriptions.js.map +1 -0
- package/dist/nodes/vendors/OpenAi/v2/actions/file/deleteFile.operation.js +84 -0
- package/dist/nodes/vendors/OpenAi/v2/actions/file/deleteFile.operation.js.map +1 -0
- package/dist/nodes/vendors/OpenAi/v2/actions/file/index.js +84 -0
- package/dist/nodes/vendors/OpenAi/v2/actions/file/index.js.map +1 -0
- package/dist/nodes/vendors/OpenAi/v2/actions/file/list.operation.js +92 -0
- package/dist/nodes/vendors/OpenAi/v2/actions/file/list.operation.js.map +1 -0
- package/dist/nodes/vendors/OpenAi/v2/actions/file/upload.operation.js +130 -0
- package/dist/nodes/vendors/OpenAi/v2/actions/file/upload.operation.js.map +1 -0
- package/dist/nodes/vendors/OpenAi/v2/actions/image/analyze.operation.js +211 -0
- package/dist/nodes/vendors/OpenAi/v2/actions/image/analyze.operation.js.map +1 -0
- package/dist/nodes/vendors/OpenAi/v2/actions/image/edit.operation.js +464 -0
- package/dist/nodes/vendors/OpenAi/v2/actions/image/edit.operation.js.map +1 -0
- package/dist/nodes/vendors/OpenAi/v2/actions/image/generate.operation.js +319 -0
- package/dist/nodes/vendors/OpenAi/v2/actions/image/generate.operation.js.map +1 -0
- package/dist/nodes/vendors/OpenAi/v2/actions/image/index.js +84 -0
- package/dist/nodes/vendors/OpenAi/v2/actions/image/index.js.map +1 -0
- package/dist/nodes/vendors/OpenAi/v2/actions/node.type.js +17 -0
- package/dist/nodes/vendors/OpenAi/v2/actions/node.type.js.map +1 -0
- package/dist/nodes/vendors/OpenAi/v2/actions/router.js +111 -0
- package/dist/nodes/vendors/OpenAi/v2/actions/router.js.map +1 -0
- package/dist/nodes/vendors/OpenAi/v2/actions/text/classify.operation.js +111 -0
- package/dist/nodes/vendors/OpenAi/v2/actions/text/classify.operation.js.map +1 -0
- package/dist/nodes/vendors/OpenAi/v2/actions/text/helpers/responses.js +253 -0
- package/dist/nodes/vendors/OpenAi/v2/actions/text/helpers/responses.js.map +1 -0
- package/dist/nodes/vendors/OpenAi/v2/actions/text/index.js +75 -0
- package/dist/nodes/vendors/OpenAi/v2/actions/text/index.js.map +1 -0
- package/dist/nodes/vendors/OpenAi/v2/actions/text/response.operation.js +701 -0
- package/dist/nodes/vendors/OpenAi/v2/actions/text/response.operation.js.map +1 -0
- package/dist/nodes/vendors/OpenAi/v2/actions/video/generate.operation.js +199 -0
- package/dist/nodes/vendors/OpenAi/v2/actions/video/generate.operation.js.map +1 -0
- package/dist/nodes/vendors/OpenAi/v2/actions/video/index.js +64 -0
- package/dist/nodes/vendors/OpenAi/v2/actions/video/index.js.map +1 -0
- package/dist/types/credentials.json +28 -0
- package/dist/types/nodes.json +115 -0
- package/dist/types/types.js +17 -0
- package/dist/types/types.js.map +1 -0
- package/dist/types/zod.types.js +17 -0
- package/dist/types/zod.types.js.map +1 -0
- package/dist/utils/N8nBinaryLoader.js +203 -0
- package/dist/utils/N8nBinaryLoader.js.map +1 -0
- package/dist/utils/N8nJsonLoader.js +89 -0
- package/dist/utils/N8nJsonLoader.js.map +1 -0
- package/dist/utils/N8nTool.js +106 -0
- package/dist/utils/N8nTool.js.map +1 -0
- package/dist/utils/agent-execution/buildSteps.js +153 -0
- package/dist/utils/agent-execution/buildSteps.js.map +1 -0
- package/dist/utils/agent-execution/createEngineRequests.js +88 -0
- package/dist/utils/agent-execution/createEngineRequests.js.map +1 -0
- package/dist/utils/agent-execution/index.js +42 -0
- package/dist/utils/agent-execution/index.js.map +1 -0
- package/dist/utils/agent-execution/memoryManagement.js +67 -0
- package/dist/utils/agent-execution/memoryManagement.js.map +1 -0
- package/dist/utils/agent-execution/processEventStream.js +82 -0
- package/dist/utils/agent-execution/processEventStream.js.map +1 -0
- package/dist/utils/agent-execution/types.js +41 -0
- package/dist/utils/agent-execution/types.js.map +1 -0
- package/dist/utils/descriptions.js +212 -0
- package/dist/utils/descriptions.js.map +1 -0
- package/dist/utils/embeddings/embeddingInputValidation.js +55 -0
- package/dist/utils/embeddings/embeddingInputValidation.js.map +1 -0
- package/dist/utils/fromAIToolFactory.js +61 -0
- package/dist/utils/fromAIToolFactory.js.map +1 -0
- package/dist/utils/helpers.js +254 -0
- package/dist/utils/helpers.js.map +1 -0
- package/dist/utils/httpProxyAgent.js +69 -0
- package/dist/utils/httpProxyAgent.js.map +1 -0
- package/dist/utils/logWrapper.js +376 -0
- package/dist/utils/logWrapper.js.map +1 -0
- package/dist/utils/output_parsers/N8nItemListOutputParser.js +64 -0
- package/dist/utils/output_parsers/N8nItemListOutputParser.js.map +1 -0
- package/dist/utils/output_parsers/N8nOutputFixingParser.js +99 -0
- package/dist/utils/output_parsers/N8nOutputFixingParser.js.map +1 -0
- package/dist/utils/output_parsers/N8nOutputParser.js +48 -0
- package/dist/utils/output_parsers/N8nOutputParser.js.map +1 -0
- package/dist/utils/output_parsers/N8nStructuredOutputParser.js +127 -0
- package/dist/utils/output_parsers/N8nStructuredOutputParser.js.map +1 -0
- package/dist/utils/output_parsers/prompt.js +48 -0
- package/dist/utils/output_parsers/prompt.js.map +1 -0
- package/dist/utils/schemaParsing.js +75 -0
- package/dist/utils/schemaParsing.js.map +1 -0
- package/dist/utils/sharedFields.js +176 -0
- package/dist/utils/sharedFields.js.map +1 -0
- package/dist/utils/tokenizer/cl100k_base.json +1 -0
- package/dist/utils/tokenizer/o200k_base.json +1 -0
- package/dist/utils/tokenizer/tiktoken.js +65 -0
- package/dist/utils/tokenizer/tiktoken.js.map +1 -0
- package/dist/utils/tokenizer/token-estimator.js +119 -0
- package/dist/utils/tokenizer/token-estimator.js.map +1 -0
- package/dist/utils/tracing.js +41 -0
- package/dist/utils/tracing.js.map +1 -0
- package/index.js +0 -0
- package/package.json +255 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../nodes/memory/MemoryManager/MemoryManager.node.ts"],"sourcesContent":["import type { BaseChatMemory } from '@langchain/community/memory/chat_memory';\nimport type { MessageContent, BaseMessage } from '@langchain/core/messages';\nimport { AIMessage, SystemMessage, HumanMessage } from '@langchain/core/messages';\nimport { NodeConnectionTypes } from 'n8n-workflow';\nimport type {\n\tIDataObject,\n\tIExecuteFunctions,\n\tINodeExecutionData,\n\tINodeType,\n\tINodeTypeDescription,\n} from 'n8n-workflow';\n\ntype MessageRole = 'ai' | 'system' | 'user';\ninterface MessageRecord {\n\ttype: MessageRole;\n\tmessage: string;\n\thideFromUI: boolean;\n}\n\nexport function simplifyMessages(messages: BaseMessage[]): Array<Record<string, MessageContent>> {\n\tif (messages.length === 0) return [];\n\n\tconst result: Array<Record<string, MessageContent>> = [];\n\tlet index = 0;\n\n\twhile (index < messages.length) {\n\t\tconst currentGroup: Record<string, MessageContent> = {};\n\n\t\tdo {\n\t\t\tconst message = messages[index];\n\t\t\tconst messageType = message.getType();\n\n\t\t\tif (messageType in currentGroup) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcurrentGroup[messageType] = message.content;\n\t\t\tindex++;\n\t\t} while (index < messages.length);\n\n\t\tresult.push(currentGroup);\n\t}\n\n\treturn result;\n}\n\nconst prepareOutputSetup = (ctx: IExecuteFunctions, version: number, memory: BaseChatMemory) => {\n\tif (version === 1) {\n\t\t//legacy behavior of insert and delete for version 1\n\t\treturn async (i: number) => {\n\t\t\tconst messages = await memory.chatHistory.getMessages();\n\n\t\t\tconst serializedMessages = messages?.map((message) => message.toJSON()) ?? [];\n\n\t\t\tconst executionData = ctx.helpers.constructExecutionMetaData(\n\t\t\t\tctx.helpers.returnJsonArray(serializedMessages as unknown as IDataObject[]),\n\t\t\t\t{ itemData: { item: i } },\n\t\t\t);\n\n\t\t\treturn executionData;\n\t\t};\n\t}\n\treturn async (i: number) => {\n\t\treturn [\n\t\t\t{\n\t\t\t\tjson: { success: true },\n\t\t\t\tpairedItem: { item: i },\n\t\t\t},\n\t\t];\n\t};\n};\n\nexport class MemoryManager implements INodeType {\n\tdescription: INodeTypeDescription = {\n\t\tdisplayName: 'Chat Memory Manager',\n\t\tname: 'memoryManager',\n\t\ticon: 'fa:database',\n\t\ticonColor: 'black',\n\t\tgroup: ['transform'],\n\t\tversion: [1, 1.1],\n\t\tdescription: 'Manage chat messages memory and use it in the workflow',\n\t\tdefaults: {\n\t\t\tname: 'Chat Memory Manager',\n\t\t},\n\t\tcodex: {\n\t\t\tcategories: ['AI'],\n\t\t\tsubcategories: {\n\t\t\t\tAI: ['Miscellaneous', 'Root Nodes'],\n\t\t\t},\n\t\t\tresources: {\n\t\t\t\tprimaryDocumentation: [\n\t\t\t\t\t{\n\t\t\t\t\t\turl: 'https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.memorymanager/',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t},\n\t\t},\n\n\t\tinputs: [\n\t\t\t{\n\t\t\t\tdisplayName: '',\n\t\t\t\ttype: NodeConnectionTypes.Main,\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Memory',\n\t\t\t\ttype: NodeConnectionTypes.AiMemory,\n\t\t\t\trequired: true,\n\t\t\t\tmaxConnections: 1,\n\t\t\t},\n\t\t],\n\n\t\toutputs: [\n\t\t\t{\n\t\t\t\tdisplayName: '',\n\t\t\t\ttype: NodeConnectionTypes.Main,\n\t\t\t},\n\t\t],\n\t\tproperties: [\n\t\t\t{\n\t\t\t\tdisplayName: 'Operation Mode',\n\t\t\t\tname: 'mode',\n\t\t\t\ttype: 'options',\n\t\t\t\tnoDataExpression: true,\n\t\t\t\tdefault: 'load',\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Get Many Messages',\n\t\t\t\t\t\tdescription: 'Retrieve chat messages from connected memory',\n\t\t\t\t\t\tvalue: 'load',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Insert Messages',\n\t\t\t\t\t\tdescription: 'Insert chat messages into connected memory',\n\t\t\t\t\t\tvalue: 'insert',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Delete Messages',\n\t\t\t\t\t\tdescription: 'Delete chat messages from connected memory',\n\t\t\t\t\t\tvalue: 'delete',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Insert Mode',\n\t\t\t\tname: 'insertMode',\n\t\t\t\ttype: 'options',\n\t\t\t\tdescription: 'Choose how new messages are inserted into the memory',\n\t\t\t\tnoDataExpression: true,\n\t\t\t\tdefault: 'insert',\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Insert Messages',\n\t\t\t\t\t\tvalue: 'insert',\n\t\t\t\t\t\tdescription: 'Add messages alongside existing ones',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Override All Messages',\n\t\t\t\t\t\tvalue: 'override',\n\t\t\t\t\t\tdescription: 'Replace the current memory with new messages',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\tmode: ['insert'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Delete Mode',\n\t\t\t\tname: 'deleteMode',\n\t\t\t\ttype: 'options',\n\t\t\t\tdescription: 'How messages are deleted from memory',\n\t\t\t\tnoDataExpression: true,\n\t\t\t\tdefault: 'lastN',\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Last N',\n\t\t\t\t\t\tvalue: 'lastN',\n\t\t\t\t\t\tdescription: 'Delete the last N messages',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'All Messages',\n\t\t\t\t\t\tvalue: 'all',\n\t\t\t\t\t\tdescription: 'Clear all messages from memory',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\tmode: ['delete'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Chat Messages',\n\t\t\t\tname: 'messages',\n\t\t\t\tdescription: 'Chat messages to insert into memory',\n\t\t\t\ttype: 'fixedCollection',\n\t\t\t\ttypeOptions: {\n\t\t\t\t\tmultipleValues: true,\n\t\t\t\t},\n\t\t\t\tdefault: {},\n\t\t\t\tplaceholder: 'Add message',\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'messageValues',\n\t\t\t\t\t\tdisplayName: 'Message',\n\t\t\t\t\t\tvalues: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tdisplayName: 'Type Name or ID',\n\t\t\t\t\t\t\t\tname: 'type',\n\t\t\t\t\t\t\t\ttype: 'options',\n\t\t\t\t\t\t\t\toptions: [\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tname: 'AI',\n\t\t\t\t\t\t\t\t\t\tvalue: 'ai',\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tname: 'System',\n\t\t\t\t\t\t\t\t\t\tvalue: 'system',\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tname: 'User',\n\t\t\t\t\t\t\t\t\t\tvalue: 'user',\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\tdefault: 'system',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tdisplayName: 'Message',\n\t\t\t\t\t\t\t\tname: 'message',\n\t\t\t\t\t\t\t\ttype: 'string',\n\t\t\t\t\t\t\t\trequired: true,\n\t\t\t\t\t\t\t\tdefault: '',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tdisplayName: 'Hide Message in Chat',\n\t\t\t\t\t\t\t\tname: 'hideFromUI',\n\t\t\t\t\t\t\t\ttype: 'boolean',\n\t\t\t\t\t\t\t\trequired: true,\n\t\t\t\t\t\t\t\tdefault: false,\n\t\t\t\t\t\t\t\tdescription: 'Whether to hide the message from the chat UI',\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],\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\tmode: ['insert'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Messages Count',\n\t\t\t\tname: 'lastMessagesCount',\n\t\t\t\ttype: 'number',\n\t\t\t\tdescription: 'The amount of last messages to delete',\n\t\t\t\tdefault: 2,\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\tmode: ['delete'],\n\t\t\t\t\t\tdeleteMode: ['lastN'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Simplify Output',\n\t\t\t\tname: 'simplifyOutput',\n\t\t\t\ttype: 'boolean',\n\t\t\t\tdescription: 'Whether to simplify the output to only include the sender and the text',\n\t\t\t\tdefault: true,\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\tmode: ['load'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Options',\n\t\t\t\tname: 'options',\n\t\t\t\tplaceholder: 'Add Option',\n\t\t\t\ttype: 'collection',\n\t\t\t\tdefault: {},\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Group Messages',\n\t\t\t\t\t\tname: 'groupMessages',\n\t\t\t\t\t\ttype: 'boolean',\n\t\t\t\t\t\tdefault: true,\n\t\t\t\t\t\tdescription:\n\t\t\t\t\t\t\t'Whether to group messages into a single item or return each message as a separate item',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\tmode: ['load'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t],\n\t};\n\n\tasync execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {\n\t\tconst nodeVersion = this.getNode().typeVersion;\n\t\tconst items = this.getInputData();\n\t\tconst mode = this.getNodeParameter('mode', 0, 'load') as 'load' | 'insert' | 'delete';\n\t\tconst memory = (await this.getInputConnectionData(\n\t\t\tNodeConnectionTypes.AiMemory,\n\t\t\t0,\n\t\t)) as BaseChatMemory;\n\n\t\tconst prepareOutput = prepareOutputSetup(this, nodeVersion, memory);\n\n\t\tconst returnData: INodeExecutionData[] = [];\n\n\t\tfor (let i = 0; i < items.length; i++) {\n\t\t\tconst messages = await memory.chatHistory.getMessages();\n\n\t\t\tif (mode === 'delete') {\n\t\t\t\tconst deleteMode = this.getNodeParameter('deleteMode', i) as 'lastN' | 'all';\n\n\t\t\t\tif (deleteMode === 'lastN') {\n\t\t\t\t\tconst lastMessagesCount = this.getNodeParameter('lastMessagesCount', i) as number;\n\t\t\t\t\tif (messages.length >= lastMessagesCount) {\n\t\t\t\t\t\tconst newMessages = messages.slice(0, messages.length - lastMessagesCount);\n\n\t\t\t\t\t\tawait memory.chatHistory.clear();\n\t\t\t\t\t\tfor (const message of newMessages) {\n\t\t\t\t\t\t\tawait memory.chatHistory.addMessage(message);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tawait memory.chatHistory.clear();\n\t\t\t\t}\n\n\t\t\t\treturnData.push(...(await prepareOutput(i)));\n\t\t\t}\n\n\t\t\tif (mode === 'insert') {\n\t\t\t\tconst insertMode = this.getNodeParameter('insertMode', i) as 'insert' | 'override';\n\t\t\t\tconst messagesToInsert = this.getNodeParameter(\n\t\t\t\t\t'messages.messageValues',\n\t\t\t\t\ti,\n\t\t\t\t\t[],\n\t\t\t\t) as MessageRecord[];\n\n\t\t\t\tconst templateMapper = {\n\t\t\t\t\tai: AIMessage,\n\t\t\t\t\tsystem: SystemMessage,\n\t\t\t\t\tuser: HumanMessage,\n\t\t\t\t};\n\n\t\t\t\tif (insertMode === 'override') {\n\t\t\t\t\tawait memory.chatHistory.clear();\n\t\t\t\t}\n\n\t\t\t\tfor (const message of messagesToInsert) {\n\t\t\t\t\tconst MessageClass = new templateMapper[message.type](message.message);\n\n\t\t\t\t\tif (message.hideFromUI) {\n\t\t\t\t\t\tMessageClass.additional_kwargs.hideFromUI = true;\n\t\t\t\t\t}\n\n\t\t\t\t\tawait memory.chatHistory.addMessage(MessageClass);\n\t\t\t\t}\n\n\t\t\t\treturnData.push(...(await prepareOutput(i)));\n\t\t\t}\n\n\t\t\tif (mode === 'load') {\n\t\t\t\tconst simplifyOutput = this.getNodeParameter('simplifyOutput', i, false) as boolean;\n\t\t\t\tconst options = this.getNodeParameter('options', i);\n\n\t\t\t\t//Load mode, legacy behavior for version 1, buggy - outputs only for single input item\n\t\t\t\tif (simplifyOutput && messages.length && nodeVersion === 1) {\n\t\t\t\t\tconst groupMessages = options.groupMessages as boolean;\n\t\t\t\t\tconst output = simplifyMessages(messages);\n\n\t\t\t\t\treturn [\n\t\t\t\t\t\tthis.helpers.constructExecutionMetaData(\n\t\t\t\t\t\t\tthis.helpers.returnJsonArray(\n\t\t\t\t\t\t\t\tgroupMessages ? [{ messages: output, messagesCount: output.length }] : output,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t{ itemData: { item: i } },\n\t\t\t\t\t\t),\n\t\t\t\t\t];\n\t\t\t\t}\n\n\t\t\t\tlet groupMessages = true;\n\t\t\t\t//disable grouping if explicitly set to false\n\t\t\t\tif (options.groupMessages === false) {\n\t\t\t\t\tgroupMessages = false;\n\t\t\t\t}\n\t\t\t\t//disable grouping if not set and node version is 1 (legacy behavior)\n\t\t\t\tif (options.groupMessages === undefined && nodeVersion === 1) {\n\t\t\t\t\tgroupMessages = false;\n\t\t\t\t}\n\n\t\t\t\tlet output: IDataObject[] =\n\t\t\t\t\t(simplifyOutput\n\t\t\t\t\t\t? simplifyMessages(messages)\n\t\t\t\t\t\t: (messages?.map((message) => message.toJSON()) as unknown as IDataObject[])) ?? [];\n\n\t\t\t\tif (groupMessages) {\n\t\t\t\t\toutput = [{ messages: output, messagesCount: output.length }];\n\t\t\t\t}\n\n\t\t\t\tconst executionData = this.helpers.constructExecutionMetaData(\n\t\t\t\t\tthis.helpers.returnJsonArray(output),\n\t\t\t\t\t{ itemData: { item: i } },\n\t\t\t\t);\n\n\t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OwnPropNames = 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 MemoryMongoDbChat_node_exports = {};
|
|
20
|
+
__export(MemoryMongoDbChat_node_exports, {
|
|
21
|
+
MemoryMongoDbChat: () => MemoryMongoDbChat
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(MemoryMongoDbChat_node_exports);
|
|
24
|
+
var import_mongodb = require("@langchain/mongodb");
|
|
25
|
+
var import_memory = require("@langchain/classic/memory");
|
|
26
|
+
var import_mongodb2 = require("mongodb");
|
|
27
|
+
var import_n8n_workflow = require("n8n-workflow");
|
|
28
|
+
var import_helpers = require("../../../utils/helpers");
|
|
29
|
+
var import_logWrapper = require("../../../utils/logWrapper");
|
|
30
|
+
var import_sharedFields = require("../../../utils/sharedFields");
|
|
31
|
+
var import_descriptions = require("../descriptions");
|
|
32
|
+
class MemoryMongoDbChat {
|
|
33
|
+
constructor() {
|
|
34
|
+
this.description = {
|
|
35
|
+
displayName: "MongoDB Chat Memory",
|
|
36
|
+
name: "memoryMongoDbChat",
|
|
37
|
+
icon: "file:mongodb.svg",
|
|
38
|
+
group: ["transform"],
|
|
39
|
+
version: [1],
|
|
40
|
+
description: "Stores the chat history in MongoDB collection.",
|
|
41
|
+
defaults: {
|
|
42
|
+
name: "MongoDB Chat Memory"
|
|
43
|
+
},
|
|
44
|
+
credentials: [
|
|
45
|
+
{
|
|
46
|
+
name: "mongoDb",
|
|
47
|
+
required: true
|
|
48
|
+
}
|
|
49
|
+
],
|
|
50
|
+
codex: {
|
|
51
|
+
categories: ["AI"],
|
|
52
|
+
subcategories: {
|
|
53
|
+
AI: ["Memory"],
|
|
54
|
+
Memory: ["Other memories"]
|
|
55
|
+
},
|
|
56
|
+
resources: {
|
|
57
|
+
primaryDocumentation: [
|
|
58
|
+
{
|
|
59
|
+
url: "https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.memorymongochat/"
|
|
60
|
+
}
|
|
61
|
+
]
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
inputs: [],
|
|
65
|
+
outputs: [import_n8n_workflow.NodeConnectionTypes.AiMemory],
|
|
66
|
+
outputNames: ["Memory"],
|
|
67
|
+
properties: [
|
|
68
|
+
(0, import_sharedFields.getConnectionHintNoticeField)([import_n8n_workflow.NodeConnectionTypes.AiAgent]),
|
|
69
|
+
import_descriptions.sessionIdOption,
|
|
70
|
+
(0, import_descriptions.expressionSessionKeyProperty)(1),
|
|
71
|
+
import_descriptions.sessionKeyProperty,
|
|
72
|
+
{
|
|
73
|
+
displayName: "Collection Name",
|
|
74
|
+
name: "collectionName",
|
|
75
|
+
type: "string",
|
|
76
|
+
default: "n8n_chat_histories",
|
|
77
|
+
description: "The collection name to store the chat history in. If collection does not exist, it will be created."
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
displayName: "Database Name",
|
|
81
|
+
name: "databaseName",
|
|
82
|
+
type: "string",
|
|
83
|
+
default: "",
|
|
84
|
+
description: "The database name to store the chat history in. If not provided, the database from credentials will be used."
|
|
85
|
+
},
|
|
86
|
+
import_descriptions.contextWindowLengthProperty
|
|
87
|
+
]
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
async supplyData(itemIndex) {
|
|
91
|
+
const credentials = await this.getCredentials("mongoDb");
|
|
92
|
+
const collectionName = this.getNodeParameter(
|
|
93
|
+
"collectionName",
|
|
94
|
+
itemIndex,
|
|
95
|
+
"n8n_chat_histories"
|
|
96
|
+
);
|
|
97
|
+
const databaseName = this.getNodeParameter("databaseName", itemIndex, "");
|
|
98
|
+
const sessionId = (0, import_helpers.getSessionId)(this, itemIndex);
|
|
99
|
+
let connectionString;
|
|
100
|
+
let dbName;
|
|
101
|
+
if (credentials.configurationType === "connectionString") {
|
|
102
|
+
connectionString = credentials.connectionString;
|
|
103
|
+
dbName = databaseName || credentials.database;
|
|
104
|
+
} else {
|
|
105
|
+
const host = credentials.host;
|
|
106
|
+
const port = credentials.port;
|
|
107
|
+
const user = credentials.user ? encodeURIComponent(credentials.user) : "";
|
|
108
|
+
const password = credentials.password ? encodeURIComponent(credentials.password) : "";
|
|
109
|
+
const authString = user && password ? `${user}:${password}@` : "";
|
|
110
|
+
const tls = credentials.tls;
|
|
111
|
+
connectionString = `mongodb://${authString}${host}:${port}/?appname=n8n`;
|
|
112
|
+
if (tls) {
|
|
113
|
+
connectionString += "&ssl=true";
|
|
114
|
+
}
|
|
115
|
+
dbName = databaseName || credentials.database;
|
|
116
|
+
}
|
|
117
|
+
if (!dbName) {
|
|
118
|
+
throw new import_n8n_workflow.NodeOperationError(
|
|
119
|
+
this.getNode(),
|
|
120
|
+
"Database name must be provided either in credentials or in node parameters"
|
|
121
|
+
);
|
|
122
|
+
}
|
|
123
|
+
try {
|
|
124
|
+
const client = new import_mongodb2.MongoClient(connectionString);
|
|
125
|
+
await client.connect();
|
|
126
|
+
const db = client.db(dbName);
|
|
127
|
+
const collection = db.collection(collectionName);
|
|
128
|
+
const mongoDBChatHistory = new import_mongodb.MongoDBChatMessageHistory({
|
|
129
|
+
collection,
|
|
130
|
+
sessionId
|
|
131
|
+
});
|
|
132
|
+
const memory = new import_memory.BufferWindowMemory({
|
|
133
|
+
memoryKey: "chat_history",
|
|
134
|
+
chatHistory: mongoDBChatHistory,
|
|
135
|
+
returnMessages: true,
|
|
136
|
+
inputKey: "input",
|
|
137
|
+
outputKey: "output",
|
|
138
|
+
k: this.getNodeParameter("contextWindowLength", itemIndex, 5)
|
|
139
|
+
});
|
|
140
|
+
async function closeFunction() {
|
|
141
|
+
await client.close();
|
|
142
|
+
}
|
|
143
|
+
return {
|
|
144
|
+
closeFunction,
|
|
145
|
+
response: (0, import_logWrapper.logWrapper)(memory, this)
|
|
146
|
+
};
|
|
147
|
+
} catch (error) {
|
|
148
|
+
throw new import_n8n_workflow.NodeOperationError(this.getNode(), `MongoDB connection error: ${error.message}`);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
153
|
+
0 && (module.exports = {
|
|
154
|
+
MemoryMongoDbChat
|
|
155
|
+
});
|
|
156
|
+
//# sourceMappingURL=MemoryMongoDbChat.node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../nodes/memory/MemoryMongoDbChat/MemoryMongoDbChat.node.ts"],"sourcesContent":["import { MongoDBChatMessageHistory } from '@langchain/mongodb';\nimport { BufferWindowMemory } from '@langchain/classic/memory';\nimport { MongoClient } from 'mongodb';\nimport type {\n\tISupplyDataFunctions,\n\tINodeType,\n\tINodeTypeDescription,\n\tSupplyData,\n} from 'n8n-workflow';\nimport { NodeConnectionTypes, NodeOperationError } from 'n8n-workflow';\n\nimport { getSessionId } from '@utils/helpers';\nimport { logWrapper } from '@utils/logWrapper';\nimport { getConnectionHintNoticeField } from '@utils/sharedFields';\n\nimport {\n\tsessionIdOption,\n\tsessionKeyProperty,\n\texpressionSessionKeyProperty,\n\tcontextWindowLengthProperty,\n} from '../descriptions';\n\nexport class MemoryMongoDbChat implements INodeType {\n\tdescription: INodeTypeDescription = {\n\t\tdisplayName: 'MongoDB Chat Memory',\n\t\tname: 'memoryMongoDbChat',\n\t\ticon: 'file:mongodb.svg',\n\t\tgroup: ['transform'],\n\t\tversion: [1],\n\t\tdescription: 'Stores the chat history in MongoDB collection.',\n\t\tdefaults: {\n\t\t\tname: 'MongoDB Chat Memory',\n\t\t},\n\t\tcredentials: [\n\t\t\t{\n\t\t\t\tname: 'mongoDb',\n\t\t\t\trequired: true,\n\t\t\t},\n\t\t],\n\t\tcodex: {\n\t\t\tcategories: ['AI'],\n\t\t\tsubcategories: {\n\t\t\t\tAI: ['Memory'],\n\t\t\t\tMemory: ['Other memories'],\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.memorymongochat/',\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.AiMemory],\n\t\toutputNames: ['Memory'],\n\t\tproperties: [\n\t\t\tgetConnectionHintNoticeField([NodeConnectionTypes.AiAgent]),\n\t\t\tsessionIdOption,\n\t\t\texpressionSessionKeyProperty(1),\n\t\t\tsessionKeyProperty,\n\t\t\t{\n\t\t\t\tdisplayName: 'Collection Name',\n\t\t\t\tname: 'collectionName',\n\t\t\t\ttype: 'string',\n\t\t\t\tdefault: 'n8n_chat_histories',\n\t\t\t\tdescription:\n\t\t\t\t\t'The collection name to store the chat history in. If collection does not exist, it will be created.',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Database Name',\n\t\t\t\tname: 'databaseName',\n\t\t\t\ttype: 'string',\n\t\t\t\tdefault: '',\n\t\t\t\tdescription:\n\t\t\t\t\t'The database name to store the chat history in. If not provided, the database from credentials will be used.',\n\t\t\t},\n\t\t\tcontextWindowLengthProperty,\n\t\t],\n\t};\n\n\tasync supplyData(this: ISupplyDataFunctions, itemIndex: number): Promise<SupplyData> {\n\t\tconst credentials = await this.getCredentials<{\n\t\t\tconfigurationType: string;\n\t\t\tconnectionString: string;\n\t\t\tdatabase: string;\n\t\t\thost: string;\n\t\t\tuser: string;\n\t\t\tport: number;\n\t\t\tpassword: string;\n\t\t\ttls: boolean;\n\t\t}>('mongoDb');\n\t\tconst collectionName = this.getNodeParameter(\n\t\t\t'collectionName',\n\t\t\titemIndex,\n\t\t\t'n8n_chat_histories',\n\t\t) as string;\n\t\tconst databaseName = this.getNodeParameter('databaseName', itemIndex, '') as string;\n\t\tconst sessionId = getSessionId(this, itemIndex);\n\n\t\tlet connectionString: string;\n\t\tlet dbName: string;\n\n\t\tif (credentials.configurationType === 'connectionString') {\n\t\t\tconnectionString = credentials.connectionString;\n\t\t\tdbName = databaseName || credentials.database;\n\t\t} else {\n\t\t\t// Build connection string from individual fields\n\t\t\tconst host = credentials.host;\n\t\t\tconst port = credentials.port;\n\t\t\tconst user = credentials.user ? encodeURIComponent(credentials.user) : '';\n\t\t\tconst password = credentials.password ? encodeURIComponent(credentials.password) : '';\n\t\t\tconst authString = user && password ? `${user}:${password}@` : '';\n\t\t\tconst tls = credentials.tls;\n\n\t\t\tconnectionString = `mongodb://${authString}${host}:${port}/?appname=n8n`;\n\t\t\tif (tls) {\n\t\t\t\tconnectionString += '&ssl=true';\n\t\t\t}\n\n\t\t\tdbName = databaseName || credentials.database;\n\t\t}\n\n\t\tif (!dbName) {\n\t\t\tthrow new NodeOperationError(\n\t\t\t\tthis.getNode(),\n\t\t\t\t'Database name must be provided either in credentials or in node parameters',\n\t\t\t);\n\t\t}\n\n\t\ttry {\n\t\t\tconst client = new MongoClient(connectionString);\n\t\t\tawait client.connect();\n\n\t\t\tconst db = client.db(dbName);\n\t\t\tconst collection = db.collection(collectionName);\n\n\t\t\tconst mongoDBChatHistory = new MongoDBChatMessageHistory({\n\t\t\t\tcollection,\n\t\t\t\tsessionId,\n\t\t\t});\n\n\t\t\tconst memory = new BufferWindowMemory({\n\t\t\t\tmemoryKey: 'chat_history',\n\t\t\t\tchatHistory: mongoDBChatHistory,\n\t\t\t\treturnMessages: true,\n\t\t\t\tinputKey: 'input',\n\t\t\t\toutputKey: 'output',\n\t\t\t\tk: this.getNodeParameter('contextWindowLength', itemIndex, 5) as number,\n\t\t\t});\n\n\t\t\tasync function closeFunction() {\n\t\t\t\tawait client.close();\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tcloseFunction,\n\t\t\t\tresponse: logWrapper(memory, this),\n\t\t\t};\n\t\t} catch (error) {\n\t\t\tthrow new NodeOperationError(this.getNode(), `MongoDB connection error: ${error.message}`);\n\t\t}\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAA0C;AAC1C,oBAAmC;AACnC,IAAAA,kBAA4B;AAO5B,0BAAwD;AAExD,qBAA6B;AAC7B,wBAA2B;AAC3B,0BAA6C;AAE7C,0BAKO;AAEA,MAAM,kBAAuC;AAAA,EAA7C;AACN,uBAAoC;AAAA,MACnC,aAAa;AAAA,MACb,MAAM;AAAA,MACN,MAAM;AAAA,MACN,OAAO,CAAC,WAAW;AAAA,MACnB,SAAS,CAAC,CAAC;AAAA,MACX,aAAa;AAAA,MACb,UAAU;AAAA,QACT,MAAM;AAAA,MACP;AAAA,MACA,aAAa;AAAA,QACZ;AAAA,UACC,MAAM;AAAA,UACN,UAAU;AAAA,QACX;AAAA,MACD;AAAA,MACA,OAAO;AAAA,QACN,YAAY,CAAC,IAAI;AAAA,QACjB,eAAe;AAAA,UACd,IAAI,CAAC,QAAQ;AAAA,UACb,QAAQ,CAAC,gBAAgB;AAAA,QAC1B;AAAA,QACA,WAAW;AAAA,UACV,sBAAsB;AAAA,YACrB;AAAA,cACC,KAAK;AAAA,YACN;AAAA,UACD;AAAA,QACD;AAAA,MACD;AAAA,MACA,QAAQ,CAAC;AAAA,MACT,SAAS,CAAC,wCAAoB,QAAQ;AAAA,MACtC,aAAa,CAAC,QAAQ;AAAA,MACtB,YAAY;AAAA,YACX,kDAA6B,CAAC,wCAAoB,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AQ;AAErB,YAAM,KAAK,OAAO,GAAG,MAAM;AAC3B,YAAM,aAAa,GAAG,WAAW,cAAc;AAE/C,YAAM,qBAAqB,IAAI,yCAA0B;AAAA,QACxD;AAAA,QACA;AAAA,MACD,CAAC;AAED,YAAM,SAAS,IAAI,iCAAmB;AAAA,QACrC,WAAW;AAAA,QACX,aAAa;AAAA,QACb,gBAAgB;AAAA,QAChB,UAAU;AAAA,QACV,WAAW;AAAA,QACX,GAAG,KAAK,iBAAiB,uBAAuB,WAAW,CAAC;AAAA,MAC7D,CAAC;AAED,qBAAe,gBAAgB;AAC9B,cAAM,OAAO,MAAM;AAAA,MACpB;AAEA,aAAO;AAAA,QACN;AAAA,QACA,cAAU,8BAAW,QAAQ,IAAI;AAAA,MAClC;AAAA,IACD,SAAS,OAAO;AACf,YAAM,IAAI,uCAAmB,KAAK,QAAQ,GAAG,6BAA6B,MAAM,OAAO,EAAE;AAAA,IAC1F;AAAA,EACD;AACD;","names":["import_mongodb"]}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="120" height="258" viewBox="0 0 120 258" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M83.0089 28.7559C72.1328 15.9086 62.7673 2.86053 60.8539 0.150554C60.6525 -0.0501848 60.3503 -0.0501848 60.1489 0.150554C58.2355 2.86053 48.8699 15.9086 37.9938 28.7559C-55.3594 147.292 52.6968 227.287 52.6968 227.287L53.6031 227.889C54.4087 240.235 56.4228 258 56.4228 258H60.451H64.4792C64.4792 258 66.4934 240.335 67.299 227.889L68.2052 227.187C68.306 227.187 176.362 147.292 83.0089 28.7559ZM60.451 225.48C60.451 225.48 55.6172 221.365 54.3081 219.257V219.057L60.1489 89.9813C60.1489 89.5798 60.7532 89.5798 60.7532 89.9813L66.594 219.057V219.257C65.2848 221.365 60.451 225.48 60.451 225.48Z" fill="white"/>
|
|
3
|
+
</svg>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="120" height="258" viewBox="0 0 120 258" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M83.0089 28.7559C72.1328 15.9086 62.7673 2.86053 60.8539 0.150554C60.6525 -0.0501848 60.3503 -0.0501848 60.1489 0.150554C58.2355 2.86053 48.8699 15.9086 37.9938 28.7559C-55.3594 147.292 52.6968 227.287 52.6968 227.287L53.6031 227.889C54.4087 240.235 56.4228 258 56.4228 258H60.451H64.4792C64.4792 258 66.4934 240.335 67.299 227.889L68.2052 227.187C68.306 227.187 176.362 147.292 83.0089 28.7559ZM60.451 225.48C60.451 225.48 55.6172 221.365 54.3081 219.257V219.057L60.1489 89.9813C60.1489 89.5798 60.7532 89.5798 60.7532 89.9813L66.594 219.057V219.257C65.2848 221.365 60.451 225.48 60.451 225.48Z" fill="#00684A"/>
|
|
3
|
+
</svg>
|
|
@@ -0,0 +1,134 @@
|
|
|
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 MemoryMotorhead_node_exports = {};
|
|
20
|
+
__export(MemoryMotorhead_node_exports, {
|
|
21
|
+
MemoryMotorhead: () => MemoryMotorhead
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(MemoryMotorhead_node_exports);
|
|
24
|
+
var import_motorhead_memory = require("@langchain/community/memory/motorhead_memory");
|
|
25
|
+
var import_n8n_workflow = require("n8n-workflow");
|
|
26
|
+
var import_helpers = require("../../../utils/helpers");
|
|
27
|
+
var import_logWrapper = require("../../../utils/logWrapper");
|
|
28
|
+
var import_sharedFields = require("../../../utils/sharedFields");
|
|
29
|
+
var import_descriptions = require("../descriptions");
|
|
30
|
+
class MemoryMotorhead {
|
|
31
|
+
constructor() {
|
|
32
|
+
this.description = {
|
|
33
|
+
displayName: "Motorhead",
|
|
34
|
+
name: "memoryMotorhead",
|
|
35
|
+
icon: "fa:file-export",
|
|
36
|
+
iconColor: "black",
|
|
37
|
+
group: ["transform"],
|
|
38
|
+
version: [1, 1.1, 1.2, 1.3],
|
|
39
|
+
description: "Use Motorhead Memory",
|
|
40
|
+
defaults: {
|
|
41
|
+
name: "Motorhead"
|
|
42
|
+
},
|
|
43
|
+
codex: {
|
|
44
|
+
categories: ["AI"],
|
|
45
|
+
subcategories: {
|
|
46
|
+
AI: ["Memory"],
|
|
47
|
+
Memory: ["Other memories"]
|
|
48
|
+
},
|
|
49
|
+
resources: {
|
|
50
|
+
primaryDocumentation: [
|
|
51
|
+
{
|
|
52
|
+
url: "https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.memorymotorhead/"
|
|
53
|
+
}
|
|
54
|
+
]
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
inputs: [],
|
|
58
|
+
outputs: [import_n8n_workflow.NodeConnectionTypes.AiMemory],
|
|
59
|
+
outputNames: ["Memory"],
|
|
60
|
+
credentials: [
|
|
61
|
+
{
|
|
62
|
+
name: "motorheadApi",
|
|
63
|
+
required: true
|
|
64
|
+
}
|
|
65
|
+
],
|
|
66
|
+
properties: [
|
|
67
|
+
(0, import_sharedFields.getConnectionHintNoticeField)([import_n8n_workflow.NodeConnectionTypes.AiAgent]),
|
|
68
|
+
{
|
|
69
|
+
displayName: "Session ID",
|
|
70
|
+
name: "sessionId",
|
|
71
|
+
type: "string",
|
|
72
|
+
required: true,
|
|
73
|
+
default: "",
|
|
74
|
+
displayOptions: {
|
|
75
|
+
show: {
|
|
76
|
+
"@version": [1]
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
displayName: "Session ID",
|
|
82
|
+
name: "sessionId",
|
|
83
|
+
type: "string",
|
|
84
|
+
default: "={{ $json.sessionId }}",
|
|
85
|
+
description: "The key to use to store the memory",
|
|
86
|
+
displayOptions: {
|
|
87
|
+
show: {
|
|
88
|
+
"@version": [1.1]
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
...import_descriptions.sessionIdOption,
|
|
94
|
+
displayOptions: {
|
|
95
|
+
show: {
|
|
96
|
+
"@version": [{ _cnd: { gte: 1.2 } }]
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
(0, import_descriptions.expressionSessionKeyProperty)(1.3),
|
|
101
|
+
import_descriptions.sessionKeyProperty
|
|
102
|
+
]
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
async supplyData(itemIndex) {
|
|
106
|
+
const credentials = await this.getCredentials("motorheadApi");
|
|
107
|
+
const nodeVersion = this.getNode().typeVersion;
|
|
108
|
+
let sessionId;
|
|
109
|
+
if (nodeVersion >= 1.2) {
|
|
110
|
+
sessionId = (0, import_helpers.getSessionId)(this, itemIndex);
|
|
111
|
+
} else {
|
|
112
|
+
sessionId = this.getNodeParameter("sessionId", itemIndex);
|
|
113
|
+
}
|
|
114
|
+
const memory = new import_motorhead_memory.MotorheadMemory({
|
|
115
|
+
sessionId,
|
|
116
|
+
url: `${credentials.host}/motorhead`,
|
|
117
|
+
clientId: credentials.clientId,
|
|
118
|
+
apiKey: credentials.apiKey,
|
|
119
|
+
memoryKey: "chat_history",
|
|
120
|
+
returnMessages: true,
|
|
121
|
+
inputKey: "input",
|
|
122
|
+
outputKey: "output"
|
|
123
|
+
});
|
|
124
|
+
await memory.init();
|
|
125
|
+
return {
|
|
126
|
+
response: (0, import_logWrapper.logWrapper)(memory, this)
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
131
|
+
0 && (module.exports = {
|
|
132
|
+
MemoryMotorhead
|
|
133
|
+
});
|
|
134
|
+
//# sourceMappingURL=MemoryMotorhead.node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../nodes/memory/MemoryMotorhead/MemoryMotorhead.node.ts"],"sourcesContent":["import { MotorheadMemory } from '@langchain/community/memory/motorhead_memory';\nimport {\n\tNodeConnectionTypes,\n\ttype INodeType,\n\ttype INodeTypeDescription,\n\ttype ISupplyDataFunctions,\n\ttype SupplyData,\n} from 'n8n-workflow';\n\nimport { getSessionId } from '@utils/helpers';\nimport { logWrapper } from '@utils/logWrapper';\nimport { getConnectionHintNoticeField } from '@utils/sharedFields';\n\nimport { expressionSessionKeyProperty, sessionIdOption, sessionKeyProperty } from '../descriptions';\n\nexport class MemoryMotorhead implements INodeType {\n\tdescription: INodeTypeDescription = {\n\t\tdisplayName: 'Motorhead',\n\t\tname: 'memoryMotorhead',\n\t\ticon: 'fa:file-export',\n\t\ticonColor: 'black',\n\t\tgroup: ['transform'],\n\t\tversion: [1, 1.1, 1.2, 1.3],\n\t\tdescription: 'Use Motorhead Memory',\n\t\tdefaults: {\n\t\t\tname: 'Motorhead',\n\t\t},\n\t\tcodex: {\n\t\t\tcategories: ['AI'],\n\t\t\tsubcategories: {\n\t\t\t\tAI: ['Memory'],\n\t\t\t\tMemory: ['Other memories'],\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.memorymotorhead/',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t},\n\t\t},\n\n\t\tinputs: [],\n\n\t\toutputs: [NodeConnectionTypes.AiMemory],\n\t\toutputNames: ['Memory'],\n\t\tcredentials: [\n\t\t\t{\n\t\t\t\tname: 'motorheadApi',\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: 'Session ID',\n\t\t\t\tname: 'sessionId',\n\t\t\t\ttype: 'string',\n\t\t\t\trequired: true,\n\t\t\t\tdefault: '',\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\t'@version': [1],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Session ID',\n\t\t\t\tname: 'sessionId',\n\t\t\t\ttype: 'string',\n\t\t\t\tdefault: '={{ $json.sessionId }}',\n\t\t\t\tdescription: 'The key to use to store the memory',\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\t'@version': [1.1],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\t...sessionIdOption,\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\t'@version': [{ _cnd: { gte: 1.2 } }],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\texpressionSessionKeyProperty(1.3),\n\t\t\tsessionKeyProperty,\n\t\t],\n\t};\n\n\tasync supplyData(this: ISupplyDataFunctions, itemIndex: number): Promise<SupplyData> {\n\t\tconst credentials = await this.getCredentials('motorheadApi');\n\t\tconst nodeVersion = this.getNode().typeVersion;\n\n\t\tlet sessionId;\n\n\t\tif (nodeVersion >= 1.2) {\n\t\t\tsessionId = getSessionId(this, itemIndex);\n\t\t} else {\n\t\t\tsessionId = this.getNodeParameter('sessionId', itemIndex) as string;\n\t\t}\n\n\t\tconst memory = new MotorheadMemory({\n\t\t\tsessionId,\n\t\t\turl: `${credentials.host as string}/motorhead`,\n\t\t\tclientId: credentials.clientId as string,\n\t\t\tapiKey: credentials.apiKey as string,\n\t\t\tmemoryKey: 'chat_history',\n\t\t\treturnMessages: true,\n\t\t\tinputKey: 'input',\n\t\t\toutputKey: 'output',\n\t\t});\n\n\t\tawait memory.init();\n\n\t\treturn {\n\t\t\tresponse: logWrapper(memory, this),\n\t\t};\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,8BAAgC;AAChC,0BAMO;AAEP,qBAA6B;AAC7B,wBAA2B;AAC3B,0BAA6C;AAE7C,0BAAkF;AAE3E,MAAM,gBAAqC;AAAA,EAA3C;AACN,uBAAoC;AAAA,MACnC,aAAa;AAAA,MACb,MAAM;AAAA,MACN,MAAM;AAAA,MACN,WAAW;AAAA,MACX,OAAO,CAAC,WAAW;AAAA,MACnB,SAAS,CAAC,GAAG,KAAK,KAAK,GAAG;AAAA,MAC1B,aAAa;AAAA,MACb,UAAU;AAAA,QACT,MAAM;AAAA,MACP;AAAA,MACA,OAAO;AAAA,QACN,YAAY,CAAC,IAAI;AAAA,QACjB,eAAe;AAAA,UACd,IAAI,CAAC,QAAQ;AAAA,UACb,QAAQ,CAAC,gBAAgB;AAAA,QAC1B;AAAA,QACA,WAAW;AAAA,UACV,sBAAsB;AAAA,YACrB;AAAA,cACC,KAAK;AAAA,YACN;AAAA,UACD;AAAA,QACD;AAAA,MACD;AAAA,MAEA,QAAQ,CAAC;AAAA,MAET,SAAS,CAAC,wCAAoB,QAAQ;AAAA,MACtC,aAAa,CAAC,QAAQ;AAAA,MACtB,aAAa;AAAA,QACZ;AAAA,UACC,MAAM;AAAA,UACN,UAAU;AA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Q,IAAI;AAAA,IAClC;AAAA,EACD;AACD;","names":[]}
|
|
@@ -0,0 +1,123 @@
|
|
|
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 MemoryPostgresChat_node_exports = {};
|
|
20
|
+
__export(MemoryPostgresChat_node_exports, {
|
|
21
|
+
MemoryPostgresChat: () => MemoryPostgresChat
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(MemoryPostgresChat_node_exports);
|
|
24
|
+
var import_postgres = require("@langchain/community/stores/message/postgres");
|
|
25
|
+
var import_memory = require("@langchain/classic/memory");
|
|
26
|
+
var import_transport = require("n8n-nodes-base/dist/nodes/Postgres/transport/index");
|
|
27
|
+
var import_credentialTest = require("n8n-nodes-base/dist/nodes/Postgres/v2/methods/credentialTest");
|
|
28
|
+
var import_n8n_workflow = require("n8n-workflow");
|
|
29
|
+
var import_helpers = require("../../../utils/helpers");
|
|
30
|
+
var import_logWrapper = require("../../../utils/logWrapper");
|
|
31
|
+
var import_sharedFields = require("../../../utils/sharedFields");
|
|
32
|
+
var import_descriptions = require("../descriptions");
|
|
33
|
+
class MemoryPostgresChat {
|
|
34
|
+
constructor() {
|
|
35
|
+
this.description = {
|
|
36
|
+
displayName: "Postgres Chat Memory",
|
|
37
|
+
name: "memoryPostgresChat",
|
|
38
|
+
icon: "file:postgres.svg",
|
|
39
|
+
group: ["transform"],
|
|
40
|
+
version: [1, 1.1, 1.2, 1.3],
|
|
41
|
+
description: "Stores the chat history in Postgres table.",
|
|
42
|
+
defaults: {
|
|
43
|
+
name: "Postgres Chat Memory"
|
|
44
|
+
},
|
|
45
|
+
credentials: [
|
|
46
|
+
{
|
|
47
|
+
name: "postgres",
|
|
48
|
+
required: true,
|
|
49
|
+
testedBy: "postgresConnectionTest"
|
|
50
|
+
}
|
|
51
|
+
],
|
|
52
|
+
codex: {
|
|
53
|
+
categories: ["AI"],
|
|
54
|
+
subcategories: {
|
|
55
|
+
AI: ["Memory"],
|
|
56
|
+
Memory: ["Other memories"]
|
|
57
|
+
},
|
|
58
|
+
resources: {
|
|
59
|
+
primaryDocumentation: [
|
|
60
|
+
{
|
|
61
|
+
url: "https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.memorypostgreschat/"
|
|
62
|
+
}
|
|
63
|
+
]
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
inputs: [],
|
|
67
|
+
outputs: [import_n8n_workflow.NodeConnectionTypes.AiMemory],
|
|
68
|
+
outputNames: ["Memory"],
|
|
69
|
+
properties: [
|
|
70
|
+
(0, import_sharedFields.getConnectionHintNoticeField)([import_n8n_workflow.NodeConnectionTypes.AiAgent]),
|
|
71
|
+
import_descriptions.sessionIdOption,
|
|
72
|
+
(0, import_descriptions.expressionSessionKeyProperty)(1.2),
|
|
73
|
+
import_descriptions.sessionKeyProperty,
|
|
74
|
+
{
|
|
75
|
+
displayName: "Table Name",
|
|
76
|
+
name: "tableName",
|
|
77
|
+
type: "string",
|
|
78
|
+
default: "n8n_chat_histories",
|
|
79
|
+
description: "The table name to store the chat history in. If table does not exist, it will be created."
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
...import_descriptions.contextWindowLengthProperty,
|
|
83
|
+
displayOptions: { hide: { "@version": [{ _cnd: { lt: 1.1 } }] } }
|
|
84
|
+
}
|
|
85
|
+
]
|
|
86
|
+
};
|
|
87
|
+
this.methods = {
|
|
88
|
+
credentialTest: {
|
|
89
|
+
postgresConnectionTest: import_credentialTest.postgresConnectionTest
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
async supplyData(itemIndex) {
|
|
94
|
+
const credentials = await this.getCredentials("postgres");
|
|
95
|
+
const tableName = this.getNodeParameter("tableName", itemIndex, "n8n_chat_histories");
|
|
96
|
+
const sessionId = (0, import_helpers.getSessionId)(this, itemIndex);
|
|
97
|
+
const pgConf = await import_transport.configurePostgres.call(this, credentials);
|
|
98
|
+
const pool = pgConf.db.$pool;
|
|
99
|
+
const pgChatHistory = new import_postgres.PostgresChatMessageHistory({
|
|
100
|
+
pool,
|
|
101
|
+
sessionId,
|
|
102
|
+
tableName
|
|
103
|
+
});
|
|
104
|
+
const memClass = this.getNode().typeVersion < 1.1 ? import_memory.BufferMemory : import_memory.BufferWindowMemory;
|
|
105
|
+
const kOptions = this.getNode().typeVersion < 1.1 ? {} : { k: this.getNodeParameter("contextWindowLength", itemIndex) };
|
|
106
|
+
const memory = new memClass({
|
|
107
|
+
memoryKey: "chat_history",
|
|
108
|
+
chatHistory: pgChatHistory,
|
|
109
|
+
returnMessages: true,
|
|
110
|
+
inputKey: "input",
|
|
111
|
+
outputKey: "output",
|
|
112
|
+
...kOptions
|
|
113
|
+
});
|
|
114
|
+
return {
|
|
115
|
+
response: (0, import_logWrapper.logWrapper)(memory, this)
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
120
|
+
0 && (module.exports = {
|
|
121
|
+
MemoryPostgresChat
|
|
122
|
+
});
|
|
123
|
+
//# sourceMappingURL=MemoryPostgresChat.node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../nodes/memory/MemoryPostgresChat/MemoryPostgresChat.node.ts"],"sourcesContent":["import { PostgresChatMessageHistory } from '@langchain/community/stores/message/postgres';\nimport { BufferMemory, BufferWindowMemory } from '@langchain/classic/memory';\nimport { configurePostgres } from 'n8n-nodes-base/dist/nodes/Postgres/transport/index';\nimport type { PostgresNodeCredentials } from 'n8n-nodes-base/dist/nodes/Postgres/v2/helpers/interfaces';\nimport { postgresConnectionTest } from 'n8n-nodes-base/dist/nodes/Postgres/v2/methods/credentialTest';\nimport type {\n\tISupplyDataFunctions,\n\tINodeType,\n\tINodeTypeDescription,\n\tSupplyData,\n} from 'n8n-workflow';\nimport { NodeConnectionTypes } from 'n8n-workflow';\nimport type pg from 'pg';\n\nimport { getSessionId } from '@utils/helpers';\nimport { logWrapper } from '@utils/logWrapper';\nimport { getConnectionHintNoticeField } from '@utils/sharedFields';\n\nimport {\n\tsessionIdOption,\n\tsessionKeyProperty,\n\tcontextWindowLengthProperty,\n\texpressionSessionKeyProperty,\n} from '../descriptions';\n\nexport class MemoryPostgresChat implements INodeType {\n\tdescription: INodeTypeDescription = {\n\t\tdisplayName: 'Postgres Chat Memory',\n\t\tname: 'memoryPostgresChat',\n\t\ticon: 'file:postgres.svg',\n\t\tgroup: ['transform'],\n\t\tversion: [1, 1.1, 1.2, 1.3],\n\t\tdescription: 'Stores the chat history in Postgres table.',\n\t\tdefaults: {\n\t\t\tname: 'Postgres Chat Memory',\n\t\t},\n\t\tcredentials: [\n\t\t\t{\n\t\t\t\tname: 'postgres',\n\t\t\t\trequired: true,\n\t\t\t\ttestedBy: 'postgresConnectionTest',\n\t\t\t},\n\t\t],\n\t\tcodex: {\n\t\t\tcategories: ['AI'],\n\t\t\tsubcategories: {\n\t\t\t\tAI: ['Memory'],\n\t\t\t\tMemory: ['Other memories'],\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.memorypostgreschat/',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t},\n\t\t},\n\n\t\tinputs: [],\n\n\t\toutputs: [NodeConnectionTypes.AiMemory],\n\t\toutputNames: ['Memory'],\n\t\tproperties: [\n\t\t\tgetConnectionHintNoticeField([NodeConnectionTypes.AiAgent]),\n\t\t\tsessionIdOption,\n\t\t\texpressionSessionKeyProperty(1.2),\n\t\t\tsessionKeyProperty,\n\t\t\t{\n\t\t\t\tdisplayName: 'Table Name',\n\t\t\t\tname: 'tableName',\n\t\t\t\ttype: 'string',\n\t\t\t\tdefault: 'n8n_chat_histories',\n\t\t\t\tdescription:\n\t\t\t\t\t'The table name to store the chat history in. If table does not exist, it will be created.',\n\t\t\t},\n\t\t\t{\n\t\t\t\t...contextWindowLengthProperty,\n\t\t\t\tdisplayOptions: { hide: { '@version': [{ _cnd: { lt: 1.1 } }] } },\n\t\t\t},\n\t\t],\n\t};\n\n\tmethods = {\n\t\tcredentialTest: {\n\t\t\tpostgresConnectionTest,\n\t\t},\n\t};\n\n\tasync supplyData(this: ISupplyDataFunctions, itemIndex: number): Promise<SupplyData> {\n\t\tconst credentials = await this.getCredentials<PostgresNodeCredentials>('postgres');\n\t\tconst tableName = this.getNodeParameter('tableName', itemIndex, 'n8n_chat_histories') as string;\n\t\tconst sessionId = getSessionId(this, itemIndex);\n\n\t\tconst pgConf = await configurePostgres.call(this, credentials);\n\t\tconst pool = pgConf.db.$pool as unknown as pg.Pool;\n\n\t\tconst pgChatHistory = new PostgresChatMessageHistory({\n\t\t\tpool,\n\t\t\tsessionId,\n\t\t\ttableName,\n\t\t});\n\n\t\tconst memClass = this.getNode().typeVersion < 1.1 ? BufferMemory : BufferWindowMemory;\n\t\tconst kOptions =\n\t\t\tthis.getNode().typeVersion < 1.1\n\t\t\t\t? {}\n\t\t\t\t: { k: this.getNodeParameter('contextWindowLength', itemIndex) };\n\n\t\tconst memory = new memClass({\n\t\t\tmemoryKey: 'chat_history',\n\t\t\tchatHistory: pgChatHistory,\n\t\t\treturnMessages: true,\n\t\t\tinputKey: 'input',\n\t\t\toutputKey: 'output',\n\t\t\t...kOptions,\n\t\t});\n\n\t\treturn {\n\t\t\tresponse: logWrapper(memory, this),\n\t\t};\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAA2C;AAC3C,oBAAiD;AACjD,uBAAkC;AAElC,4BAAuC;AAOvC,0BAAoC;AAGpC,qBAA6B;AAC7B,wBAA2B;AAC3B,0BAA6C;AAE7C,0BAKO;AAEA,MAAM,mBAAwC;AAAA,EAA9C;AACN,uBAAoC;AAAA,MACnC,aAAa;AAAA,MACb,MAAM;AAAA,MACN,MAAM;AAAA,MACN,OAAO,CAAC,WAAW;AAAA,MACnB,SAAS,CAAC,GAAG,KAAK,KAAK,GAAG;AAAA,MAC1B,aAAa;AAAA,MACb,UAAU;AAAA,QACT,MAAM;AAAA,MACP;AAAA,MACA,aAAa;AAAA,QACZ;AAAA,UACC,MAAM;AAAA,UACN,UAAU;AAAA,UACV,UAAU;AAAA,QACX;AAAA,MACD;AAAA,MACA,OAAO;AAAA,QACN,YAAY,CAAC,IAAI;AAAA,QACjB,eAAe;AAAA,UACd,IAAI,CAAC,QAAQ;AAAA,UACb,QAAQ,CAAC,gBAAgB;AAAA,QAC1B;AAAA,QACA,WAAW;AAAA,UACV,sBAAsB;AAAA,YACrB;AAAA,cACC,KAAK;AAAA,YACN;AAAA,UACD;AAAA,QACD;AAAA,MACD;AAAA,MAEA,QAAQ,CAAC;AAAA,MAET,SAAS,CAAC,wCAAoB,QAAQ;AAAA,MACtC,aAAa,CAAC,QAAQ;AAAA,MACtB,YAAY;AAAA,YACX,kDAA6B,CAAC,wCAAoB,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xlink" fill="#fff" fill-rule="evenodd" stroke="#000" stroke-linecap="round" stroke-linejoin="round" viewBox="0 0 79 81"><use xlink:href="#a" x=".5" y=".5"/><symbol id="a" overflow="visible"><g fill-rule="nonzero" stroke="none"><path fill="#000" d="M77.391 47.922c-.466-1.412-1.688-2.396-3.268-2.632-.745-.111-1.598-.064-2.608.144-1.76.363-3.065.501-4.018.528 3.596-6.072 6.521-12.997 8.204-19.515 2.722-10.54 1.268-15.341-.432-17.513C70.77 3.185 64.206.097 56.287.002c-4.224-.052-7.933.782-9.867 1.382a37 37 0 0 0-5.77-.528c-3.809-.061-7.174.77-10.05 2.476a46 46 0 0 0-7.098-1.782C16.561.411 10.968 1.299 6.876 4.19 1.922 7.689-.375 13.77.05 22.262c.135 2.696 1.643 10.9 4.018 18.68 1.365 4.472 2.82 8.185 4.326 11.038 2.135 4.046 4.419 6.428 6.984 7.284 1.438.479 4.049.814 6.797-1.473a6 6 0 0 0 1.429 1.23c.783.494 1.74.897 2.696 1.136 3.446.862 6.674.646 9.427-.561l.041 1.362.06 1.899c.163 4.064.44 7.223 1.259 9.434.045.122.105.307.169.503.409 1.251 1.092 3.346 2.83 4.987 1.8 1.699 3.978 2.22 5.972 2.22 1 0 1.955-.131 2.792-.311 2.984-.639 6.373-1.614 8.824-5.104 2.318-3.3 3.444-8.27 3.648-16.101l.074-.634.048-.414.546.048.141.01c3.039.138 6.755-.506 9.037-1.566 1.803-.837 7.582-3.888 6.221-8.007"/><path fill="#336791" d="M72.195 48.723c-9.036 1.864-9.657-1.195-9.657-1.195 9.541-14.157 13.529-32.127 10.087-36.525C63.235-.994 46.981 4.68 46.71 4.827l-.087.016c-1.785-.371-3.783-.591-6.029-.628-4.089-.067-7.19 1.072-9.544 2.857 0 0-28.995-11.945-27.647 15.023.287 5.737 8.223 43.41 17.689 32.031 3.46-4.161 6.803-7.679 6.803-7.679 1.66 1.103 3.648 1.666 5.732 1.463l.162-.137a6.3 6.3 0 0 0 .065 1.62c-2.439 2.725-1.722 3.203-6.597 4.206-4.933 1.017-2.035 2.826-.143 3.299 2.294.574 7.6 1.386 11.185-3.633l-.143.573c.956.765 1.626 4.978 1.514 8.797s-.188 6.441.565 8.489 1.503 6.656 7.912 5.282c5.355-1.148 8.13-4.121 8.516-9.081.274-3.526.894-3.005.933-6.158l.497-1.493c.573-4.78.091-6.322 3.39-5.605l.802.07c2.428.11 5.606-.391 7.471-1.257 4.016-1.864 6.398-4.976 2.438-4.158"/><path d="M32.747 24.66c-.814-.113-1.552-.008-1.925.274a.7.7 0 0 0-.292.47c-.047.336.188.707.333.898.409.542 1.006.915 1.598.997a2 2 0 0 0 .256.018c.986 0 1.883-.768 1.962-1.335.099-.71-.932-1.183-1.931-1.322m26.975.022c-.078-.556-1.068-.715-2.007-.584s-1.848.554-1.772 1.112c.061.434.844 1.174 1.771 1.174q.117 0 .237-.016c.619-.086 1.073-.479 1.288-.705.329-.345.518-.73.484-.98m15.477 23.828c-.345-1.042-1.453-1.377-3.296-.997-5.471 1.129-7.43.347-8.073-.127 4.252-6.478 7.75-14.308 9.637-21.614.894-3.461 1.388-6.675 1.428-9.294.045-2.876-.445-4.988-1.455-6.279-4.072-5.203-10.048-7.994-17.283-8.07-4.973-.056-9.175 1.217-9.99 1.575a25 25 0 0 0-5.622-.722c-3.734-.06-6.961.834-9.633 2.655a43 43 0 0 0-7.828-2.052c-6.342-1.021-11.381-.248-14.978 2.3-4.291 3.04-6.272 8.475-5.888 16.152.129 2.583 1.601 10.529 3.923 18.139 3.057 10.016 6.38 15.686 9.877 16.852a4.4 4.4 0 0 0 1.402.232c1.276 0 2.839-.575 4.466-2.531a161 161 0 0 1 6.156-6.966 9.9 9.9 0 0 0 4.429 1.191l.01.121c-.31.368-.564.69-.781.965-1.07 1.358-1.293 1.641-4.738 2.351-.98.202-3.582.738-3.62 2.563-.041 1.993 3.076 2.83 3.431 2.919 1.238.31 2.43.463 3.568.463 2.766 0 5.2-.909 7.145-2.668-.06 7.106.236 14.107 1.089 16.241.699 1.746 2.406 6.014 7.798 6.014.791 0 1.662-.092 2.62-.297 5.627-1.207 8.071-3.694 9.016-9.177.506-2.93 1.374-9.928 1.782-13.682.862.269 1.971.392 3.17.392 2.501 0 5.387-.531 7.197-1.372 2.033-.944 5.702-3.261 5.037-5.274zM61.8 23.147c-.019 1.108-.171 2.114-.333 3.164-.174 1.129-.354 2.297-.399 3.715-.045 1.379.128 2.814.294 4.2.337 2.801.682 5.685-.655 8.531a11 11 0 0 1-.592-1.218c-.166-.403-.527-1.05-1.027-1.946-1.944-3.487-6.497-11.652-4.167-14.984.694-.992 2.456-2.011 6.879-1.463zM56.439 4.374c6.482.143 11.609 2.568 15.24 7.207 2.784 3.558-.282 19.749-9.158 33.716l-.269-.339-.112-.14c2.294-3.788 1.845-7.536 1.446-10.859-.164-1.364-.319-2.652-.28-3.861.041-1.283.21-2.382.374-3.446.202-1.311.407-2.667.35-4.265a1.8 1.8 0 0 0 .037-.601c-.144-1.533-1.894-6.12-5.462-10.273-1.951-2.271-4.797-4.813-8.682-6.527a29.3 29.3 0 0 1 6.515-.612zM20.167 53.298c-1.793 2.155-3.031 1.742-3.438 1.607-2.653-.885-5.73-6.491-8.444-15.382-2.348-7.693-3.72-15.428-3.829-17.597-.343-6.86 1.32-11.641 4.943-14.21 5.896-4.181 15.589-1.679 19.484-.409l-.17.163c-6.391 6.455-6.24 17.483-6.224 18.157a22 22 0 0 0 .051 1.135c.11 1.855.315 5.307-.232 9.217-.508 3.633.612 7.189 3.072 9.756q.383.398.795.75a164 164 0 0 0-6.008 6.814zm6.83-9.113c-1.983-2.069-2.884-4.947-2.471-7.896.577-4.13.364-7.727.25-9.659l-.039-.694c.934-.828 5.261-3.146 8.346-2.439 1.408.323 2.266 1.281 2.623 2.931 1.846 8.539.244 12.098-1.043 14.957-.265.589-.516 1.146-.73 1.722l-.166.445c-.42 1.126-.811 2.173-1.053 3.167-2.108-.006-4.159-.907-5.718-2.534zm.324 11.516a5 5 0 0 1-1.494-.642c.271-.128.754-.301 1.591-.474 4.052-.834 4.678-1.423 6.045-3.158.313-.398.669-.849 1.16-1.398.733-.821 1.068-.682 1.676-.43.493.204.972.821 1.167 1.501.092.321.195.93-.143 1.404-2.855 3.997-7.015 3.946-10.003 3.198zm21.207 19.735c-4.957 1.062-6.713-1.467-7.869-4.359-.747-1.867-1.113-10.285-.853-19.582a1.1 1.1 0 0 0-.048-.356 5 5 0 0 0-.139-.657c-.387-1.353-1.331-2.484-2.462-2.953-.45-.186-1.275-.528-2.267-.274.212-.871.578-1.855.976-2.921l.167-.448c.188-.505.423-1.029.673-1.583 1.347-2.992 3.192-7.091 1.19-16.35-.75-3.468-3.254-5.161-7.05-4.768-2.276.235-4.358 1.154-5.396 1.68q-.334.169-.618.329c.29-3.494 1.385-10.024 5.481-14.156 2.579-2.601 6.014-3.886 10.199-3.817 8.246.135 13.534 4.367 16.518 7.893 2.571 3.039 3.964 6.1 4.52 7.751-4.179-.425-7.022.4-8.463 2.46-3.135 4.481 1.715 13.178 4.046 17.358.427.766.796 1.428.912 1.709.759 1.839 1.742 3.067 2.459 3.964.22.275.433.541.596.774-1.266.365-3.539 1.208-3.332 5.422-.167 2.115-1.356 12.016-1.959 15.514-.797 4.621-2.497 6.343-7.279 7.368zm20.693-23.68c-1.294.601-3.46 1.052-5.518 1.148-2.273.107-3.43-.255-3.702-.477-.128-2.626.85-2.901 1.884-3.191.163-.046.321-.09.474-.144a4 4 0 0 0 .313.23c1.827 1.206 5.085 1.336 9.685.386l.05-.01c-.62.58-1.682 1.359-3.187 2.058z"/></g></symbol></svg>
|