Merge pull request #46 from mambaHu/master
Markdown analysis report garbled issue
This commit is contained in:
commit
c80808a0c5
@ -49,7 +49,7 @@ def write_results_to_file(history, file_name=None):
|
|||||||
if file_name is None:
|
if file_name is None:
|
||||||
file_name = time.strftime("chatGPT分析报告%Y-%m-%d-%H-%M-%S", time.localtime()) + '.md'
|
file_name = time.strftime("chatGPT分析报告%Y-%m-%d-%H-%M-%S", time.localtime()) + '.md'
|
||||||
os.makedirs('./gpt_log/', exist_ok=True)
|
os.makedirs('./gpt_log/', exist_ok=True)
|
||||||
with open(f'./gpt_log/{file_name}', 'w') as f:
|
with open(f'./gpt_log/{file_name}', 'w', encoding = 'utf8') as f:
|
||||||
f.write('# chatGPT 分析报告\n')
|
f.write('# chatGPT 分析报告\n')
|
||||||
for i, content in enumerate(history):
|
for i, content in enumerate(history):
|
||||||
if i%2==0: f.write('## ')
|
if i%2==0: f.write('## ')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user