Merge pull request #41 from jlaneve/patch-1

cost_usd -> total_cost_usd in example
This commit is contained in:
Lina Tawfik
2025-06-25 23:24:35 -07:00
committed by GitHub

View File

@@ -60,8 +60,8 @@ async def with_tools_example():
for block in message.content:
if isinstance(block, TextBlock):
print(f"Claude: {block.text}")
elif isinstance(message, ResultMessage) and message.cost_usd > 0:
print(f"\nCost: ${message.cost_usd:.4f}")
elif isinstance(message, ResultMessage) and message.total_cost_usd > 0:
print(f"\nCost: ${message.total_cost_usd:.4f}")
print()