Add support for values params for functions - #65
Merged
Conversation
Devis Lucato (dluc)
requested review from
Lee Miller (lemillermicrosoft) and
Shawn Callegari (shawncal)
March 13, 2023 19:47
Devis Lucato (dluc)
force-pushed
the
dluc84-tpl
branch
from
March 13, 2023 22:41
ab86b50 to
d5f7c43
Compare
Devis Lucato (dluc)
force-pushed
the
dluc84-tpl
branch
from
March 14, 2023 01:42
90c29bc to
7b9c35b
Compare
Devis Lucato (dluc)
force-pushed
the
dluc84-tpl
branch
from
March 14, 2023 06:20
7b9c35b to
65e4a98
Compare
Lee Miller (lemillermicrosoft)
previously approved these changes
Mar 14, 2023
Lee Miller (lemillermicrosoft)
left a comment
Member
There was a problem hiding this comment.
Did not have chance to test yet, but LGTM.
Shawn Callegari (shawncal)
previously approved these changes
Mar 14, 2023
Contributor
|
Devis Lucato (@dluc) Merge conflict (renamed tests folder) and a new warning. Happy to merge when ready |
Lee Miller (lemillermicrosoft)
left a comment
Member
There was a problem hiding this comment.
Had one question about variable expansion on function name support.
Devis Lucato (dluc)
dismissed stale reviews from Shawn Callegari (shawncal) and Lee Miller (lemillermicrosoft)
via
March 14, 2023 22:51
7d93321
Devis Lucato (dluc)
force-pushed
the
dluc84-tpl
branch
from
March 14, 2023 22:51
65e4a98 to
7d93321
Compare
Contributor
Author
|
Shawn Callegari (@shawncal) Lee Miller (@lemillermicrosoft) warnings fixed / comments addressed |
Shawn Callegari (shawncal)
approved these changes
Mar 15, 2023
Desmond Howard (dehoward)
pushed a commit
to lemillermicrosoft/semantic-kernel
that referenced
this pull request
Jun 1, 2023
### Motivation and Context
1. When writing a prompt one might want to use the symbols `{{` and `}}`
without triggering the template engine.
2. When invoking functions, one might want to pass a value rather than a
variable, e.g. `{{ recall "my preferred browser" }}`.
3. Semantic functions might want to call other semantic functions.
### Description
This PR adds support for "values", so special syntax can be embedded,
and so that functions can be invoked with predefined values without the
need to create a temporary variable.
E.g.
```
{{ "{{" }} and {{ "}}" }} are special SK sequences.
```
```
... {{ read 'c:\documents\ai\file.txt' }} ...
```
```
... {{ "quotes' \"escaping\" example" }} ...
```
```
... {{ 'quotes\' "escaping" example' }} ...
```
```
{{ 'two special chars \\\' here' }}
```
Added missing tests for all the template language, including end to end
integration tests covering several edge cases.
Also: semantic functions can now call other semantic functions. The
previous implementation would allow semantic functions to call only
native functions.
golden-aries
pushed a commit
to golden-aries/semantic-kernel
that referenced
this pull request
Oct 10, 2023
### Motivation and Context The world evolves and so must we. ### Description Adapted CC to SK 0.18: - SKContext no longer contains Memory nor a cancellation token, so now using Memory from Kernel - Make use of SKContext.Clone() and remove a redundant implementation - Removed code related to ACS semantic search, which no longer exists (only ACS vector search remains) ### Contribution Checklist - [ ] The code builds clean without any errors or warnings - [ ] The PR follows the [Contribution Guidelines](https://github.com/microsoft/copilot-chat/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/copilot-chat/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [ ] All unit tests pass, and I have added new tests where possible - [ ] I didn't break anyone 😄
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation and Context
{{and}}without triggering the template engine.{{ recall "my preferred browser" }}.Description
This PR adds support for "values", so special syntax can be embedded, and so that functions can be invoked with predefined values without the need to create a temporary variable.
E.g.
Added missing tests for all the template language, including end to end integration tests covering several edge cases.
Also: semantic functions can now call other semantic functions. The previous implementation would allow semantic functions to call only native functions.
Contribution Checklist
dotnet format