forked from phoenix/litellm-mirror
(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
|
Endpoint for checking if cache can be pinged
|
||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
|
litellm_cache_params = {}
|
||||||
|
specific_cache_params = {}
|
||||||
|
|
||||||
if litellm.cache is None:
|
if litellm.cache is None:
|
||||||
raise HTTPException(
|
raise HTTPException(
|
||||||
status_code=503, detail="Cache not initialized. litellm.cache is None"
|
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():
|
for k, v in vars(litellm.cache).items():
|
||||||
try:
|
try:
|
||||||
if k == "cache":
|
if k == "cache":
|
||||||
|
@ -7618,7 +7619,6 @@ async def cache_ping():
|
||||||
"cache_type": litellm.cache.type,
|
"cache_type": litellm.cache.type,
|
||||||
"litellm_cache_params": litellm_cache_params,
|
"litellm_cache_params": litellm_cache_params,
|
||||||
}
|
}
|
||||||
return None
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
raise HTTPException(
|
raise HTTPException(
|
||||||
status_code=503,
|
status_code=503,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue