Merge pull request #2187 from BerriAI/litellm_clickhouse_logs

[FEAT] Use Logging on clickhouse
This commit is contained in:
Ishaan Jaff 2024-02-26 08:26:02 -08:00 committed by GitHub
commit 4067d4f1e5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 260 additions and 0 deletions

View file

@ -1369,6 +1369,7 @@ def get_logging_payload(kwargs, response_obj, start_time, end_time):
"user": kwargs.get("user", ""),
"metadata": metadata,
"cache_key": cache_key,
"spend": kwargs.get("response_cost", 0),
"total_tokens": usage.get("total_tokens", 0),
"prompt_tokens": usage.get("prompt_tokens", 0),
"completion_tokens": usage.get("completion_tokens", 0),