mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-07 08:26:10 +00:00
fix(anthropic.py): fix linting error
This commit is contained in:
parent
0a30ba9674
commit
0ce6c038ee
1 changed files with 2 additions and 1 deletions
|
|
@ -464,7 +464,8 @@ class AnthropicConfig:
|
|||
# extract usage
|
||||
usage: litellm.Usage = getattr(response, "usage")
|
||||
anthropic_usage = AnthropicResponseUsageBlock(
|
||||
input_tokens=usage.prompt_tokens, output_tokens=usage.completion_tokens
|
||||
input_tokens=usage.prompt_tokens or 0,
|
||||
output_tokens=usage.completion_tokens or 0,
|
||||
)
|
||||
translated_obj = AnthropicResponse(
|
||||
id=response.id,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue