mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-27 18:12:29 +08: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
|
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`);
|
log.info(`Vector search disabled - using tool-based context extraction instead`);
|
||||||
|
|
||||||
// Extract context from search results
|
// Extract context from search results
|
||||||
@ -899,6 +899,12 @@ export class ChatPipeline {
|
|||||||
const executionTime = Date.now() - startTime;
|
const executionTime = Date.now() - startTime;
|
||||||
const metrics = this.metrics.stageMetrics[stageName];
|
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.totalExecutions++;
|
||||||
metrics.averageExecutionTime =
|
metrics.averageExecutionTime =
|
||||||
(metrics.averageExecutionTime * (metrics.totalExecutions - 1) + executionTime) /
|
(metrics.averageExecutionTime * (metrics.totalExecutions - 1) + executionTime) /
|
||||||
|
Loading…
x
Reference in New Issue
Block a user