Fix async transformer example to use async iteration on channel

This commit is contained in:
Nick Hollon
2026-04-15 19:02:24 -04:00
parent 5b1f86facc
commit b72b5fefd0
@@ -446,7 +446,7 @@ async def run_v2_async_with_transformer(question: str) -> None:
_ = await run.output
snapshots = list(run.extensions["token_metrics"])
snapshots = [s async for s in run.extensions["token_metrics"]]
final = next((s for s in snapshots if s.is_final), None)
periodic = [s for s in snapshots if not s.is_final]