From 929c0afc9b01bda777c682e5789cf9d165b38210 Mon Sep 17 00:00:00 2001 From: qingxu fu <505030475@qq.com> Date: Tue, 11 Apr 2023 19:59:06 +0800 Subject: [PATCH] =?UTF-8?q?2.67=20=E4=BF=AE=E5=A4=8Dtypo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crazy_functions/下载arxiv论文翻译摘要.py | 4 ++-- crazy_functions/总结word文档.py | 6 +++--- crazy_functions/批量总结PDF文档.py | 6 +++--- crazy_functions/批量总结PDF文档pdfminer.py | 6 +++--- crazy_functions/批量翻译PDF文档_多线程.py | 4 ++-- crazy_functions/生成函数注释.py | 4 ++-- crazy_functions/读文章写摘要.py | 6 +++--- crazy_functions/谷歌检索小助手.py | 4 ++-- version | 2 +- 9 files changed, 21 insertions(+), 21 deletions(-) diff --git a/crazy_functions/下载arxiv论文翻译摘要.py b/crazy_functions/下载arxiv论文翻译摘要.py index 56ec400..3da831f 100644 --- a/crazy_functions/下载arxiv论文翻译摘要.py +++ b/crazy_functions/下载arxiv论文翻译摘要.py @@ -183,12 +183,12 @@ def 下载arxiv论文并翻译摘要(txt, llm_kwargs, plugin_kwargs, chatbot, hi chatbot[-1] = (i_say_show_user, gpt_say) history.append(i_say_show_user); history.append(gpt_say) - yield from update_ui(chatbot=chatbot, history=chatbot, msg=msg) # 刷新界面 + yield from update_ui(chatbot=chatbot, history=history, msg=msg) # 刷新界面 # 写入文件 import shutil # 重置文件的创建时间 shutil.copyfile(pdf_path, f'./gpt_log/{os.path.basename(pdf_path)}'); os.remove(pdf_path) res = write_results_to_file(history) chatbot.append(("完成了吗?", res + "\n\nPDF文件也已经下载")) - yield from update_ui(chatbot=chatbot, history=chatbot, msg=msg) # 刷新界面 + yield from update_ui(chatbot=chatbot, history=history, msg=msg) # 刷新界面 diff --git a/crazy_functions/总结word文档.py b/crazy_functions/总结word文档.py index 4a3f7c9..742c7ab 100644 --- a/crazy_functions/总结word文档.py +++ b/crazy_functions/总结word文档.py @@ -52,7 +52,7 @@ def 解析docx(file_manifest, project_folder, llm_kwargs, plugin_kwargs, chatbot chatbot[-1] = (i_say_show_user, gpt_say) history.append(i_say_show_user) history.append(gpt_say) - yield from update_ui(chatbot=chatbot, history=chatbot, msg=msg) # 刷新界面 + yield from update_ui(chatbot=chatbot, history=history, msg=msg) # 刷新界面 if not fast_debug: time.sleep(2) """ @@ -84,10 +84,10 @@ def 解析docx(file_manifest, project_folder, llm_kwargs, plugin_kwargs, chatbot chatbot[-1] = (i_say, gpt_say) history.append(i_say) history.append(gpt_say) - yield from update_ui(chatbot=chatbot, history=chatbot, msg=msg) # 刷新界面 + yield from update_ui(chatbot=chatbot, history=history, msg=msg) # 刷新界面 res = write_results_to_file(history) chatbot.append(("完成了吗?", res)) - yield from update_ui(chatbot=chatbot, history=chatbot, msg=msg) # 刷新界面 + yield from update_ui(chatbot=chatbot, history=history, msg=msg) # 刷新界面 @CatchException diff --git a/crazy_functions/批量总结PDF文档.py b/crazy_functions/批量总结PDF文档.py index 9f5b0d4..2f42014 100644 --- a/crazy_functions/批量总结PDF文档.py +++ b/crazy_functions/批量总结PDF文档.py @@ -90,7 +90,7 @@ def 解析PDF(file_manifest, project_folder, llm_kwargs, plugin_kwargs, chatbot, chatbot[-1] = (i_say_show_user, gpt_say) history.append(i_say_show_user); history.append(gpt_say) - yield from update_ui(chatbot=chatbot, history=chatbot, msg=msg) # 刷新界面 + yield from update_ui(chatbot=chatbot, history=history, msg=msg) # 刷新界面 if not fast_debug: time.sleep(2) all_file = ', '.join([os.path.relpath(fp, project_folder) for index, fp in enumerate(file_manifest)]) @@ -112,10 +112,10 @@ def 解析PDF(file_manifest, project_folder, llm_kwargs, plugin_kwargs, chatbot, chatbot[-1] = (i_say, gpt_say) history.append(i_say); history.append(gpt_say) - yield from update_ui(chatbot=chatbot, history=chatbot, msg=msg) # 刷新界面 + yield from update_ui(chatbot=chatbot, history=history, msg=msg) # 刷新界面 res = write_results_to_file(history) chatbot.append(("完成了吗?", res)) - yield from update_ui(chatbot=chatbot, history=chatbot, msg=msg) # 刷新界面 + yield from update_ui(chatbot=chatbot, history=history, msg=msg) # 刷新界面 @CatchException diff --git a/crazy_functions/批量总结PDF文档pdfminer.py b/crazy_functions/批量总结PDF文档pdfminer.py index b6a1ad1..3868885 100644 --- a/crazy_functions/批量总结PDF文档pdfminer.py +++ b/crazy_functions/批量总结PDF文档pdfminer.py @@ -93,7 +93,7 @@ def 解析Paper(file_manifest, project_folder, llm_kwargs, plugin_kwargs, chatbo ) # 带超时倒计时 chatbot[-1] = (i_say_show_user, gpt_say) history.append(i_say_show_user); history.append(gpt_say) - yield from update_ui(chatbot=chatbot, history=chatbot, msg=msg) # 刷新界面 + yield from update_ui(chatbot=chatbot, history=history, msg=msg) # 刷新界面 if not fast_debug: time.sleep(2) all_file = ', '.join([os.path.relpath(fp, project_folder) for index, fp in enumerate(file_manifest)]) @@ -114,10 +114,10 @@ def 解析Paper(file_manifest, project_folder, llm_kwargs, plugin_kwargs, chatbo ) # 带超时倒计时 chatbot[-1] = (i_say, gpt_say) history.append(i_say); history.append(gpt_say) - yield from update_ui(chatbot=chatbot, history=chatbot, msg=msg) # 刷新界面 + yield from update_ui(chatbot=chatbot, history=history, msg=msg) # 刷新界面 res = write_results_to_file(history) chatbot.append(("完成了吗?", res)) - yield from update_ui(chatbot=chatbot, history=chatbot, msg=msg) # 刷新界面 + yield from update_ui(chatbot=chatbot, history=history, msg=msg) # 刷新界面 diff --git a/crazy_functions/批量翻译PDF文档_多线程.py b/crazy_functions/批量翻译PDF文档_多线程.py index 08d0bd6..244a4e1 100644 --- a/crazy_functions/批量翻译PDF文档_多线程.py +++ b/crazy_functions/批量翻译PDF文档_多线程.py @@ -280,7 +280,7 @@ def 解析PDF(file_manifest, project_folder, llm_kwargs, plugin_kwargs, chatbot, # 更新UI generated_conclusion_files.append(f'./gpt_log/{create_report_file_name}') chatbot.append((f"{fp}完成了吗?", res)) - yield from update_ui(chatbot=chatbot, history=chatbot) # 刷新界面 + yield from update_ui(chatbot=chatbot, history=history) # 刷新界面 # 准备文件的下载 import shutil @@ -293,4 +293,4 @@ def 解析PDF(file_manifest, project_folder, llm_kwargs, plugin_kwargs, chatbot, if os.path.exists(pdf_path): os.remove(pdf_path) chatbot.append(("给出输出文件清单", str(generated_conclusion_files))) - yield from update_ui(chatbot=chatbot, history=chatbot) # 刷新界面 + yield from update_ui(chatbot=chatbot, history=history) # 刷新界面 diff --git a/crazy_functions/生成函数注释.py b/crazy_functions/生成函数注释.py index 852fef8..a5568b9 100644 --- a/crazy_functions/生成函数注释.py +++ b/crazy_functions/生成函数注释.py @@ -23,13 +23,13 @@ def 生成函数注释(file_manifest, project_folder, llm_kwargs, plugin_kwargs, chatbot[-1] = (i_say_show_user, gpt_say) history.append(i_say_show_user); history.append(gpt_say) - yield from update_ui(chatbot=chatbot, history=chatbot, msg=msg) # 刷新界面 + yield from update_ui(chatbot=chatbot, history=history, msg=msg) # 刷新界面 if not fast_debug: time.sleep(2) if not fast_debug: res = write_results_to_file(history) chatbot.append(("完成了吗?", res)) - yield from update_ui(chatbot=chatbot, history=chatbot, msg=msg) # 刷新界面 + yield from update_ui(chatbot=chatbot, history=history, msg=msg) # 刷新界面 diff --git a/crazy_functions/读文章写摘要.py b/crazy_functions/读文章写摘要.py index d1e4ee3..b910f5d 100644 --- a/crazy_functions/读文章写摘要.py +++ b/crazy_functions/读文章写摘要.py @@ -24,7 +24,7 @@ def 解析Paper(file_manifest, project_folder, llm_kwargs, plugin_kwargs, chatbo chatbot[-1] = (i_say_show_user, gpt_say) history.append(i_say_show_user); history.append(gpt_say) - yield from update_ui(chatbot=chatbot, history=chatbot, msg=msg) # 刷新界面 + yield from update_ui(chatbot=chatbot, history=history, msg=msg) # 刷新界面 if not fast_debug: time.sleep(2) all_file = ', '.join([os.path.relpath(fp, project_folder) for index, fp in enumerate(file_manifest)]) @@ -39,10 +39,10 @@ def 解析Paper(file_manifest, project_folder, llm_kwargs, plugin_kwargs, chatbo chatbot[-1] = (i_say, gpt_say) history.append(i_say); history.append(gpt_say) - yield from update_ui(chatbot=chatbot, history=chatbot, msg=msg) # 刷新界面 + yield from update_ui(chatbot=chatbot, history=history, msg=msg) # 刷新界面 res = write_results_to_file(history) chatbot.append(("完成了吗?", res)) - yield from update_ui(chatbot=chatbot, history=chatbot, msg=msg) # 刷新界面 + yield from update_ui(chatbot=chatbot, history=history, msg=msg) # 刷新界面 diff --git a/crazy_functions/谷歌检索小助手.py b/crazy_functions/谷歌检索小助手.py index 0590e3b..94ef256 100644 --- a/crazy_functions/谷歌检索小助手.py +++ b/crazy_functions/谷歌检索小助手.py @@ -100,7 +100,7 @@ def 谷歌检索小助手(txt, llm_kwargs, plugin_kwargs, chatbot, history, syst chatbot.append(["状态?", "已经全部完成"]) msg = '正常' - yield from update_ui(chatbot=chatbot, history=chatbot, msg=msg) # 刷新界面 + yield from update_ui(chatbot=chatbot, history=history, msg=msg) # 刷新界面 res = write_results_to_file(history) chatbot.append(("完成了吗?", res)); - yield from update_ui(chatbot=chatbot, history=chatbot, msg=msg) # 刷新界面 + yield from update_ui(chatbot=chatbot, history=history, msg=msg) # 刷新界面 diff --git a/version b/version index d8bfd45..73f040d 100644 --- a/version +++ b/version @@ -1,5 +1,5 @@ { - "version": 2.66, + "version": 2.67, "show_feature": true, "new_feature": "很抱歉2.6有bug,现已经紧急修复<->现可通过输入区更新临时api-key <-> 增强多线程稳定性(涉及代码解析、PDF翻译、自译解等) <-> 修复Token计数错误(解决PDF翻译的分割不合理的问题) <-> 如果一键更新失败,可前往github手动更新" }