### 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
Simple Chat Summary Sample Learning App
Watch the Chat Summary Quick Start Video.
!IMPORTANT This learning sample is for educational purposes only and should not be used in any production use case. It is intended to highlight concepts of Semantic Kernel and not any architectural / security design practices to be used.
Running the sample
- You will need an Open AI Key or Azure Open AI Service key for this sample.
- Ensure the KernelHttpServer sample is already running at
http://localhost:7071. If not, follow the steps to start it here. - Copy .env.example into a new file with name ".env".
- You will also need to Run the following command
yarn install(if you have never run the sample before) and/oryarn startfrom the command line. - A browser will automatically open, otherwise you can navigate to
http://localhost:3000to use the sample.
Working with Secrets: KernelHttpServer's Readme has a note on safely working with keys and other secrets.
About the Simple Chat Summary Sample
The Simple Chat Summary sample allows you to see the power of semantic functions used in a chat.
The sample highlights the SummarizeConversation, GetConversationActionItems, and GetConversationTopics native functions in the Conversation Summary Skill. Each function calls Open AI to review the information in the chat window and produces insights.
The chat data can be loaded from this data file – which you can edit or just add more to the chat while you are on the page.
Caution
Each function will call Open AI which will use tokens that you will be billed for.
Next Steps: Try a more advanced sample app
Book creator – learn how Planner and chaining of semantic functions can be used in your app.
Deeper Learning Tips
- Try modifying the array exported as ChatThread in ChatThread.ts to alter the conversation that is supplied by default.
- View
loadSummarySkill,loadActionItemsSkillandloadTopicsSkillin ChatInteraction.tsx to seefetchrequests that POST skills to the Semantic Kernel hosted by the Azure Function - Notice how AISummary.tsx makes POST requests to the Azure Function to invoke skills that were previously added. Also take note of the Skill definition and configuration in Skills.ts - these skills were copied from the skills folder and added into the project to create a simple first run experience.
