From 23834e8a029a7a0826decc941824e19c3693a34a Mon Sep 17 00:00:00 2001 From: Hangfei Lin Date: Fri, 12 Sep 2025 11:01:55 -0700 Subject: [PATCH] chore: Remove unused _get_audio_transcription_from_session function This function is no longer called or needed within the `BaseLlmFlow` class. PiperOrigin-RevId: 806351470 --- .../adk/flows/llm_flows/base_llm_flow.py | 36 ------------------- 1 file changed, 36 deletions(-) diff --git a/src/google/adk/flows/llm_flows/base_llm_flow.py b/src/google/adk/flows/llm_flows/base_llm_flow.py index e797b4ab..1c36a1a0 100644 --- a/src/google/adk/flows/llm_flows/base_llm_flow.py +++ b/src/google/adk/flows/llm_flows/base_llm_flow.py @@ -69,42 +69,6 @@ DEFAULT_TASK_COMPLETION_DELAY = 1.0 DEFAULT_ENABLE_CACHE_STATISTICS = False -def _get_audio_transcription_from_session( - invocation_context: InvocationContext, -) -> list[types.Content]: - """Get audio and transcription content from session events. - - Collects audio file references and transcription text from session events - to reconstruct the conversation history including multimodal content. - Args: - invocation_context: The invocation context containing session data. - Returns: - A list of Content objects containing audio files and transcriptions. - """ - contents = [] - - for event in invocation_context.session.events: - # Collect transcription text events - if hasattr(event, 'input_transcription') and event.input_transcription: - contents.append( - types.Content( - role='user', - parts=[types.Part.from_text(text=event.input_transcription.text)], - ) - ) - - if hasattr(event, 'output_transcription') and event.output_transcription: - contents.append( - types.Content( - role='model', - parts=[ - types.Part.from_text(text=event.output_transcription.text) - ], - ) - ) - return contents - - class BaseLlmFlow(ABC): """A basic flow that calls the LLM in a loop until a final response is generated.