@@ -352,18 +352,18 @@ async def internal_lifespan(app: FastAPI):
352
352
)
353
353
354
354
@app .get ("/list-apps" )
355
- def list_apps () -> list [str ]:
355
+ async def list_apps () -> list [str ]:
356
356
return self .agent_loader .list_agents ()
357
357
358
358
@app .get ("/debug/trace/{event_id}" , tags = [TAG_DEBUG ])
359
- def get_trace_dict (event_id : str ) -> Any :
359
+ async def get_trace_dict (event_id : str ) -> Any :
360
360
event_dict = trace_dict .get (event_id , None )
361
361
if event_dict is None :
362
362
raise HTTPException (status_code = 404 , detail = "Trace not found" )
363
363
return event_dict
364
364
365
365
@app .get ("/debug/trace/session/{session_id}" , tags = [TAG_DEBUG ])
366
- def get_session_trace (session_id : str ) -> Any :
366
+ async def get_session_trace (session_id : str ) -> Any :
367
367
spans = memory_exporter .get_finished_spans (session_id )
368
368
if not spans :
369
369
return []
@@ -461,7 +461,7 @@ async def create_session(
461
461
response_model_exclude_none = True ,
462
462
tags = [TAG_EVALUATION ],
463
463
)
464
- def create_eval_set (
464
+ async def create_eval_set (
465
465
app_name : str ,
466
466
eval_set_id : str ,
467
467
):
@@ -479,7 +479,7 @@ def create_eval_set(
479
479
response_model_exclude_none = True ,
480
480
tags = [TAG_EVALUATION ],
481
481
)
482
- def list_eval_sets (app_name : str ) -> list [str ]:
482
+ async def list_eval_sets (app_name : str ) -> list [str ]:
483
483
"""Lists all eval sets for the given app."""
484
484
try :
485
485
return self .eval_sets_manager .list_eval_sets (app_name )
@@ -532,7 +532,7 @@ async def add_session_to_eval_set(
532
532
response_model_exclude_none = True ,
533
533
tags = [TAG_EVALUATION ],
534
534
)
535
- def list_evals_in_eval_set (
535
+ async def list_evals_in_eval_set (
536
536
app_name : str ,
537
537
eval_set_id : str ,
538
538
) -> list [str ]:
@@ -551,7 +551,7 @@ def list_evals_in_eval_set(
551
551
response_model_exclude_none = True ,
552
552
tags = [TAG_EVALUATION ],
553
553
)
554
- def get_eval (
554
+ async def get_eval (
555
555
app_name : str , eval_set_id : str , eval_case_id : str
556
556
) -> EvalCase :
557
557
"""Gets an eval case in an eval set."""
@@ -574,7 +574,7 @@ def get_eval(
574
574
response_model_exclude_none = True ,
575
575
tags = [TAG_EVALUATION ],
576
576
)
577
- def update_eval (
577
+ async def update_eval (
578
578
app_name : str ,
579
579
eval_set_id : str ,
580
580
eval_case_id : str ,
@@ -605,7 +605,7 @@ def update_eval(
605
605
"/apps/{app_name}/eval_sets/{eval_set_id}/evals/{eval_case_id}" ,
606
606
tags = [TAG_EVALUATION ],
607
607
)
608
- def delete_eval (app_name : str , eval_set_id : str , eval_case_id : str ):
608
+ async def delete_eval (app_name : str , eval_set_id : str , eval_case_id : str ):
609
609
try :
610
610
self .eval_sets_manager .delete_eval_case (
611
611
app_name , eval_set_id , eval_case_id
@@ -690,7 +690,7 @@ async def run_eval(
690
690
response_model_exclude_none = True ,
691
691
tags = [TAG_EVALUATION ],
692
692
)
693
- def get_eval_result (
693
+ async def get_eval_result (
694
694
app_name : str ,
695
695
eval_result_id : str ,
696
696
) -> EvalSetResult :
@@ -709,7 +709,7 @@ def get_eval_result(
709
709
response_model_exclude_none = True ,
710
710
tags = [TAG_EVALUATION ],
711
711
)
712
- def list_eval_results (app_name : str ) -> list [str ]:
712
+ async def list_eval_results (app_name : str ) -> list [str ]:
713
713
"""Lists all eval results for the given app."""
714
714
return self .eval_set_results_manager .list_eval_set_results (app_name )
715
715
@@ -718,7 +718,7 @@ def list_eval_results(app_name: str) -> list[str]:
718
718
response_model_exclude_none = True ,
719
719
tags = [TAG_EVALUATION ],
720
720
)
721
- def list_eval_metrics (app_name : str ) -> list [MetricInfo ]:
721
+ async def list_eval_metrics (app_name : str ) -> list [MetricInfo ]:
722
722
"""Lists all eval metrics for the given app."""
723
723
try :
724
724
from ..evaluation .metric_evaluator_registry import DEFAULT_METRIC_EVALUATOR_REGISTRY
0 commit comments