You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 52e317a
Browse filesBrowse the repository at this point in the historyBrowse files
### 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 <[email protected]>
0 commit comments