You've already forked adk-python
mirror of
https://github.com/encounter/adk-python.git
synced 2026-03-30 10:57:20 -07:00
feat: Add an internal function name 'adk_framework' to allow passing function response to the framework but not poluting the agent context
Co-authored-by: Shangjie Chen <deanchen@google.com> PiperOrigin-RevId: 845933584
This commit is contained in:
committed by
Copybara-Service
parent
78c96e99ff
commit
589f15cb27
@@ -270,6 +270,7 @@ def _should_include_event_in_context(
|
||||
return not (
|
||||
_contains_empty_content(event)
|
||||
or not _is_event_belongs_to_branch(current_branch, event)
|
||||
or _is_adk_framework_event(event)
|
||||
or _is_auth_event(event)
|
||||
or _is_request_confirmation_event(event)
|
||||
)
|
||||
@@ -656,6 +657,11 @@ def _is_request_confirmation_event(event: Event) -> bool:
|
||||
return _is_function_call_event(event, REQUEST_CONFIRMATION_FUNCTION_CALL_NAME)
|
||||
|
||||
|
||||
def _is_adk_framework_event(event: Event) -> bool:
|
||||
"""Checks if the event is an ADK framework event."""
|
||||
return _is_function_call_event(event, 'adk_framework')
|
||||
|
||||
|
||||
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.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user