Merge pull request #41 from jlaneve/patch-1
Some checks failed
Test / test (3.10) (push) Has been cancelled
Lint / lint (push) Has been cancelled
Test / test (3.11) (push) Has been cancelled
Test / test (3.12) (push) Has been cancelled
Test / test (3.13) (push) Has been cancelled

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