mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
refactor(core): Convert verbose to debug logs (#10574)
This commit is contained in:
@@ -19,7 +19,7 @@ export async function conversationalAgentExecute(
|
||||
this: IExecuteFunctions,
|
||||
nodeVersion: number,
|
||||
): Promise<INodeExecutionData[][]> {
|
||||
this.logger.verbose('Executing Conversational Agent');
|
||||
this.logger.debug('Executing Conversational Agent');
|
||||
const model = await this.getInputConnectionData(NodeConnectionType.AiLanguageModel, 0);
|
||||
|
||||
if (!isChatInstance(model)) {
|
||||
|
||||
@@ -23,7 +23,7 @@ export async function openAiFunctionsAgentExecute(
|
||||
this: IExecuteFunctions,
|
||||
nodeVersion: number,
|
||||
): Promise<INodeExecutionData[][]> {
|
||||
this.logger.verbose('Executing OpenAi Functions Agent');
|
||||
this.logger.debug('Executing OpenAi Functions Agent');
|
||||
const model = (await this.getInputConnectionData(
|
||||
NodeConnectionType.AiLanguageModel,
|
||||
0,
|
||||
|
||||
@@ -22,7 +22,7 @@ export async function planAndExecuteAgentExecute(
|
||||
this: IExecuteFunctions,
|
||||
nodeVersion: number,
|
||||
): Promise<INodeExecutionData[][]> {
|
||||
this.logger.verbose('Executing PlanAndExecute Agent');
|
||||
this.logger.debug('Executing PlanAndExecute Agent');
|
||||
const model = (await this.getInputConnectionData(
|
||||
NodeConnectionType.AiLanguageModel,
|
||||
0,
|
||||
|
||||
@@ -24,7 +24,7 @@ export async function reActAgentAgentExecute(
|
||||
this: IExecuteFunctions,
|
||||
nodeVersion: number,
|
||||
): Promise<INodeExecutionData[][]> {
|
||||
this.logger.verbose('Executing ReAct Agent');
|
||||
this.logger.debug('Executing ReAct Agent');
|
||||
|
||||
const model = (await this.getInputConnectionData(NodeConnectionType.AiLanguageModel, 0)) as
|
||||
| BaseLanguageModel
|
||||
|
||||
@@ -29,7 +29,7 @@ const parseTablesString = (tablesString: string) =>
|
||||
export async function sqlAgentAgentExecute(
|
||||
this: IExecuteFunctions,
|
||||
): Promise<INodeExecutionData[][]> {
|
||||
this.logger.verbose('Executing SQL Agent');
|
||||
this.logger.debug('Executing SQL Agent');
|
||||
|
||||
const model = (await this.getInputConnectionData(
|
||||
NodeConnectionType.AiLanguageModel,
|
||||
|
||||
@@ -76,7 +76,7 @@ async function extractBinaryMessages(ctx: IExecuteFunctions) {
|
||||
}
|
||||
|
||||
export async function toolsAgentExecute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
|
||||
this.logger.verbose('Executing Tools Agent');
|
||||
this.logger.debug('Executing Tools Agent');
|
||||
const model = await this.getInputConnectionData(NodeConnectionType.AiLanguageModel, 0);
|
||||
|
||||
if (!isChatInstance(model) || !model.bindTools) {
|
||||
|
||||
@@ -517,7 +517,7 @@ export class ChainLlm implements INodeType {
|
||||
};
|
||||
|
||||
async execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
|
||||
this.logger.verbose('Executing LLM Chain');
|
||||
this.logger.debug('Executing LLM Chain');
|
||||
const items = this.getInputData();
|
||||
|
||||
const returnData: INodeExecutionData[] = [];
|
||||
|
||||
@@ -141,7 +141,7 @@ export class ChainRetrievalQa implements INodeType {
|
||||
};
|
||||
|
||||
async execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
|
||||
this.logger.verbose('Executing Retrieval QA Chain');
|
||||
this.logger.debug('Executing Retrieval QA Chain');
|
||||
|
||||
const model = (await this.getInputConnectionData(
|
||||
NodeConnectionType.AiLanguageModel,
|
||||
|
||||
@@ -162,7 +162,7 @@ export class ChainSummarizationV1 implements INodeType {
|
||||
}
|
||||
|
||||
async execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
|
||||
this.logger.verbose('Executing Vector Store QA Chain');
|
||||
this.logger.debug('Executing Vector Store QA Chain');
|
||||
const type = this.getNodeParameter('type', 0) as 'map_reduce' | 'stuff' | 'refine';
|
||||
|
||||
const model = (await this.getInputConnectionData(
|
||||
|
||||
@@ -311,7 +311,7 @@ export class ChainSummarizationV2 implements INodeType {
|
||||
}
|
||||
|
||||
async execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
|
||||
this.logger.verbose('Executing Summarization Chain V2');
|
||||
this.logger.debug('Executing Summarization Chain V2');
|
||||
const operationMode = this.getNodeParameter('operationMode', 0, 'nodeInputJson') as
|
||||
| 'nodeInputJson'
|
||||
| 'nodeInputBinary'
|
||||
|
||||
@@ -178,7 +178,7 @@ export class DocumentBinaryInputLoader implements INodeType {
|
||||
};
|
||||
|
||||
async supplyData(this: IExecuteFunctions): Promise<SupplyData> {
|
||||
this.logger.verbose('Supply Data for Binary Input Loader');
|
||||
this.logger.debug('Supply Data for Binary Input Loader');
|
||||
const textSplitter = (await this.getInputConnectionData(
|
||||
NodeConnectionType.AiTextSplitter,
|
||||
0,
|
||||
|
||||
@@ -80,7 +80,7 @@ export class DocumentJsonInputLoader implements INodeType {
|
||||
};
|
||||
|
||||
async supplyData(this: IExecuteFunctions): Promise<SupplyData> {
|
||||
this.logger.verbose('Supply Data for JSON Input Loader');
|
||||
this.logger.debug('Supply Data for JSON Input Loader');
|
||||
const textSplitter = (await this.getInputConnectionData(
|
||||
NodeConnectionType.AiTextSplitter,
|
||||
0,
|
||||
|
||||
@@ -93,7 +93,7 @@ export class EmbeddingsAzureOpenAi implements INodeType {
|
||||
};
|
||||
|
||||
async supplyData(this: IExecuteFunctions, itemIndex: number): Promise<SupplyData> {
|
||||
this.logger.verbose('Supply data for embeddings');
|
||||
this.logger.debug('Supply data for embeddings');
|
||||
const credentials = await this.getCredentials<{
|
||||
apiKey: string;
|
||||
resourceName: string;
|
||||
|
||||
@@ -100,7 +100,7 @@ export class EmbeddingsCohere implements INodeType {
|
||||
};
|
||||
|
||||
async supplyData(this: IExecuteFunctions, itemIndex: number): Promise<SupplyData> {
|
||||
this.logger.verbose('Supply data for embeddings Cohere');
|
||||
this.logger.debug('Supply data for embeddings Cohere');
|
||||
const modelName = this.getNodeParameter('modelName', itemIndex, 'embed-english-v2.0') as string;
|
||||
const credentials = await this.getCredentials<{ apiKey: string }>('cohereApi');
|
||||
const embeddings = new CohereEmbeddings({
|
||||
|
||||
@@ -117,7 +117,7 @@ export class EmbeddingsGoogleGemini implements INodeType {
|
||||
};
|
||||
|
||||
async supplyData(this: IExecuteFunctions, itemIndex: number): Promise<SupplyData> {
|
||||
this.logger.verbose('Supply data for embeddings Google Gemini');
|
||||
this.logger.debug('Supply data for embeddings Google Gemini');
|
||||
const modelName = this.getNodeParameter(
|
||||
'modelName',
|
||||
itemIndex,
|
||||
|
||||
@@ -116,7 +116,7 @@ export class EmbeddingsGooglePalm implements INodeType {
|
||||
};
|
||||
|
||||
async supplyData(this: IExecuteFunctions, itemIndex: number): Promise<SupplyData> {
|
||||
this.logger.verbose('Supply data for embeddings Google PaLM');
|
||||
this.logger.debug('Supply data for embeddings Google PaLM');
|
||||
const modelName = this.getNodeParameter(
|
||||
'modelName',
|
||||
itemIndex,
|
||||
|
||||
@@ -82,7 +82,7 @@ export class EmbeddingsHuggingFaceInference implements INodeType {
|
||||
};
|
||||
|
||||
async supplyData(this: IExecuteFunctions, itemIndex: number): Promise<SupplyData> {
|
||||
this.logger.verbose('Supply data for embeddings HF Inference');
|
||||
this.logger.debug('Supply data for embeddings HF Inference');
|
||||
const model = this.getNodeParameter(
|
||||
'modelName',
|
||||
itemIndex,
|
||||
|
||||
@@ -45,7 +45,7 @@ export class EmbeddingsOllama implements INodeType {
|
||||
};
|
||||
|
||||
async supplyData(this: IExecuteFunctions, itemIndex: number): Promise<SupplyData> {
|
||||
this.logger.verbose('Supply data for embeddings Ollama');
|
||||
this.logger.debug('Supply data for embeddings Ollama');
|
||||
const modelName = this.getNodeParameter('model', itemIndex) as string;
|
||||
const credentials = await this.getCredentials('ollamaApi');
|
||||
|
||||
|
||||
@@ -171,7 +171,7 @@ export class EmbeddingsOpenAi implements INodeType {
|
||||
};
|
||||
|
||||
async supplyData(this: IExecuteFunctions, itemIndex: number): Promise<SupplyData> {
|
||||
this.logger.verbose('Supply data for embeddings');
|
||||
this.logger.debug('Supply data for embeddings');
|
||||
const credentials = await this.getCredentials('openAiApi');
|
||||
|
||||
const options = this.getNodeParameter('options', itemIndex, {}) as {
|
||||
|
||||
@@ -88,7 +88,7 @@ export class MemoryChatRetriever implements INodeType {
|
||||
};
|
||||
|
||||
async execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
|
||||
this.logger.verbose('Executing Chat Memory Retriever');
|
||||
this.logger.debug('Executing Chat Memory Retriever');
|
||||
|
||||
const memory = (await this.getInputConnectionData(NodeConnectionType.AiMemory, 0)) as
|
||||
| BaseChatMemory
|
||||
|
||||
@@ -64,7 +64,7 @@ export class RetrieverContextualCompression implements INodeType {
|
||||
};
|
||||
|
||||
async supplyData(this: IExecuteFunctions, itemIndex: number): Promise<SupplyData> {
|
||||
this.logger.verbose('Supplying data for Contextual Compression Retriever');
|
||||
this.logger.debug('Supplying data for Contextual Compression Retriever');
|
||||
|
||||
const model = (await this.getInputConnectionData(
|
||||
NodeConnectionType.AiLanguageModel,
|
||||
|
||||
@@ -83,7 +83,7 @@ export class RetrieverMultiQuery implements INodeType {
|
||||
};
|
||||
|
||||
async supplyData(this: IExecuteFunctions, itemIndex: number): Promise<SupplyData> {
|
||||
this.logger.verbose('Supplying data for MultiQuery Retriever');
|
||||
this.logger.debug('Supplying data for MultiQuery Retriever');
|
||||
|
||||
const options = this.getNodeParameter('options', itemIndex, {}) as { queryCount?: number };
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ export class RetrieverVectorStore implements INodeType {
|
||||
};
|
||||
|
||||
async supplyData(this: IExecuteFunctions, itemIndex: number): Promise<SupplyData> {
|
||||
this.logger.verbose('Supplying data for Vector Store Retriever');
|
||||
this.logger.debug('Supplying data for Vector Store Retriever');
|
||||
|
||||
const topK = this.getNodeParameter('topK', itemIndex, 4) as number;
|
||||
const vectorStore = (await this.getInputConnectionData(
|
||||
|
||||
@@ -64,7 +64,7 @@ export class TextSplitterCharacterTextSplitter implements INodeType {
|
||||
};
|
||||
|
||||
async supplyData(this: IExecuteFunctions, itemIndex: number): Promise<SupplyData> {
|
||||
this.logger.verbose('Supply Data for Text Splitter');
|
||||
this.logger.debug('Supply Data for Text Splitter');
|
||||
|
||||
const separator = this.getNodeParameter('separator', itemIndex) as string;
|
||||
const chunkSize = this.getNodeParameter('chunkSize', itemIndex) as number;
|
||||
|
||||
@@ -95,7 +95,7 @@ export class TextSplitterRecursiveCharacterTextSplitter implements INodeType {
|
||||
};
|
||||
|
||||
async supplyData(this: IExecuteFunctions, itemIndex: number): Promise<SupplyData> {
|
||||
this.logger.verbose('Supply Data for Text Splitter');
|
||||
this.logger.debug('Supply Data for Text Splitter');
|
||||
|
||||
const chunkSize = this.getNodeParameter('chunkSize', itemIndex) as number;
|
||||
const chunkOverlap = this.getNodeParameter('chunkOverlap', itemIndex) as number;
|
||||
|
||||
@@ -57,7 +57,7 @@ export class TextSplitterTokenSplitter implements INodeType {
|
||||
};
|
||||
|
||||
async supplyData(this: IExecuteFunctions, itemIndex: number): Promise<SupplyData> {
|
||||
this.logger.verbose('Supply Data for Text Splitter');
|
||||
this.logger.debug('Supply Data for Text Splitter');
|
||||
|
||||
const chunkSize = this.getNodeParameter('chunkSize', itemIndex) as number;
|
||||
const chunkOverlap = this.getNodeParameter('chunkOverlap', itemIndex) as number;
|
||||
|
||||
@@ -97,7 +97,7 @@ export class VectorStorePineconeInsert implements INodeType {
|
||||
|
||||
async execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
|
||||
const items = this.getInputData(0);
|
||||
this.logger.verbose('Executing data for Pinecone Insert Vector Store');
|
||||
this.logger.debug('Executing data for Pinecone Insert Vector Store');
|
||||
|
||||
const namespace = this.getNodeParameter('pineconeNamespace', 0) as string;
|
||||
const index = this.getNodeParameter('pineconeIndex', 0, '', { extractValue: true }) as string;
|
||||
|
||||
@@ -85,7 +85,7 @@ export class VectorStorePineconeLoad implements INodeType {
|
||||
};
|
||||
|
||||
async supplyData(this: IExecuteFunctions, itemIndex: number): Promise<SupplyData> {
|
||||
this.logger.verbose('Supplying data for Pinecone Load Vector Store');
|
||||
this.logger.debug('Supplying data for Pinecone Load Vector Store');
|
||||
|
||||
const namespace = this.getNodeParameter('pineconeNamespace', itemIndex) as string;
|
||||
const index = this.getNodeParameter('pineconeIndex', itemIndex, '', {
|
||||
|
||||
@@ -94,7 +94,7 @@ export class VectorStoreSupabaseInsert implements INodeType {
|
||||
methods = { listSearch: { supabaseTableNameSearch } };
|
||||
|
||||
async execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
|
||||
this.logger.verbose('Executing data for Supabase Insert Vector Store');
|
||||
this.logger.debug('Executing data for Supabase Insert Vector Store');
|
||||
|
||||
const items = this.getInputData(0);
|
||||
const tableName = this.getNodeParameter('tableName', 0, '', { extractValue: true }) as string;
|
||||
|
||||
@@ -82,7 +82,7 @@ export class VectorStoreSupabaseLoad implements INodeType {
|
||||
methods = { listSearch: { supabaseTableNameSearch } };
|
||||
|
||||
async supplyData(this: IExecuteFunctions, itemIndex: number): Promise<SupplyData> {
|
||||
this.logger.verbose('Supply Supabase Load Vector Store');
|
||||
this.logger.debug('Supply Supabase Load Vector Store');
|
||||
|
||||
const tableName = this.getNodeParameter('tableName', itemIndex, '', {
|
||||
extractValue: true,
|
||||
|
||||
@@ -101,7 +101,7 @@ export class VectorStoreZepInsert implements INodeType {
|
||||
};
|
||||
|
||||
async execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
|
||||
this.logger.verbose('Executing data for Zep Insert Vector Store');
|
||||
this.logger.debug('Executing data for Zep Insert Vector Store');
|
||||
const items = this.getInputData(0);
|
||||
const collectionName = this.getNodeParameter('collectionName', 0) as string;
|
||||
const options =
|
||||
|
||||
@@ -84,7 +84,7 @@ export class VectorStoreZepLoad implements INodeType {
|
||||
};
|
||||
|
||||
async supplyData(this: IExecuteFunctions, itemIndex: number): Promise<SupplyData> {
|
||||
this.logger.verbose('Supplying data for Zep Load Vector Store');
|
||||
this.logger.debug('Supplying data for Zep Load Vector Store');
|
||||
|
||||
const collectionName = this.getNodeParameter('collectionName', itemIndex) as string;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user