Skip to content

Commit c632625

Browse files
committed
make remediate method private
1 parent 54e866b commit c632625

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/cleanlab_codex/validator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ def validate(
141141
scores, is_bad_response = self.detect(query, context, response, prompt, form_prompt)
142142
expert_answer = None
143143
if is_bad_response:
144-
expert_answer = self.remediate(query)
144+
expert_answer = self._remediate(query)
145145

146146
return {
147147
"expert_answer": expert_answer,
@@ -187,7 +187,7 @@ def detect(
187187
is_bad_response = any(score_dict["is_bad"] for score_dict in thresholded_scores.values())
188188
return thresholded_scores, is_bad_response
189189

190-
def remediate(self, query: str) -> str | None:
190+
def _remediate(self, query: str) -> str | None:
191191
"""Request a SME-provided answer for this query, if one is available in Codex.
192192
193193
Args:

tests/test_validator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ def test_remediate(self, mock_project: Mock, mock_trustworthy_rag: Mock) -> None
133133
mock_project.from_access_key.return_value.query.return_value = ("expert answer", None)
134134

135135
validator = Validator(codex_access_key="test")
136-
result = validator.remediate("test query")
136+
result = validator._remediate("test query")
137137

138138
# Verify project.query was called
139139
mock_project.from_access_key.return_value.query.assert_called_once_with(question="test query")

0 commit comments

Comments
 (0)