-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
.Net: Include output scheme in functions manual for HandlebarsPlanner #4732
Labels
.NET
Issue or Pull requests regarding .NET code
planner
Anything related to planner or plans
sk team issue
A tag to denote issues that where created by the Semantic Kernel team (i.e., not the community)
Comments
gitri-ms
added
.NET
Issue or Pull requests regarding .NET code
planner
Anything related to planner or plans
sk team issue
A tag to denote issues that where created by the Semantic Kernel team (i.e., not the community)
labels
Jan 24, 2024
github-actions
bot
changed the title
Include output scheme in functions manual for HandlebarsPlanner
.Net: Include output scheme in functions manual for HandlebarsPlanner
Jan 24, 2024
4 tasks
4 tasks
4 tasks
github-merge-queue bot
pushed a commit
that referenced
this issue
Feb 1, 2024
### 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. --> The custom `or` helper had a bug where it was checking for null values, rather than checking for non-null values. This PR changes the condition to `not null`. Also, renamed a heading in the CreatePlan prompt to better guide the model in identifying Handlebars built-in _block_ helpers. ### Description Additional changes to the `GetArgumentValue` method in `KernelHelperUtils.cs` to return null if variable isn't defined. Before, if the template referenced a variable that wasn't defined in `KernelArguments`, the method would just return the key as a string. Now, it just returns null (as expected). > I had it returning a string before because I thought Handlebars would default the argument to its string representation since it templates regular text, but I double checked [HB docs](https://handlebarsjs.com/guide/expressions.html#helpers-with-multiple-parameters), and generally, string literals are surrounded by quotes when a raw value is passed as an argument. Should resolve these issues: - #4661 - #4732 ### 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 😄 --------- Co-authored-by: Gina Triolo <51341242+gitri-ms@users.noreply.github.com>
Bryan-Roe
pushed a commit
to Bryan-Roe/semantic-kernel
that referenced
this issue
Oct 6, 2024
### 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. --> The custom `or` helper had a bug where it was checking for null values, rather than checking for non-null values. This PR changes the condition to `not null`. Also, renamed a heading in the CreatePlan prompt to better guide the model in identifying Handlebars built-in _block_ helpers. ### Description Additional changes to the `GetArgumentValue` method in `KernelHelperUtils.cs` to return null if variable isn't defined. Before, if the template referenced a variable that wasn't defined in `KernelArguments`, the method would just return the key as a string. Now, it just returns null (as expected). > I had it returning a string before because I thought Handlebars would default the argument to its string representation since it templates regular text, but I double checked [HB docs](https://handlebarsjs.com/guide/expressions.html#helpers-with-multiple-parameters), and generally, string literals are surrounded by quotes when a raw value is passed as an argument. Should resolve these issues: - microsoft#4661 - microsoft#4732 ### 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 😄 --------- Co-authored-by: Gina Triolo <51341242+gitri-ms@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
.NET
Issue or Pull requests regarding .NET code
planner
Anything related to planner or plans
sk team issue
A tag to denote issues that where created by the Semantic Kernel team (i.e., not the community)
The function descriptions in the handlebars planner prompt should include the scheme of the output. This would make it possible for the planner to generate a plan that can parse or extract data from an output object.
The text was updated successfully, but these errors were encountered: