diff --git a/litellm/llms/prompt_templates/factory.py b/litellm/llms/prompt_templates/factory.py index f137c90f65d..d7f2272c4f5 100644 --- a/litellm/llms/prompt_templates/factory.py +++ b/litellm/llms/prompt_templates/factory.py @@ -220,7 +220,7 @@ def phind_codellama_pt(messages): def hf_chat_template(model: str, messages: list, chat_template: Optional[Any] = None): - # Define Jinja2 environment with autoescaping disabled + # Define Jinja2 environment env = ImmutableSandboxedEnvironment() def raise_exception(message):