Skip to content

Commit

Permalink
Fix variable typo (cont) (langgenius#8161)
Browse files Browse the repository at this point in the history
  • Loading branch information
ZuzooVn authored and cuiks committed Sep 26, 2024
1 parent 7bf827b commit 6402fb8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion api/core/moderation/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

class ModerationAction(Enum):
DIRECT_OUTPUT = 'direct_output'
OVERRIDED = 'overrided'
OVERRIDDEN = 'overridden'


class ModerationInputsResult(BaseModel):
Expand Down
2 changes: 1 addition & 1 deletion api/core/moderation/input_moderation.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def check(

if moderation_result.action == ModerationAction.DIRECT_OUTPUT:
raise ModerationException(moderation_result.preset_response)
elif moderation_result.action == ModerationAction.OVERRIDED:
elif moderation_result.action == ModerationAction.OVERRIDDEN:
inputs = moderation_result.inputs
query = moderation_result.query

Expand Down

0 comments on commit 6402fb8

Please sign in to comment.