Skip to content
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: implemented multiple arguments for functions in templates, with named_args added #5014

Merged

Conversation

eavanvalkenburg
Copy link
Member

Motivation and Context

This implements ADR0009 multiple arguments in a template function.

Closes #5003

Description

Added NamedArgBlocks class and updated codetokenizer and templatetokenizer to recognize these and implement them, add code to CodeBlock class to use it.

Contribution Checklist

@eavanvalkenburg eavanvalkenburg requested a review from a team as a code owner February 14, 2024 14:48
@shawncal shawncal added the python Pull requests for the Python Semantic Kernel label Feb 14, 2024
Copy link
Contributor

@juliomenendez juliomenendez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good! Just a couple comments

@moonbox3
Copy link
Contributor

moonbox3 commented Feb 15, 2024

LGTM. With that said, due to my mistake earlier with some merge issues, let's please re-create this PR against the following branch: https://github.com/microsoft/semantic-kernel/tree/python_kernel_args_latest. Sorry for the hassle.

@eavanvalkenburg eavanvalkenburg changed the base branch from kernel_args_and_func_result to python_kernel_args_latest February 15, 2024 06:14
@eavanvalkenburg eavanvalkenburg force-pushed the named_args_blocks branch 2 times, most recently from 7d03f58 to 30810c6 Compare February 19, 2024 09:54
Copy link
Contributor

@moonbox3 moonbox3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This all looks really good, and much needed! Thank you. Tiny comments regarding doc strings/removing a commented line of code.

@moonbox3 moonbox3 merged commit 2a3e52a into microsoft:python_kernel_args_latest Feb 21, 2024
2 checks passed
eavanvalkenburg added a commit that referenced this pull request Feb 22, 2024
…th named_args added (#5014)

### Motivation and Context

<!-- 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.
-->
This implements ADR0009 multiple arguments in a template function. 

Closes #5003 

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->
Added NamedArgBlocks class and updated codetokenizer and
templatetokenizer to recognize these and implement them, add code to
CodeBlock class to use it.

### 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 😄
@eavanvalkenburg eavanvalkenburg deleted the named_args_blocks branch February 27, 2024 10:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
python Pull requests for the Python Semantic Kernel
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants