From 2f946f3e6ccd5191c587c1d3ae434db1a71a46be Mon Sep 17 00:00:00 2001 From: lbykkkk Date: Mon, 2 Dec 2024 00:11:41 +0800 Subject: [PATCH] fix --- crazy_functional.py | 6 +++--- crazy_functions/Arxiv_论文对话.py | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/crazy_functional.py b/crazy_functional.py index 001e6998..65522b74 100644 --- a/crazy_functional.py +++ b/crazy_functional.py @@ -91,9 +91,9 @@ def get_crazy_functions(): "Color": "stop", "AsButton": False, "AdvancedArgs": True, - "Info": "通过在高级参数区写入prompt,可自定义询问逻辑,默认情况下为总结逻辑 | 输入参数为路径", - "ArgsReminder": r"1、请不要更改上方输入框中以“private_upload/...”开头的路径。 " - r"2、请在下方高级参数区中输入你的prompt,文档中的内容将被添加你的prompt后。3、示例:“这篇文章的方法是什么:” ", + "Info": "在输入区中输入论文ID,在高级参数区中输入问题", + "ArgsReminder": r"1、请在输入区中输入arxiv ID。 " + r"2、请在下方高级参数区中输入你的问题,示例:“这篇文章的方法是什么,请用中文回答我” ", "Function": HotReload(Arxiv论文对话), }, "翻译README或MD": { diff --git a/crazy_functions/Arxiv_论文对话.py b/crazy_functions/Arxiv_论文对话.py index 2884601f..523e8331 100644 --- a/crazy_functions/Arxiv_论文对话.py +++ b/crazy_functions/Arxiv_论文对话.py @@ -428,9 +428,10 @@ def Arxiv论文对话(txt: str, llm_kwargs: Dict, plugin_kwargs: Dict, chatbot: if txt.lower().strip().startswith(('https://arxiv.org', 'arxiv.org', '0', '1', '2')) and not arxiv_worker.loading: chatbot.append((txt, "正在处理论文,请稍等...")) yield from update_ui(chatbot=chatbot, history=history) - fragments, formatted_content, fragment_output_dir = process_arxiv_sync(arxiv_worker.arxiv_splitter, arxiv_id) - promote_file_to_downloadzone(fragment_output_dir, chatbot=chatbot) - chatbot.append(["论文下载成功,接下来将编码论文,预计等待两分钟,请耐心等待,等待过程中,可以查看论文:", formatted_content]) + fragments, formatted_content, fragment_output_files = process_arxiv_sync(arxiv_worker.arxiv_splitter, arxiv_id) + for file in fragment_output_files: + promote_file_to_downloadzone(file, chatbot=chatbot) + chatbot.append(["论文文字内容已保存至下载区,接下来将进行论文编码,请耐心等待三分钟,论文的文字内容为:", formatted_content]) yield from update_ui(chatbot=chatbot, history=history) try: # 创建新的事件循环 @@ -478,8 +479,7 @@ def Arxiv论文对话(txt: str, llm_kwargs: Dict, plugin_kwargs: Dict, chatbot: fragments, formatted_content, fragment_output_files = process_arxiv_sync(arxiv_worker.arxiv_splitter, arxiv_id) for file in fragment_output_files: promote_file_to_downloadzone(file, chatbot=chatbot) - chatbot.append(["论文的文字内容为:", formatted_content]) - chatbot.append(["处理完成", f"论文文字内容已保存至下载区"]) + chatbot.append(["论文文字内容已保存至下载区,论文的文字内容为:", formatted_content]) yield from update_ui(chatbot=chatbot, history=history) if not user_query: user_query = "What is the main research question or problem addressed in this paper?"