mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-08-24 16:42:24 +02:00
Fix async transformer example to use async iteration on channel
This commit is contained in:
@@ -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]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user