Spaces:
Running
Running
Merge branch 'master' into dev
Browse files- README.md +2 -2
- toolbox.py +4 -1
README.md
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
|
3 |
# ChatGPT 学术优化
|
4 |
|
5 |
-
**如果喜欢这个项目,请给它一个Star;如果你发明了更好用的学术快捷键,欢迎发issue或者pull requests
|
6 |
|
7 |
-
If you like this project, please give it a Star. If you've come up with more useful academic shortcuts, feel free to open an issue or pull request
|
8 |
|
9 |
```
|
10 |
代码中参考了很多其他优秀项目中的设计,主要包括:
|
|
|
2 |
|
3 |
# ChatGPT 学术优化
|
4 |
|
5 |
+
**如果喜欢这个项目,请给它一个Star;如果你发明了更好用的学术快捷键,欢迎发issue或者pull requests(dev分支)**
|
6 |
|
7 |
+
If you like this project, please give it a Star. If you've come up with more useful academic shortcuts, feel free to open an issue or pull request (to `dev` branch).
|
8 |
|
9 |
```
|
10 |
代码中参考了很多其他优秀项目中的设计,主要包括:
|
toolbox.py
CHANGED
@@ -84,7 +84,10 @@ def write_results_to_file(history, file_name=None):
|
|
84 |
with open(f'./gpt_log/{file_name}', 'w', encoding = 'utf8') as f:
|
85 |
f.write('# chatGPT 分析报告\n')
|
86 |
for i, content in enumerate(history):
|
87 |
-
|
|
|
|
|
|
|
88 |
if i%2==0: f.write('## ')
|
89 |
f.write(content)
|
90 |
f.write('\n\n')
|
|
|
84 |
with open(f'./gpt_log/{file_name}', 'w', encoding = 'utf8') as f:
|
85 |
f.write('# chatGPT 分析报告\n')
|
86 |
for i, content in enumerate(history):
|
87 |
+
try: # 这个bug没找到触发条件,暂时先这样顶一下
|
88 |
+
if type(content) != str: content = str(content)
|
89 |
+
except:
|
90 |
+
continue
|
91 |
if i%2==0: f.write('## ')
|
92 |
f.write(content)
|
93 |
f.write('\n\n')
|