change some open fn encoding to utf-8

这个提交包含在:
binary-husky
2024-11-19 15:49:29 +00:00
父节点 588b22e039
当前提交 e62decac21
共有 4 个文件被更改,包括 5 次插入5 次删除

查看文件

@@ -31,7 +31,7 @@ class MoonShotInit:
files.append(f)
for file in files:
if file.split('.')[-1] in ['pdf']:
with open(file, 'r') as fp:
with open(file, 'r', encoding='utf8') as fp:
from crazy_functions.crazy_utils import read_and_clean_pdf_text
file_content, _ = read_and_clean_pdf_text(fp)
what_ask.append({"role": "system", "content": file_content})