Skip to content
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 methods to import plans into kernel #1654

Merged
merged 1 commit into from
Jun 22, 2023

Conversation

lemillermicrosoft
Copy link
Member

@lemillermicrosoft lemillermicrosoft commented Jun 21, 2023

This commit adds two extension methods to the KernelPlanExtensions class that allow importing a plan into the kernel from either a Plan object or a JSON string. These methods simplify the process of registering custom functions based on plans and make it easier to integrate with external sources of plans. The methods use the kernel.RegisterCustomFunction method internally and return the corresponding function definition.

Resolves #1653

Contribution Checklist

This commit adds two extension methods to the KernelPlanExtensions
class that allow importing a plan into the kernel from either a Plan
object or a JSON string. These methods simplify the process of
registering custom functions based on plans and make it easier to
integrate with external sources of plans. The methods use the
kernel.RegisterCustomFunction method internally and return the
corresponding function definition.
@lemillermicrosoft lemillermicrosoft requested a review from a team as a code owner June 21, 2023 20:38
@lemillermicrosoft lemillermicrosoft added the PR: in progress Under development and/or addressing feedback label Jun 21, 2023
@github-actions github-actions bot added .NET Issue or Pull requests regarding .NET code kernel.core labels Jun 21, 2023
@shawncal shawncal added this pull request to the merge queue Jun 22, 2023
Merged via the queue into microsoft:main with commit 0849660 Jun 22, 2023
10 checks passed
@lemillermicrosoft lemillermicrosoft added this to the Sprint 33 milestone Jun 27, 2023
@evchaki evchaki modified the milestones: Sprint 33, Sprint 34 Jun 30, 2023
shawncal pushed a commit to shawncal/semantic-kernel that referenced this pull request Jul 6, 2023
This commit adds two extension methods to the KernelPlanExtensions class
that allow importing a plan into the kernel from either a Plan object or
a JSON string. These methods simplify the process of registering custom
functions based on plans and make it easier to integrate with external
sources of plans. The methods use the kernel.RegisterCustomFunction
method internally and return the corresponding function definition.

Resolves microsoft#1653 

### Contribution Checklist
<!-- Before submitting this PR, please make sure: -->
- [x] The code builds clean without any errors or warnings
- [ ] 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`
- [ ] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 馃槃
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
.NET Issue or Pull requests regarding .NET code PR: in progress Under development and/or addressing feedback
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Persisting plan as new Function for AI (Importing a plan object as a registered function)
3 participants