mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-16 17:46:45 +00:00
refactor(core): Refactor some imports to reduce baseline memory usage (#15916)
This commit is contained in:
committed by
GitHub
parent
8abd556597
commit
7c806ff532
@@ -1,6 +1,6 @@
|
||||
import { RunnableSequence } from '@langchain/core/runnables';
|
||||
import { AgentExecutor, createToolCallingAgent } from 'langchain/agents';
|
||||
import { omit } from 'lodash';
|
||||
import omit from 'lodash/omit';
|
||||
import { jsonParse, NodeOperationError } from 'n8n-workflow';
|
||||
import type { IExecuteFunctions, INodeExecutionData } from 'n8n-workflow';
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { ChatPromptTemplate } from '@langchain/core/prompts';
|
||||
import { RunnableSequence } from '@langchain/core/runnables';
|
||||
import { AgentExecutor, createToolCallingAgent } from 'langchain/agents';
|
||||
import { omit } from 'lodash';
|
||||
import omit from 'lodash/omit';
|
||||
import { jsonParse, NodeOperationError, sleep } from 'n8n-workflow';
|
||||
import type { IExecuteFunctions, INodeExecutionData } from 'n8n-workflow';
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ import type {
|
||||
import type { BaseMessage } from '@langchain/core/messages';
|
||||
import type { LLMResult } from '@langchain/core/outputs';
|
||||
import { encodingForModel } from '@langchain/core/utils/tiktoken';
|
||||
import { pick } from 'lodash';
|
||||
import pick from 'lodash/pick';
|
||||
import type { IDataObject, ISupplyDataFunctions, JsonObject } from 'n8n-workflow';
|
||||
import { NodeConnectionTypes, NodeError, NodeOperationError } from 'n8n-workflow';
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import type { CallbackManagerForToolRun } from '@langchain/core/callbacks/manager';
|
||||
import { DynamicStructuredTool, DynamicTool } from '@langchain/core/tools';
|
||||
import { isArray, isObject } from 'lodash';
|
||||
import isArray from 'lodash/isArray';
|
||||
import isObject from 'lodash/isObject';
|
||||
import type { SetField, SetNodeOptions } from 'n8n-nodes-base/dist/nodes/Set/v2/helpers/interfaces';
|
||||
import * as manual from 'n8n-nodes-base/dist/nodes/Set/v2/manual.mode';
|
||||
import { getCurrentWorkflowInputData } from 'n8n-nodes-base/dist/utils/workflowInputsResourceMapping/GenericFunctions';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { BaseChatMemory } from '@langchain/community/memory/chat_memory';
|
||||
import { pick } from 'lodash';
|
||||
import pick from 'lodash/pick';
|
||||
import { Node, NodeConnectionTypes } from 'n8n-workflow';
|
||||
import type {
|
||||
IDataObject,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { NodeTestHarness } from '@nodes-testing/node-test-harness';
|
||||
import { pick } from 'lodash';
|
||||
import pick from 'lodash/pick';
|
||||
import type { WorkflowTestData } from 'n8n-workflow';
|
||||
import path from 'node:path';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user