semantic-kernel
semantic-kernel copied to clipboard
Remove PlannerSkill and add SequentialPlanner
Motivation and Context
This pull request contains a series of changes that refactor and improve the planning module and tests in the SemanticKernel project. The planning module is responsible for creating and executing plans based on natural language prompts and available skills. The changes aim to simplify the code, enhance the functionality, and increase the test coverage and quality of the planning module.
Description
- Add a new SequentialPlanner class that uses semantic function to generate plans from natural language prompts
- Add a new SequentialPlanParser class that parses the XML output of the semantic function and converts it into a Plan object
- Remove PlannerSkill
- Rename PlannerConfig class that contains common configuration options for planner instances, such as the maximum number of tokens, the relevancy threshold, and the excluded or included functions
- Refactor the Plan class to make it more consistent and robust, and add support for serialization, named outputs, and nested plans
- Add unit tests for the SequentialPlanner, SequentialPlanParser, and Plan classes and refactor the existing planning tests to use mock functions and skills.
- Fix a failing web skill test by skipping it due to inconsistent Bing search results
Contribution Checklist
- [X] The code builds clean without any errors or warnings
- [X] The PR follows SK Contribution Guidelines (https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
- [X] The code follows the .NET coding conventions (https://learn.microsoft.com/dotnet/csharp/fundamentals/coding-style/coding-conventions) verified with
dotnet format - [X] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone :smile:
As this changes removes Conditional work all together, I suggest removing the ConditionalFlowHelper, ConditionalFlowConstants and the UnitTests related to it.
LGTM
❗Removing the existing planner is a breaking change that requires a new minor version.
🎉
From: Lee Miller @.> Sent: Friday, April 21, 2023 9:02 AM To: microsoft/semantic-kernel @.> Cc: Adrian Bonar (HE/HIM) @.>; Review requested @.> Subject: Re: [microsoft/semantic-kernel] Remove PlannerSkill and add SequentialPlanner (PR #523)
Merged #523https://github.com/microsoft/semantic-kernel/pull/523 into main.
— Reply to this email directly, view it on GitHubhttps://github.com/microsoft/semantic-kernel/pull/523#event-9069092523, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ANONW5DFV4F2JUGW27RQS6LXCKVOZANCNFSM6AAAAAAXDXA4PI. You are receiving this because your review was requested.Message ID: @.@.>>
Is Conditional Plan no longer supported?