mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-06 08:16:43 +00:00
Update litellm/proxy/health_endpoints/_health_endpoints.py
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
This commit is contained in:
parent
b12ba12749
commit
33342e4502
1 changed files with 17 additions and 1 deletions
|
|
@ -344,7 +344,23 @@ async def health_services_endpoint( # noqa: PLR0915
|
|||
from litellm.litellm_core_utils.litellm_logging import aktoLogger as _akto
|
||||
from litellm.integrations.akto.akto_logger import AktoLogger
|
||||
|
||||
akto_logger = _akto if _akto is not None else AktoLogger()
|
||||
elif service == "akto":
|
||||
from litellm.litellm_core_utils.litellm_logging import aktoLogger as _akto
|
||||
from litellm.integrations.akto.akto_logger import AktoLogger
|
||||
|
||||
try:
|
||||
akto_logger = _akto if _akto is not None else AktoLogger()
|
||||
response = await akto_logger.async_health_check()
|
||||
except Exception as e:
|
||||
return {"status": "unhealthy", "error_message": str(e)}
|
||||
return {
|
||||
"status": response["status"],
|
||||
"message": (
|
||||
response["error_message"]
|
||||
if response["status"] == "unhealthy"
|
||||
else "Akto is healthy"
|
||||
),
|
||||
}
|
||||
response = await akto_logger.async_health_check()
|
||||
return {
|
||||
"status": response["status"],
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue