Merge branch 'master' into dev

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

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')