mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 19:49:01 +01:00 
			
		
		
		
	fix(llm): remove the vectorSearch stage from the pipeline
This commit is contained in:
		
							parent
							
								
									4550c12c6e
								
							
						
					
					
						commit
						b0d804da08
					
				| @ -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) / | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 perf3ct
						perf3ct