From e815afb79283173825ce6107cd508b91535ff535 Mon Sep 17 00:00:00 2001 From: binary-husky <96192199+binary-husky@users.noreply.github.com> Date: Fri, 31 Mar 2023 21:48:45 +0800 Subject: [PATCH 1/2] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 285c10d..cf01cc1 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,9 @@ # ChatGPT 学术优化 -**如果喜欢这个项目,请给它一个Star;如果你发明了更好用的学术快捷键,欢迎发issue或者pull requests** +**如果喜欢这个项目,请给它一个Star;如果你发明了更好用的学术快捷键,欢迎发issue或者pull requests(dev分支)** -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). ``` 代码中参考了很多其他优秀项目中的设计,主要包括: From 7c8b8b95b2ef96c84d9f03dc64050b9dd6f392c8 Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 31 Mar 2023 22:49:39 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- toolbox.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/toolbox.py b/toolbox.py index d96b3f6..be64c31 100644 --- a/toolbox.py +++ b/toolbox.py @@ -55,6 +55,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): + try: # 这个bug没找到触发条件,暂时先这样顶一下 + if type(content) != str: content = str(content) + except: + continue if i%2==0: f.write('## ') f.write(content) f.write('\n\n')