From d4d55b20a8ce5a1eb62e9383b4ae62b9ff9015e1 Mon Sep 17 00:00:00 2001 From: perf3ct Date: Tue, 3 Jun 2025 03:00:15 +0000 Subject: [PATCH] fix(llm): get rid of a lot of log.info() statements that were spammy --- apps/server/src/services/llm/context_extractors/index.ts | 1 - .../src/services/llm/pipeline/stages/tool_calling_stage.ts | 7 +------ apps/server/src/services/llm/tools/search_notes_tool.ts | 4 +--- apps/server/src/services/llm/tools/tool_registry.ts | 3 +-- 4 files changed, 3 insertions(+), 12 deletions(-) diff --git a/apps/server/src/services/llm/context_extractors/index.ts b/apps/server/src/services/llm/context_extractors/index.ts index f6cd07b28..9b97f38a3 100644 --- a/apps/server/src/services/llm/context_extractors/index.ts +++ b/apps/server/src/services/llm/context_extractors/index.ts @@ -42,7 +42,6 @@ export class AgentToolsManager { } try { - log.info("Initializing agent tools"); // Initialize the context service first try { diff --git a/apps/server/src/services/llm/pipeline/stages/tool_calling_stage.ts b/apps/server/src/services/llm/pipeline/stages/tool_calling_stage.ts index 1dd6ff550..f988a6394 100644 --- a/apps/server/src/services/llm/pipeline/stages/tool_calling_stage.ts +++ b/apps/server/src/services/llm/pipeline/stages/tool_calling_stage.ts @@ -559,11 +559,9 @@ export class ToolCallingStage extends BasePipelineStage { // Get agent tools manager and initialize it const agentTools = aiServiceManager.getAgentTools(); if (agentTools && typeof agentTools.initialize === 'function') { - log.info('Initializing agent tools to create vectorSearchTool'); try { // Force initialization to ensure it runs even if previously marked as initialized await agentTools.initialize(true); - log.info('Agent tools initialized successfully'); } catch (initError: any) { log.error(`Failed to initialize agent tools: ${initError.message}`); return null; @@ -143,7 +141,7 @@ export class SearchNotesTool implements ToolHandler { temperature: 0.3, maxTokens: 200, // Type assertion to bypass type checking for special internal parameters - ...(({ + ...(({ bypassFormatter: true, bypassContextProcessing: true } as Record)) diff --git a/apps/server/src/services/llm/tools/tool_registry.ts b/apps/server/src/services/llm/tools/tool_registry.ts index 9ad41fdce..6d6dd417f 100644 --- a/apps/server/src/services/llm/tools/tool_registry.ts +++ b/apps/server/src/services/llm/tools/tool_registry.ts @@ -13,7 +13,7 @@ import log from '../../log.js'; export class ToolRegistry { private static instance: ToolRegistry; private tools: Map = new Map(); - private initializationAttempted: boolean = false; + private initializationAttempted = false; private constructor() {} @@ -106,7 +106,6 @@ export class ToolRegistry { } this.tools.set(name, handler); - log.info(`Registered tool: ${name}`); } /**