relax dict requirement

This commit is contained in:
vbarda
2024-12-04 11:03:33 -05:00
parent f702f66e02
commit ac30ead4b0
3 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -62,8 +62,8 @@ EVALUATION_PROMPT = f"""You are an evaluator tasked with assessing the accuracy
def evaluate_agent(outputs: dict, reference_outputs: dict):
if "info" not in outputs or not isinstance(outputs["info"], dict):
return 0.0
if "info" not in outputs:
raise ValueError("Agent output must contain 'info' key")
class Score(BaseModel):
"""Evaluate the agent's output against the expected output."""
+2 -2
View File
@@ -35,8 +35,8 @@ EVALUATION_PROMPT = f"""You are an evaluator tasked with assessing the accuracy
def evaluate_agent(outputs: dict, reference_outputs: dict):
if "info" not in outputs or not isinstance(outputs["info"], dict):
return 0.0
if "info" not in outputs:
raise ValueError("Agent output must contain 'info' key")
class Score(BaseModel):
"""Evaluate the agent's output against the expected output."""
+2 -2
View File
@@ -41,8 +41,8 @@ EVALUATION_PROMPT = f"""You are an evaluator tasked with assessing the accuracy
def evaluate_agent(outputs: dict, reference_outputs: dict):
if "info" not in outputs or not isinstance(outputs["info"], dict):
return 0.0
if "info" not in outputs:
raise ValueError("Agent output must contain 'info' key")
class Score(BaseModel):
"""Evaluate the agent's output against the expected output."""