Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.Net: New result types - FunctionResult and KernelResult #2864

Merged
merged 31 commits into from Sep 22, 2023

Conversation

dmytrostruk
Copy link
Member

@dmytrostruk dmytrostruk commented Sep 18, 2023

Motivation and Context

This PR contains changes to replace SKContext as result type with new types FunctionResult and KernelResult.

  1. FunctionResult - new return type from single function invocation. It contains object? Value which can be any primitive, complex type or IAsyncEnumerable<T>. It also contains SKContext, but internally. This is required to pass SKContext to the next function in pipeline and keep the implementation simple at first iteration. Context could be removed from FunctionResult if needed in the future. It's not publicly available as part of FunctionResult.
  2. KernelResult - new return type in Kernel.RunAsync method. It doesn't contain SKContext, just object? Value to get execution result.

FunctionResult also contains Metadata - property, that contains additional data, including AI model response (e.g. token usage).
KernelResult contains collection of FunctionResult - all function results from pipeline, so it's possible to check result of each function in pipeline, observe result value, AI-related information, like amount of tokens etc.

Syntax in examples and tests were changed from result.Result to result.GetValue<string>, but now it should be possible to get any type as a result and not only string.

Description

  1. Updated ISKFunction interface to return FunctionResult instead of SKContext.
  2. Updated IKernel interface to return KernelResult instead of SKContext.
  3. Updated NativeFunction to support IAsyncEnumerable<T> return type.
  4. Added tests to SKFunctionTests2 to verify the behavior for different result types.
  5. Removed test KernelTests.ItProvidesAccessToFunctionsViaSKContextAsync. Reason: Invalid scenario. Kernel should not provide public access to functions via SKContext.
  6. Updated tests and examples across the codebase to align with new signature.

Contribution Checklist

  • The code builds clean without any errors or warnings
  • The PR follows the SK Contribution Guidelines and the pre-submission formatting script raises no violations
  • All unit tests pass, and I have added new tests where possible
  • I didn't break anyone 😄
    • BREAKING CHANGE: This PR will modify syntax of getting result using ISKFunction.InvokeAsync and IKernel.RunAsync methods. Syntax changed from SKContext.Result to FunctionResult/KernelResult.GetValue<T>().

@dmytrostruk dmytrostruk requested a review from a team as a code owner September 18, 2023 21:00
@shawncal shawncal added .NET Issue or Pull requests regarding .NET code kernel Issues or pull requests impacting the core kernel kernel.core labels Sep 18, 2023
@dmytrostruk dmytrostruk added the PR: breaking change Pull requests that introduce breaking changes label Sep 18, 2023
@dmytrostruk dmytrostruk self-assigned this Sep 18, 2023
Copy link
Member

@markwallace-microsoft markwallace-microsoft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dmytrostruk can you create an ADR for this change. This will be helpful for the community and the Java team.

@shawncal shawncal added the docs and tests Improvements or additions to documentation label Sep 21, 2023
@dmytrostruk dmytrostruk added PR: ready for review All feedback addressed, ready for reviews PR: ready to merge PR has been approved by all reviewers, and is ready to merge. labels Sep 21, 2023
@dmytrostruk dmytrostruk added this pull request to the merge queue Sep 22, 2023
Merged via the queue into microsoft:main with commit 544b6c1 Sep 22, 2023
18 checks passed
@dmytrostruk dmytrostruk deleted the new-result-types branch September 22, 2023 15:43
lemillermicrosoft added a commit to gitri-ms/semantic-kernel that referenced this pull request Sep 23, 2023
commit 2df1499
Author: Lee Miller <lemiller@microsoft.com>
Date:   Fri Sep 22 15:39:56 2023 -0700

    .Net: Refactor PlannerConfig classes for better organization (microsoft#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 microsoft#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 😄

commit 4a2cf70
Author: Lee Miller <lemiller@microsoft.com>
Date:   Fri Sep 22 12:07:27 2023 -0700

    .Net: Add new token counter implementations to TextChunker (microsoft#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 microsoft#2809

    Fixes microsoft#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 billions of tiny organisms, known as coral polyps.
    ```
    <sup style="font-size: smaller;">(Avg. Execution Time: 7,512.2 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: 15,597 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.
    ```

    <!-- 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 😄

commit 544b6c1
Author: Dmytro Struk <13853051+dmytrostruk@users.noreply.github.com>
Date:   Fri Sep 22 16:37:57 2023 +0100

    .Net: New result types - FunctionResult and KernelResult (microsoft#2864)

    <!-- 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 contains changes to replace `SKContext` as result type with new
    types `FunctionResult` and `KernelResult`.

    1. `FunctionResult` - new return type from single function invocation.
    It contains `object? Value` which can be any primitive, complex type or
    `IAsyncEnumerable<T>`. It also contains `SKContext`, but internally.
    This is required to pass `SKContext` to the next function in pipeline
    and keep the implementation simple at first iteration. Context could be
    removed from `FunctionResult` if needed in the future. It's not publicly
    available as part of `FunctionResult`.
    2. `KernelResult` - new return type in `Kernel.RunAsync` method. It
    doesn't contain `SKContext`, just `object? Value` to get execution
    result.

    `FunctionResult` also contains `Metadata` - property, that contains
    additional data, including AI model response (e.g. token usage).
    `KernelResult` contains collection of `FunctionResult` - all function
    results from pipeline, so it's possible to check result of each function
    in pipeline, observe result value, AI-related information, like amount
    of tokens etc.

    Syntax in examples and tests were changed from `result.Result` to
    `result.GetValue<string>`, but now it should be possible to get any type
    as a result and not only string.

    <!-- Describe your changes, the overall approach, the underlying design.
    These notes will help understanding how your code works. Thanks! -->
    1. Updated `ISKFunction` interface to return `FunctionResult` instead of
    `SKContext`.
    2. Updated `IKernel` interface to return `KernelResult` instead of
    `SKContext`.
    3. Updated `NativeFunction` to support `IAsyncEnumerable<T>` return
    type.
    4. Added tests to `SKFunctionTests2` to verify the behavior for
    different result types.
    5. Removed test
    `KernelTests.ItProvidesAccessToFunctionsViaSKContextAsync`. Reason:
    Invalid scenario. Kernel should not provide public access to functions
    via `SKContext`.
    6. Updated tests and examples across the codebase to align with new
    signature.

    <!-- 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 😄
    - BREAKING CHANGE: This PR will modify syntax of getting result using
    `ISKFunction.InvokeAsync` and `IKernel.RunAsync` methods. Syntax changed
    from `SKContext.Result` to `FunctionResult/KernelResult.GetValue<T>()`.

commit bf9c1fc
Author: Mark Wallace <127216156+markwallace-microsoft@users.noreply.github.com>
Date:   Fri Sep 22 14:38:13 2023 +0100

    .Net: Rename 'Skills' -> 'Plugins' - Part 8 Update plugin names, descriptions, and parameters (microsoft#2940)

    - [ ] 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 😄
    This pull request updates plugin names, descriptions, and parameters in
    the Semantic Kernel project. Specifically, it updates the descriptions
    for several connectors and planners to refer to Semantic Kernel plugins
    instead of skills, and renames the 'FunSkill' plugin to 'FunPlugin'.
    Additionally, it updates the 'executionParameters' parameter to
    'functionExecutionParameters'.
    - Updated descriptions for Chroma, DuckDB, Milvus, Pinecone, Postgres,
    Qdrant, Redis, SQLite, and Weaviate connectors to refer to Semantic
    Kernel plugins instead of skills
    - Updated SequentialPlanner and ActionPlanner to exclude plugins instead
    of skills
    - Renamed 'FunSkill' plugin to 'FunPlugin' in OpenAPI documents
    - Renamed 'executionParameters' parameter to
    'functionExecutionParameters' in OpenAPI documents

    ---
    *Powered by [Microsoft Semantic
    Kernel](https://github.com/microsoft/semantic-kernel)*

commit 48b6e2a
Author: Mark Wallace <127216156+markwallace-microsoft@users.noreply.github.com>
Date:   Fri Sep 22 13:57:00 2023 +0100

    .Net: Rename 'Skills' -> 'Plugins' - Part 7 Update .md files terminology from SKILLS to PLUGINS (microsoft#2939)

    Replace `Skill` with `Plugin` in docs and dotnet readme's

    - [ ] 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 😄
    This set of commits updates the terminology used in the project from
    SKILLS to PLUGINS. SKILLS have been renamed to PLUGINS throughout the
    codebase, and related documentation and comments have been updated
    accordingly. Additionally, the telemetry metrics have been updated to
    reflect the new naming convention.
    - Rename SKILLS to PLUGINS throughout the codebase
    - Update related documentation and comments
    - Update telemetry metrics to reflect new naming convention

    ---
    *Powered by [Microsoft Semantic
    Kernel](https://github.com/microsoft/semantic-kernel)*

commit ef4c5a5
Author: Mark Wallace <127216156+markwallace-microsoft@users.noreply.github.com>
Date:   Fri Sep 22 11:24:42 2023 +0100

    .Net: Rename 'Skills' -> 'Plugins' - Part 6 Updates to MsGraphSkillsExample, OpenApiPluginsExample, and graph-api-skills projects (microsoft#2938)

    - Rename MsGraphSkillsExample
    - Rename OpenApiSkillsExample

    - [ ] 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 😄
    This pull request includes updates to three different projects. In the
    MsGraphSkillsExample project, the name has been changed to
    MsGraphPluginsExample to better reflect the nature of the project as a
    set of plugins rather than skills. In the OpenApiPluginsExample project,
    the OpenAPI skills have been renamed to OpenAPI plugins throughout the
    project, and the GitHub plugin has been updated to use a new API key
    configuration option.
    - Renamed MsGraphSkillsExample project to MsGraphPluginsExample
    - Updated all relevant files and references to reflect the new project
    name
    - Changed references to 'skills' to 'plugins' in RepoFiles.cs
    - Updated README.md to reflect the new project name and purpose
    - Changed exception message in YourAppException.cs to reflect the new
    project name
    - Renamed AzureOpenAIConfiguration.cs, OpenAIConfiguration.cs,
    Program.cs, and README.md to reflect the new project name and purpose
    - Updated the OpenApiSkillsExample project to use the new GitHubPlugin
    instead of the deprecated GitHubSkill.
    - Renamed the 'openapi-skills' directory to 'OpenApiPluginsExample'.
    - Updated the README.md file to reflect the changes and to use the term
    'plugin' instead of 'skill'.
    - Renamed the 'RequiredOnPropertyValueAttribute.cs' file to
    'OpenApiPluginsExample'.
    - Updated the 'appsettings.json' file to use the new GitHubPlugin
    options.

    ---
    *Powered by [Microsoft Semantic
    Kernel](https://github.com/microsoft/semantic-kernel)*

commit 559d6f3
Author: Mark Wallace <127216156+markwallace-microsoft@users.noreply.github.com>
Date:   Fri Sep 22 10:38:38 2023 +0100

    .Net: Rename the folder containing the SemanticKernel.Core project (microsoft#2919)

    Rename the folder containing the SemanticKernel.Core project to match
    the project name

    - [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: Roger Barreto <19890735+RogerBarreto@users.noreply.github.com>

commit 4d7dfe3
Author: Anthony Puppo <anthonyosx@gmail.com>
Date:   Fri Sep 22 05:36:30 2023 -0400

    .Net: Stream response should not skip white space (microsoft#2922)
    The current Azure OpenAI streaming implementation skips white space (ie.
    space character token ID 220). All non-empty tokens should be streamed,
    including space characters. This is rare as most tokens are prefixed
    with a space by default, but still an issue in some cases (such as
    formatted markdown, code, etc).

    Fixes microsoft#2921
    Modify the streaming logic to check for null or empty instead of null,
    empty and white space.

    <!-- 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: Roger Barreto <19890735+RogerBarreto@users.noreply.github.com>

commit 810627a
Author: SergeyMenshykh <68852919+SergeyMenshykh@users.noreply.github.com>
Date:   Fri Sep 22 09:58:51 2023 +0100

    .Net: [OpenAPI] Removing duplication in parameters serialization functionality (microsoft#2923)

    The `FormStyleParameterSerializer` and
    `SpaceDelimitedStyleParameterSerializer` classes currently share similar
    serialization logic for array-type parameters. The upcoming PR
    introduces the `PipeDelimitedStyleParameterSerializer` class, which adds
    a similar but slightly different serialization functionality. To prevent
    code duplication, the common serialization logic is moved to the
    `ArrayParameterValueSerializer` class.

    Related issue - microsoft#2745

    - The `ArrayParameterValueSerializer` class has been added to contain
    common serialization functionality for parameters of an array type.
    - The `FormStyleParameterSerializer` and
    `SpaceDelimitedStyleParameterSerializer` classes have been modified to
    delegate array parameter serialization to the
    `ArrayParameterValueSerializer` class.

    <!-- 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 😄

commit e3868df
Author: Mark Wallace <127216156+markwallace-microsoft@users.noreply.github.com>
Date:   Fri Sep 22 07:08:23 2023 +0100

    .Net: Rename 'Skills' -> 'Plugins' - Part 5 (microsoft#2918)

    - Update samples to use plugins and not skills
    - Update integration tests to use plugins and not skills
    - Switch to using the sample semantic plugins

    - [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: Lee Miller <lemiller@microsoft.com>

commit 283a0de
Author: Anthony Puppo <anthonyosx@gmail.com>
Date:   Thu Sep 21 18:35:49 2023 -0400

    .Net: Update AggregatePartitionedResultsAsync method definition with additional arguments (microsoft#2731)

    The existing `AggregatePartitionedResultsAsync` extension method doesn't
    expose common arguments used when invoking functions and makes an
    assumption on how to separate results.

    Update the `AggregatePartitionedResultsAsync` method definition with
    additional arguments to both utilize and proxy through to `InvokeAsync`.

    <!-- 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: Lee Miller <lemiller@microsoft.com>
lemillermicrosoft added a commit to lemillermicrosoft/semantic-kernel that referenced this pull request Sep 28, 2023
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&lt;T&gt;.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 billions of tiny organisms, known as coral polyps.
    ```
    <sup style="font-size: smaller;">(Avg. Execution Time: 7,512.2 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: 15,597 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.
    ```

    <!-- 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 544b6c122b038ffeb176a62f79b81e7586d3dcdb
Author: Dmytro Struk <13853051+dmytrostruk@users.noreply.github.com>
Date:   Fri Sep 22 16:37:57 2023 +0100

    .Net: New result types - FunctionResult and KernelResult (#2864)

    <!-- 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 contains changes to replace `SKContext` as result type with new
    types `FunctionResult` and `KernelResult`.

    1. `FunctionResult` - new return type from single function invocation.
    It contains `object? Value` which can be any primitive, complex type or
    `IAsyncEnumerable<T>`. It also contains `SKContext`, but internally.
    This is required to pass `SKContext` to the next function in pipeline
    and keep the implementation simple at first iteration. Context could be
    removed from `FunctionResult` if needed in the future. It's not publicly
    available as part of `FunctionResult`.
    2. `KernelResult` - new return type in `Kernel.RunAsync` method. It
    doesn't contain `SKContext`, just `object? Value` to get execution
    result.

    `FunctionResult` also contains `Metadata` - property, that contains
    additional data, including AI model response (e.g. token usage).
    `KernelResult` contains collection of `FunctionResult` - all function
    results from pipeline, so it's possible to check result of each function
    in pipelin…
@stephentoub
Copy link
Member

Was just updating to use the new SK beta that has this. Did we consider overriding ToString to make experimentation / prototyping with this a bit easier? e.g.

public override string ToString() => Value?.ToString() ?? base.ToString();

or something like that?

Related, what do we expect a consumer to do if they don't know the T that the function might return? The only API available to get back any information about it is GetValue<T>.

@dmytrostruk
Copy link
Member Author

Did we consider overriding ToString to make experimentation / prototyping with this a bit easier?

@stephentoub I thought about that, but this is something that can be provided separately as extension method to FunctionResult (e.g. ReadAsString()) or implemented on users' side, if user mainly works with strings. I decided to avoid ToString override, because type of Value property will be forced to have meaningful ToString override as well. Otherwise, if it's custom type for example, we will return typeof(T).FullName, which won't provide additional benefits. In my opinion, FunctionResult should remain type-agnostic.

what do we expect a consumer to do if they don't know the T that the function might return?

It depends on return type of last function in pipeline.

  • If it's Semantic Function - return type will be always string.
  • If it's Native Function - return type will be always the same as return type of invoked function.

Also, it's possible to get plain .GetValue<object> and then try to cast it to any potential return types and see if it's successful.
Another way would be to try to search for potential TypeConverter, and convert object to another known type, as we did in in StepwisePlanner, since in planning functionality we don't know about last function return type in generated plan:

var kernelResult = await this._kernel.RunAsync(targetFunction, vars, cancellationToken).ConfigureAwait(false);
var resultObject = kernelResult.GetValue<object>();
var converter = TypeDescriptor.GetConverter(resultObject);
if (converter.CanConvertTo(typeof(string)))
{
result = converter.ConvertToString(resultObject);
}

If function pipeline is static (i.e., last function in pipeline will be always the same), and user doesn't know its return type, when user will try to cast it to invalid type, the exception will mention type of Value property which should be used for casting.

@stephentoub
Copy link
Member

because type of Value property will be forced to have meaningful ToString override as well.

It won't be forced to. If it doesn't, you'll get its type name, which is no worse than getting the type name of "FunctionResult". And without either a ToString or a DebuggerDisplay attribute, it's harder to use in a debugger, eg you need to expand it in a watch to see anything useful.

Everywhere I previously just output the result of a function invocation, I now need to know about and use .GetValue<object>(). It's less condusive to quick tests and experimentation and prototyping.

As a point of reference, there are multiple container types in .NET that serve to just wrap some T with additional functionality, like Lazy, Nullable, and ThreadLocal, and that override ToString to delegate to the wrapped T's ToString. It's not intended to be something someone parses and consumes programmatically, but an aid for logging, debugging, etc.

@dmytrostruk
Copy link
Member Author

Everywhere I previously just output the result of a function invocation, I now need to know about and use .GetValue<object>(). It's less condusive to quick tests and experimentation and prototyping.

I agree, but taking into account that we are on the way to v1.0 and usage of SK in production environments, is it something that we want to deliver out of the box? We can add DebuggerDisplay attribute to simplify debugging process, but ToString override, as you said, it's something that is useful for tests and prototyping, but should not be used in production environments.

If you have some business scenario in production, you should know about the result type you expect to be returned from Kernel, so you can take it and handle it as needed.

@stephentoub
Copy link
Member

Are Lazy<T>, Nullable<T>, ThreadLocal<T>, every arity of Tuple<...> and ValueTuple<...>, etc. not meant for production environments?

@dmytrostruk
Copy link
Member Author

Are Lazy<T>, Nullable<T>, ThreadLocal<T>, every arity of Tuple<...> and ValueTuple<...>, etc. not meant for production environments?

Sorry, I missed that part about these types and their ToString overrides. If this is common implementation, then I will add ToString override as well as DebuggerDisplay attribute and we will deliver it as part of next release. Thanks for the information!

SOE-YoungS pushed a commit to SOE-YoungS/semantic-kernel that referenced this pull request Nov 1, 2023
)

### Motivation and Context

<!-- 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 contains changes to replace `SKContext` as result type with new
types `FunctionResult` and `KernelResult`.

1. `FunctionResult` - new return type from single function invocation.
It contains `object? Value` which can be any primitive, complex type or
`IAsyncEnumerable<T>`. It also contains `SKContext`, but internally.
This is required to pass `SKContext` to the next function in pipeline
and keep the implementation simple at first iteration. Context could be
removed from `FunctionResult` if needed in the future. It's not publicly
available as part of `FunctionResult`.
2. `KernelResult` - new return type in `Kernel.RunAsync` method. It
doesn't contain `SKContext`, just `object? Value` to get execution
result.

`FunctionResult` also contains `Metadata` - property, that contains
additional data, including AI model response (e.g. token usage).
`KernelResult` contains collection of `FunctionResult` - all function
results from pipeline, so it's possible to check result of each function
in pipeline, observe result value, AI-related information, like amount
of tokens etc.

Syntax in examples and tests were changed from `result.Result` to
`result.GetValue<string>`, but now it should be possible to get any type
as a result and not only string.

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->
1. Updated `ISKFunction` interface to return `FunctionResult` instead of
`SKContext`.
2. Updated `IKernel` interface to return `KernelResult` instead of
`SKContext`.
3. Updated `NativeFunction` to support `IAsyncEnumerable<T>` return
type.
4. Added tests to `SKFunctionTests2` to verify the behavior for
different result types.
5. Removed test
`KernelTests.ItProvidesAccessToFunctionsViaSKContextAsync`. Reason:
Invalid scenario. Kernel should not provide public access to functions
via `SKContext`.
6. Updated tests and examples across the codebase to align with new
signature.

### Contribution Checklist

<!-- 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 😄
- BREAKING CHANGE: This PR will modify syntax of getting result using
`ISKFunction.InvokeAsync` and `IKernel.RunAsync` methods. Syntax changed
from `SKContext.Result` to `FunctionResult/KernelResult.GetValue<T>()`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs and tests Improvements or additions to documentation kernel Issues or pull requests impacting the core kernel .NET Issue or Pull requests regarding .NET code PR: breaking change Pull requests that introduce breaking changes PR: ready for review All feedback addressed, ready for reviews PR: ready to merge PR has been approved by all reviewers, and is ready to merge.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

8 participants