From b8e242086560b1ad7a3bddcc26ff8fb8d68ee9b4 Mon Sep 17 00:00:00 2001 From: Christophe Bornet Date: Tue, 8 Jul 2025 16:31:02 +0200 Subject: [PATCH] langchain: Fix Evaluator's _check_evaluation_args (#31910) Co-authored-by: Mason Daugherty --- libs/langchain/langchain/evaluation/schema.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/langchain/langchain/evaluation/schema.py b/libs/langchain/langchain/evaluation/schema.py index 3d664bf80b5..ba068c89b9e 100644 --- a/libs/langchain/langchain/evaluation/schema.py +++ b/libs/langchain/langchain/evaluation/schema.py @@ -120,10 +120,10 @@ class _EvalArgsMixin: ValueError: If the evaluator requires an input string but none is provided, or if the evaluator requires a reference label but none is provided. """ - if self.requires_input and input is None: + if self.requires_input and input_ is None: msg = f"{self.__class__.__name__} requires an input string." raise ValueError(msg) - if input is not None and not self.requires_input: + if input_ is not None and not self.requires_input: warn(self._skip_input_warning) if self.requires_reference and reference is None: msg = f"{self.__class__.__name__} requires a reference string."