diff options
Diffstat (limited to 'packages/server/src/utils/nextSpeakerChecker.ts')
| -rw-r--r-- | packages/server/src/utils/nextSpeakerChecker.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/packages/server/src/utils/nextSpeakerChecker.ts b/packages/server/src/utils/nextSpeakerChecker.ts index 5eb0c512..3fe813db 100644 --- a/packages/server/src/utils/nextSpeakerChecker.ts +++ b/packages/server/src/utils/nextSpeakerChecker.ts @@ -4,8 +4,9 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { Chat, Content, SchemaUnion, Type } from '@google/genai'; +import { Content, SchemaUnion, Type } from '@google/genai'; import { GeminiClient } from '../core/client.js'; +import { GeminiChat } from '../core/geminiChat.js'; const CHECK_PROMPT = `Analyze *only* the content and structure of your immediately preceding response (your last turn in the conversation history). Based *strictly* on that response, determine who should logically speak next: the 'user' or the 'model' (you). **Decision Rules (apply in order):** @@ -57,7 +58,7 @@ export interface NextSpeakerResponse { } export async function checkNextSpeaker( - chat: Chat, + chat: GeminiChat, geminiClient: GeminiClient, ): Promise<NextSpeakerResponse | null> { // We need to capture the curated history because there are many moments when the model will return invalid turns |
