mirror of
https://github.com/EvolutionAPI/adk-python.git
synced 2025-07-13 15:14:50 -06:00
Add role to the event returned in agent callback sample
Events without a role are filtered out in the next turns. PiperOrigin-RevId: 758393355
This commit is contained in:
parent
f6bdd555fb
commit
ff9de71869
@ -92,7 +92,9 @@ def after_agent_cb1(callback_context):
|
||||
|
||||
def after_agent_cb2(callback_context):
|
||||
print('@after_agent_cb2')
|
||||
return types.Content(
|
||||
# ModelContent (or Content with role set to 'model') must be returned.
|
||||
# Otherwise, the event will be excluded from the context in the next turn.
|
||||
return types.ModelContent(
|
||||
parts=[
|
||||
types.Part(
|
||||
text='(stopped) after_agent_cb2',
|
||||
|
Loading…
Reference in New Issue
Block a user