Skip to content

Commit 79f9a4a

Browse files
authored
fix: GroundednessEvaluator.has_context should be private (#43336)
1 parent e576c43 commit 79f9a4a

File tree

1 file changed

+2
-2
lines changed
  • sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_evaluators/_groundedness

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ def __call__( # pylint: disable=docstring-missing-param
214214

215215
return super().__call__(*args, **kwargs)
216216

217-
def has_context(self, eval_input: dict) -> bool:
217+
def _has_context(self, eval_input: dict) -> bool:
218218
"""
219219
Return True if eval_input contains a non-empty 'context' field.
220220
Treats None, empty strings, empty lists, and lists of empty strings as no context.
@@ -235,7 +235,7 @@ async def _do_eval(self, eval_input: Dict) -> Dict[str, Union[float, str]]:
235235
if "query" not in eval_input:
236236
return await super()._do_eval(eval_input)
237237

238-
contains_context = self.has_context(eval_input)
238+
contains_context = self._has_context(eval_input)
239239

240240
simplified_query = simplify_messages(eval_input["query"], drop_tool_calls=contains_context)
241241
simplified_response = simplify_messages(eval_input["response"], drop_tool_calls=False)

0 commit comments

Comments
 (0)