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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for custom context in plan execution #826
Merged
Merged
Conversation
This file contains 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
github-actions
bot
added
.NET
Issue or Pull requests regarding .NET code
kernel
Issues or pull requests impacting the core kernel
kernel.core
labels
May 5, 2023
lemillermicrosoft
added
bug
Something isn't working
PR: ready for review
All feedback addressed, ready for reviews
PR: in progress
Under development and/or addressing feedback
and removed
PR: ready for review
All feedback addressed, ready for reviews
labels
May 5, 2023
RogerBarreto
reviewed
May 5, 2023
lemillermicrosoft
added
PR: ready for review
All feedback addressed, ready for reviews
and removed
PR: in progress
Under development and/or addressing feedback
labels
May 5, 2023
RogerBarreto
reviewed
May 5, 2023
shawncal
reviewed
May 6, 2023
lemillermicrosoft
force-pushed
the
505_plan_context
branch
from
May 6, 2023 03:06
a984c23
to
47009e3
Compare
shawncal
reviewed
May 6, 2023
shawncal
approved these changes
May 6, 2023
Summary: This commit fixes a bug that allows users to pass a custom SKContext object to a plan invocation, which can override or augment the default context variables. This enables more flexibility and control over the plan execution and the output. The commit also adds a unit test to verify the functionality of the new feature.
Summary: This commit adds the ability to execute a plan with a custom state and parameters, as well as overriding the input and other variables from the context. It also adds unit tests to verify the behavior of the plan execution with different combinations of state, parameters, and context. The commit modifies the GetNextStepVariables method in the Plan class to implement the logic for resolving the variables for each step in the plan. It also updates the documentation to explain the priority order for the variables.
Summary: This commit replaces the hard-coded string "INPUT" with the constant ContextVariables.MainKey in two places where it is used to refer to the main context variable name. This improves readability and consistency, and avoids potential typos or mismatches.
Summary: This commit simplifies the logic for setting step variables in the Plan class by removing redundant checks for empty strings. The variables.Get and State.Get methods already handle empty strings internally, so there is no need to check them again. This makes the code more readable and consistent.
codebrain
pushed a commit
to searchpioneer/semantic-kernel
that referenced
this pull request
May 16, 2023
This commit fixes a bug that allows users to pass a custom SKContext object to a plan invocation, which can override or augment the default context variables. This enables more flexibility and control over the plan execution and the output. The commit also adds a unit test to verify the functionality of the new feature. Co-authored-by: Lee Miller <lemillermicrosoft@users.noreply.github.com> Co-authored-by: Shawn Callegari <36091529+shawncal@users.noreply.github.com>
dehoward
pushed a commit
to lemillermicrosoft/semantic-kernel
that referenced
this pull request
Jun 1, 2023
This commit fixes a bug that allows users to pass a custom SKContext object to a plan invocation, which can override or augment the default context variables. This enables more flexibility and control over the plan execution and the output. The commit also adds a unit test to verify the functionality of the new feature. Co-authored-by: Lee Miller <lemillermicrosoft@users.noreply.github.com> Co-authored-by: Shawn Callegari <36091529+shawncal@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
Something isn't working
kernel
Issues or pull requests impacting the core kernel
.NET
Issue or Pull requests regarding .NET code
PR: ready for review
All feedback addressed, ready for reviews
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.
This commit fixes a bug that allows users to pass a custom SKContext object to a plan invocation, which can override or augment the default context variables. This enables more flexibility and control over the plan execution and the output. The commit also adds a unit test to verify the functionality of the new feature.
Contribution Checklist
dotnet format