Skip to content

Commit

Permalink
fix(AI Agent Node): Fix issues with some tools not populating (#10406)
Browse files Browse the repository at this point in the history
  • Loading branch information
OlegIvaniv authored and mutdmour committed Aug 14, 2024
1 parent 172c574 commit dfc5596
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions packages/@n8n/nodes-langchain/utils/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<T>(obj: unknown, ...methodNames: Array<string | symbol>): obj is T {
return methodNames.every(
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit dfc5596

Please sign in to comment.