You've already forked adk-python
mirror of
https://github.com/encounter/adk-python.git
synced 2026-03-30 10:57:20 -07:00
chore: Filter out adk_request_input event from content list
Co-authored-by: Shangjie Chen <deanchen@google.com> PiperOrigin-RevId: 859321034
This commit is contained in:
committed by
Copybara-Service
parent
b57a3d43e4
commit
295b345587
@@ -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.
|
||||
|
||||
|
||||
@@ -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__)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user