Skip to content

Render templates in immutable sandbox #1441

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 10, 2024

Conversation

CISC
Copy link
Contributor

@CISC CISC commented May 10, 2024

Chat templates are rendered with ImmutableSandboxedEnvironment in transformers so no need to do otherwise here.

CISC and others added 2 commits May 10, 2024 02:15
Chat templates are rendered with ImmutableSandboxedEnvironment in transformers so no need to do otherwise here.
@abetlen abetlen merged commit 561e880 into abetlen:main May 10, 2024
16 checks passed
@CISC CISC deleted the immutable-template-sandbox branch May 10, 2024 08:19
@CISC
Copy link
Contributor Author

CISC commented May 10, 2024

Heh, what a fluke with dual PR, just noticed the discrepancy when double checking rendering with transformers...

BTW, the security PR left loader=jinja2.BaseLoader() in, it doesn't really make a difference, but it's not necessary since we're always using .from_string() which will not invoke a loader.

@abetlen
Copy link
Owner

abetlen commented May 10, 2024

@CISC yeah I was reviewing the security PR when I saw you open this one so I figured I should merge both soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants