Skip to content

Commit cbe1129

Browse files
authored
allow ensure_ascii parameter as a few templates are using it now
1 parent ea52ae8 commit cbe1129

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llama_cpp/llama_chat_format.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ def __init__(
214214
lstrip_blocks=True,
215215
extensions=[jinja2_ext.loopcontrols],
216216
)
217-
environment.filters["tojson"] = lambda x, indent=None, separators=None, sort_keys=False: json.dumps(x, indent=indent, separators=separators, sort_keys=sort_keys, ensure_ascii=False)
217+
environment.filters["tojson"] = lambda x, indent=None, separators=None, sort_keys=False, ensure_ascii=False: json.dumps(x, indent=indent, separators=separators, sort_keys=sort_keys, ensure_ascii=ensure_ascii)
218218
environment.globals["strftime_now"] = lambda format: datetime.now().strftime(format)
219219
self._environment = environment.from_string(self.template)
220220

0 commit comments

Comments
 (0)