Skip to content

Conversation

@jsamuel1
Copy link
Collaborator

@jsamuel1 jsamuel1 commented Dec 8, 2025

Update OutputEvaluator to use the new structured_output_model parameter instead of the deprecated structured_output and structured_output_async methods.

Changes

  • Replace evaluator_agent.structured_output(EvaluationOutput, prompt) with evaluator_agent(prompt, structured_output_model=EvaluationOutput)
  • Replace await evaluator_agent.structured_output_async(EvaluationOutput, prompt) with await evaluator_agent.invoke_async(prompt, structured_output_model=EvaluationOutput)

Testing

All existing tests pass.

Update OutputEvaluator to use the new structured_output_model parameter
instead of the deprecated structured_output and structured_output_async
methods.
…tern

Replace deprecated Agent.structured_output() and Agent.structured_output_async()
methods with the new pattern using agent() and agent.invoke_async() with
structured_output_model parameter, then accessing result.structured_output.

Updated evaluators:
- output_evaluator
- trajectory_evaluator
- interactions_evaluator
- goal_success_rate_evaluator
- faithfulness_evaluator
- helpfulness_evaluator
- harmfulness_evaluator
- tool_selection_accuracy_evaluator
- tool_parameter_accuracy_evaluator

Updated all corresponding unit tests and integration tests to mock the new API.
@jsamuel1 jsamuel1 deployed to manual-approval December 22, 2025 07:17 — with GitHub Actions Active
@yonib05 yonib05 requested a review from afarntrog December 31, 2025 15:00
uv.lock Outdated
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR looks great. Let's just exclude this uv.lock file

@jsamuel1
Copy link
Collaborator Author

jsamuel1 commented Jan 3, 2026

Done - removed uv.lock from the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants