diff options
Diffstat (limited to 'packages/core/src/services/loopDetectionService.ts')
| -rw-r--r-- | packages/core/src/services/loopDetectionService.ts | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/packages/core/src/services/loopDetectionService.ts b/packages/core/src/services/loopDetectionService.ts index a01e4ee9..409e92a8 100644 --- a/packages/core/src/services/loopDetectionService.ts +++ b/packages/core/src/services/loopDetectionService.ts @@ -9,7 +9,6 @@ import { GeminiEventType, ServerGeminiStreamEvent } from '../core/turn.js'; import { logLoopDetected } from '../telemetry/loggers.js'; import { LoopDetectedEvent, LoopType } from '../telemetry/types.js'; import { Config, DEFAULT_GEMINI_FLASH_MODEL } from '../config/config.js'; -import { SchemaUnion, Type } from '@google/genai'; const TOOL_CALL_LOOP_THRESHOLD = 5; const CONTENT_LOOP_THRESHOLD = 10; @@ -341,16 +340,16 @@ Please analyze the conversation history to determine the possibility that the co ...recentHistory, { role: 'user', parts: [{ text: prompt }] }, ]; - const schema: SchemaUnion = { - type: Type.OBJECT, + const schema: Record<string, unknown> = { + type: 'object', properties: { reasoning: { - type: Type.STRING, + type: 'string', description: 'Your reasoning on if the conversation is looping without forward progress.', }, confidence: { - type: Type.NUMBER, + type: 'number', description: 'A number between 0.0 and 1.0 representing your confidence that the conversation is in an unproductive state.', }, |
