File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
eval_protocol/mcp_servers/tau2/tests Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -752,10 +752,22 @@ def tau2_airline_eval(
752752
753753 reward = 1.0
754754
755+ # Convert incoming action dicts to typed Action objects for the evaluator
756+ action_objs : Optional [List [Action ]] = None
757+ if actions is not None :
758+ action_objs = []
759+ for a in actions :
760+ if isinstance (a , Action ):
761+ action_objs .append (a )
762+ elif isinstance (a , dict ):
763+ action_objs .append (Action (** a ))
764+ else :
765+ raise TypeError ("actions must be a list of Action or dict items" )
766+
755767 evaluation_criteria = EvaluationCriteria (
756768 nl_assertions = nl_assertions ,
757769 communicate_info = communicate_info ,
758- actions = actions ,
770+ actions = action_objs ,
759771 env_assertions = None ,
760772 reward_basis = [
761773 RewardType .NL_ASSERTION ,
You can’t perform that action at this time.
0 commit comments