Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
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 😄
  • Loading branch information
lemillermicrosoft committed Sep 25, 2023
1 parent fbd0afd commit 19be044
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public abstract class PlannerConfigBase
/// <summary>
/// Delegate to get the prompt template string.
/// </summary>
public Func<string>? GetPromptTemplate { get; set; }
public Func<string>? GetPromptTemplate { get; set; } = null;

/// <summary>
/// A list of plugins to exclude from the plan creation request.
Expand Down

0 comments on commit 19be044

Please sign in to comment.