Spaces:
Paused
Paused
Ahmet Kaan Sever
commited on
Commit
·
ddb6316
1
Parent(s):
a43bda3
Status check API
Browse files- svc/router.py +4 -1
svc/router.py
CHANGED
@@ -43,6 +43,10 @@ async def login_for_access_token(form_data: OAuth2PasswordRequestForm = Depends(
|
|
43 |
async def protected_route(username: str = Depends(get_current_user)):
|
44 |
return {"message": f"Hello, {username}! This is a protected resource."}
|
45 |
|
|
|
|
|
|
|
|
|
46 |
|
47 |
@router.post("/chat", response_model=TaskResponse)
|
48 |
def inference_model(request: LMHarnessTaskRequest, username: str = Depends(get_current_user)):
|
@@ -78,7 +82,6 @@ def inference_model(request: LMHarnessTaskRequest, username: str = Depends(get_c
|
|
78 |
return TaskResponse(results=dumped)
|
79 |
|
80 |
|
81 |
-
|
82 |
@router.post("/deepeval/eval", response_model=TaskResponse)
|
83 |
async def deep_eval_suite(request: DeepEvalSuiteRequest):
|
84 |
des = DeepEvalTaskManager(request.model_name, request.tasks)
|
|
|
43 |
async def protected_route(username: str = Depends(get_current_user)):
|
44 |
return {"message": f"Hello, {username}! This is a protected resource."}
|
45 |
|
46 |
+
@router.get("/deepeval/status")
|
47 |
+
async def deep_eval_status():
|
48 |
+
#Return running with 200 status code
|
49 |
+
return {"status": "running"}
|
50 |
|
51 |
@router.post("/chat", response_model=TaskResponse)
|
52 |
def inference_model(request: LMHarnessTaskRequest, username: str = Depends(get_current_user)):
|
|
|
82 |
return TaskResponse(results=dumped)
|
83 |
|
84 |
|
|
|
85 |
@router.post("/deepeval/eval", response_model=TaskResponse)
|
86 |
async def deep_eval_suite(request: DeepEvalSuiteRequest):
|
87 |
des = DeepEvalTaskManager(request.model_name, request.tasks)
|