From fe14b4184ec32b56b6008c9b4ecdcd742c8fec5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=81=8D=E5=85=AE=E6=83=9A=E5=85=AE?= <101191390+HIllya51@users.noreply.github.com> Date: Wed, 3 Apr 2024 02:53:11 +0800 Subject: [PATCH] Update dev_chatgpt.py --- LunaTranslator/LunaTranslator/translator/dev_chatgpt.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LunaTranslator/LunaTranslator/translator/dev_chatgpt.py b/LunaTranslator/LunaTranslator/translator/dev_chatgpt.py index 5f46e750..fe38c910 100644 --- a/LunaTranslator/LunaTranslator/translator/dev_chatgpt.py +++ b/LunaTranslator/LunaTranslator/translator/dev_chatgpt.py @@ -32,7 +32,7 @@ class TS(basetransdev): ) ) if "This content may violate our usage policies." == res: - if error: + if error or len(self.last) == 0: raise Exception("This content may violate our usage policies.") return self.last self.last = res