fix(llm): remove the vectorSearch stage from the pipeline

This commit is contained in:
perf3ct 2025-06-07 18:57:08 +00:00
parent 4550c12c6e
commit b0d804da08
No known key found for this signature in database
GPG Key ID: 569C4EEC436F5232

View File

@ -210,7 +210,7 @@ export class ChatPipeline {
executionTime: Date.now() - vectorSearchStartTime
};
this.updateStageMetrics('vectorSearch', vectorSearchStartTime);
// Skip metrics update for disabled vector search functionality
log.info(`Vector search disabled - using tool-based context extraction instead`);
// Extract context from search results
@ -899,6 +899,12 @@ export class ChatPipeline {
const executionTime = Date.now() - startTime;
const metrics = this.metrics.stageMetrics[stageName];
// Guard against undefined metrics (e.g., for removed stages)
if (!metrics) {
log.info(`WARNING: Attempted to update metrics for unknown stage: ${stageName}`);
return;
}
metrics.totalExecutions++;
metrics.averageExecutionTime =
(metrics.averageExecutionTime * (metrics.totalExecutions - 1) + executionTime) /