mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-16 17:46:45 +00:00
refactor(core): All calls to supplyData should use a distinct context type (no-changelog) (#11421)
This commit is contained in:
committed by
GitHub
parent
04c075a46b
commit
8f5fe05a92
@@ -1,6 +1,6 @@
|
||||
import type { DynamicStructuredToolInput } from '@langchain/core/tools';
|
||||
import { DynamicStructuredTool, DynamicTool } from '@langchain/core/tools';
|
||||
import type { IExecuteFunctions, IDataObject } from 'n8n-workflow';
|
||||
import type { ISupplyDataFunctions, IDataObject } from 'n8n-workflow';
|
||||
import { NodeConnectionType, jsonParse, NodeOperationError } from 'n8n-workflow';
|
||||
import { StructuredOutputParser } from 'langchain/output_parsers';
|
||||
import type { ZodTypeAny } from 'zod';
|
||||
@@ -45,12 +45,11 @@ ALL parameters marked as required must be provided`;
|
||||
};
|
||||
|
||||
export class N8nTool extends DynamicStructuredTool {
|
||||
private context: IExecuteFunctions;
|
||||
|
||||
constructor(context: IExecuteFunctions, fields: DynamicStructuredToolInput) {
|
||||
constructor(
|
||||
private context: ISupplyDataFunctions,
|
||||
fields: DynamicStructuredToolInput,
|
||||
) {
|
||||
super(fields);
|
||||
|
||||
this.context = context;
|
||||
}
|
||||
|
||||
asDynamicTool(): DynamicTool {
|
||||
|
||||
Reference in New Issue
Block a user