From c92f8dcdf54cd26519c020a0e4da10625f3cdb90 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: Sat, 31 Aug 2024 21:51:42 +0800 Subject: [PATCH] Update gptcommon.py --- LunaTranslator/LunaTranslator/translator/gptcommon.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/LunaTranslator/LunaTranslator/translator/gptcommon.py b/LunaTranslator/LunaTranslator/translator/gptcommon.py index 627b3c96..cad85508 100644 --- a/LunaTranslator/LunaTranslator/translator/gptcommon.py +++ b/LunaTranslator/LunaTranslator/translator/gptcommon.py @@ -87,6 +87,8 @@ class gptcommon(basetrans): continue if response_data == "data: [DONE]": break + if response_data == ": OPENROUTER PROCESSING": + continue try: json_data = json.loads(response_data[6:]) rs = json_data["choices"][0].get("finish_reason")