-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Python: support Jinja2 templating #5483
Conversation
Python 3.8 Test Coverage Report •
Python 3.8 Unit Test Overview
|
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.
Looks good. Just a couple questions and sorry if I'm missing something but what's the difference between create_handlebars_helper_from_function
and create_jinja2_helper_from_function
?
As we talked about offline, the handlebars helper function has a |
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.
Looks great! One small nit to update, but otherwise let's get it in!
python/semantic_kernel/prompt_template/utils/template_function_helpers.py
Outdated
Show resolved
Hide resolved
### Motivation and Context Jinja2 is a heavily supported Python templating language and we're introducing it to SK Python. <!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> ### Description This PR brings in the ability to specify Jinja2 templates for use within SK Python: - Closes microsoft#5343 <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [X] The code builds clean without any errors or warnings - [X] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [X] All unit tests pass, and I have added new tests where possible - [X] I didn't break anyone 😄
Motivation and Context
Jinja2 is a heavily supported Python templating language and we're introducing it to SK Python.
Description
This PR brings in the ability to specify Jinja2 templates for use within SK Python:
Contribution Checklist