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