mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 11:43:54 +00:00
(feat) proxy add docstring for /test
This commit is contained in:
parent
31ad1c2748
commit
467ea282f2
1 changed files with 11 additions and 1 deletions
|
@ -1414,8 +1414,18 @@ async def config_yaml_endpoint(config_info: ConfigYAML):
|
||||||
return {"hello": "world"}
|
return {"hello": "world"}
|
||||||
|
|
||||||
|
|
||||||
@router.get("/test")
|
@router.get("/test", tags=["health"])
|
||||||
async def test_endpoint(request: Request):
|
async def test_endpoint(request: Request):
|
||||||
|
"""
|
||||||
|
A test endpoint that pings the proxy server to check if it's healthy.
|
||||||
|
|
||||||
|
Parameters:
|
||||||
|
request (Request): The incoming request.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
dict: A dictionary containing the route of the request URL.
|
||||||
|
"""
|
||||||
|
# ping the proxy server to check if its healthy
|
||||||
return {"route": request.url.path}
|
return {"route": request.url.path}
|
||||||
|
|
||||||
@router.get("/health", tags=["health"], dependencies=[Depends(user_api_key_auth)])
|
@router.get("/health", tags=["health"], dependencies=[Depends(user_api_key_auth)])
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue