From 5115690a4a0d43d2ecb8f3012ba1eeffe5a81596 Mon Sep 17 00:00:00 2001 From: Krishna Date: Mon, 8 Dec 2025 21:55:28 -0600 Subject: [PATCH] Update README.md --- contributing/samples/human_in_loop/README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/contributing/samples/human_in_loop/README.md b/contributing/samples/human_in_loop/README.md index 141851fca0..06d676cb1b 100644 --- a/contributing/samples/human_in_loop/README.md +++ b/contributing/samples/human_in_loop/README.md @@ -18,7 +18,7 @@ This example demonstrates an agent using a long-running tool (`ask_for_approval` # Example: After external approval updated_tool_output_data = { "status": "approved", - "ticket-id": ticket_id, # from original call + "ticketId": ticket_id, # from original call # ... other relevant updated data } @@ -31,12 +31,13 @@ This example demonstrates an agent using a long-running tool (`ask_for_approval` ) # Send this back to the agent - await runner.run_async( + async for _ in runner.run_async( # ... session_id, user_id ... new_message=types.Content( parts=[updated_function_response_part], role="user" ), - ) + ): + pass # exhaust generator (or handle events) ``` 6. **Agent Acts on Update**: The agent receives this message containing the `types.FunctionResponse` and, based on its instructions, proceeds with the next steps (e.g., calling another tool like `reimburse`).