8000 Render templates in immutable sandbox by CISC · Pull Request #1441 · abetlen/llama-cpp-python · GitHub
[go: up one dir, main page]

Skip to content

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
@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

0