Spaces:
Running
Running
削减默认的最大线程数到5
Browse files
crazy_functions/Latex全文润色.py
CHANGED
@@ -92,7 +92,7 @@ def 多文件润色(file_manifest, project_folder, llm_kwargs, plugin_kwargs, ch
|
|
92 |
chatbot=chatbot,
|
93 |
history_array=[[""] for _ in range(n_split)],
|
94 |
sys_prompt_array=sys_prompt_array,
|
95 |
-
max_workers=
|
96 |
scroller_max_len = 80
|
97 |
)
|
98 |
|
|
|
92 |
chatbot=chatbot,
|
93 |
history_array=[[""] for _ in range(n_split)],
|
94 |
sys_prompt_array=sys_prompt_array,
|
95 |
+
max_workers=5, # OpenAI所允许的最大并行过载
|
96 |
scroller_max_len = 80
|
97 |
)
|
98 |
|
crazy_functions/Latex全文翻译.py
CHANGED
@@ -90,7 +90,7 @@ def 多文件翻译(file_manifest, project_folder, llm_kwargs, plugin_kwargs, ch
|
|
90 |
chatbot=chatbot,
|
91 |
history_array=[[""] for _ in range(n_split)],
|
92 |
sys_prompt_array=sys_prompt_array,
|
93 |
-
max_workers=
|
94 |
scroller_max_len = 80
|
95 |
)
|
96 |
|
|
|
90 |
chatbot=chatbot,
|
91 |
history_array=[[""] for _ in range(n_split)],
|
92 |
sys_prompt_array=sys_prompt_array,
|
93 |
+
max_workers=5, # OpenAI所允许的最大并行过载
|
94 |
scroller_max_len = 80
|
95 |
)
|
96 |
|
crazy_functions/crazy_utils.py
CHANGED
@@ -132,7 +132,7 @@ def request_gpt_model_in_new_thread_with_ui_alive(
|
|
132 |
def request_gpt_model_multi_threads_with_very_awesome_ui_and_high_efficiency(
|
133 |
inputs_array, inputs_show_user_array, llm_kwargs,
|
134 |
chatbot, history_array, sys_prompt_array,
|
135 |
-
refresh_interval=0.2, max_workers=
|
136 |
handle_token_exceed=True, show_user_at_complete=False,
|
137 |
retry_times_at_unknown_error=2,
|
138 |
):
|
|
|
132 |
def request_gpt_model_multi_threads_with_very_awesome_ui_and_high_efficiency(
|
133 |
inputs_array, inputs_show_user_array, llm_kwargs,
|
134 |
chatbot, history_array, sys_prompt_array,
|
135 |
+
refresh_interval=0.2, max_workers=5, scroller_max_len=30,
|
136 |
handle_token_exceed=True, show_user_at_complete=False,
|
137 |
retry_times_at_unknown_error=2,
|
138 |
):
|
crazy_functions/批量Markdown翻译.py
CHANGED
@@ -73,7 +73,7 @@ def 多文件翻译(file_manifest, project_folder, llm_kwargs, plugin_kwargs, ch
|
|
73 |
chatbot=chatbot,
|
74 |
history_array=[[""] for _ in range(n_split)],
|
75 |
sys_prompt_array=sys_prompt_array,
|
76 |
-
max_workers=
|
77 |
scroller_max_len = 80
|
78 |
)
|
79 |
|
|
|
73 |
chatbot=chatbot,
|
74 |
history_array=[[""] for _ in range(n_split)],
|
75 |
sys_prompt_array=sys_prompt_array,
|
76 |
+
max_workers=5, # OpenAI所允许的最大并行过载
|
77 |
scroller_max_len = 80
|
78 |
)
|
79 |
|
crazy_functions/批量翻译PDF文档_多线程.py
CHANGED
@@ -98,7 +98,7 @@ def 解析PDF(file_manifest, project_folder, llm_kwargs, plugin_kwargs, chatbot,
|
|
98 |
history_array=[[paper_meta] for _ in paper_fragments],
|
99 |
sys_prompt_array=[
|
100 |
"请你作为一个学术翻译,负责把学术论文的片段准确翻译成中文。" for _ in paper_fragments],
|
101 |
-
max_workers=
|
102 |
)
|
103 |
|
104 |
# 整理报告的格式
|
|
|
98 |
history_array=[[paper_meta] for _ in paper_fragments],
|
99 |
sys_prompt_array=[
|
100 |
"请你作为一个学术翻译,负责把学术论文的片段准确翻译成中文。" for _ in paper_fragments],
|
101 |
+
max_workers=5 # OpenAI所允许的最大并行过载
|
102 |
)
|
103 |
|
104 |
# 整理报告的格式
|