Merge pull request #1557 from BerriAI/litellm_emit_spend_logs

feat(utils.py): emit response cost as part of logs
This commit is contained in:
Krish Dholakia 2024-01-22 21:02:40 -08:00 committed by GitHub
commit bedb08bdef
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 191 additions and 46 deletions

View file

@ -260,6 +260,7 @@ def test_call_with_user_over_budget(prisma_client):
"user_api_key_user_id": user_id,
}
},
"response_cost": 0.00002,
},
completion_response=resp,
start_time=datetime.now(),
@ -335,6 +336,7 @@ def test_call_with_user_over_budget_stream(prisma_client):
"user_api_key_user_id": user_id,
}
},
"response_cost": 0.00002,
},
completion_response=ModelResponse(),
start_time=datetime.now(),