[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
9d2aa80953
commit
72211d18b7
1 changed files with 1 additions and 3 deletions
|
|
@ -200,9 +200,7 @@ def calculate_cost(
|
|||
# style usage chunk Studio re-emits (``_build_usage_chunk``) uses
|
||||
# ``prompt_tokens`` / ``completion_tokens``. Either is fine here
|
||||
# so a caller can hand whichever envelope landed first.
|
||||
input_tokens = int(
|
||||
usage.get("input_tokens") or usage.get("prompt_tokens") or 0
|
||||
)
|
||||
input_tokens = int(usage.get("input_tokens") or usage.get("prompt_tokens") or 0)
|
||||
output_tokens = int(
|
||||
usage.get("output_tokens") or usage.get("completion_tokens") or 0
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue