From 8f7ec3bdcbcf1ea8347353f1b9eabac2b21db49f Mon Sep 17 00:00:00 2001 From: Oleg Ivaniv Date: Wed, 14 Aug 2024 15:01:27 +0200 Subject: [PATCH] fix(AI Agent Node): Fix issues with some tools not populating --- packages/@n8n/nodes-langchain/utils/helpers.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/packages/@n8n/nodes-langchain/utils/helpers.ts b/packages/@n8n/nodes-langchain/utils/helpers.ts index 673fa0402c483..05b4a5cadc6f7 100644 --- a/packages/@n8n/nodes-langchain/utils/helpers.ts +++ b/packages/@n8n/nodes-langchain/utils/helpers.ts @@ -13,7 +13,6 @@ import type { BaseLLM } from '@langchain/core/language_models/llms'; import type { BaseChatMemory } from 'langchain/memory'; import type { BaseChatMessageHistory } from '@langchain/core/chat_history'; import { N8nTool } from './N8nTool'; -import { DynamicTool } from '@langchain/core/tools'; function hasMethods(obj: unknown, ...methodNames: Array): obj is T { return methodNames.every( @@ -195,8 +194,6 @@ export const getConnectedTools = async ( const finalTools = []; for (const tool of connectedTools) { - if (!(tool instanceof DynamicTool) && !(tool instanceof N8nTool)) continue; - const { name } = tool; if (seenNames.has(name)) { throw new NodeOperationError(