diff --git a/src/google/adk/flows/llm_flows/contents.py b/src/google/adk/flows/llm_flows/contents.py index 046a443a..0a17ade6 100644 --- a/src/google/adk/flows/llm_flows/contents.py +++ b/src/google/adk/flows/llm_flows/contents.py @@ -29,6 +29,7 @@ from ._base_llm_processor import BaseLlmRequestProcessor from .functions import remove_client_function_call_id from .functions import REQUEST_CONFIRMATION_FUNCTION_CALL_NAME from .functions import REQUEST_EUC_FUNCTION_CALL_NAME +from .functions import REQUEST_INPUT_FUNCTION_CALL_NAME logger = logging.getLogger('google_adk.' + __name__) @@ -280,6 +281,7 @@ def _should_include_event_in_context( or _is_adk_framework_event(event) or _is_auth_event(event) or _is_request_confirmation_event(event) + or _is_request_input_event(event) ) @@ -675,6 +677,11 @@ def _is_adk_framework_event(event: Event) -> bool: return _is_function_call_event(event, 'adk_framework') +def _is_request_input_event(event: Event) -> bool: + """Checks if the event is a request input event.""" + return _is_function_call_event(event, REQUEST_INPUT_FUNCTION_CALL_NAME) + + def _is_live_model_audio_event_with_inline_data(event: Event) -> bool: """Check if the event is a live/bidi audio event with inline data. diff --git a/src/google/adk/flows/llm_flows/functions.py b/src/google/adk/flows/llm_flows/functions.py index ec1cd230..6e512ae8 100644 --- a/src/google/adk/flows/llm_flows/functions.py +++ b/src/google/adk/flows/llm_flows/functions.py @@ -49,6 +49,7 @@ if TYPE_CHECKING: AF_FUNCTION_CALL_ID_PREFIX = 'adk-' REQUEST_EUC_FUNCTION_CALL_NAME = 'adk_request_credential' REQUEST_CONFIRMATION_FUNCTION_CALL_NAME = 'adk_request_confirmation' +REQUEST_INPUT_FUNCTION_CALL_NAME = 'adk_request_input' logger = logging.getLogger('google_adk.' + __name__)