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
.Net: make planner constructors more similar #2849
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
shawncal
added
.NET
Issue or Pull requests regarding .NET code
kernel
Issues or pull requests impacting the core kernel
kernel.core
labels
Sep 15, 2023
hario90
changed the title
make planner constructors more similar
Normalize planner constructors
Sep 15, 2023
github-actions
bot
changed the title
Normalize planner constructors
.Net: make planner constructors more similar
Sep 15, 2023
lemillermicrosoft
added
the
PR: breaking change
Pull requests that introduce breaking changes
label
Sep 15, 2023
lemillermicrosoft
approved these changes
Sep 20, 2023
dotnet/src/Extensions/Planning.SequentialPlanner/SequentialPlanner.cs
Outdated
Show resolved
Hide resolved
@hario90 We've got some conflicts. Can you please resolve, then ping me for final review and merge? |
dotnet/src/Extensions/Planning.SequentialPlanner/SequentialPlanner.cs
Outdated
Show resolved
Hide resolved
dotnet/src/Extensions/Planning.StepwisePlanner/StepwisePlanner.cs
Outdated
Show resolved
Hide resolved
SergeyMenshykh
approved these changes
Sep 21, 2023
SOE-YoungS
pushed a commit
to SOE-YoungS/semantic-kernel
that referenced
this pull request
Nov 1, 2023
### Motivation and Context Fixes microsoft#2847, microsoft#2519 Contains breaking changes. This addresses inconsistencies in planner construction. The planners sometimes took a prompt override through a delegate in the config and sometimes as a constructor argument. Additionally, the ActionPlanner used to take a loggerFactory as a constructor argument while the other planners did not. The goal of these changes is to make working with planners more predictable. ### Description * Added `GetPromptTemplate` delegate function to the planner base config. All planners will use this to get the prompt override. * Removed logger factory argument from ActionPlanner constructor. Used the Kernel's logger factory to create a new logger within each planner constructor. * Renamed private `Config` private instance field to `_config` ### 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 - [ ] I didn't break anyone 馃槃 --------- Co-authored-by: Shawn Callegari <36091529+shawncal@users.noreply.github.com>
Is If not intended to override the create plan prompt, what is it used for? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
kernel
Issues or pull requests impacting the core kernel
.NET
Issue or Pull requests regarding .NET code
PR: breaking change
Pull requests that introduce breaking changes
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.
Motivation and Context
Fixes #2847, #2519
Contains breaking changes.
This addresses inconsistencies in planner construction. The planners sometimes took a prompt override through a delegate in the config and sometimes as a constructor argument. Additionally, the ActionPlanner used to take a loggerFactory as a constructor argument while the other planners did not.
The goal of these changes is to make working with planners more predictable.
Description
GetPromptTemplate
delegate function to the planner base config. All planners will use this to get the prompt override.Config
private instance field to_config
Contribution Checklist