From 6402fb85ef89b0cc945de807ca0bdf0c62624d8d Mon Sep 17 00:00:00 2001 From: Nam Vu Date: Mon, 9 Sep 2024 22:46:13 +0700 Subject: [PATCH] Fix variable typo (cont) (#8161) --- api/core/moderation/base.py | 2 +- api/core/moderation/input_moderation.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/api/core/moderation/base.py b/api/core/moderation/base.py index 9a369a9f87742a..757dd2ab46567f 100644 --- a/api/core/moderation/base.py +++ b/api/core/moderation/base.py @@ -9,7 +9,7 @@ class ModerationAction(Enum): DIRECT_OUTPUT = 'direct_output' - OVERRIDED = 'overrided' + OVERRIDDEN = 'overridden' class ModerationInputsResult(BaseModel): diff --git a/api/core/moderation/input_moderation.py b/api/core/moderation/input_moderation.py index 8157b300b1f6c7..46dfacbc9e0d83 100644 --- a/api/core/moderation/input_moderation.py +++ b/api/core/moderation/input_moderation.py @@ -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