(feat) use clickhouse as a logging provider

This commit is contained in:
ishaan-jaff 2024-02-26 07:35:16 -08:00
parent 13f1d7b96f
commit 8045053398
3 changed files with 64 additions and 13 deletions

View file

@ -1360,6 +1360,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),