Skip to content

Commit

Permalink
fix the model being None probelm
Browse files Browse the repository at this point in the history
  • Loading branch information
Anindyadeep committed Nov 28, 2023
1 parent 4bf3ae9 commit d35ac7a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion deepeval/models/detoxify_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@

class DetoxifyModel(DeepEvalBaseModel):
def __init__(self, model_name: str | None = None, *args, **kwargs):
assert model_name in ["original", "unbiased", "multilingual"], "Invalid model. Available variants: original, unbiased, multilingual"
if model_name is not None:
assert model_name in ["original", "unbiased", "multilingual"], "Invalid model. Available variants: original, unbiased, multilingual"
model_name = 'original' if model_name is None else model_name
super().__init__(model_name, *args, **kwargs)

Expand Down

0 comments on commit d35ac7a

Please sign in to comment.