From 7c307d89647257f05823ff8e89f564e74a53ad79 Mon Sep 17 00:00:00 2001 From: binary-husky Date: Sat, 9 Sep 2023 19:33:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=BA=90=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E8=A7=A3=E6=9E=90=E6=A8=A1=E5=9D=97=E4=B8=8E=E8=99=9A=E7=A9=BA?= =?UTF-8?q?=E7=BB=88=E7=AB=AF=E7=9A=84=E5=85=BC=E5=AE=B9=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crazy_functions/解析项目源代码.py | 10 ++++++---- docs/GithubAction+AllCapacity | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/crazy_functions/解析项目源代码.py b/crazy_functions/解析项目源代码.py index 30ae444..926b629 100644 --- a/crazy_functions/解析项目源代码.py +++ b/crazy_functions/解析项目源代码.py @@ -1,5 +1,5 @@ -from toolbox import update_ui -from toolbox import CatchException, report_execption, write_results_to_file +from toolbox import update_ui, promote_file_to_downloadzone +from toolbox import CatchException, report_execption, write_history_to_file from .crazy_utils import input_clipping def 解析源代码新(file_manifest, project_folder, llm_kwargs, plugin_kwargs, chatbot, history, system_prompt): @@ -43,7 +43,8 @@ def 解析源代码新(file_manifest, project_folder, llm_kwargs, plugin_kwargs, # 全部文件解析完成,结果写入文件,准备对工程源代码进行汇总分析 report_part_1 = copy.deepcopy(gpt_response_collection) history_to_return = report_part_1 - res = write_results_to_file(report_part_1) + res = write_history_to_file(report_part_1) + promote_file_to_downloadzone(res, chatbot=chatbot) chatbot.append(("完成?", "逐个文件分析已完成。" + res + "\n\n正在开始汇总。")) yield from update_ui(chatbot=chatbot, history=history_to_return) # 刷新界面 @@ -97,7 +98,8 @@ def 解析源代码新(file_manifest, project_folder, llm_kwargs, plugin_kwargs, ############################## ################################## history_to_return.extend(report_part_2) - res = write_results_to_file(history_to_return) + res = write_history_to_file(history_to_return) + promote_file_to_downloadzone(res, chatbot=chatbot) chatbot.append(("完成了吗?", res)) yield from update_ui(chatbot=chatbot, history=history_to_return) # 刷新界面 diff --git a/docs/GithubAction+AllCapacity b/docs/GithubAction+AllCapacity index f6f05da..82ddd08 100644 --- a/docs/GithubAction+AllCapacity +++ b/docs/GithubAction+AllCapacity @@ -1,7 +1,7 @@ # docker build -t gpt-academic-all-capacity -f docs/GithubAction+AllCapacity --network=host --build-arg http_proxy=http://localhost:10881 --build-arg https_proxy=http://localhost:10881 . # 从NVIDIA源,从而支持显卡(检查宿主的nvidia-smi中的cuda版本必须>=11.3) -FROM fuqingxu/11.3.1-runtime-ubuntu20.04-with-texlive:latest +FROM fuqingxu/11.3.1-runtime-ubuntu20.04-with-texlive-cache:latest # use python3 as the system default python WORKDIR /gpt