From c8349e766b75517b6bba950210a014b7d7b693cf Mon Sep 17 00:00:00 2001 From: qingxu fu <505030475@qq.com> Date: Fri, 14 Apr 2023 12:28:25 +0800 Subject: [PATCH] =?UTF-8?q?=E5=89=8A=E5=87=8F=E9=BB=98=E8=AE=A4=E7=9A=84?= =?UTF-8?q?=E6=9C=80=E5=A4=A7=E7=BA=BF=E7=A8=8B=E6=95=B0=E5=88=B05?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crazy_functions/Latex全文润色.py | 2 +- crazy_functions/Latex全文翻译.py | 2 +- crazy_functions/crazy_utils.py | 2 +- crazy_functions/批量Markdown翻译.py | 2 +- crazy_functions/批量翻译PDF文档_多线程.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/crazy_functions/Latex全文润色.py b/crazy_functions/Latex全文润色.py index 844513b..45fc13b 100644 --- a/crazy_functions/Latex全文润色.py +++ b/crazy_functions/Latex全文润色.py @@ -92,7 +92,7 @@ def 多文件润色(file_manifest, project_folder, llm_kwargs, plugin_kwargs, ch chatbot=chatbot, history_array=[[""] for _ in range(n_split)], sys_prompt_array=sys_prompt_array, - max_workers=10, # OpenAI所允许的最大并行过载 + max_workers=5, # OpenAI所允许的最大并行过载 scroller_max_len = 80 ) diff --git a/crazy_functions/Latex全文翻译.py b/crazy_functions/Latex全文翻译.py index a41bdfe..d234d88 100644 --- a/crazy_functions/Latex全文翻译.py +++ b/crazy_functions/Latex全文翻译.py @@ -90,7 +90,7 @@ def 多文件翻译(file_manifest, project_folder, llm_kwargs, plugin_kwargs, ch chatbot=chatbot, history_array=[[""] for _ in range(n_split)], sys_prompt_array=sys_prompt_array, - max_workers=10, # OpenAI所允许的最大并行过载 + max_workers=5, # OpenAI所允许的最大并行过载 scroller_max_len = 80 ) diff --git a/crazy_functions/crazy_utils.py b/crazy_functions/crazy_utils.py index d25eed5..27d58c7 100644 --- a/crazy_functions/crazy_utils.py +++ b/crazy_functions/crazy_utils.py @@ -132,7 +132,7 @@ def request_gpt_model_in_new_thread_with_ui_alive( def request_gpt_model_multi_threads_with_very_awesome_ui_and_high_efficiency( inputs_array, inputs_show_user_array, llm_kwargs, chatbot, history_array, sys_prompt_array, - refresh_interval=0.2, max_workers=10, scroller_max_len=30, + refresh_interval=0.2, max_workers=5, scroller_max_len=30, handle_token_exceed=True, show_user_at_complete=False, retry_times_at_unknown_error=2, ): diff --git a/crazy_functions/批量Markdown翻译.py b/crazy_functions/批量Markdown翻译.py index 129ae7a..6852512 100644 --- a/crazy_functions/批量Markdown翻译.py +++ b/crazy_functions/批量Markdown翻译.py @@ -73,7 +73,7 @@ def 多文件翻译(file_manifest, project_folder, llm_kwargs, plugin_kwargs, ch chatbot=chatbot, history_array=[[""] for _ in range(n_split)], sys_prompt_array=sys_prompt_array, - max_workers=10, # OpenAI所允许的最大并行过载 + max_workers=5, # OpenAI所允许的最大并行过载 scroller_max_len = 80 ) diff --git a/crazy_functions/批量翻译PDF文档_多线程.py b/crazy_functions/批量翻译PDF文档_多线程.py index de2a274..b3f9aaf 100644 --- a/crazy_functions/批量翻译PDF文档_多线程.py +++ b/crazy_functions/批量翻译PDF文档_多线程.py @@ -98,7 +98,7 @@ def 解析PDF(file_manifest, project_folder, llm_kwargs, plugin_kwargs, chatbot, history_array=[[paper_meta] for _ in paper_fragments], sys_prompt_array=[ "请你作为一个学术翻译,负责把学术论文的片段准确翻译成中文。" for _ in paper_fragments], - max_workers=16 # OpenAI所允许的最大并行过载 + max_workers=5 # OpenAI所允许的最大并行过载 ) # 整理报告的格式