Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/google/adk/evaluation/agent_evaluator.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class _EvalMetricResultWithInvocation(BaseModel):
"""

actual_invocation: Invocation
expected_invocation: Invocation
expected_invocation: Optional[Invocation] = None
eval_metric_result: EvalMetricResult


Expand Down Expand Up @@ -438,15 +438,21 @@ def _print_details(
"threshold": threshold,
"prompt": AgentEvaluator._convert_content_to_text(
per_invocation_result.expected_invocation.user_content
if per_invocation_result.expected_invocation
else per_invocation_result.actual_invocation.user_content
),
"expected_response": AgentEvaluator._convert_content_to_text(
per_invocation_result.expected_invocation.final_response
if per_invocation_result.expected_invocation
else None
),
"actual_response": AgentEvaluator._convert_content_to_text(
per_invocation_result.actual_invocation.final_response
),
"expected_tool_calls": AgentEvaluator._convert_tool_calls_to_text(
per_invocation_result.expected_invocation.intermediate_data
if per_invocation_result.expected_invocation
else None
),
"actual_tool_calls": AgentEvaluator._convert_tool_calls_to_text(
per_invocation_result.actual_invocation.intermediate_data
Expand Down
Loading