Skip to content

Commit e26a11b

Browse files
committed
fix: GroundednessEvaluator.has_context should be private (#43336)
1 parent ce0419c commit e26a11b

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
@@ -208,7 +208,7 @@ def __call__( # pylint: disable=docstring-missing-param
208208

209209
return super().__call__(*args, **kwargs)
210210

211-
def has_context(self, eval_input: dict) -> bool:
211+
def _has_context(self, eval_input: dict) -> bool:
212212
"""
213213
Return True if eval_input contains a non-empty 'context' field.
214214
Treats None, empty strings, empty lists, and lists of empty strings as no context.
@@ -229,7 +229,7 @@ async def _do_eval(self, eval_input: Dict) -> Dict[str, Union[float, str]]:
229229
if "query" not in eval_input:
230230
return await super()._do_eval(eval_input)
231231

232-
contains_context = self.has_context(eval_input)
232+
contains_context = self._has_context(eval_input)
233233

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

0 commit comments

Comments
 (0)