mirror of
https://github.com/anthropics/claude-agent-sdk-python.git
synced 2025-10-06 01:00:03 +03:00
Merge pull request #41 from jlaneve/patch-1
cost_usd -> total_cost_usd in example
This commit is contained in:
@@ -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()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user