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

Fix day format in TimeSkill #1466

Merged
merged 3 commits into from
Jun 15, 2023

Conversation

lemillermicrosoft
Copy link
Member

@lemillermicrosoft lemillermicrosoft commented Jun 13, 2023

The TimeSkill class was using the wrong format specifier for the day of the month, resulting in a two-digit year instead. This commit changes the format from "DD" to "dd", which correctly outputs the day as a number from 01 to 31. This fixes a potential confusion and inconsistency in the output of the TimeSkill methods.

Contribution Checklist

@github-actions github-actions bot added .NET Issue or Pull requests regarding .NET code kernel.core labels Jun 13, 2023
@lemillermicrosoft lemillermicrosoft marked this pull request as ready for review June 14, 2023 01:24
@lemillermicrosoft
Copy link
Member Author

lemillermicrosoft commented Jun 14, 2023

Needed for #1472 scenarios

@lemillermicrosoft lemillermicrosoft added the PR: ready for review All feedback addressed, ready for reviews label Jun 14, 2023
@lemillermicrosoft lemillermicrosoft self-assigned this Jun 14, 2023
amsacha
amsacha previously approved these changes Jun 14, 2023
The TimeSkill class was using the wrong format specifier for the day
of the month, resulting in a two-digit year instead. This commit
changes the format from "DD" to "dd", which correctly outputs the day
as a number from 01 to 31. This fixes a potential confusion and
inconsistency in the output of the TimeSkill methods.
This commit adds a new method to the TimeSkill class that returns the
current day of the month as a string. The method uses the current
culture to format the day. The commit also adds a unit test for the
new method, checking that the returned value matches the expected one
and is a valid integer. This method can be useful for scenarios that
require getting or comparing the current day.
@github-actions github-actions bot added the kernel Issues or pull requests impacting the core kernel label Jun 15, 2023
@lemillermicrosoft lemillermicrosoft enabled auto-merge (squash) June 15, 2023 19:49
@lemillermicrosoft lemillermicrosoft added the PR: ready to merge PR has been approved by all reviewers, and is ready to merge. label Jun 15, 2023
@lemillermicrosoft lemillermicrosoft merged commit e30229a into microsoft:main Jun 15, 2023
@lemillermicrosoft lemillermicrosoft added this to the Sprint 33 milestone Jun 20, 2023
github-merge-queue bot pushed a commit that referenced this pull request Jun 26, 2023
### Motivation and Context
This pull request adds a new extension for semantic planning using a
stepwise approach. The StepwisePlanner extension allows users to create
and execute plans that consist of a sequence of semantic and native
functions, each with a goal and a set of inputs and outputs. The
extension uses a semantic search engine to find relevant functions for
each step, and a plan creation service to generate a plan that satisfies
the user's ask. The extension also provides a system step function that
executes the plan and returns the final answer and intermediate
observations. The extension can be configured with various parameters,
such as the relevancy threshold, the maximum number of relevant
functions, the excluded and included functions and skills, and the
maximum number of tokens, iterations, and time for the plan.

Regarding #1472

### Description
- Add StepwisePlanner.cs, which registers the planner native functions
and the system step function
- Add StepwisePlannerConfig.cs, which defines the configuration options
for the StepwisePlanner extension
- Add SystemStep.cs, which represents a step in a Stepwise plan, with
properties for the thought, action, action variables, observation, final
answer, and original response
- Add helper methods for formatting and validating function views,
generating plan requests, and invoking the plan.
- Add logging and error handling for the planner extension
- Add unit tests for the planner extension and the native functions

### Related
- Majority of work initially started from @kaza in #992 

### Changes in other PRs to merge separately
- #1464
- #1465 
- #1466 

### Contribution Checklist
<!-- Before submitting this PR, please make sure: -->
- [x] The code builds clean without any errors or warnings
- [x] The PR follows SK Contribution Guidelines
(https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
- [x] The code follows the .NET coding conventions
(https://learn.microsoft.com/dotnet/csharp/fundamentals/coding-style/coding-conventions)
verified with `dotnet format`
- [x] All unit tests pass, and I have added new tests where possible
- [x] I didn't break anyone 😄

---------

Co-authored-by: Almir Kazazic <kaza@users.noreply.github.com>

---------

Co-authored-by: Lee Miller <lemillermicrosoft@users.noreply.github.com>
shawncal pushed a commit to shawncal/semantic-kernel that referenced this pull request Jul 6, 2023
The TimeSkill class was using the wrong format specifier for the day of
the month, resulting in a two-digit year instead. This commit changes
the format from "DD" to "dd", which correctly outputs the day as a
number from 01 to 31. This fixes a potential confusion and inconsistency
in the output of the TimeSkill methods.

Co-authored-by: Lee Miller <lemillermicrosoft@users.noreply.github.com>
shawncal pushed a commit to shawncal/semantic-kernel that referenced this pull request Jul 6, 2023
### Motivation and Context
This pull request adds a new extension for semantic planning using a
stepwise approach. The StepwisePlanner extension allows users to create
and execute plans that consist of a sequence of semantic and native
functions, each with a goal and a set of inputs and outputs. The
extension uses a semantic search engine to find relevant functions for
each step, and a plan creation service to generate a plan that satisfies
the user's ask. The extension also provides a system step function that
executes the plan and returns the final answer and intermediate
observations. The extension can be configured with various parameters,
such as the relevancy threshold, the maximum number of relevant
functions, the excluded and included functions and skills, and the
maximum number of tokens, iterations, and time for the plan.

Regarding microsoft#1472

### Description
- Add StepwisePlanner.cs, which registers the planner native functions
and the system step function
- Add StepwisePlannerConfig.cs, which defines the configuration options
for the StepwisePlanner extension
- Add SystemStep.cs, which represents a step in a Stepwise plan, with
properties for the thought, action, action variables, observation, final
answer, and original response
- Add helper methods for formatting and validating function views,
generating plan requests, and invoking the plan.
- Add logging and error handling for the planner extension
- Add unit tests for the planner extension and the native functions

### Related
- Majority of work initially started from @kaza in microsoft#992 

### Changes in other PRs to merge separately
- microsoft#1464
- microsoft#1465 
- microsoft#1466 

### Contribution Checklist
<!-- Before submitting this PR, please make sure: -->
- [x] The code builds clean without any errors or warnings
- [x] The PR follows SK Contribution Guidelines
(https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
- [x] The code follows the .NET coding conventions
(https://learn.microsoft.com/dotnet/csharp/fundamentals/coding-style/coding-conventions)
verified with `dotnet format`
- [x] All unit tests pass, and I have added new tests where possible
- [x] I didn't break anyone 😄

---------

Co-authored-by: Almir Kazazic <kaza@users.noreply.github.com>

---------

Co-authored-by: Lee Miller <lemillermicrosoft@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kernel Issues or pull requests impacting the core kernel .NET Issue or Pull requests regarding .NET code 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.

2 participants