streaming: switch to stream_async + iter_chunks response drain
This commit is contained in:
@@ -187,8 +187,10 @@ def handler(event, context):
|
||||
payload=json.dumps(payload).encode(),
|
||||
)
|
||||
|
||||
# Consume streaming response (agent delivers to Telegram via send_message tool)
|
||||
for chunk in response.get('response', []):
|
||||
pass # intentional no-op — agent handles delivery internally
|
||||
# Drain streaming response body (agent delivers to Telegram via send_message tool)
|
||||
body = response.get('response')
|
||||
if body is not None:
|
||||
for _ in body.iter_chunks():
|
||||
pass
|
||||
|
||||
print(f"[agent-runner] Completed session={session_id} actor={actor_id}")
|
||||
|
||||
Reference in New Issue
Block a user