-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.Net: Feature flow planner #2165
.Net: Feature flow planner #2165
Conversation
|
||
public string Goal { get; set; } | ||
|
||
public List<string> Requires |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR, will take some time to go through it. I'd like to understand these pieces better (xml docs will help) and whether it would make sense to include as part of Plan
or SKFunction
objects.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Lee. Just completed the docs for the data models.
I did explore Plan
in the beginning. however there are some gaps so I am proposing a different IPlan
implementation. // haven't really implemented the marker interface yet.
Here are the quoted comments from Flow.cs
.
/// Principles:
/// 1. The model should be decoupled from execution status
/// 2. The model is mutable to allow dynamic changes
/// 3. The model doesn't enforce any execution order as long as the dependencies are satisfied.
Besides these, there are some other differences
- for each step in the flow, there could be a set of skills to use to achieve the step goal.
- each step should support multi-in, multi-out
- execution context for each step should be highly isolated to avoid noise and waste of tokens
83bc590
to
c5882b7
Compare
59d7b57
to
8768f6d
Compare
…ntic-kernel into feature-flow-planner
Removed Example54_FlowPlanner.cs file and updated the flow name in Example55_FlowPlanner.cs to match the correct file. This removal might be due to refactoring or deprecation of the example.
This commit updates the FlowPlanner example by renaming the flow and adding an interactive mode. The interactive mode allows users to provide input and receive responses from the assistant in a more dynamic way. The example has been refactored to separate the interactive and non-interactive modes into different methods.
/// <param name="validator">The flow validator.</param> | ||
/// <param name="config">Optional configuration object</param> | ||
public FlowPlanner( | ||
KernelBuilder kernelBuilder, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think Kernel is more appropriate here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The idea of having kernel builder is that for each step, we could use an isolated kernel.
Otherwise when we present functions in ReAct steps, unwanted skills would show up there and mislead the reasoning.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay note for myself to take a second look at how the skills are managed or determined to be unwanted from the global skills collection.
public FlowPlanner( | ||
KernelBuilder kernelBuilder, | ||
IFlowStatusProvider flowStatusProvider, | ||
Dictionary<object, string?>? globalSkillCollection = null, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure about global naming -- is that appropriate?
Also, why not use the skills available in the kernel? This seems more like a custom loader that should not be planner specific logic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes this is related to the Flow load process which loads the skills into kernel.
as mentioned in above comment, for each step, we initialize a new kernel and load skills.
And there are two ways to instantiate the skills.
- via reflection
- from this global skill collection
Stopwatch sw = new(); | ||
sw.Start(); | ||
Console.WriteLine("Flow: " + s_flow.Name); | ||
var result = await planner.ExecuteFlowAsync(s_flow, sessionId, "Execute the flow"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So is the idea that while result.Result is not empty, that message is passed to the user, and user message is fed back into the flow?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. Here is a high level example to utilize the planner is having a web api which accepts user input and return response.
[Route("complete/{userInput}")]
public async Task<string[]> Complete(string userInput)
{
Flow flow = this.GetActiveFlowFromStorage(userContext);
if (flow == null)
{
flow = this.SelectNextFlow(userInput)
}
var result = await planner.ExecuteFlowAsync(flow, userInput).ConfigureAwait(false);
if (result.isComplete)
{
// mark this as complete in storage
}
return JsonSerializer.Deserialize<string[]>(result.Result);
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note for self: stepasync/invokeasync and/or enabling functions in a plan to have control over execution state.
Stopwatch sw = new(); | ||
sw.Start(); | ||
Console.WriteLine("Flow: " + s_flow.Name); | ||
var result = await planner.ExecuteFlowAsync(s_flow, sessionId, "Execute the flow"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The idea here is that the result of ExecuteFlow is a message to the user and when that is empty, the Answer is the message to the user, is that right?
Would be nice to tighten up the pattern there, to make it more clear if execution needs to continue or not. I will try and take a pass at making this follow the Plan
object model. I'm also still leaning on the idea that the get information from use is a function the kernel has a handle to.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here are the actual code we use to determine if the flow has completed and show proceed.
if (flow.Provides.All(p => result.Variables.ContainsKey(p)))
{
// flow has completed, update state in DB
}
6290506
into
microsoft:feature-feature-flow-planner
<!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> This PR is trying to help making it easier to build complex Copilot which is capable of commanding, Q&A, collaboration, suggestion, etc, in reliable ways. A new FlowPlanner is introduced, which leverages the available skills, execute the plan in multi-step, multi-pass way, including interaction with users to get clarification on the goal, input for skills/functions, and authorization for actions when needed. More details in microsoft#2164. <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> Major changes * FlowModel * ChatSkill, which is to make the implementation of multi-pass skill easier with built in chat history accessor * FlowExecutor * ReAct engine, which is similar as the StepwisePlanner implementation but more isolated and enriched with chat integration * UnitTests * IntegrationTests * Examples <!-- 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 - [x] I didn't break anyone 😄 --------- Co-authored-by: Yan Li <yanli@microsoft.com> Co-authored-by: Lee Miller <lemiller@microsoft.com>
<!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> This PR is trying to help making it easier to build complex Copilot which is capable of commanding, Q&A, collaboration, suggestion, etc, in reliable ways. A new FlowPlanner is introduced, which leverages the available skills, execute the plan in multi-step, multi-pass way, including interaction with users to get clarification on the goal, input for skills/functions, and authorization for actions when needed. More details in #2164. <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> Major changes * FlowModel * ChatSkill, which is to make the implementation of multi-pass skill easier with built in chat history accessor * FlowExecutor * ReAct engine, which is similar as the StepwisePlanner implementation but more isolated and enriched with chat integration * UnitTests * IntegrationTests * Examples <!-- 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 - [x] I didn't break anyone 😄 --------- Co-authored-by: Yan Li <yanli@microsoft.com> Co-authored-by: Lee Miller <lemiller@microsoft.com>
<!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> This PR is trying to help making it easier to build complex Copilot which is capable of commanding, Q&A, collaboration, suggestion, etc, in reliable ways. A new FlowPlanner is introduced, which leverages the available skills, execute the plan in multi-step, multi-pass way, including interaction with users to get clarification on the goal, input for skills/functions, and authorization for actions when needed. More details in #2164. <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> Major changes * FlowModel * ChatSkill, which is to make the implementation of multi-pass skill easier with built in chat history accessor * FlowExecutor * ReAct engine, which is similar as the StepwisePlanner implementation but more isolated and enriched with chat integration * UnitTests * IntegrationTests * Examples <!-- 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 - [x] I didn't break anyone 😄 --------- Co-authored-by: Yan Li <yanli@microsoft.com> Co-authored-by: Lee Miller <lemiller@microsoft.com>
<!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> This PR is trying to help making it easier to build complex Copilot which is capable of commanding, Q&A, collaboration, suggestion, etc, in reliable ways. A new FlowPlanner is introduced, which leverages the available skills, execute the plan in multi-step, multi-pass way, including interaction with users to get clarification on the goal, input for skills/functions, and authorization for actions when needed. More details in #2164. <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> Major changes * FlowModel * ChatSkill, which is to make the implementation of multi-pass skill easier with built in chat history accessor * FlowExecutor * ReAct engine, which is similar as the StepwisePlanner implementation but more isolated and enriched with chat integration * UnitTests * IntegrationTests * Examples <!-- 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 - [x] I didn't break anyone 😄 --------- Co-authored-by: Yan Li <yanli@microsoft.com> Co-authored-by: Lee Miller <lemiller@microsoft.com>
<!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> This PR is trying to help making it easier to build complex Copilot which is capable of commanding, Q&A, collaboration, suggestion, etc, in reliable ways. A new FlowPlanner is introduced, which leverages the available skills, execute the plan in multi-step, multi-pass way, including interaction with users to get clarification on the goal, input for skills/functions, and authorization for actions when needed. More details in #2164. <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> Major changes * FlowModel * ChatSkill, which is to make the implementation of multi-pass skill easier with built in chat history accessor * FlowExecutor * ReAct engine, which is similar as the StepwisePlanner implementation but more isolated and enriched with chat integration * UnitTests * IntegrationTests * Examples <!-- 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 - [x] I didn't break anyone 😄 --------- Co-authored-by: Yan Li <yanli@microsoft.com> Co-authored-by: Lee Miller <lemiller@microsoft.com>
<!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> This PR is trying to help making it easier to build complex Copilot which is capable of commanding, Q&A, collaboration, suggestion, etc, in reliable ways. A new FlowPlanner is introduced, which leverages the available skills, execute the plan in multi-step, multi-pass way, including interaction with users to get clarification on the goal, input for skills/functions, and authorization for actions when needed. More details in #2164. <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> Major changes * FlowModel * ChatSkill, which is to make the implementation of multi-pass skill easier with built in chat history accessor * FlowExecutor * ReAct engine, which is similar as the StepwisePlanner implementation but more isolated and enriched with chat integration * UnitTests * IntegrationTests * Examples <!-- 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 - [x] I didn't break anyone 😄 --------- Co-authored-by: Yan Li <yanli@microsoft.com> Co-authored-by: Lee Miller <lemiller@microsoft.com>
<!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> This PR is trying to help making it easier to build complex Copilot which is capable of commanding, Q&A, collaboration, suggestion, etc, in reliable ways. A new FlowPlanner is introduced, which leverages the available skills, execute the plan in multi-step, multi-pass way, including interaction with users to get clarification on the goal, input for skills/functions, and authorization for actions when needed. More details in microsoft#2164. <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> Major changes * FlowModel * ChatSkill, which is to make the implementation of multi-pass skill easier with built in chat history accessor * FlowExecutor * ReAct engine, which is similar as the StepwisePlanner implementation but more isolated and enriched with chat integration * UnitTests * IntegrationTests * Examples <!-- 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 - [x] I didn't break anyone 😄 --------- Co-authored-by: Yan Li <yanli@microsoft.com> Co-authored-by: Lee Miller <lemiller@microsoft.com>
Update AIRequestSettings in CollectEmailSkill and refactor code to improve readability and maintainability. Adjust project references and remove unused imports. This commit also updates ReActEngine to use PluginName instead of SkillName, simplifies CreateActionContext, and adjusts function filtering in GetAvailableFunctions. It updates FlowPlanner references as well. Squashed commit of the following: commit 1a350dc2f854606975f0d6140ef9f8e15853f307 Author: Lee Miller <lemiller@microsoft.com> Date: Wed Sep 27 18:51:09 2023 -0700 🔄 Update AIRequestSettings and refactor context creation This commit updates the AIRequestSettings class usage in CollectEmailSkill and refactors the context creation in FlowExecutor and ReActEngine. It also replaces the usage of RestrictedSkillName with RestrictedPluginName and adjusts the handling of MaxTokens in the ReActEngine configuration. Update ReActEngine to use PluginName instead of SkillName and adjust FlowPlanner references accordingly. Remove unnecessary imports and adjust project file dependencies. commit 04d2ff9ee30a55eb9329f78f8d5044240e8ad386 Author: Yan Li <dannis_28@hotmail.com> Date: Thu Sep 28 00:06:28 2023 +0800 .Net: [FeatureBranch][FlowPlanner] Support referenced flow step (#2920) Note that this PR is for feature branch only. Changes 1. Support optional completion type 2. Support reference flow as a FlowStep 3. Accommodate latest kernel changes 4. Add more unit tests for the Planner as above <!-- 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 - [X] I didn't break anyone :smile: commit b680065a56b6f9d93f3ebd465946b0ca0e2aacf0 Author: Yan Li <dannis_28@hotmail.com> Date: Fri Sep 15 01:21:45 2023 +0800 [Feature branch only] Merge from main and support more completion types (#2778) Follow up PR into feature branch for https://github.com/microsoft/semantic-kernel/issues/2164. 1. Merge from main 2. Address code style issues per latest rules 3. Support more step completion types <!-- 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 - [x] I didn't break anyone :smile: commit fc50c325c1907b8030f6e21cb9880d3b601538ff Author: Lee Miller <lemiller@microsoft.com> Date: Wed Sep 6 08:26:45 2023 -0700 🔄 Simplify GetKernelBuilder and update retry configuration This commit simplifies the GetKernelBuilder method by directly returning the builder with the AzureChatCompletionService configured. It also updates the retry configuration to use the new WithRetryBasic method, removing the need for the HttpRetryConfig object. commit 5d9a82e5cfb6538410cc23708aee52d7880990f1 Author: Yan Li <dannis_28@hotmail.com> Date: Wed Aug 23 08:56:02 2023 +0800 .Net: Feature flow planner (#2165) <!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> This PR is trying to help making it easier to build complex Copilot which is capable of commanding, Q&A, collaboration, suggestion, etc, in reliable ways. A new FlowPlanner is introduced, which leverages the available skills, execute the plan in multi-step, multi-pass way, including interaction with users to get clarification on the goal, input for skills/functions, and authorization for actions when needed. More details in https://github.com/microsoft/semantic-kernel/issues/2164. <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> Major changes * FlowModel * ChatSkill, which is to make the implementation of multi-pass skill easier with built in chat history accessor * FlowExecutor * ReAct engine, which is similar as the StepwisePlanner implementation but more isolated and enriched with chat integration * UnitTests * IntegrationTests * Examples <!-- 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 - [x] I didn't break anyone :smile: --------- Co-authored-by: Yan Li <yanli@microsoft.com> Co-authored-by: Lee Miller <lemiller@microsoft.com> commit 56bcccfab643aa0768c8f510e9a0a7db3aaa191a Author: Jib <Jibzade@gmail.com> Date: Wed Sep 27 15:30:22 2023 -0400 Python: Make `semantic_kernel.NullLogger` match `logging.Logger` function signatures (#2892) <!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> 1. #2889 2. Allows Contributors and Devs to seamlessly use `NullLogger` or generalized `Logger` class without having to do attribute checks 3. See details in #2889 4. #2889 <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> * I added in a `_NullerMeta` metaclass to the `NullLogger` to iterate over all the function signatures in the `Logger` class and have them issue no returns. * This is backward compatible and breaks no existing implementations. <!-- 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 - [x] I didn't break anyone :smile: --------- Co-authored-by: Abby Harrison <54643756+awharrison-28@users.noreply.github.com> commit 8217c21e43505b4be61f626ef66695decf9bc874 Author: Lee Miller <lemiller@microsoft.com> Date: Wed Sep 27 09:54:07 2023 -0700 Update Plan and StepwisePlanner classes for FunctionResult support (#2976) This pull request includes several updates to the Plan and StepwisePlanner classes. The changes include: adding step count and iteration metadata to the StepwisePlanner, updating Plan to prevent functions from having access to variables they shouldn't, adding the ability to add metadata to the result of a Plan execution, and adding a new unit test to verify the functionality of the new metadata feature. - Added 'stepsTaken' and 'iterations' fields to ExecutionResult struct in Example51_StepwisePlanner.cs - Added 'stepCount', 'functionCount', 'stepsTaken', and 'iterations' outputs to Plan in StepwisePlanner.cs - Added TryGetMetadataValue method to FunctionResult.cs - Added assertions for step count and iteration metadata in StepwisePlannerTests.cs - Added code to merge state with current context variables and filter variables to only those needed for the next step in Plan.cs - Added code to update the function result with outputs from the current state in Plan.cs - Added new methods to the FunctionResult class to allow for adding metadata to individual chapters of a book - Updated the Plan class to use the new metadata methods - Added a new unit test to verify the functionality of the new metadata feature --- *Powered by [Microsoft Semantic Kernel](https://github.com/microsoft/semantic-kernel)* <!-- 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 - [x] I didn't break anyone :smile: --------- Co-authored-by: Dmytro Struk <13853051+dmytrostruk@users.noreply.github.com> commit 1efa7fb2d1053b1252bdf6eade18ccd37f4c5e71 Author: Lee Miller <lemiller@microsoft.com> Date: Wed Sep 27 09:01:58 2023 -0700 .Net: Add xRetry package and apply to tests Add xRetry package to IntegrationTests project (#2996) Add xRetry package to Directory.Packages.props and IntegrationTests.csproj. Update StepwisePlannerTests to use RetryTheory attribute for improved test reliability. Package details: https://github.com/JoshKeegan/xRetry <!-- 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 - [x] I didn't break anyone :smile: This pull request adds the xRetry package to the IntegrationTests project in the dotnet directory. It also updates the IntegrationTests.csproj file to include the xRetry package reference. Additionally, the StepwisePlannerTests.cs file has been updated to use the [RetryTheory] attribute instead of [Theory] for one of its test cases. - Added xRetry package reference to IntegrationTests.csproj - Updated StepwisePlannerTests.cs to use [RetryTheory] attribute for one test case --- *Powered by [Microsoft Semantic Kernel](https://github.com/microsoft/semantic-kernel)* commit af8a5c037f989404102c0d9cdd845dce878a1508 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed Sep 27 13:47:47 2023 +0100 .Net: Bump NRedisStack from 0.8.1 to 0.9.0 in /dotnet (#2978) Bumps NRedisStack from 0.8.1 to 0.9.0. [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=NRedisStack&package-manager=nuget&previous-version=0.8.1&new-version=0.9.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Dmytro Struk <13853051+dmytrostruk@users.noreply.github.com> commit 2bf7902ef02b81848031f8877b8c6e839c7cd9c2 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed Sep 27 12:48:20 2023 +0100 .Net: Bump Azure.AI.OpenAI from 1.0.0-beta.7 to 1.0.0-beta.8 in /dotnet (#2979) Bumps [Azure.AI.OpenAI](https://github.com/Azure/azure-sdk-for-net) from 1.0.0-beta.7 to 1.0.0-beta.8. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/Azure/azure-sdk-for-net/releases">Azure.AI.OpenAI's releases</a>.</em></p> <blockquote> <h2>Azure.AI.OpenAI_1.0.0-beta.8</h2> <h2>1.0.0-beta.8 (2023-09-21)</h2> <h3>Features Added</h3> <ul> <li>Audio Transcription and Audio Translation using OpenAI Whisper models is now supported. See <a href="https://platform.openai.com/docs/api-reference/audio">OpenAI's API reference</a> or the <a href="https://learn.microsoft.com/azure/ai-services/openai/whisper-quickstart">Azure OpenAI quickstart</a> for detailed overview and background information. <ul> <li>The new methods <code>GetAudioTranscription</code> and <code>GetAudioTranscription</code> expose these capabilities on <code>OpenAIClient</code></li> <li>Transcription produces text in the primary, supported, spoken input language of the audio data provided, together with any optional associated metadata</li> <li>Translation produces text, translated to English and reflective of the audio data provided, together with any optional associated metadata</li> <li>These methods work for both Azure OpenAI and non-Azure <code>api.openai.com</code> client configurations</li> </ul> </li> </ul> <h3>Breaking Changes</h3> <ul> <li>The underlying representation of <code>PromptFilterResults</code> (for <code>Completions</code> and <code>ChatCompletions</code>) has had its response body key changed from <code>prompt_annotations</code> to <code>prompt_filter_results</code></li> <li><strong>Prior versions of the <code>Azure.AI.OpenAI</code> library may no longer populate <code>PromptFilterResults</code> as expected</strong> and it's highly recommended to upgrade to this version if the use of Azure OpenAI content moderation annotations for input data is desired</li> <li>If a library version upgrade is not immediately possible, it's advised to use <code>Response<T>.GetRawResponse()</code> and manually extract the <code>prompt_filter_results</code> object from the top level of the <code>Completions</code> or <code>ChatCompletions</code> response <code>Content</code> payload</li> </ul> <h3>Bugs Fixed</h3> <ul> <li>Support for the described breaking change for <code>PromptFilterResults</code> was added and this library version will now again deserialize <code>PromptFilterResults</code> appropriately</li> <li><code>PromptFilterResults</code> and <code>ContentFilterResults</code> are now exposed on the result classes for streaming Completions and Chat Completions. <code>Streaming(Chat)Completions.PromptFilterResults</code> will report an index-sorted list of all prompt annotations received so far while <code>Streaming(Chat)Choice.ContentFilterResults</code> will reflect the latest-received content annotations that were populated and received while streaming</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/Azure/azure-sdk-for-net/commit/e902ef5a2ed5db3d6104ccb2db29b97a02258634"><code>e902ef5</code></a> CHANGELOG snap for beta.8 release (<a href="https://redirect.github.com/Azure/azure-sdk-for-net/issues/38897">#38897</a>)</li> <li><a href="https://github.com/Azure/azure-sdk-for-net/commit/494a50b6843eeeabe8107c285562cd4c939401d9"><code>494a50b</code></a> Azure OpenAI: audio transcription and translation (<a href="https://redirect.github.com/Azure/azure-sdk-for-net/issues/38460">#38460</a>)</li> <li><a href="https://github.com/Azure/azure-sdk-for-net/commit/bc5e855008db838982fc6f9dbd6cacb011bea3f1"><code>bc5e855</code></a> Update MSAL dependencies to latest (<a href="https://redirect.github.com/Azure/azure-sdk-for-net/issues/38866">#38866</a>)</li> <li><a href="https://github.com/Azure/azure-sdk-for-net/commit/87cd28b1e117cb35625f82e292bf7f76562490b8"><code>87cd28b</code></a> .NET SDK release changes for dataprotection (<a href="https://redirect.github.com/Azure/azure-sdk-for-net/issues/38408">#38408</a>)</li> <li><a href="https://github.com/Azure/azure-sdk-for-net/commit/240a4fcab49587107c01bf60168357ba8be84b1e"><code>240a4fc</code></a> Increment package version after release of Azure.Identity (<a href="https://redirect.github.com/Azure/azure-sdk-for-net/issues/38667">#38667</a>)</li> <li><a href="https://github.com/Azure/azure-sdk-for-net/commit/187a4f0e31f1c74c363ec3288e270f9cde1cc367"><code>187a4f0</code></a> Increment version for monitor releases (<a href="https://redirect.github.com/Azure/azure-sdk-for-net/issues/38864">#38864</a>)</li> <li><a href="https://github.com/Azure/azure-sdk-for-net/commit/d5ee8a0ff55293afa6252ece2395fb08b75815ba"><code>d5ee8a0</code></a> [Storage][DataMovement] Add resource specific checkpoint data classes (<a href="https://redirect.github.com/Azure/azure-sdk-for-net/issues/38842">#38842</a>)</li> <li><a href="https://github.com/Azure/azure-sdk-for-net/commit/b03a0db9be3b9c015d50bd22412d001dc0d797fe"><code>b03a0db</code></a> [AzureMonitorExporter] prepare new release. Exporter 1.0.0. Distro beta7 (<a href="https://redirect.github.com/Azure/azure-sdk-for-net/issues/38">#38</a>...</li> <li><a href="https://github.com/Azure/azure-sdk-for-net/commit/0d1e7bedba3787edc87e2166dfb0ee930b9bc0f6"><code>0d1e7be</code></a> [AzureMonitorDistro] update OTel ResourceDetectors (<a href="https://redirect.github.com/Azure/azure-sdk-for-net/issues/38833">#38833</a>)</li> <li><a href="https://github.com/Azure/azure-sdk-for-net/commit/02c132f60287e114f2de35f422a93ec423acdcaa"><code>02c132f</code></a> [AzureMonitorDistro] disable test (<a href="https://redirect.github.com/Azure/azure-sdk-for-net/issues/38840">#38840</a>)</li> <li>Additional commits viewable in <a href="https://github.com/Azure/azure-sdk-for-net/compare/Azure.AI.OpenAI_1.0.0-beta.7...Azure.AI.OpenAI_1.0.0-beta.8">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=Azure.AI.OpenAI&package-manager=nuget&previous-version=1.0.0-beta.7&new-version=1.0.0-beta.8)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Dmytro Struk <13853051+dmytrostruk@users.noreply.github.com> commit caa7efde794f86434f6147f60b3f7cd494fe874f Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed Sep 27 12:39:28 2023 +0100 .Net: Bump Pgvector from 0.1.3 to 0.1.4 in /dotnet (#2977) Bumps [Pgvector](https://github.com/pgvector/pgvector-dotnet) from 0.1.3 to 0.1.4. <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/pgvector/pgvector-dotnet/commit/2902ea9e8f8cde77c3b08793335060c81996fc9d"><code>2902ea9</code></a> Pgvector: Version bump to 0.1.4 [skip ci]</li> <li><a href="https://github.com/pgvector/pgvector-dotnet/commit/c59efdec5b317c192d3eb47c985953472b34849f"><code>c59efde</code></a> Improved Npgsql example [skip ci]</li> <li><a href="https://github.com/pgvector/pgvector-dotnet/commit/626d8694cd0dd7df0049051c70d35cc7303ce9e1"><code>626d869</code></a> Improved Dapper example [skip ci]</li> <li><a href="https://github.com/pgvector/pgvector-dotnet/commit/dd1ac68796dcf3d3be5ff423b7d3ad9b7d738bb7"><code>dd1ac68</code></a> Fixed format [skip ci]</li> <li><a href="https://github.com/pgvector/pgvector-dotnet/commit/ff4ea8b5329bf226be7b2f28f5de803f833cedfa"><code>ff4ea8b</code></a> Improved tests</li> <li><a href="https://github.com/pgvector/pgvector-dotnet/commit/61e594aa5ef3d3db76f51db0db5774a07efb710c"><code>61e594a</code></a> Added distance functions for Entity Framework Core - closes <a href="https://redirect.github.com/pgvector/pgvector-dotnet/issues/18">#18</a></li> <li><a href="https://github.com/pgvector/pgvector-dotnet/commit/1027cd4cffe6e8d79ee638c0945ede6cecf0f9b1"><code>1027cd4</code></a> Added docs for enabling extension [skip ci]</li> <li><a href="https://github.com/pgvector/pgvector-dotnet/commit/8fb0f7882f693513c16afb64b52bbc942e05824f"><code>8fb0f78</code></a> Updated test</li> <li><a href="https://github.com/pgvector/pgvector-dotnet/commit/66b95b901ad87ca24ed682b40615a98c4caaa844"><code>66b95b9</code></a> Added HasPostgresExtension to readme - <a href="https://redirect.github.com/pgvector/pgvector-dotnet/issues/17">#17</a> [skip ci]</li> <li><a href="https://github.com/pgvector/pgvector-dotnet/commit/b6daa3c690be22f9a8499f4750f684d43520d5bd"><code>b6daa3c</code></a> Added HNSW to docs [skip ci]</li> <li>Additional commits viewable in <a href="https://github.com/pgvector/pgvector-dotnet/compare/v0.1.3...v0.1.4">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=Pgvector&package-manager=nuget&previous-version=0.1.3&new-version=0.1.4)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Dmytro Struk <13853051+dmytrostruk@users.noreply.github.com> commit 1fad7a12d97e2e3151859a8e6c312cc0de52baa4 Author: Mark Wallace <127216156+markwallace-microsoft@users.noreply.github.com> Date: Wed Sep 27 11:49:00 2023 +0100 .Net: Extract semantic functions from Kernel.Core (#2961) 1. Why is this change required? This is part of the work to extract functionality from Semantic Kernel core prior to 1.0 release. 2. What problem does it solve? Isolates the semantic function implementation from the Semantic Kernel core. 3. What scenario does it contribute to? Contributes to the goal of reducing the Semantic Kernel core to focus on AI orchestration. 4. If it fixes an open issue, please link to the issue here. https://github.com/microsoft/semantic-kernel/issues/2563 Fixes #2563 - Move classes from abstractions SemanticFunctions folder to new functions.semantic project - Move classes from core SemanticFunctions and SkillDefinition folders to new functions.semantic project - Fix up all unit tests - [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 - [x] I didn't break anyone :smile: commit db25811c5986e9febaaa31fd2d667479e5f0d706 Author: Gina Triolo <51341242+gitri-ms@users.noreply.github.com> Date: Wed Sep 27 02:54:32 2023 -0700 .Net: Fix broken path in GitHub plugin example (#2995) <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> Update path to GitHub plugin JSON in example. Fixes #2823 <!-- Before submitting this PR, please make sure: --> - [ ] The code builds clean without any errors or warnings - [ ] 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 - [ ] All unit tests pass, and I have added new tests where possible - [ ] I didn't break anyone :smile: Co-authored-by: Dmytro Struk <13853051+dmytrostruk@users.noreply.github.com> commit 5fd59476d7a5d8931c061ce95fe1c352a02dd044 Author: Weihan Li <weihanli@outlook.com> Date: Wed Sep 27 17:29:02 2023 +0800 .Net: Some code enhancements (#2988) To keep the code clean and follow the best practice - add `readonly` for field if applicable - sealed internal types if applicable - prefer static method other than instance method if applicable - remove unnecessary init - prefer smaller access scope - fix two typo <!-- 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 - [x] I didn't break anyone :smile: --------- Co-authored-by: Weihan Li <weihan.li@iherb.com> Co-authored-by: Dmytro Struk <13853051+dmytrostruk@users.noreply.github.com> commit eb9ecba63fe7a26252507e18619e07659726a379 Author: Eduard van Valkenburg <eavanvalkenburg@users.noreply.github.com> Date: Wed Sep 27 04:59:32 2023 +0200 Python: simple implementation of token usage (#2844) <!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> Added token usage tracking to the OpenAI classes, similar to how that is done in dotnet. Similar approach as #2526 but for Python TODO: add a similar construct to python for the SKContext.LastResult. <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> Added three fields to the OpenAI Chat and Text completion classes. After doing a call, check if 'usage" is in the response and then update the fields, can be read through properties. <!-- 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 - [x] I didn't break anyone :smile: --------- Co-authored-by: Abby Harrison <54643756+awharrison-28@users.noreply.github.com> commit 45f492aa89c112bc17fff40fff11dafc00cfa224 Author: Mark Karle <mkarle@users.noreply.github.com> Date: Tue Sep 26 18:24:42 2023 -0700 Python: Enforcing return typehints on native functions (#2948) <!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> This solves [this issue](https://github.com/microsoft/semantic-kernel/issues/1069) where native functions are not returning the expected result. In python, return typehints are optional. However, the semantic kernel requires a return typehint to determine how to handle the function. For that reason, we're now enforcing return typehints and raising an exception when one is not provided. This may break existing void functions but none in our repo are affected. Fixes #1069 <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> <!-- 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 :smile: This pull request includes two sets of changes. First, it fixes the return type annotations in three core skills: file_io_skill, text_memory_skill, and wait_skill. Specifically, the write_async method in file_io_skill and the save_async method in text_memory_skill now have a return type of None, and the wait method in wait_skill now has a return type of None. Additionally, the import_native_skill_from_directory method in kernel.py has been refactored to simplify the code. Second, this pull request adds error handling for functions with no return type in the delegate inference module. Previously, if a function did not specify a return type, the DelegateType could not be inferred, leading to errors. This pull request adds a check for functions with no return type and raises a KernelException with an appropriate error message. Additionally, this pull request includes some minor changes to unit tests for native functions. - Fixed return type annotation for write_async method in file_io_skill - Fixed return type annotation for save_async method in text_memory_skill - Fixed return type annotation for wait method in wait_skill - Refactored import_native_skill_from_directory method in kernel.py - Added error handling for functions with no return type in the delegate inference module - Added a check for functions with no return type and raised a KernelException with an appropriate error message - Made minor changes to unit tests for native functions --- *Powered by [Microsoft Semantic Kernel](https://github.com/microsoft/semantic-kernel)* commit b65fb53a40c9cceed9950848e05de927e1a66137 Author: Lee Miller <lemiller@microsoft.com> Date: Tue Sep 26 14:57:05 2023 -0700 .Net: Remove SKParameterAttribute and related code (#2991) This commit removes the `SKParameterAttribute` class and its usage in `NativeFunction.cs`. The attribute was used to describe additional parameters for native functions that weren't part of the method signature. The removal simplifies the codebase and reduces complexity. <!-- Before submitting this PR, please make sure: --> - [ ] The code builds clean without any errors or warnings - [ ] 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 - [ ] All unit tests pass, and I have added new tests where possible - [ ] I didn't break anyone :smile: commit 8e2337e0d6c639331544541c5f0062e6193ca6a2 Author: Lee Miller <lemiller@microsoft.com> Date: Tue Sep 26 10:14:51 2023 -0700 .Net: Refactor planners, memory config, and function extensions (#2949) Followup to #2912 and #2931. Resolves #2848 Resolves https://github.com/microsoft/semantic-kernel/issues/2074 This commit includes several updates and refactors to planners, SemanticMemoryConfig, and function extension classes. Changes include updating SequentialPlannerConfig to use SemanticMemory, refactoring tests to use async methods, renaming and updating test cases, and improving planner configurations. Additionally, FunctionViewExtensions has been added and refactored, along with updates to method signatures and code organization. The StepwisePlanner has also been refactored, and PlannerConfigBase has been updated to improve memory usage and function filtering. commit 43dcbe5aeab8b3baa6f2e6ecff84e3b190761926 Author: Lisa Harrylock <lisaharrylock@gmail.com> Date: Tue Sep 26 10:00:48 2023 -0700 .Net: move maxtokens property to base config Update max tokens configuration in planners (#2974) This change is part of the effort to make the core planners more consistent with each other. This makes working with the planners more predictable. Fixes #2973 <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> <!-- 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 - [x] I didn't break anyone :smile: This pull request updates the max tokens configuration in the planners to use the value from the configuration object instead of a hard-coded value. Specifically, the ActionPlanner, SequentialPlanner, and StepwisePlanner classes have been updated to use the MaxTokens property from their respective configuration objects. Additionally, default values for MaxTokens have been added to the ActionPlannerConfig, SequentialPlannerConfig, and StepwisePlannerConfig classes. - ActionPlanner.cs: Updated ExtensionData dictionary to use MaxTokens value from configuration object - ActionPlannerConfig.cs: Added default value for MaxTokens property - SequentialPlanner.cs: Updated ExtensionData dictionary to use MaxTokens value from configuration object - SequentialPlannerConfig.cs: Added default value for MaxTokens property - StepwisePlanner.cs: Updated ExtensionData dictionary to use MaxTokens value from configuration object - StepwisePlannerConfig.cs: Added default value for MaxTokens property - PlannerConfigBase.cs: Added MaxTokens property to base configuration class --- *Powered by [Microsoft Semantic Kernel](https://github.com/microsoft/semantic-kernel)* commit 02c0261eff85ccd3cfe063e8ad5b63bb7539f0de Author: Lisa Harrylock <lisaharrylock@gmail.com> Date: Tue Sep 26 10:00:30 2023 -0700 .Net: Fix Solution File (#2984) Fixes #2975 The Planners.Core.UnitTests project was missing a EndProject tag (Thanks @lemillermicrosoft for catching this!). Additionally, the mapping for the publish profile was incorrect for the Planners.Core project. <!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> <!-- 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 - [x] I didn't break anyone :smile: commit 9cd68cea2e522f8dcf613795eba98a265855540d Author: Matthew Bolaños <matthewbolanos@gmail.com> Date: Tue Sep 26 16:12:03 2023 +0100 Add deprecation warnings to samples (#2967) Per https://github.com/microsoft/semantic-kernel/issues/2810, we will be deprecating the current web-based samples in favor of console apps in the dotnet and python samples folders. Added a deprecation warning to the samples - [ ] The code builds clean without any errors or warnings - [ ] 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 - [ ] All unit tests pass, and I have added new tests where possible - [ ] I didn't break anyone :smile: commit 76db027273371ea81e6db66afcb1d888cc53b459 Author: Mark Wallace <127216156+markwallace-microsoft@users.noreply.github.com> Date: Tue Sep 26 13:44:33 2023 +0100 .Net: Rename ImportAIPluginAsync Update plugin import method and planner, and rename AIPlugin to Plugin in KernelAIPluginExtensions.cs (#2968) - [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 - [x] I didn't break anyone :smile: This pull request includes three changes. First, the plugin import method in the PluginTests.cs file of the IntegrationTests project has been updated to use the ImportPluginFunctionsAsync method instead of the deprecated ImportAIPluginAsync method. Second, the StepwisePlannerTests.cs file in the same project has been updated to use the Planning.StepwisePlanner method instead of the deprecated Planning.StepwisePlannerAsync method. Finally, the KernelAIPluginExtensions.cs file has been updated to rename all instances of AIPlugin to Plugin, including renaming the ImportAIPluginAsync method to ImportPluginFunctionsAsync. The changes also include an obsolete attribute for the old method name, which will be removed in a future release, and a new EditorBrowsable attribute to hide the obsolete method from IntelliSense. - Replace ImportAIPluginAsync with ImportPluginFunctionsAsync in PluginTests.cs - Update StepwisePlannerTests.cs to use Planning.StepwisePlanner instead of Planning.StepwisePlannerAsync - Rename all instances of AIPlugin to Plugin in KernelAIPluginExtensions.cs - Rename ImportAIPluginAsync method to ImportPluginFunctionsAsync - Add obsolete attribute to ImportAIPluginAsync method - Add EditorBrowsable attribute to obsolete method --- *Powered by [Microsoft Semantic Kernel](https://github.com/microsoft/semantic-kernel)* commit 13227dccf4becf445a679ae447228fd7f775d6b1 Author: Mark Wallace <127216156+markwallace-microsoft@users.noreply.github.com> Date: Tue Sep 26 10:25:22 2023 +0100 .Net: Rename skill -> plugin in examples Update URLs, file paths, and plugin/skill names in Semantic Kernel examples and KernelSyntaxExamples (#2963) <!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> <!-- Before submitting this PR, please make sure: --> - [ ] The code builds clean without any errors or warnings - [ ] 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 - [ ] All unit tests pass, and I have added new tests where possible - [ ] I didn't break anyone :smile: This pull request updates URLs, file paths, and plugin/skill names in several examples in the Semantic Kernel repository and the KernelSyntaxExamples code samples. Specifically, it updates the URL for the ChatPlugin in Example14_SemanticMemory.cs, updates the file path for the TextMemoryPlugin in Example15_TextMemoryPlugin.cs, updates the name of an example in Example23_OpenApiPlugin_Github.cs, updates the file path for the JiraPlugin in Example24_OpenApiPlugin_Jira.cs, and updates the file path for the JiraPlugin in Example31_CustomPlanner.cs. Additionally, the ContextQuery and BingSkill have been renamed to QAPlugin and BingPlugin, respectively, in the KernelSyntaxExamples code samples. The WebSearchEngineSkill has been renamed to WebSearchEnginePlugin, and the GroundingSkill has been renamed to GroundingPlugin. Finally, the Example48_GroundednessChecks code sample has been updated to reflect these changes. - Update URL for ChatPlugin in Example14_SemanticMemory.cs - Update file path for TextMemoryPlugin in Example15_TextMemoryPlugin.cs - Update name of example in Example23_OpenApiPlugin_Github.cs - Update file path for JiraPlugin in Example24_OpenApiPlugin_Jira.cs - Update file path for JiraPlugin in Example31_CustomPlanner.cs - Renamed ContextQuery to QAPlugin in KernelSyntaxExamples - Renamed BingSkill to BingPlugin in KernelSyntaxExamples - Renamed WebSearchEngineSkill to WebSearchEnginePlugin in KernelSyntaxExamples - Renamed GroundingSkill to GroundingPlugin in KernelSyntaxExamples - Updated Example48_GroundednessChecks code sample to reflect changes in KernelSyntaxExamples --- *Powered by [Microsoft Semantic Kernel](https://github.com/microsoft/semantic-kernel)* commit bb5d0d6e79ce756b39e49829575d32a9e2280d76 Author: Mark Wallace <127216156+markwallace-microsoft@users.noreply.github.com> Date: Tue Sep 26 10:24:47 2023 +0100 .Net: Remove JsonPropertyOrder from OpenAIRequestSettings Refactor OpenAIRequestSettings class (#2965) - [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 - [x] I didn't break anyone :smile: This pull request refactors the OpenAIRequestSettings class in the Connectors.AI.OpenAI namespace. The changes include removing the JsonPropertyOrder attribute from several properties, removing the MaxTokens default value, and changing the default value for ResultsPerPrompt. Additionally, the DefaultTextMaxTokens property is now only used for text completions. - Removed JsonPropertyOrder attribute from Temperature, TopP, PresencePenalty, FrequencyPenalty, StopSequences, ResultsPerPrompt, ChatSystemPrompt, and TokenSelectionBiases properties - Removed default value for MaxTokens property - Changed default value for ResultsPerPrompt property - Updated DefaultTextMaxTokens property to only be used for text completions --- *Powered by [Microsoft Semantic Kernel](https://github.com/microsoft/semantic-kernel)* commit fbd0afd6870315b50030eae62682636dc1d0bd6f Author: Lisa Harrylock <lisaharrylock@gmail.com> Date: Mon Sep 25 10:41:50 2023 -0700 .Net: Merge planner packages2 (#2931) Combining the planner files into one package makes it easier to provide a consistent interface for planners. Fixes #2856 This introduces breaking changes since the namespaces for the planners changed. * Created Planners.Core and Planners.Core.UnitTests projects under new folder Planners * Created a folder for each type of planner within the Planners project * Moved planner files to their new project and folder. * Removed old projects <!-- 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 :smile: - Namespaces for planner files changed --------- Co-authored-by: Mark Wallace <127216156+markwallace-microsoft@users.noreply.github.com> commit a02c15eaea01e4fa94fe2bf27635f67fedae34c4 Author: Jadyn <jadyn.wong@live.com> Date: Mon Sep 25 23:11:00 2023 +0800 .Net: Postgres memory store add simple constructor (#2688) <!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> The Postgres memory store adds a simple constructor using a connection string. The `NpgsqlDataSource` is managed internally by the postgres memory store. <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> - Similar to the recent changes to the redis memory store. which allows the user to pass the connection string directly. the `NpgsqlDataSource` is managed internally. - Fixed postgres integration test (caused by #2419) <!-- 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 - [x] I didn't break anyone :smile: --------- Co-authored-by: Lee Miller <lemiller@microsoft.com> Co-authored-by: Dmytro Struk <13853051+dmytrostruk@users.noreply.github.com> commit 60116e46d98ed8e486b28b656f0d7e2d5d21286e Author: Weihan Li <weihanli@outlook.com> Date: Mon Sep 25 22:09:13 2023 +0800 .Net: Update PromptTemplate.cs (#2955) Keep code clean let `_params` to be `readonly` since nowhere updates it <!-- 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 - [x] I didn't break anyone :smile: commit 4afd1e5580dcc4fc16909f3f4d8188620ec5c172 Author: Weihan Li <weihanli@outlook.com> Date: Mon Sep 25 22:04:04 2023 +0800 .Net: Update PlannerConfigBase.cs (#2954) To keep code clean Remove unnecessary init <!-- 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 - [x] I didn't break anyone :smile: commit 3451a4ebbc9db0d049f48804c12791c681a326cb Author: Mark Wallace <127216156+markwallace-microsoft@users.noreply.github.com> Date: Sat Sep 23 20:42:14 2023 +0100 .Net: Rename ImportXXXPlugins methods to ImportXXXFunctions (#2937) As part of the Skill -> Plugin rename the `ImportSkill` and `ImportSemanticSkillFromDirectory` where renamed to use the term `Plugin`. These methods actually import functions to the Kernel so this PR renames them to match what they actually do. We want to reserve `ImportPlugin` for use later when we add more plugin support to the SK. So now we do this: `var functions = kernel.ImportFunctionsFromDirectory(...);` In future we will do this `var plugin = kernel.ImportPluginFromDirectory(...);` The plugin instance will contain a list of functions in addition to other data about the plugin. <!-- Before submitting this PR, please make sure: --> - [ ] The code builds clean without any errors or warnings - [ ] 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 - [ ] All unit tests pass, and I have added new tests where possible - [ ] I didn't break anyone :smile: commit 086ef88a5218f8a265eff82814981412ce1270f6 Author: SergeyMenshykh <68852919+SergeyMenshykh@users.noreply.github.com> Date: Sat Sep 23 09:26:39 2023 +0100 .Net: [OpenApi] Pipe delimited query string parameters (#2941) This change is required to support two ways of serializing array query string parameters of 'pipeDelimited' style: A query string parameter per array item - p1=a&p1=b&p1=c A space-separated value per array item - p1=a|b|c ![image](https://github.com/microsoft/semantic-kernel/assets/68852919/4974647a-fe9c-4561-b4fd-bf380ae6ad4a) Related issue - https://github.com/microsoft/semantic-kernel/issues/2745 - The `PipeDelimitedStyleParametersSerializer` class has been added to perform `pipeDelimited` style parameter serialization. For more details about parameter styles, please refer to the [link](https://swagger.io/specification/v3/#parameter-object). - The `QueryStringBuilder` class has been modified to use the `PipeDelimitedStyleParametersSerializer` for the `pipeDelimited` style parameter serialization. <!-- 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 - [x] I didn't break anyone :smile: commit 5766499c26c3ef80860e16b08bc0f1805aee4d36 Author: Mark Wallace <127216156+markwallace-microsoft@users.noreply.github.com> Date: Sat Sep 23 07:39:54 2023 +0100 .Net: Rename ImportXXXPlugins methods to ImportXXXFunctions for GRPC (#2943) - [ ] The code builds clean without any errors or warnings - [ ] 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 - [ ] All unit tests pass, and I have added new tests where possible - [ ] I didn't break anyone :smile: commit 2df149929738b5e88eeda71686c5cb7989735a9d Author: Lee Miller <lemiller@microsoft.com> Date: Fri Sep 22 15:39:56 2023 -0700 .Net: Refactor PlannerConfig classes for better organization (#2912) Moved common properties and methods from SequentialPlannerConfig and StepwisePlannerConfig to the base class PlannerConfigBase. This change improves code organization and reduces redundancy. Additionally, added a new GetSkillFunction property to the PlannerConfigBase class, allowing for custom function lookup behavior. This change provides flexibility in how skill functions are retrieved and used within the planning process. Resolves #2911 <!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> <!-- 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 - [x] I didn't break anyone :smile: commit 4a2cf70c9fb254b73b9fac1f99493f62650ce7fa Author: Lee Miller <lemiller@microsoft.com> Date: Fri Sep 22 12:07:27 2023 -0700 .Net: Add new token counter implementations to TextChunker (#2840) Implement MicrosoftML and DeepDev token counters in the TextChunker example. Update the project file with new package references and modify the RunExampleWithCustomTokenCounter method to support different token counter types. Inspired by #2809 Fixes #478 | Iteration | MicrosoftML (ms) | MicrosoftMLRoberta (ms) | SharpToken (ms) | DeepDev (ms) | |------------|-------------------|--------------------------|-----------------|--------------| | 1 | 38 | 10,189 | 14,305 | 16,701 | | 2 | 36 | 5,581 | 8,381 | 14,214 | | 3 | 13 | 5,354 | 7,955 | 13,630 | | 4 | 27 | 5,679 | 9,156 | 16,164 | | 5 | 16 | 5,158 | 8,657 | 17,276 | | Average | 26.0 | 7,512.2 | 9,710.8 | 15,597 | <sup style="font-size: smaller;">(Avg. Execution Time: 9,710.8 ms)</sup> ``` The city of Venice, located in the northeastern part of Italy, is renowned for its unique geographical features. Built on more than 100 small islands in a lagoon in the Adriatic Sea, it has no roads, just canals including the Grand Canal thoroughfare lined with Renaissance and Gothic palaces. The central square, Piazza San Marco, contains St. Mark's Basilica, which is tiled with Byzantine mosaics, and the Campanile bell tower offering views of the city's red roofs. ------------------------ The Amazon Rainforest, also known as Amazonia, is a moist broadleaf tropical rainforest in the Amazon biome that covers most of the Amazon basin of South America. This basin encompasses 7 million square kilometers, of which 5.5 million square kilometers are covered by the rainforest. This region includes territory belonging to nine nations and 3.4 million square kilometers of uncontacted tribes. The Amazon represents over half of the planet's remaining rainforests and comprises the largest and most biodiverse tract of tropical rainforest in the world. ------------------------ The Great Barrier Reef is the world's largest coral reef system composed of over 2,900 individual reefs and 900 islands stretching for over 2,300 kilometers over an area of approximately 344,400 square kilometers. The reef is located in the Coral Sea, off the coast of Queensland, Australia. The Great Barrier Reef can be seen from outer space and is the world's biggest single structure made by living organisms. This reef structure is composed of and built by billions of tiny organisms, known as coral polyps. ``` <sup style="font-size: smaller;">(Avg. Execution Time: 26.0 ms)</sup> ``` The city of Venice, located in the northeastern part of Italy, is renowned for its unique geographical features. Built on more than 100 small ------------------------ islands in a lagoon in the Adriatic Sea, it has no roads, just canals including the Grand Canal thoroughfare lined with Renaissance and ------------------------ Gothic palaces. The central square, Piazza San Marco, contains St. Mark's Basilica, which is tiled with Byzantine mosaics, ------------------------ and the Campanile bell tower offering views of the city's red roofs. The Amazon Rainforest, also known as Amazonia, ------------------------ is a moist broadleaf tropical rainforest in the Amazon biome that covers most of the Amazon basin of South America. This basin encompasses 7 ------------------------ million square kilometers, of which 5. 5 million square kilometers are covered by the rainforest. This region includes territory ------------------------ belonging to nine nations and 3. 4 million square kilometers of uncontacted tribes. The Amazon represents over ------------------------ half of the planet's remaining rainforests and comprises the largest and most biodiverse tract of tropical rainforest in the world. ------------------------ The Great Barrier Reef is the world's largest coral reef system composed of over 2, 900 individual reefs and 900 islands ------------------------ stretching for over 2, 300 kilometers over an area of approximately 344, 400 square kilometers. The reef is located in the ------------------------ Coral Sea, off the coast of Queensland, Australia. The Great Barrier Reef can be seen from outer space and is the world's ------------------------ biggest single structure made by living organisms. This reef structure is composed of and built by bil…
Update AIRequestSettings in CollectEmailSkill and refactor code to improve readability and maintainability. Adjust project references and remove unused imports. This commit also updates ReActEngine to use PluginName instead of SkillName, simplifies CreateActionContext, and adjusts function filtering in GetAvailableFunctions. It updates FlowPlanner references as well. Squashed commit of the following: commit 1a350dc2f854606975f0d6140ef9f8e15853f307 Author: Lee Miller <lemiller@microsoft.com> Date: Wed Sep 27 18:51:09 2023 -0700 🔄 Update AIRequestSettings and refactor context creation This commit updates the AIRequestSettings class usage in CollectEmailSkill and refactors the context creation in FlowExecutor and ReActEngine. It also replaces the usage of RestrictedSkillName with RestrictedPluginName and adjusts the handling of MaxTokens in the ReActEngine configuration. Update ReActEngine to use PluginName instead of SkillName and adjust FlowPlanner references accordingly. Remove unnecessary imports and adjust project file dependencies. commit 04d2ff9ee30a55eb9329f78f8d5044240e8ad386 Author: Yan Li <dannis_28@hotmail.com> Date: Thu Sep 28 00:06:28 2023 +0800 .Net: [FeatureBranch][FlowPlanner] Support referenced flow step (#2920) Note that this PR is for feature branch only. Changes 1. Support optional completion type 2. Support reference flow as a FlowStep 3. Accommodate latest kernel changes 4. Add more unit tests for the Planner as above <!-- 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 - [X] I didn't break anyone :smile: commit b680065a56b6f9d93f3ebd465946b0ca0e2aacf0 Author: Yan Li <dannis_28@hotmail.com> Date: Fri Sep 15 01:21:45 2023 +0800 [Feature branch only] Merge from main and support more completion types (#2778) Follow up PR into feature branch for https://github.com/microsoft/semantic-kernel/issues/2164. 1. Merge from main 2. Address code style issues per latest rules 3. Support more step completion types <!-- 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 - [x] I didn't break anyone :smile: commit fc50c325c1907b8030f6e21cb9880d3b601538ff Author: Lee Miller <lemiller@microsoft.com> Date: Wed Sep 6 08:26:45 2023 -0700 🔄 Simplify GetKernelBuilder and update retry configuration This commit simplifies the GetKernelBuilder method by directly returning the builder with the AzureChatCompletionService configured. It also updates the retry configuration to use the new WithRetryBasic method, removing the need for the HttpRetryConfig object. commit 5d9a82e5cfb6538410cc23708aee52d7880990f1 Author: Yan Li <dannis_28@hotmail.com> Date: Wed Aug 23 08:56:02 2023 +0800 .Net: Feature flow planner (#2165) <!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> This PR is trying to help making it easier to build complex Copilot which is capable of commanding, Q&A, collaboration, suggestion, etc, in reliable ways. A new FlowPlanner is introduced, which leverages the available skills, execute the plan in multi-step, multi-pass way, including interaction with users to get clarification on the goal, input for skills/functions, and authorization for actions when needed. More details in https://github.com/microsoft/semantic-kernel/issues/2164. <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> Major changes * FlowModel * ChatSkill, which is to make the implementation of multi-pass skill easier with built in chat history accessor * FlowExecutor * ReAct engine, which is similar as the StepwisePlanner implementation but more isolated and enriched with chat integration * UnitTests * IntegrationTests * Examples <!-- 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 - [x] I didn't break anyone :smile: --------- Co-authored-by: Yan Li <yanli@microsoft.com> Co-authored-by: Lee Miller <lemiller@microsoft.com> commit 56bcccfab643aa0768c8f510e9a0a7db3aaa191a Author: Jib <Jibzade@gmail.com> Date: Wed Sep 27 15:30:22 2023 -0400 Python: Make `semantic_kernel.NullLogger` match `logging.Logger` function signatures (#2892) <!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> 1. #2889 2. Allows Contributors and Devs to seamlessly use `NullLogger` or generalized `Logger` class without having to do attribute checks 3. See details in #2889 4. #2889 <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> * I added in a `_NullerMeta` metaclass to the `NullLogger` to iterate over all the function signatures in the `Logger` class and have them issue no returns. * This is backward compatible and breaks no existing implementations. <!-- 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 - [x] I didn't break anyone :smile: --------- Co-authored-by: Abby Harrison <54643756+awharrison-28@users.noreply.github.com> commit 8217c21e43505b4be61f626ef66695decf9bc874 Author: Lee Miller <lemiller@microsoft.com> Date: Wed Sep 27 09:54:07 2023 -0700 Update Plan and StepwisePlanner classes for FunctionResult support (#2976) This pull request includes several updates to the Plan and StepwisePlanner classes. The changes include: adding step count and iteration metadata to the StepwisePlanner, updating Plan to prevent functions from having access to variables they shouldn't, adding the ability to add metadata to the result of a Plan execution, and adding a new unit test to verify the functionality of the new metadata feature. - Added 'stepsTaken' and 'iterations' fields to ExecutionResult struct in Example51_StepwisePlanner.cs - Added 'stepCount', 'functionCount', 'stepsTaken', and 'iterations' outputs to Plan in StepwisePlanner.cs - Added TryGetMetadataValue method to FunctionResult.cs - Added assertions for step count and iteration metadata in StepwisePlannerTests.cs - Added code to merge state with current context variables and filter variables to only those needed for the next step in Plan.cs - Added code to update the function result with outputs from the current state in Plan.cs - Added new methods to the FunctionResult class to allow for adding metadata to individual chapters of a book - Updated the Plan class to use the new metadata methods - Added a new unit test to verify the functionality of the new metadata feature --- *Powered by [Microsoft Semantic Kernel](https://github.com/microsoft/semantic-kernel)* <!-- 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 - [x] I didn't break anyone :smile: --------- Co-authored-by: Dmytro Struk <13853051+dmytrostruk@users.noreply.github.com> commit 1efa7fb2d1053b1252bdf6eade18ccd37f4c5e71 Author: Lee Miller <lemiller@microsoft.com> Date: Wed Sep 27 09:01:58 2023 -0700 .Net: Add xRetry package and apply to tests Add xRetry package to IntegrationTests project (#2996) Add xRetry package to Directory.Packages.props and IntegrationTests.csproj. Update StepwisePlannerTests to use RetryTheory attribute for improved test reliability. Package details: https://github.com/JoshKeegan/xRetry <!-- 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 - [x] I didn't break anyone :smile: This pull request adds the xRetry package to the IntegrationTests project in the dotnet directory. It also updates the IntegrationTests.csproj file to include the xRetry package reference. Additionally, the StepwisePlannerTests.cs file has been updated to use the [RetryTheory] attribute instead of [Theory] for one of its test cases. - Added xRetry package reference to IntegrationTests.csproj - Updated StepwisePlannerTests.cs to use [RetryTheory] attribute for one test case --- *Powered by [Microsoft Semantic Kernel](https://github.com/microsoft/semantic-kernel)* commit af8a5c037f989404102c0d9cdd845dce878a1508 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed Sep 27 13:47:47 2023 +0100 .Net: Bump NRedisStack from 0.8.1 to 0.9.0 in /dotnet (#2978) Bumps NRedisStack from 0.8.1 to 0.9.0. [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=NRedisStack&package-manager=nuget&previous-version=0.8.1&new-version=0.9.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Dmytro Struk <13853051+dmytrostruk@users.noreply.github.com> commit 2bf7902ef02b81848031f8877b8c6e839c7cd9c2 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed Sep 27 12:48:20 2023 +0100 .Net: Bump Azure.AI.OpenAI from 1.0.0-beta.7 to 1.0.0-beta.8 in /dotnet (#2979) Bumps [Azure.AI.OpenAI](https://github.com/Azure/azure-sdk-for-net) from 1.0.0-beta.7 to 1.0.0-beta.8. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/Azure/azure-sdk-for-net/releases">Azure.AI.OpenAI's releases</a>.</em></p> <blockquote> <h2>Azure.AI.OpenAI_1.0.0-beta.8</h2> <h2>1.0.0-beta.8 (2023-09-21)</h2> <h3>Features Added</h3> <ul> <li>Audio Transcription and Audio Translation using OpenAI Whisper models is now supported. See <a href="https://platform.openai.com/docs/api-reference/audio">OpenAI's API reference</a> or the <a href="https://learn.microsoft.com/azure/ai-services/openai/whisper-quickstart">Azure OpenAI quickstart</a> for detailed overview and background information. <ul> <li>The new methods <code>GetAudioTranscription</code> and <code>GetAudioTranscription</code> expose these capabilities on <code>OpenAIClient</code></li> <li>Transcription produces text in the primary, supported, spoken input language of the audio data provided, together with any optional associated metadata</li> <li>Translation produces text, translated to English and reflective of the audio data provided, together with any optional associated metadata</li> <li>These methods work for both Azure OpenAI and non-Azure <code>api.openai.com</code> client configurations</li> </ul> </li> </ul> <h3>Breaking Changes</h3> <ul> <li>The underlying representation of <code>PromptFilterResults</code> (for <code>Completions</code> and <code>ChatCompletions</code>) has had its response body key changed from <code>prompt_annotations</code> to <code>prompt_filter_results</code></li> <li><strong>Prior versions of the <code>Azure.AI.OpenAI</code> library may no longer populate <code>PromptFilterResults</code> as expected</strong> and it's highly recommended to upgrade to this version if the use of Azure OpenAI content moderation annotations for input data is desired</li> <li>If a library version upgrade is not immediately possible, it's advised to use <code>Response<T>.GetRawResponse()</code> and manually extract the <code>prompt_filter_results</code> object from the top level of the <code>Completions</code> or <code>ChatCompletions</code> response <code>Content</code> payload</li> </ul> <h3>Bugs Fixed</h3> <ul> <li>Support for the described breaking change for <code>PromptFilterResults</code> was added and this library version will now again deserialize <code>PromptFilterResults</code> appropriately</li> <li><code>PromptFilterResults</code> and <code>ContentFilterResults</code> are now exposed on the result classes for streaming Completions and Chat Completions. <code>Streaming(Chat)Completions.PromptFilterResults</code> will report an index-sorted list of all prompt annotations received so far while <code>Streaming(Chat)Choice.ContentFilterResults</code> will reflect the latest-received content annotations that were populated and received while streaming</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/Azure/azure-sdk-for-net/commit/e902ef5a2ed5db3d6104ccb2db29b97a02258634"><code>e902ef5</code></a> CHANGELOG snap for beta.8 release (<a href="https://redirect.github.com/Azure/azure-sdk-for-net/issues/38897">#38897</a>)</li> <li><a href="https://github.com/Azure/azure-sdk-for-net/commit/494a50b6843eeeabe8107c285562cd4c939401d9"><code>494a50b</code></a> Azure OpenAI: audio transcription and translation (<a href="https://redirect.github.com/Azure/azure-sdk-for-net/issues/38460">#38460</a>)</li> <li><a href="https://github.com/Azure/azure-sdk-for-net/commit/bc5e855008db838982fc6f9dbd6cacb011bea3f1"><code>bc5e855</code></a> Update MSAL dependencies to latest (<a href="https://redirect.github.com/Azure/azure-sdk-for-net/issues/38866">#38866</a>)</li> <li><a href="https://github.com/Azure/azure-sdk-for-net/commit/87cd28b1e117cb35625f82e292bf7f76562490b8"><code>87cd28b</code></a> .NET SDK release changes for dataprotection (<a href="https://redirect.github.com/Azure/azure-sdk-for-net/issues/38408">#38408</a>)</li> <li><a href="https://github.com/Azure/azure-sdk-for-net/commit/240a4fcab49587107c01bf60168357ba8be84b1e"><code>240a4fc</code></a> Increment package version after release of Azure.Identity (<a href="https://redirect.github.com/Azure/azure-sdk-for-net/issues/38667">#38667</a>)</li> <li><a href="https://github.com/Azure/azure-sdk-for-net/commit/187a4f0e31f1c74c363ec3288e270f9cde1cc367"><code>187a4f0</code></a> Increment version for monitor releases (<a href="https://redirect.github.com/Azure/azure-sdk-for-net/issues/38864">#38864</a>)</li> <li><a href="https://github.com/Azure/azure-sdk-for-net/commit/d5ee8a0ff55293afa6252ece2395fb08b75815ba"><code>d5ee8a0</code></a> [Storage][DataMovement] Add resource specific checkpoint data classes (<a href="https://redirect.github.com/Azure/azure-sdk-for-net/issues/38842">#38842</a>)</li> <li><a href="https://github.com/Azure/azure-sdk-for-net/commit/b03a0db9be3b9c015d50bd22412d001dc0d797fe"><code>b03a0db</code></a> [AzureMonitorExporter] prepare new release. Exporter 1.0.0. Distro beta7 (<a href="https://redirect.github.com/Azure/azure-sdk-for-net/issues/38">#38</a>...</li> <li><a href="https://github.com/Azure/azure-sdk-for-net/commit/0d1e7bedba3787edc87e2166dfb0ee930b9bc0f6"><code>0d1e7be</code></a> [AzureMonitorDistro] update OTel ResourceDetectors (<a href="https://redirect.github.com/Azure/azure-sdk-for-net/issues/38833">#38833</a>)</li> <li><a href="https://github.com/Azure/azure-sdk-for-net/commit/02c132f60287e114f2de35f422a93ec423acdcaa"><code>02c132f</code></a> [AzureMonitorDistro] disable test (<a href="https://redirect.github.com/Azure/azure-sdk-for-net/issues/38840">#38840</a>)</li> <li>Additional commits viewable in <a href="https://github.com/Azure/azure-sdk-for-net/compare/Azure.AI.OpenAI_1.0.0-beta.7...Azure.AI.OpenAI_1.0.0-beta.8">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=Azure.AI.OpenAI&package-manager=nuget&previous-version=1.0.0-beta.7&new-version=1.0.0-beta.8)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Dmytro Struk <13853051+dmytrostruk@users.noreply.github.com> commit caa7efde794f86434f6147f60b3f7cd494fe874f Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed Sep 27 12:39:28 2023 +0100 .Net: Bump Pgvector from 0.1.3 to 0.1.4 in /dotnet (#2977) Bumps [Pgvector](https://github.com/pgvector/pgvector-dotnet) from 0.1.3 to 0.1.4. <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/pgvector/pgvector-dotnet/commit/2902ea9e8f8cde77c3b08793335060c81996fc9d"><code>2902ea9</code></a> Pgvector: Version bump to 0.1.4 [skip ci]</li> <li><a href="https://github.com/pgvector/pgvector-dotnet/commit/c59efdec5b317c192d3eb47c985953472b34849f"><code>c59efde</code></a> Improved Npgsql example [skip ci]</li> <li><a href="https://github.com/pgvector/pgvector-dotnet/commit/626d8694cd0dd7df0049051c70d35cc7303ce9e1"><code>626d869</code></a> Improved Dapper example [skip ci]</li> <li><a href="https://github.com/pgvector/pgvector-dotnet/commit/dd1ac68796dcf3d3be5ff423b7d3ad9b7d738bb7"><code>dd1ac68</code></a> Fixed format [skip ci]</li> <li><a href="https://github.com/pgvector/pgvector-dotnet/commit/ff4ea8b5329bf226be7b2f28f5de803f833cedfa"><code>ff4ea8b</code></a> Improved tests</li> <li><a href="https://github.com/pgvector/pgvector-dotnet/commit/61e594aa5ef3d3db76f51db0db5774a07efb710c"><code>61e594a</code></a> Added distance functions for Entity Framework Core - closes <a href="https://redirect.github.com/pgvector/pgvector-dotnet/issues/18">#18</a></li> <li><a href="https://github.com/pgvector/pgvector-dotnet/commit/1027cd4cffe6e8d79ee638c0945ede6cecf0f9b1"><code>1027cd4</code></a> Added docs for enabling extension [skip ci]</li> <li><a href="https://github.com/pgvector/pgvector-dotnet/commit/8fb0f7882f693513c16afb64b52bbc942e05824f"><code>8fb0f78</code></a> Updated test</li> <li><a href="https://github.com/pgvector/pgvector-dotnet/commit/66b95b901ad87ca24ed682b40615a98c4caaa844"><code>66b95b9</code></a> Added HasPostgresExtension to readme - <a href="https://redirect.github.com/pgvector/pgvector-dotnet/issues/17">#17</a> [skip ci]</li> <li><a href="https://github.com/pgvector/pgvector-dotnet/commit/b6daa3c690be22f9a8499f4750f684d43520d5bd"><code>b6daa3c</code></a> Added HNSW to docs [skip ci]</li> <li>Additional commits viewable in <a href="https://github.com/pgvector/pgvector-dotnet/compare/v0.1.3...v0.1.4">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=Pgvector&package-manager=nuget&previous-version=0.1.3&new-version=0.1.4)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Dmytro Struk <13853051+dmytrostruk@users.noreply.github.com> commit 1fad7a12d97e2e3151859a8e6c312cc0de52baa4 Author: Mark Wallace <127216156+markwallace-microsoft@users.noreply.github.com> Date: Wed Sep 27 11:49:00 2023 +0100 .Net: Extract semantic functions from Kernel.Core (#2961) 1. Why is this change required? This is part of the work to extract functionality from Semantic Kernel core prior to 1.0 release. 2. What problem does it solve? Isolates the semantic function implementation from the Semantic Kernel core. 3. What scenario does it contribute to? Contributes to the goal of reducing the Semantic Kernel core to focus on AI orchestration. 4. If it fixes an open issue, please link to the issue here. https://github.com/microsoft/semantic-kernel/issues/2563 Fixes #2563 - Move classes from abstractions SemanticFunctions folder to new functions.semantic project - Move classes from core SemanticFunctions and SkillDefinition folders to new functions.semantic project - Fix up all unit tests - [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 - [x] I didn't break anyone :smile: commit db25811c5986e9febaaa31fd2d667479e5f0d706 Author: Gina Triolo <51341242+gitri-ms@users.noreply.github.com> Date: Wed Sep 27 02:54:32 2023 -0700 .Net: Fix broken path in GitHub plugin example (#2995) <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> Update path to GitHub plugin JSON in example. Fixes #2823 <!-- Before submitting this PR, please make sure: --> - [ ] The code builds clean without any errors or warnings - [ ] 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 - [ ] All unit tests pass, and I have added new tests where possible - [ ] I didn't break anyone :smile: Co-authored-by: Dmytro Struk <13853051+dmytrostruk@users.noreply.github.com> commit 5fd59476d7a5d8931c061ce95fe1c352a02dd044 Author: Weihan Li <weihanli@outlook.com> Date: Wed Sep 27 17:29:02 2023 +0800 .Net: Some code enhancements (#2988) To keep the code clean and follow the best practice - add `readonly` for field if applicable - sealed internal types if applicable - prefer static method other than instance method if applicable - remove unnecessary init - prefer smaller access scope - fix two typo <!-- 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 - [x] I didn't break anyone :smile: --------- Co-authored-by: Weihan Li <weihan.li@iherb.com> Co-authored-by: Dmytro Struk <13853051+dmytrostruk@users.noreply.github.com> commit eb9ecba63fe7a26252507e18619e07659726a379 Author: Eduard van Valkenburg <eavanvalkenburg@users.noreply.github.com> Date: Wed Sep 27 04:59:32 2023 +0200 Python: simple implementation of token usage (#2844) <!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> Added token usage tracking to the OpenAI classes, similar to how that is done in dotnet. Similar approach as #2526 but for Python TODO: add a similar construct to python for the SKContext.LastResult. <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> Added three fields to the OpenAI Chat and Text completion classes. After doing a call, check if 'usage" is in the response and then update the fields, can be read through properties. <!-- 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 - [x] I didn't break anyone :smile: --------- Co-authored-by: Abby Harrison <54643756+awharrison-28@users.noreply.github.com> commit 45f492aa89c112bc17fff40fff11dafc00cfa224 Author: Mark Karle <mkarle@users.noreply.github.com> Date: Tue Sep 26 18:24:42 2023 -0700 Python: Enforcing return typehints on native functions (#2948) <!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> This solves [this issue](https://github.com/microsoft/semantic-kernel/issues/1069) where native functions are not returning the expected result. In python, return typehints are optional. However, the semantic kernel requires a return typehint to determine how to handle the function. For that reason, we're now enforcing return typehints and raising an exception when one is not provided. This may break existing void functions but none in our repo are affected. Fixes #1069 <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> <!-- 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 :smile: This pull request includes two sets of changes. First, it fixes the return type annotations in three core skills: file_io_skill, text_memory_skill, and wait_skill. Specifically, the write_async method in file_io_skill and the save_async method in text_memory_skill now have a return type of None, and the wait method in wait_skill now has a return type of None. Additionally, the import_native_skill_from_directory method in kernel.py has been refactored to simplify the code. Second, this pull request adds error handling for functions with no return type in the delegate inference module. Previously, if a function did not specify a return type, the DelegateType could not be inferred, leading to errors. This pull request adds a check for functions with no return type and raises a KernelException with an appropriate error message. Additionally, this pull request includes some minor changes to unit tests for native functions. - Fixed return type annotation for write_async method in file_io_skill - Fixed return type annotation for save_async method in text_memory_skill - Fixed return type annotation for wait method in wait_skill - Refactored import_native_skill_from_directory method in kernel.py - Added error handling for functions with no return type in the delegate inference module - Added a check for functions with no return type and raised a KernelException with an appropriate error message - Made minor changes to unit tests for native functions --- *Powered by [Microsoft Semantic Kernel](https://github.com/microsoft/semantic-kernel)* commit b65fb53a40c9cceed9950848e05de927e1a66137 Author: Lee Miller <lemiller@microsoft.com> Date: Tue Sep 26 14:57:05 2023 -0700 .Net: Remove SKParameterAttribute and related code (#2991) This commit removes the `SKParameterAttribute` class and its usage in `NativeFunction.cs`. The attribute was used to describe additional parameters for native functions that weren't part of the method signature. The removal simplifies the codebase and reduces complexity. <!-- Before submitting this PR, please make sure: --> - [ ] The code builds clean without any errors or warnings - [ ] 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 - [ ] All unit tests pass, and I have added new tests where possible - [ ] I didn't break anyone :smile: commit 8e2337e0d6c639331544541c5f0062e6193ca6a2 Author: Lee Miller <lemiller@microsoft.com> Date: Tue Sep 26 10:14:51 2023 -0700 .Net: Refactor planners, memory config, and function extensions (#2949) Followup to #2912 and #2931. Resolves #2848 Resolves https://github.com/microsoft/semantic-kernel/issues/2074 This commit includes several updates and refactors to planners, SemanticMemoryConfig, and function extension classes. Changes include updating SequentialPlannerConfig to use SemanticMemory, refactoring tests to use async methods, renaming and updating test cases, and improving planner configurations. Additionally, FunctionViewExtensions has been added and refactored, along with updates to method signatures and code organization. The StepwisePlanner has also been refactored, and PlannerConfigBase has been updated to improve memory usage and function filtering. commit 43dcbe5aeab8b3baa6f2e6ecff84e3b190761926 Author: Lisa Harrylock <lisaharrylock@gmail.com> Date: Tue Sep 26 10:00:48 2023 -0700 .Net: move maxtokens property to base config Update max tokens configuration in planners (#2974) This change is part of the effort to make the core planners more consistent with each other. This makes working with the planners more predictable. Fixes #2973 <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> <!-- 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 - [x] I didn't break anyone :smile: This pull request updates the max tokens configuration in the planners to use the value from the configuration object instead of a hard-coded value. Specifically, the ActionPlanner, SequentialPlanner, and StepwisePlanner classes have been updated to use the MaxTokens property from their respective configuration objects. Additionally, default values for MaxTokens have been added to the ActionPlannerConfig, SequentialPlannerConfig, and StepwisePlannerConfig classes. - ActionPlanner.cs: Updated ExtensionData dictionary to use MaxTokens value from configuration object - ActionPlannerConfig.cs: Added default value for MaxTokens property - SequentialPlanner.cs: Updated ExtensionData dictionary to use MaxTokens value from configuration object - SequentialPlannerConfig.cs: Added default value for MaxTokens property - StepwisePlanner.cs: Updated ExtensionData dictionary to use MaxTokens value from configuration object - StepwisePlannerConfig.cs: Added default value for MaxTokens property - PlannerConfigBase.cs: Added MaxTokens property to base configuration class --- *Powered by [Microsoft Semantic Kernel](https://github.com/microsoft/semantic-kernel)* commit 02c0261eff85ccd3cfe063e8ad5b63bb7539f0de Author: Lisa Harrylock <lisaharrylock@gmail.com> Date: Tue Sep 26 10:00:30 2023 -0700 .Net: Fix Solution File (#2984) Fixes #2975 The Planners.Core.UnitTests project was missing a EndProject tag (Thanks @lemillermicrosoft for catching this!). Additionally, the mapping for the publish profile was incorrect for the Planners.Core project. <!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> <!-- 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 - [x] I didn't break anyone :smile: commit 9cd68cea2e522f8dcf613795eba98a265855540d Author: Matthew Bolaños <matthewbolanos@gmail.com> Date: Tue Sep 26 16:12:03 2023 +0100 Add deprecation warnings to samples (#2967) Per https://github.com/microsoft/semantic-kernel/issues/2810, we will be deprecating the current web-based samples in favor of console apps in the dotnet and python samples folders. Added a deprecation warning to the samples - [ ] The code builds clean without any errors or warnings - [ ] 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 - [ ] All unit tests pass, and I have added new tests where possible - [ ] I didn't break anyone :smile: commit 76db027273371ea81e6db66afcb1d888cc53b459 Author: Mark Wallace <127216156+markwallace-microsoft@users.noreply.github.com> Date: Tue Sep 26 13:44:33 2023 +0100 .Net: Rename ImportAIPluginAsync Update plugin import method and planner, and rename AIPlugin to Plugin in KernelAIPluginExtensions.cs (#2968) - [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 - [x] I didn't break anyone :smile: This pull request includes three changes. First, the plugin import method in the PluginTests.cs file of the IntegrationTests project has been updated to use the ImportPluginFunctionsAsync method instead of the deprecated ImportAIPluginAsync method. Second, the StepwisePlannerTests.cs file in the same project has been updated to use the Planning.StepwisePlanner method instead of the deprecated Planning.StepwisePlannerAsync method. Finally, the KernelAIPluginExtensions.cs file has been updated to rename all instances of AIPlugin to Plugin, including renaming the ImportAIPluginAsync method to ImportPluginFunctionsAsync. The changes also include an obsolete attribute for the old method name, which will be removed in a future release, and a new EditorBrowsable attribute to hide the obsolete method from IntelliSense. - Replace ImportAIPluginAsync with ImportPluginFunctionsAsync in PluginTests.cs - Update StepwisePlannerTests.cs to use Planning.StepwisePlanner instead of Planning.StepwisePlannerAsync - Rename all instances of AIPlugin to Plugin in KernelAIPluginExtensions.cs - Rename ImportAIPluginAsync method to ImportPluginFunctionsAsync - Add obsolete attribute to ImportAIPluginAsync method - Add EditorBrowsable attribute to obsolete method --- *Powered by [Microsoft Semantic Kernel](https://github.com/microsoft/semantic-kernel)* commit 13227dccf4becf445a679ae447228fd7f775d6b1 Author: Mark Wallace <127216156+markwallace-microsoft@users.noreply.github.com> Date: Tue Sep 26 10:25:22 2023 +0100 .Net: Rename skill -> plugin in examples Update URLs, file paths, and plugin/skill names in Semantic Kernel examples and KernelSyntaxExamples (#2963) <!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> <!-- Before submitting this PR, please make sure: --> - [ ] The code builds clean without any errors or warnings - [ ] 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 - [ ] All unit tests pass, and I have added new tests where possible - [ ] I didn't break anyone :smile: This pull request updates URLs, file paths, and plugin/skill names in several examples in the Semantic Kernel repository and the KernelSyntaxExamples code samples. Specifically, it updates the URL for the ChatPlugin in Example14_SemanticMemory.cs, updates the file path for the TextMemoryPlugin in Example15_TextMemoryPlugin.cs, updates the name of an example in Example23_OpenApiPlugin_Github.cs, updates the file path for the JiraPlugin in Example24_OpenApiPlugin_Jira.cs, and updates the file path for the JiraPlugin in Example31_CustomPlanner.cs. Additionally, the ContextQuery and BingSkill have been renamed to QAPlugin and BingPlugin, respectively, in the KernelSyntaxExamples code samples. The WebSearchEngineSkill has been renamed to WebSearchEnginePlugin, and the GroundingSkill has been renamed to GroundingPlugin. Finally, the Example48_GroundednessChecks code sample has been updated to reflect these changes. - Update URL for ChatPlugin in Example14_SemanticMemory.cs - Update file path for TextMemoryPlugin in Example15_TextMemoryPlugin.cs - Update name of example in Example23_OpenApiPlugin_Github.cs - Update file path for JiraPlugin in Example24_OpenApiPlugin_Jira.cs - Update file path for JiraPlugin in Example31_CustomPlanner.cs - Renamed ContextQuery to QAPlugin in KernelSyntaxExamples - Renamed BingSkill to BingPlugin in KernelSyntaxExamples - Renamed WebSearchEngineSkill to WebSearchEnginePlugin in KernelSyntaxExamples - Renamed GroundingSkill to GroundingPlugin in KernelSyntaxExamples - Updated Example48_GroundednessChecks code sample to reflect changes in KernelSyntaxExamples --- *Powered by [Microsoft Semantic Kernel](https://github.com/microsoft/semantic-kernel)* commit bb5d0d6e79ce756b39e49829575d32a9e2280d76 Author: Mark Wallace <127216156+markwallace-microsoft@users.noreply.github.com> Date: Tue Sep 26 10:24:47 2023 +0100 .Net: Remove JsonPropertyOrder from OpenAIRequestSettings Refactor OpenAIRequestSettings class (#2965) - [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 - [x] I didn't break anyone :smile: This pull request refactors the OpenAIRequestSettings class in the Connectors.AI.OpenAI namespace. The changes include removing the JsonPropertyOrder attribute from several properties, removing the MaxTokens default value, and changing the default value for ResultsPerPrompt. Additionally, the DefaultTextMaxTokens property is now only used for text completions. - Removed JsonPropertyOrder attribute from Temperature, TopP, PresencePenalty, FrequencyPenalty, StopSequences, ResultsPerPrompt, ChatSystemPrompt, and TokenSelectionBiases properties - Removed default value for MaxTokens property - Changed default value for ResultsPerPrompt property - Updated DefaultTextMaxTokens property to only be used for text completions --- *Powered by [Microsoft Semantic Kernel](https://github.com/microsoft/semantic-kernel)* commit fbd0afd6870315b50030eae62682636dc1d0bd6f Author: Lisa Harrylock <lisaharrylock@gmail.com> Date: Mon Sep 25 10:41:50 2023 -0700 .Net: Merge planner packages2 (#2931) Combining the planner files into one package makes it easier to provide a consistent interface for planners. Fixes #2856 This introduces breaking changes since the namespaces for the planners changed. * Created Planners.Core and Planners.Core.UnitTests projects under new folder Planners * Created a folder for each type of planner within the Planners project * Moved planner files to their new project and folder. * Removed old projects <!-- 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 :smile: - Namespaces for planner files changed --------- Co-authored-by: Mark Wallace <127216156+markwallace-microsoft@users.noreply.github.com> commit a02c15eaea01e4fa94fe2bf27635f67fedae34c4 Author: Jadyn <jadyn.wong@live.com> Date: Mon Sep 25 23:11:00 2023 +0800 .Net: Postgres memory store add simple constructor (#2688) <!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> The Postgres memory store adds a simple constructor using a connection string. The `NpgsqlDataSource` is managed internally by the postgres memory store. <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> - Similar to the recent changes to the redis memory store. which allows the user to pass the connection string directly. the `NpgsqlDataSource` is managed internally. - Fixed postgres integration test (caused by #2419) <!-- 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 - [x] I didn't break anyone :smile: --------- Co-authored-by: Lee Miller <lemiller@microsoft.com> Co-authored-by: Dmytro Struk <13853051+dmytrostruk@users.noreply.github.com> commit 60116e46d98ed8e486b28b656f0d7e2d5d21286e Author: Weihan Li <weihanli@outlook.com> Date: Mon Sep 25 22:09:13 2023 +0800 .Net: Update PromptTemplate.cs (#2955) Keep code clean let `_params` to be `readonly` since nowhere updates it <!-- 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 - [x] I didn't break anyone :smile: commit 4afd1e5580dcc4fc16909f3f4d8188620ec5c172 Author: Weihan Li <weihanli@outlook.com> Date: Mon Sep 25 22:04:04 2023 +0800 .Net: Update PlannerConfigBase.cs (#2954) To keep code clean Remove unnecessary init <!-- 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 - [x] I didn't break anyone :smile: commit 3451a4ebbc9db0d049f48804c12791c681a326cb Author: Mark Wallace <127216156+markwallace-microsoft@users.noreply.github.com> Date: Sat Sep 23 20:42:14 2023 +0100 .Net: Rename ImportXXXPlugins methods to ImportXXXFunctions (#2937) As part of the Skill -> Plugin rename the `ImportSkill` and `ImportSemanticSkillFromDirectory` where renamed to use the term `Plugin`. These methods actually import functions to the Kernel so this PR renames them to match what they actually do. We want to reserve `ImportPlugin` for use later when we add more plugin support to the SK. So now we do this: `var functions = kernel.ImportFunctionsFromDirectory(...);` In future we will do this `var plugin = kernel.ImportPluginFromDirectory(...);` The plugin instance will contain a list of functions in addition to other data about the plugin. <!-- Before submitting this PR, please make sure: --> - [ ] The code builds clean without any errors or warnings - [ ] 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 - [ ] All unit tests pass, and I have added new tests where possible - [ ] I didn't break anyone :smile: commit 086ef88a5218f8a265eff82814981412ce1270f6 Author: SergeyMenshykh <68852919+SergeyMenshykh@users.noreply.github.com> Date: Sat Sep 23 09:26:39 2023 +0100 .Net: [OpenApi] Pipe delimited query string parameters (#2941) This change is required to support two ways of serializing array query string parameters of 'pipeDelimited' style: A query string parameter per array item - p1=a&p1=b&p1=c A space-separated value per array item - p1=a|b|c ![image](https://github.com/microsoft/semantic-kernel/assets/68852919/4974647a-fe9c-4561-b4fd-bf380ae6ad4a) Related issue - https://github.com/microsoft/semantic-kernel/issues/2745 - The `PipeDelimitedStyleParametersSerializer` class has been added to perform `pipeDelimited` style parameter serialization. For more details about parameter styles, please refer to the [link](https://swagger.io/specification/v3/#parameter-object). - The `QueryStringBuilder` class has been modified to use the `PipeDelimitedStyleParametersSerializer` for the `pipeDelimited` style parameter serialization. <!-- 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 - [x] I didn't break anyone :smile: commit 5766499c26c3ef80860e16b08bc0f1805aee4d36 Author: Mark Wallace <127216156+markwallace-microsoft@users.noreply.github.com> Date: Sat Sep 23 07:39:54 2023 +0100 .Net: Rename ImportXXXPlugins methods to ImportXXXFunctions for GRPC (#2943) - [ ] The code builds clean without any errors or warnings - [ ] 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 - [ ] All unit tests pass, and I have added new tests where possible - [ ] I didn't break anyone :smile: commit 2df149929738b5e88eeda71686c5cb7989735a9d Author: Lee Miller <lemiller@microsoft.com> Date: Fri Sep 22 15:39:56 2023 -0700 .Net: Refactor PlannerConfig classes for better organization (#2912) Moved common properties and methods from SequentialPlannerConfig and StepwisePlannerConfig to the base class PlannerConfigBase. This change improves code organization and reduces redundancy. Additionally, added a new GetSkillFunction property to the PlannerConfigBase class, allowing for custom function lookup behavior. This change provides flexibility in how skill functions are retrieved and used within the planning process. Resolves #2911 <!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> <!-- 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 - [x] I didn't break anyone :smile: commit 4a2cf70c9fb254b73b9fac1f99493f62650ce7fa Author: Lee Miller <lemiller@microsoft.com> Date: Fri Sep 22 12:07:27 2023 -0700 .Net: Add new token counter implementations to TextChunker (#2840) Implement MicrosoftML and DeepDev token counters in the TextChunker example. Update the project file with new package references and modify the RunExampleWithCustomTokenCounter method to support different token counter types. Inspired by #2809 Fixes #478 | Iteration | MicrosoftML (ms) | MicrosoftMLRoberta (ms) | SharpToken (ms) | DeepDev (ms) | |------------|-------------------|--------------------------|-----------------|--------------| | 1 | 38 | 10,189 | 14,305 | 16,701 | | 2 | 36 | 5,581 | 8,381 | 14,214 | | 3 | 13 | 5,354 | 7,955 | 13,630 | | 4 | 27 | 5,679 | 9,156 | 16,164 | | 5 | 16 | 5,158 | 8,657 | 17,276 | | Average | 26.0 | 7,512.2 | 9,710.8 | 15,597 | <sup style="font-size: smaller;">(Avg. Execution Time: 9,710.8 ms)</sup> ``` The city of Venice, located in the northeastern part of Italy, is renowned for its unique geographical features. Built on more than 100 small islands in a lagoon in the Adriatic Sea, it has no roads, just canals including the Grand Canal thoroughfare lined with Renaissance and Gothic palaces. The central square, Piazza San Marco, contains St. Mark's Basilica, which is tiled with Byzantine mosaics, and the Campanile bell tower offering views of the city's red roofs. ------------------------ The Amazon Rainforest, also known as Amazonia, is a moist broadleaf tropical rainforest in the Amazon biome that covers most of the Amazon basin of South America. This basin encompasses 7 million square kilometers, of which 5.5 million square kilometers are covered by the rainforest. This region includes territory belonging to nine nations and 3.4 million square kilometers of uncontacted tribes. The Amazon represents over half of the planet's remaining rainforests and comprises the largest and most biodiverse tract of tropical rainforest in the world. ------------------------ The Great Barrier Reef is the world's largest coral reef system composed of over 2,900 individual reefs and 900 islands stretching for over 2,300 kilometers over an area of approximately 344,400 square kilometers. The reef is located in the Coral Sea, off the coast of Queensland, Australia. The Great Barrier Reef can be seen from outer space and is the world's biggest single structure made by living organisms. This reef structure is composed of and built by billions of tiny organisms, known as coral polyps. ``` <sup style="font-size: smaller;">(Avg. Execution Time: 26.0 ms)</sup> ``` The city of Venice, located in the northeastern part of Italy, is renowned for its unique geographical features. Built on more than 100 small ------------------------ islands in a lagoon in the Adriatic Sea, it has no roads, just canals including the Grand Canal thoroughfare lined with Renaissance and ------------------------ Gothic palaces. The central square, Piazza San Marco, contains St. Mark's Basilica, which is tiled with Byzantine mosaics, ------------------------ and the Campanile bell tower offering views of the city's red roofs. The Amazon Rainforest, also known as Amazonia, ------------------------ is a moist broadleaf tropical rainforest in the Amazon biome that covers most of the Amazon basin of South America. This basin encompasses 7 ------------------------ million square kilometers, of which 5. 5 million square kilometers are covered by the rainforest. This region includes territory ------------------------ belonging to nine nations and 3. 4 million square kilometers of uncontacted tribes. The Amazon represents over ------------------------ half of the planet's remaining rainforests and comprises the largest and most biodiverse tract of tropical rainforest in the world. ------------------------ The Great Barrier Reef is the world's largest coral reef system composed of over 2, 900 individual reefs and 900 islands ------------------------ stretching for over 2, 300 kilometers over an area of approximately 344, 400 square kilometers. The reef is located in the ------------------------ Coral Sea, off the coast of Queensland, Australia. The Great Barrier Reef can be seen from outer space and is the world's ------------------------ biggest single structure made by living organisms. This reef structure is composed of and built by bil…
Motivation and Context
This PR is trying to help making it easier to build complex Copilot which is capable of commanding, Q&A, collaboration, suggestion, etc, in reliable ways.
A new FlowPlanner is introduced, which leverages the available skills, execute the plan in multi-step, multi-pass way, including interaction with users to get clarification on the goal, input for skills/functions, and authorization for actions when needed.
More details in #2164.
Description
Major changes
Contribution Checklist