cost_usd -> total_cost_usd in example

This commit is contained in:
Julian LaNeve 2025-06-25 15:18:52 -04:00 committed by GitHub
parent 52cc0db139
commit f868c59c72
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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()