Skip to content

Commit a525806

Browse files
authored
Refactor not applicable result method calls
1 parent 5032e26 commit a525806

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_evaluators/_tool_call_accuracy/_tool_call_accuracy.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -230,10 +230,9 @@ async def _do_eval(self, eval_input: Dict) -> Dict[str, Union[float, str]]: # t
230230

231231
# Check for intermediate response
232232
if _is_intermediate_response(eval_input.get("response")):
233-
return self._not_applicable_result(
233+
return self._return_not_applicable_result(
234234
"Intermediate response. Please provide the agent's final response for evaluation.",
235-
self.threshold,
236-
has_details=True,
235+
self.threshold
237236
)
238237

239238
# Preprocess messages if they are lists
@@ -326,7 +325,7 @@ async def _real_call(self, **kwargs):
326325
eval_input = self._convert_kwargs_to_eval_input(**kwargs)
327326
if isinstance(eval_input, dict) and eval_input.get("error_message"):
328327
# If there is an error message, return not applicable result
329-
return self._not_applicable_result(eval_input.get("error_message"), self.threshold, has_details=True)
328+
return self._return_not_applicable_result(eval_input.get("error_message"), self.threshold)
330329
# Do the evaluation
331330
result = await self._do_eval(eval_input)
332331
# Return the result

0 commit comments

Comments
 (0)