We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6e4892f commit cc7aa33Copy full SHA for cc7aa33
src/transformers/tokenization_utils_base.py
@@ -2086,7 +2086,7 @@ def _from_pretrained(
2086
chat_template_file = resolved_vocab_files.pop("chat_template_file", None)
2087
extra_chat_templates = [key for key in resolved_vocab_files if key.startswith("chat_template_")]
2088
if chat_template_file is not None:
2089
- with open(chat_template_file) as chat_template_handle:
+ with open(chat_template_file, encoding="utf-8") as chat_template_handle:
2090
chat_templates["default"] = chat_template_handle.read()
2091
for extra_chat_template in extra_chat_templates:
2092
template_file = resolved_vocab_files.pop(extra_chat_template, None)
0 commit comments