From 477926a71862cade299ab45236cabde0e4dbd31b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 17 Jun 2025 17:28:59 +0000 Subject: [PATCH 1/2] Initial plan for issue From ac033491c6a18dee4250aed75553fe305cee56ed Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 17 Jun 2025 17:37:14 +0000 Subject: [PATCH 2/2] Fix tool_call_accuracy evaluator sample format issues Co-authored-by: singankit <30610298+singankit@users.noreply.github.com> --- .../samples/evaluation_samples_evaluate.py | 43 +++++++++---------- 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/sdk/evaluation/azure-ai-evaluation/samples/evaluation_samples_evaluate.py b/sdk/evaluation/azure-ai-evaluation/samples/evaluation_samples_evaluate.py index c6e254ce9bac..b2b78d20f846 100644 --- a/sdk/evaluation/azure-ai-evaluation/samples/evaluation_samples_evaluate.py +++ b/sdk/evaluation/azure-ai-evaluation/samples/evaluation_samples_evaluate.py @@ -458,33 +458,32 @@ def evaluation_evaluate_classes_methods(self): tool_call_accuracy_evaluator( query="How is the weather in New York?", response="The weather in New York is sunny.", - tool_calls={ - "type": "tool_call", - "tool_call": { - "id": "call_eYtq7fMyHxDWIgeG2s26h0lJ", - "type": "function", - "function": { - "name": "fetch_weather", - "arguments": { - "location": "New York" - } + tool_calls=[ + { + "type": "tool_call", + "tool_call_id": "call_eYtq7fMyHxDWIgeG2s26h0lJ", + "name": "fetch_weather", + "arguments": { + "location": "New York" } } - }, - tool_definitions={ - "id": "fetch_weather", - "name": "fetch_weather", - "description": "Fetches the weather information for the specified location.", - "parameters": { - "type": "object", - "properties": { - "location": { - "type": "string", - "description": "The location to fetch weather for." + ], + tool_definitions=[ + { + "name": "fetch_weather", + "type": "function", + "description": "Fetches the weather information for the specified location.", + "parameters": { + "type": "object", + "properties": { + "location": { + "type": "string", + "description": "The location to fetch weather for." + } } } } - } + ] ) # [END tool_call_accuracy_evaluator]