Log the 2 types of loop detection (#4193)

This commit is contained in:
Sandy Tao
2025-07-14 21:44:07 -07:00
committed by GitHub
parent 734da8b9d2
commit 886faa2990
7 changed files with 102 additions and 5 deletions

View File

@@ -101,7 +101,7 @@ export class GeminiClient {
*/
private readonly COMPRESSION_PRESERVE_THRESHOLD = 0.3;
private readonly loopDetector = new LoopDetectionService();
private readonly loopDetector: LoopDetectionService;
private lastPromptId?: string;
constructor(private config: Config) {
@@ -110,6 +110,7 @@ export class GeminiClient {
}
this.embeddingModel = config.getEmbeddingModel();
this.loopDetector = new LoopDetectionService(config);
}
async initialize(contentGeneratorConfig: ContentGeneratorConfig) {