Files
semantic-kernel/python/tests/unit
tim-gillandDevis Lucato d9028ee44f Add new relative time skills for ' ago' and 'last ' (#927)
### Motivation and Context

The change enables the planner to make use of time references like "last
wednesday" or "three days ago" which currently cause issues. This
enables better use of SequentialPlanner when servicing user intent.
Issue: https://github.com/microsoft/semantic-kernel/issues/922

### Description

This adds two new functions to the core TimeSkill class in both .net and
python.
1. DaysAgo(str days) - takes an argument representing a number of days
and offsets it from the current date to return the resultant date as the
answer.
2. LastMatchingDay(str dayName) - takes the name of a day of the week
and works backwards from yesterday to give it the first matching date of
that day (e.g. "last wednesday"). Currently it only works with English
day names, and this is reflected in the prompt description.

Simple unit tests are added for each function.

Co-authored-by: Devis Lucato <[email protected]>
2023-05-25 15:47:21 -07:00
..
2023-04-21 12:47:37 -07:00