mirror of
https://github.com/anthropics/claude-code-sdk-python.git
synced 2025-07-07 14:45:00 +00:00
cost_usd -> total_cost_usd in example
This commit is contained in:
parent
52cc0db139
commit
f868c59c72
1 changed files with 2 additions and 2 deletions
|
@ -60,8 +60,8 @@ async def with_tools_example():
|
||||||
for block in message.content:
|
for block in message.content:
|
||||||
if isinstance(block, TextBlock):
|
if isinstance(block, TextBlock):
|
||||||
print(f"Claude: {block.text}")
|
print(f"Claude: {block.text}")
|
||||||
elif isinstance(message, ResultMessage) and message.cost_usd > 0:
|
elif isinstance(message, ResultMessage) and message.total_cost_usd > 0:
|
||||||
print(f"\nCost: ${message.cost_usd:.4f}")
|
print(f"\nCost: ${message.total_cost_usd:.4f}")
|
||||||
print()
|
print()
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue