From a3f36668a840472e56b5ee1e2640e2a5d93f56c1 Mon Sep 17 00:00:00 2001 From: binary-husky Date: Thu, 14 Sep 2023 17:51:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dlatex=E8=AF=86=E5=88=AB?= =?UTF-8?q?=E4=B8=BB=E6=96=87=E4=BB=B6=E9=94=99=E8=AF=AF=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crazy_functions/latex_fns/latex_toolbox.py | 1 + request_llm/com_sparkapi.py | 1 + 2 files changed, 2 insertions(+) diff --git a/crazy_functions/latex_fns/latex_toolbox.py b/crazy_functions/latex_fns/latex_toolbox.py index e39ac2d..9fc1f6c 100644 --- a/crazy_functions/latex_fns/latex_toolbox.py +++ b/crazy_functions/latex_fns/latex_toolbox.py @@ -256,6 +256,7 @@ def find_main_tex_file(file_manifest, mode): canidates_score.append(0) with open(texf, 'r', encoding='utf8', errors='ignore') as f: file_content = f.read() + file_content = rm_comments(file_content) for uw in unexpected_words: if uw in file_content: canidates_score[-1] -= 1 diff --git a/request_llm/com_sparkapi.py b/request_llm/com_sparkapi.py index 0b8d655..ae970b9 100644 --- a/request_llm/com_sparkapi.py +++ b/request_llm/com_sparkapi.py @@ -109,6 +109,7 @@ class SparkRequestInstance(): code = data['header']['code'] if code != 0: print(f'请求错误: {code}, {data}') + self.result_buf += str(data) ws.close() self.time_to_exit_event.set() else: