Skip to content

Commit

Permalink
change some open fn encoding to utf-8
Browse files Browse the repository at this point in the history
  • Loading branch information
binary-husky committed Nov 19, 2024
1 parent 588b22e commit 82a7289
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion request_llms/bridge_moonshot.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def __converter_file(self, user_input: str):
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})
Expand Down
2 changes: 1 addition & 1 deletion themes/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def minimize_js(common_js_path):
os.remove(old_min_js)
# use rjsmin to minimize `common_js_path`
c_jsmin = rjsmin.jsmin
with open(common_js_path, "r") as f:
with open(common_js_path, "r", encoding='utf-8') as f:
js_content = f.read()
if common_js_path == "themes/common.js":
js_content = inject_mutex_button_code(js_content)
Expand Down

0 comments on commit 82a7289

Please sign in to comment.