qingxu99 commited on
Commit
929c0af
1 Parent(s): 6e8c563

2.67 修复typo

Browse files
crazy_functions/下载arxiv论文翻译摘要.py CHANGED
@@ -183,12 +183,12 @@ def 下载arxiv论文并翻译摘要(txt, llm_kwargs, plugin_kwargs, chatbot, hi
183
 
184
  chatbot[-1] = (i_say_show_user, gpt_say)
185
  history.append(i_say_show_user); history.append(gpt_say)
186
- yield from update_ui(chatbot=chatbot, history=chatbot, msg=msg) # 刷新界面
187
  # 写入文件
188
  import shutil
189
  # 重置文件的创建时间
190
  shutil.copyfile(pdf_path, f'./gpt_log/{os.path.basename(pdf_path)}'); os.remove(pdf_path)
191
  res = write_results_to_file(history)
192
  chatbot.append(("完成了吗?", res + "\n\nPDF文件也已经下载"))
193
- yield from update_ui(chatbot=chatbot, history=chatbot, msg=msg) # 刷新界面
194
 
 
183
 
184
  chatbot[-1] = (i_say_show_user, gpt_say)
185
  history.append(i_say_show_user); history.append(gpt_say)
186
+ yield from update_ui(chatbot=chatbot, history=history, msg=msg) # 刷新界面
187
  # 写入文件
188
  import shutil
189
  # 重置文件的创建时间
190
  shutil.copyfile(pdf_path, f'./gpt_log/{os.path.basename(pdf_path)}'); os.remove(pdf_path)
191
  res = write_results_to_file(history)
192
  chatbot.append(("完成了吗?", res + "\n\nPDF文件也已经下载"))
193
+ yield from update_ui(chatbot=chatbot, history=history, msg=msg) # 刷新界面
194
 
crazy_functions/总结word文档.py CHANGED
@@ -52,7 +52,7 @@ def 解析docx(file_manifest, project_folder, llm_kwargs, plugin_kwargs, chatbot
52
  chatbot[-1] = (i_say_show_user, gpt_say)
53
  history.append(i_say_show_user)
54
  history.append(gpt_say)
55
- yield from update_ui(chatbot=chatbot, history=chatbot, msg=msg) # 刷新界面
56
  if not fast_debug: time.sleep(2)
57
 
58
  """
@@ -84,10 +84,10 @@ def 解析docx(file_manifest, project_folder, llm_kwargs, plugin_kwargs, chatbot
84
  chatbot[-1] = (i_say, gpt_say)
85
  history.append(i_say)
86
  history.append(gpt_say)
87
- yield from update_ui(chatbot=chatbot, history=chatbot, msg=msg) # 刷新界面
88
  res = write_results_to_file(history)
89
  chatbot.append(("完成了吗?", res))
90
- yield from update_ui(chatbot=chatbot, history=chatbot, msg=msg) # 刷新界面
91
 
92
 
93
  @CatchException
 
52
  chatbot[-1] = (i_say_show_user, gpt_say)
53
  history.append(i_say_show_user)
54
  history.append(gpt_say)
55
+ yield from update_ui(chatbot=chatbot, history=history, msg=msg) # 刷新界面
56
  if not fast_debug: time.sleep(2)
57
 
58
  """
 
84
  chatbot[-1] = (i_say, gpt_say)
85
  history.append(i_say)
86
  history.append(gpt_say)
87
+ yield from update_ui(chatbot=chatbot, history=history, msg=msg) # 刷新界面
88
  res = write_results_to_file(history)
89
  chatbot.append(("完成了吗?", res))
90
+ yield from update_ui(chatbot=chatbot, history=history, msg=msg) # 刷新界面
91
 
92
 
93
  @CatchException
crazy_functions/批量总结PDF文档.py CHANGED
@@ -90,7 +90,7 @@ def 解析PDF(file_manifest, project_folder, llm_kwargs, plugin_kwargs, chatbot,
90
 
91
  chatbot[-1] = (i_say_show_user, gpt_say)
92
  history.append(i_say_show_user); history.append(gpt_say)
93
- yield from update_ui(chatbot=chatbot, history=chatbot, msg=msg) # 刷新界面
94
  if not fast_debug: time.sleep(2)
95
 
96
  all_file = ', '.join([os.path.relpath(fp, project_folder) for index, fp in enumerate(file_manifest)])
@@ -112,10 +112,10 @@ def 解析PDF(file_manifest, project_folder, llm_kwargs, plugin_kwargs, chatbot,
112
 
113
  chatbot[-1] = (i_say, gpt_say)
114
  history.append(i_say); history.append(gpt_say)
115
- yield from update_ui(chatbot=chatbot, history=chatbot, msg=msg) # 刷新界面
116
  res = write_results_to_file(history)
117
  chatbot.append(("完成了吗?", res))
118
- yield from update_ui(chatbot=chatbot, history=chatbot, msg=msg) # 刷新界面
119
 
120
 
121
  @CatchException
 
90
 
91
  chatbot[-1] = (i_say_show_user, gpt_say)
92
  history.append(i_say_show_user); history.append(gpt_say)
93
+ yield from update_ui(chatbot=chatbot, history=history, msg=msg) # 刷新界面
94
  if not fast_debug: time.sleep(2)
95
 
96
  all_file = ', '.join([os.path.relpath(fp, project_folder) for index, fp in enumerate(file_manifest)])
 
112
 
113
  chatbot[-1] = (i_say, gpt_say)
114
  history.append(i_say); history.append(gpt_say)
115
+ yield from update_ui(chatbot=chatbot, history=history, msg=msg) # 刷新界面
116
  res = write_results_to_file(history)
117
  chatbot.append(("完成了吗?", res))
118
+ yield from update_ui(chatbot=chatbot, history=history, msg=msg) # 刷新界面
119
 
120
 
121
  @CatchException
crazy_functions/批量总结PDF文档pdfminer.py CHANGED
@@ -93,7 +93,7 @@ def 解析Paper(file_manifest, project_folder, llm_kwargs, plugin_kwargs, chatbo
93
  ) # 带超时倒计时
94
  chatbot[-1] = (i_say_show_user, gpt_say)
95
  history.append(i_say_show_user); history.append(gpt_say)
96
- yield from update_ui(chatbot=chatbot, history=chatbot, msg=msg) # 刷新界面
97
  if not fast_debug: time.sleep(2)
98
 
99
  all_file = ', '.join([os.path.relpath(fp, project_folder) for index, fp in enumerate(file_manifest)])
@@ -114,10 +114,10 @@ def 解析Paper(file_manifest, project_folder, llm_kwargs, plugin_kwargs, chatbo
114
  ) # 带超时倒计时
115
  chatbot[-1] = (i_say, gpt_say)
116
  history.append(i_say); history.append(gpt_say)
117
- yield from update_ui(chatbot=chatbot, history=chatbot, msg=msg) # 刷新界面
118
  res = write_results_to_file(history)
119
  chatbot.append(("完成了吗?", res))
120
- yield from update_ui(chatbot=chatbot, history=chatbot, msg=msg) # 刷新界面
121
 
122
 
123
 
 
93
  ) # 带超时倒计时
94
  chatbot[-1] = (i_say_show_user, gpt_say)
95
  history.append(i_say_show_user); history.append(gpt_say)
96
+ yield from update_ui(chatbot=chatbot, history=history, msg=msg) # 刷新界面
97
  if not fast_debug: time.sleep(2)
98
 
99
  all_file = ', '.join([os.path.relpath(fp, project_folder) for index, fp in enumerate(file_manifest)])
 
114
  ) # 带超时倒计时
115
  chatbot[-1] = (i_say, gpt_say)
116
  history.append(i_say); history.append(gpt_say)
117
+ yield from update_ui(chatbot=chatbot, history=history, msg=msg) # 刷新界面
118
  res = write_results_to_file(history)
119
  chatbot.append(("完成了吗?", res))
120
+ yield from update_ui(chatbot=chatbot, history=history, msg=msg) # 刷新界面
121
 
122
 
123
 
crazy_functions/批量翻译PDF文档_多线程.py CHANGED
@@ -280,7 +280,7 @@ def 解析PDF(file_manifest, project_folder, llm_kwargs, plugin_kwargs, chatbot,
280
  # 更新UI
281
  generated_conclusion_files.append(f'./gpt_log/{create_report_file_name}')
282
  chatbot.append((f"{fp}完成了吗?", res))
283
- yield from update_ui(chatbot=chatbot, history=chatbot) # 刷新界面
284
 
285
  # 准备文件的下载
286
  import shutil
@@ -293,4 +293,4 @@ def 解析PDF(file_manifest, project_folder, llm_kwargs, plugin_kwargs, chatbot,
293
  if os.path.exists(pdf_path):
294
  os.remove(pdf_path)
295
  chatbot.append(("给出输出文件清单", str(generated_conclusion_files)))
296
- yield from update_ui(chatbot=chatbot, history=chatbot) # 刷新界面
 
280
  # 更新UI
281
  generated_conclusion_files.append(f'./gpt_log/{create_report_file_name}')
282
  chatbot.append((f"{fp}完成了吗?", res))
283
+ yield from update_ui(chatbot=chatbot, history=history) # 刷新界面
284
 
285
  # 准备文件的下载
286
  import shutil
 
293
  if os.path.exists(pdf_path):
294
  os.remove(pdf_path)
295
  chatbot.append(("给出输出文件清单", str(generated_conclusion_files)))
296
+ yield from update_ui(chatbot=chatbot, history=history) # 刷新界面
crazy_functions/生成函数注释.py CHANGED
@@ -23,13 +23,13 @@ def 生成函数注释(file_manifest, project_folder, llm_kwargs, plugin_kwargs,
23
 
24
  chatbot[-1] = (i_say_show_user, gpt_say)
25
  history.append(i_say_show_user); history.append(gpt_say)
26
- yield from update_ui(chatbot=chatbot, history=chatbot, msg=msg) # 刷新界面
27
  if not fast_debug: time.sleep(2)
28
 
29
  if not fast_debug:
30
  res = write_results_to_file(history)
31
  chatbot.append(("完成了吗?", res))
32
- yield from update_ui(chatbot=chatbot, history=chatbot, msg=msg) # 刷新界面
33
 
34
 
35
 
 
23
 
24
  chatbot[-1] = (i_say_show_user, gpt_say)
25
  history.append(i_say_show_user); history.append(gpt_say)
26
+ yield from update_ui(chatbot=chatbot, history=history, msg=msg) # 刷新界面
27
  if not fast_debug: time.sleep(2)
28
 
29
  if not fast_debug:
30
  res = write_results_to_file(history)
31
  chatbot.append(("完成了吗?", res))
32
+ yield from update_ui(chatbot=chatbot, history=history, msg=msg) # 刷新界面
33
 
34
 
35
 
crazy_functions/读文章写摘要.py CHANGED
@@ -24,7 +24,7 @@ def 解析Paper(file_manifest, project_folder, llm_kwargs, plugin_kwargs, chatbo
24
 
25
  chatbot[-1] = (i_say_show_user, gpt_say)
26
  history.append(i_say_show_user); history.append(gpt_say)
27
- yield from update_ui(chatbot=chatbot, history=chatbot, msg=msg) # 刷新界面
28
  if not fast_debug: time.sleep(2)
29
 
30
  all_file = ', '.join([os.path.relpath(fp, project_folder) for index, fp in enumerate(file_manifest)])
@@ -39,10 +39,10 @@ def 解析Paper(file_manifest, project_folder, llm_kwargs, plugin_kwargs, chatbo
39
 
40
  chatbot[-1] = (i_say, gpt_say)
41
  history.append(i_say); history.append(gpt_say)
42
- yield from update_ui(chatbot=chatbot, history=chatbot, msg=msg) # 刷新界面
43
  res = write_results_to_file(history)
44
  chatbot.append(("完成了吗?", res))
45
- yield from update_ui(chatbot=chatbot, history=chatbot, msg=msg) # 刷新界面
46
 
47
 
48
 
 
24
 
25
  chatbot[-1] = (i_say_show_user, gpt_say)
26
  history.append(i_say_show_user); history.append(gpt_say)
27
+ yield from update_ui(chatbot=chatbot, history=history, msg=msg) # 刷新界面
28
  if not fast_debug: time.sleep(2)
29
 
30
  all_file = ', '.join([os.path.relpath(fp, project_folder) for index, fp in enumerate(file_manifest)])
 
39
 
40
  chatbot[-1] = (i_say, gpt_say)
41
  history.append(i_say); history.append(gpt_say)
42
+ yield from update_ui(chatbot=chatbot, history=history, msg=msg) # 刷新界面
43
  res = write_results_to_file(history)
44
  chatbot.append(("完成了吗?", res))
45
+ yield from update_ui(chatbot=chatbot, history=history, msg=msg) # 刷新界面
46
 
47
 
48
 
crazy_functions/谷歌检索小助手.py CHANGED
@@ -100,7 +100,7 @@ def 谷歌检索小助手(txt, llm_kwargs, plugin_kwargs, chatbot, history, syst
100
 
101
  chatbot.append(["状态?", "已经全部完成"])
102
  msg = '正常'
103
- yield from update_ui(chatbot=chatbot, history=chatbot, msg=msg) # 刷新界面
104
  res = write_results_to_file(history)
105
  chatbot.append(("完成了吗?", res));
106
- yield from update_ui(chatbot=chatbot, history=chatbot, msg=msg) # 刷新界面
 
100
 
101
  chatbot.append(["状态?", "已经全部完成"])
102
  msg = '正常'
103
+ yield from update_ui(chatbot=chatbot, history=history, msg=msg) # 刷新界面
104
  res = write_results_to_file(history)
105
  chatbot.append(("完成了吗?", res));
106
+ yield from update_ui(chatbot=chatbot, history=history, msg=msg) # 刷新界面
version CHANGED
@@ -1,5 +1,5 @@
1
  {
2
- "version": 2.66,
3
  "show_feature": true,
4
  "new_feature": "很抱歉2.6有bug,现已经紧急修复<->现可通过输入区更新临时api-key <-> 增强多线程稳定性(涉及代码解析、PDF翻译、自译解等) <-> 修复Token计数错误(解决PDF翻译的分割不合理的问题) <-> 如果一键更新失败,可前往github手动更新"
5
  }
 
1
  {
2
+ "version": 2.67,
3
  "show_feature": true,
4
  "new_feature": "很抱歉2.6有bug,现已经紧急修复<->现可通过输入区更新临时api-key <-> 增强多线程稳定性(涉及代码解析、PDF翻译、自译解等) <-> 修复Token计数错误(解决PDF翻译的分割不合理的问题) <-> 如果一键更新失败,可前往github手动更新"
5
  }