Merge branch 'master' into dev

This commit is contained in:
Your Name 2023-03-31 23:08:30 +08:00
commit 41801c017c
2 changed files with 6 additions and 3 deletions

View File

@ -2,9 +2,9 @@
# ChatGPT 学术优化
**如果喜欢这个项目请给它一个Star如果你发明了更好用的学术快捷键欢迎发issue或者pull requests**
**如果喜欢这个项目请给它一个Star如果你发明了更好用的学术快捷键欢迎发issue或者pull requestsdev分支**
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.
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.
```
代码中参考了很多其他优秀项目中的设计,主要包括:

View File

@ -84,7 +84,10 @@ def write_results_to_file(history, file_name=None):
with open(f'./gpt_log/{file_name}', 'w', encoding = 'utf8') as f:
f.write('# chatGPT 分析报告\n')
for i, content in enumerate(history):
if type(content) != str: content = str(content)
try: # 这个bug没找到触发条件暂时先这样顶一下
if type(content) != str: content = str(content)
except:
continue
if i%2==0: f.write('## ')
f.write(content)
f.write('\n\n')