mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 11:14:04 +00:00
(feat) better debugging for /cache/ping
This commit is contained in:
parent
2256ece5a9
commit
4ed551dc52
1 changed files with 3 additions and 3 deletions
|
@ -7571,13 +7571,14 @@ async def cache_ping():
|
|||
Endpoint for checking if cache can be pinged
|
||||
"""
|
||||
try:
|
||||
litellm_cache_params = {}
|
||||
specific_cache_params = {}
|
||||
|
||||
if litellm.cache is None:
|
||||
raise HTTPException(
|
||||
status_code=503, detail="Cache not initialized. litellm.cache is None"
|
||||
)
|
||||
|
||||
litellm_cache_params = {}
|
||||
specific_cache_params = {}
|
||||
for k, v in vars(litellm.cache).items():
|
||||
try:
|
||||
if k == "cache":
|
||||
|
@ -7618,7 +7619,6 @@ async def cache_ping():
|
|||
"cache_type": litellm.cache.type,
|
||||
"litellm_cache_params": litellm_cache_params,
|
||||
}
|
||||
return None
|
||||
except Exception as e:
|
||||
raise HTTPException(
|
||||
status_code=503,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue