File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed
Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -63,10 +63,10 @@ async def act(
6363 # the last assistant message's content, so we do
6464 # not need to show it.
6565 summary .turn_count = message .num_turns
66+ summary .cost = message .total_cost_usd
6667 if usage := message .usage :
6768 summary .token_count = _token_count (usage )
68- summary .usage_details = message .usage
69- summary .cost = message .total_cost_usd
69+ summary .usage_details = usage
7070 case sdk .SystemMessage ():
7171 pass # TODO: Notify on tool usage?
7272 return summary
Original file line number Diff line number Diff line change @@ -72,10 +72,9 @@ class ActionSummary:
7272
7373 title : str | None = None
7474 turn_count : int | None = None
75- # TODO: Split into input and output token counts.
76- token_count : int | None = None
75+ token_count : int | None = None # TODO: Split into input and output.
7776 cost : float | None = None
78- usage_details : JSONObject | None = None
77+ usage_details : JSONObject | None = None # TODO: Use.
7978
8079 def increment_turn_count (self , n : int = 1 , init : bool = False ) -> None :
8180 self ._increment ("turn_count" , n , init )
You can’t perform that action at this time.
0 commit comments