FunctionFlow behavior in plan object.#6
Closed
lemillermicrosoft wants to merge 4 commits intopom_plannerfrom
Closed
FunctionFlow behavior in plan object.#6lemillermicrosoft wants to merge 4 commits intopom_plannerfrom
lemillermicrosoft wants to merge 4 commits intopom_plannerfrom
Conversation
| /// </summary> | ||
| internal const string AppendToResultTag = "appendToResult"; | ||
|
|
||
| internal static SequentialPlan ToPlanFromXml(this string xmlString, SKContext context) |
Owner
Author
There was a problem hiding this comment.
TODO - more testing and integration of Roger's Conditional work -- might need some help here.
Owner
Author
There was a problem hiding this comment.
Maybe we can just have Conditional stuff be their own Plan implementation that can be added to a SequentialPlan or other.
8ded2b0 to
6b257aa
Compare
cc7bf05 to
93f80cf
Compare
6b257aa to
20ed80a
Compare
f93c2d7 to
349dd16
Compare
20ed80a to
4edc808
Compare
f03c858 to
33454c5
Compare
4edc808 to
c6f5d8e
Compare
33454c5 to
52daf36
Compare
c6f5d8e to
9cdbf68
Compare
52daf36 to
1721f17
Compare
9cdbf68 to
ee49f71
Compare
1721f17 to
3eba236
Compare
ee49f71 to
2dfd9d1
Compare
3eba236 to
42799fb
Compare
2dfd9d1 to
932bec6
Compare
Owner
Author
|
TODO:
|
42799fb to
6ab0047
Compare
dd planning functionality and tests to SemanticKernel project
Summary: This commit adds several classes and methods to support planning functionality in the SemanticKernel project. It also adds unit and integration tests for the planning module and the skills involved in creating and executing plans. The main changes are:
- Added a new class FunctionFlowParser that can parse XML plans created by the Function Flow semantic function. The parser converts the XML string into a SequentialPlan object that can be executed by the planner.
- Added a new class PlannerConfig that encapsulates the common configuration options for planner instances, such as relevancy threshold, max tokens, and excluded or included functions.
- Added a new class FunctionFlowPlanner that implements a planner that uses a semantic function to generate a step-by-step plan from a goal, using relevant functions from the kernel.
- Added a new class SequentialPlan that represents a plan composed of sequential steps. The SequentialPlan class inherits from the Plan class and overrides the InvokeNextStepAsync method to execute the next function in the plan. The SequentialPlan class also has properties for storing the output and result keys of each step.
- Added a new skill PlannerSkill that can execute a plan using the kernel's skills and context.
- Added a new email skill that can send emails using the OpenAI completion backend. The email skill demonstrates how to use the context variables and named parameters in the plan steps.
- Added two new extension methods to the SKContext class: GetFunctionsManualAsync and GetAvailableFunctionsAsync. These methods allow the user to query for functions that match a semantic query and a planner configuration, and to get a manual string for each function.
- Added several unit tests for the planning functionality of the semantic kernel, covering different scenarios of creating and executing plans using different skills and functions.
- Added several integration tests for the planning and email skills, covering different scenarios of creating and executing sequential plans that involve summarizing, translating, and sending emails.
- Updated the Example12_Planning.cs file to demonstrate how to use the planning functionality with a simple web search example and a poetry writing and translating example. The file also demonstrates two different ways of using the planner skill: directly as a skill function, or as a planner class.
- Imported some skills from the sample skills directory, such as WebSearchEngineSkill and SummarizeSkill.
- Added some TODO comments and bug reports for the planning module.
This commit makes several changes to the Plan class and its related classes and tests. It refactors the Plan class to use the new ISKFunction interface and the FunctionView class, and to improve the handling of function parameters and variables. It also adds a new method to set the function and name properties of the Plan class, and a new property to specify the output keys for each step. It removes the SequentialPlan class, which was no longer needed, and some unused or redundant code from the SequentialPlan.cs file. It updates the PlanTests class to use imported skills instead of hard-coded skill names and functions, and to use the new Plan constructor. It also fixes some minor formatting and naming issues, and adds some comments and assertions for clarity. TODO - tests about book scenario, appending results (or not).
df9dc98 to
a6e4e93
Compare
| /// <summary> | ||
| /// Common configuration for planner instances. | ||
| /// </summary> | ||
| public sealed class PlannerConfig |
Owner
Author
There was a problem hiding this comment.
I was on board for getting rid of planner skill, but now I see it more as Removing FunctionFlowRunner and replacing with FunctionFlowParser to take NL XML and convert to a Plan object and then rely on native kernel support for execution. The PlannerSkill can still expose this and use the FunctionFlowPlanner just like a developer could use directly, as well.
dehoward
pushed a commit
that referenced
this pull request
Jun 1, 2023
### Motivation and Context Currently, semantic memory can only be added to directly through the kernel. Users should be able to save information to semantic memory using TextMemorySkill. ### Description Added the semantic function `SaveAsync` to `TextMemorySkill.` Additionally updated `Example15_MemorySkill` to demonstrate how to use the new functionality. I manually verified that the example output remains unchanged.
dehoward
pushed a commit
that referenced
this pull request
Jun 1, 2023
Build and style fixes in OpenAPI skill (microsoft#297)
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.
dd planning functionality and tests to SemanticKernel project
Motivation and Context
Description
Contribution Checklist
dotnet format