|
2 | 2 | // |
3 | 3 | // SPDX-License-Identifier: Apache-2.0 |
4 | 4 | import { |
5 | | - type FunctionDeclaration, |
6 | | - type FunctionResponse, |
7 | | - type GoogleGenAIOptions, |
8 | | - type LiveClientToolResponse, |
9 | | - type Session, |
10 | 5 | ActivityHandling, |
11 | 6 | type AudioTranscriptionConfig, |
12 | 7 | Behavior, |
| 8 | + type Content, |
13 | 9 | type ContextWindowCompressionConfig, |
| 10 | + type FunctionDeclaration, |
| 11 | + type FunctionResponse, |
14 | 12 | FunctionResponseScheduling, |
15 | 13 | GoogleGenAI, |
| 14 | + type GoogleGenAIOptions, |
16 | 15 | type HttpOptions, |
17 | | - type RealtimeInputConfig, |
18 | | - type LiveServerMessage, |
| 16 | + type LiveClientRealtimeInput, |
| 17 | + type LiveClientToolResponse, |
19 | 18 | type LiveConnectConfig, |
20 | 19 | type LiveServerContent, |
| 20 | + type LiveServerGoAway, |
| 21 | + type LiveServerMessage, |
21 | 22 | type LiveServerToolCall, |
22 | 23 | type LiveServerToolCallCancellation, |
23 | | - type UsageMetadata, |
24 | | - type ModalityTokenCount, |
25 | 24 | MediaModality, |
26 | | - type LiveServerGoAway, |
27 | 25 | Modality, |
28 | | - type Content, |
29 | | - type LiveClientRealtimeInput |
30 | | -} from "@google/genai"; |
| 26 | + type ModalityTokenCount, |
| 27 | + type RealtimeInputConfig, |
| 28 | + type Session, |
| 29 | + type UsageMetadata, |
| 30 | +} from '@google/genai'; |
31 | 31 | import type { APIConnectOptions } from '@livekit/agents'; |
32 | 32 | import { |
33 | 33 | APIConnectionError, |
@@ -949,10 +949,7 @@ export class RealtimeSession extends llm.RealtimeSession { |
949 | 949 | } |
950 | 950 | } |
951 | 951 |
|
952 | | - private async onReceiveMessage( |
953 | | - session: Session, |
954 | | - response: LiveServerMessage, |
955 | | - ): Promise<void> { |
| 952 | + private async onReceiveMessage(session: Session, response: LiveServerMessage): Promise<void> { |
956 | 953 | // Skip logging verbose audio data events |
957 | 954 | const hasAudioData = response.serverContent?.modelTurn?.parts?.some( |
958 | 955 | (part) => part.inlineData?.data, |
|
0 commit comments