diff --git a/src/google/adk/flows/llm_flows/audio_cache_manager.py b/src/google/adk/flows/llm_flows/audio_cache_manager.py index 6b59fecb..5ba55c53 100644 --- a/src/google/adk/flows/llm_flows/audio_cache_manager.py +++ b/src/google/adk/flows/llm_flows/audio_cache_manager.py @@ -141,7 +141,6 @@ class AudioCacheManager: Returns: True if the cache was successfully flushed, False otherwise. """ - print('flush cache') if not invocation_context.artifact_service or not audio_cache: logger.debug('Skipping cache flush: no artifact service or empty cache') return False diff --git a/src/google/adk/models/gemini_llm_connection.py b/src/google/adk/models/gemini_llm_connection.py index 1811e49e..fd6f4a78 100644 --- a/src/google/adk/models/gemini_llm_connection.py +++ b/src/google/adk/models/gemini_llm_connection.py @@ -164,8 +164,14 @@ class GeminiLlmConnection(BaseLlmConnection): message.server_content.input_transcription and message.server_content.input_transcription.text ): + user_text = message.server_content.input_transcription.text + parts = [ + types.Part.from_text( + text=user_text, + ) + ] llm_response = LlmResponse( - input_transcription=message.server_content.input_transcription, + content=types.Content(role='user', parts=parts) ) yield llm_response if ( @@ -180,8 +186,13 @@ class GeminiLlmConnection(BaseLlmConnection): # We rely on other control signals to determine when to yield the # full text response(turn_complete, interrupted, or tool_call). text += message.server_content.output_transcription.text + parts = [ + types.Part.from_text( + text=message.server_content.output_transcription.text + ) + ] llm_response = LlmResponse( - output_transcription=message.server_content.output_transcription + content=types.Content(role='model', parts=parts), partial=True ) yield llm_response