mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 18:54:30 +00:00
(fix) log cache hits on SpendLogs table
This commit is contained in:
parent
bf851ef19a
commit
2f3765a03f
2 changed files with 10 additions and 0 deletions
|
@ -1003,6 +1003,10 @@ def get_logging_payload(kwargs, response_obj, start_time, end_time):
|
|||
cache_key = litellm.cache.get_cache_key(**kwargs)
|
||||
else:
|
||||
cache_key = "Cache OFF"
|
||||
if cache_hit == True:
|
||||
import time
|
||||
|
||||
id = f"{id}_cache_hit{time.time()}" # SpendLogs does not allow duplicate request_id
|
||||
|
||||
payload = {
|
||||
"request_id": id,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue