You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
content=f"Hello! I've received your task. Normally you can do some state initialization here, or just pass and do nothing until you get your first event. For now I'm just acknowledging that I've received a task with the following params:\n\n{json.dumps(params.params, indent=2)}.\n\nYou should only see this message once, when the task is created. All subsequent events will be handled by the `on_task_event_send` handler.",
# In future tutorials, this is where we'll add more sophisticated response logic.
57
-
await adk.messages.create(
58
-
task_id=params.task.id,
59
-
content=TextContent(
60
-
author="agent",
61
-
content=f"Hello! I've received your message. I can't respond right now, but in future tutorials we'll see how you can get me to intelligently respond to your message.",
# This is mostly for durable workflows that are cancellable like Temporal, but we will leave it here for demonstration purposes.
75
-
logger.info(f"Hello! I've received task cancel for task {params.task.id}: {params.task}. This isn't necessary for this example, but it's good to know that it's available.")
"""Default message handler with streaming support"""
23
+
return TextContent(
24
+
author="agent",
25
+
content=f"Hello! I've received your message. Here's a generic response, but in future tutorials we'll see how you can get me to intelligently respond to your message. This is what I heard you say: {params.content.content}",
0 commit comments