@@ -63,7 +63,7 @@ async def async_main():
6363 )
6464
6565 try :
66- graph = await aiclient .create_agent_graph (
66+ graph = aiclient .create_agent_graph (
6767 graph_key ,
6868 context ,
6969 tools = {
@@ -92,10 +92,10 @@ async def async_main():
9292 print (f" Success: { summary .success } " )
9393 if summary .path :
9494 print (f" Path: { ' -> ' .join (summary .path )} " )
95- if summary .usage :
96- print (f" Input tokens: { summary .usage .input } " )
97- print (f" Output tokens: { summary .usage .output } " )
98- print (f" Total tokens: { summary .usage .total } " )
95+ if summary .tokens :
96+ print (f" Input tokens: { summary .tokens .input } " )
97+ print (f" Output tokens: { summary .tokens .output } " )
98+ print (f" Total tokens: { summary .tokens .total } " )
9999
100100 if summary .node_metrics :
101101 print ("\n Per-node metrics:" )
@@ -105,10 +105,10 @@ async def async_main():
105105 print (f" Duration: { node_summary .duration_ms } ms" )
106106 if node_summary .success is not None :
107107 print (f" Success: { node_summary .success } " )
108- if node_summary .usage :
109- print (f" Input tokens: { node_summary .usage .input } " )
110- print (f" Output tokens: { node_summary .usage .output } " )
111- print (f" Total tokens: { node_summary .usage .total } " )
108+ if node_summary .tokens :
109+ print (f" Input tokens: { node_summary .tokens .input } " )
110+ print (f" Output tokens: { node_summary .tokens .output } " )
111+ print (f" Total tokens: { node_summary .tokens .total } " )
112112 if node_summary .tool_calls :
113113 print (f" Tool calls: { ', ' .join (node_summary .tool_calls )} " )
114114
0 commit comments