hellofinch hace 1 año
padre
commit
6952684e8b
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      pdf2zh/translator.py

+ 1 - 1
pdf2zh/translator.py

@@ -282,7 +282,7 @@ class ZhipuTranslator(OpenAITranslator):
                 == "1301"
             ):
                 return ""
-            print("openai api error.")
+            raise ValueError("openai api error.")
         return response.choices[0].message.content.strip()