Skip to content

Commit 31af2f6

Browse files
Toxicity Detection validators (#80)
Co-authored-by: dennyabrain <[email protected]>
1 parent d9569ba commit 31af2f6

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

backend/app/api/API_USAGE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ Optional filters:
101101
- `ids=<uuid>&ids=<uuid>`
102102
- `stage=input|output`
103103
- `type=uli_slur_match|pii_remover|gender_assumption_bias|ban_list|llm_critic|topic_relevance|llamaguard_7b|profanity_free|nsfw_text`
104+
- `type=uli_slur_match|pii_remover|gender_assumption_bias|ban_list|llm_critic|topic_relevance|llamaguard_7b|profanity_free`
104105

105106
Example:
106107

backend/app/core/validators/config/base_validator_config.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,9 @@ def _on_fix(self, value: str, fail_result: FailResult):
1919
fix_value = fail_result.fix_value if fail_result else None
2020
if not fix_value:
2121
self.validator_metadata = {
22-
<<<<<<< feat/toxicity-huggingface-model
23-
"reason": f"Empty string has been returned since the validation failed for: {self.type}"
24-
}
25-
=======
2622
"reason": f"Empty string has been returned since the validation failed for: {self.type}" # type: ignore[attr-defined]
2723
}
2824
return ""
29-
>>>>>>> feat/toxicity-hub-validators
3025
return fix_value
3126

3227
def resolve_on_fail(self):

0 commit comments

Comments
 (0)