-
Notifications
You must be signed in to change notification settings - Fork 426
✨ Add block assignment functionality in jinja
package.
#1341
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
Conversation
jinja
paxkage.
jinja
paxkage.jinja
paxkage.
jinja
paxkage.jinja
package.
Thanks so much! This is very useful and the PR looks clean 👍 Maybe it's worth adding a unit test for a very simple test string that tests just this functionality? To be added in
|
Good suggestion @xenova, I've added a simple test 👍 |
I've also added a simple test for |
Flawless PR! Thanks a ton! Failing lint is unrelated to this PR - could you merge main into your branch? I'll re-run CI and merge when all is green. |
I've already rebased |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yes you are right! Fixed by #1348 (& ran pnpm format
).
Thanks again.
This PR implements functionality of block assignments (https://jinja.palletsprojects.com/en/stable/templates/#block-assignments) in lexer, parser and engine=
I felt encouraged by the reply here:
#1087 (comment)
It was necessary to parse some chat_templates e.g. https://huggingface.co/MadeAgents/Hammer2.1-1.5b/blob/main/tokenizer_config.json (nicely formatted
chat_template
: https://pastebin.com/xBmhbwLi)Let me know if you have any feedback.