mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-14 23:21:35 +00:00
parent
a27f5cc6c9
commit
b4f2d6ddea
1 changed files with 2 additions and 3 deletions
|
|
@ -43,9 +43,8 @@ async def test_anthropic_basic_completion_with_headers():
|
|||
json.dumps(response_json, indent=4, default=str),
|
||||
)
|
||||
reported_usage = response_json.get("usage", None)
|
||||
# fix null checks for reported_usage
|
||||
anthropic_api_input_tokens = reported_usage.get("input_tokens", None) if reported_usage else None
|
||||
anthropic_api_output_tokens = reported_usage.get("output_tokens", None) if reported_usage else None
|
||||
anthropic_api_input_tokens = reported_usage.get("input_tokens", None)
|
||||
anthropic_api_output_tokens = reported_usage.get("output_tokens", None)
|
||||
litellm_call_id = response_headers.get("x-litellm-call-id")
|
||||
|
||||
print(f"LiteLLM Call ID: {litellm_call_id}")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue