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: remove list todays events tool from outlook calendar #329

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions outlook/calendar/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,6 @@ func main() {
fmt.Println(err)
os.Exit(1)
}
case "listEventsToday":
now := time.Now()
start := time.Date(now.Year(), now.Month(), now.Day(), 0, 0, 0, 0, now.Location())
end := time.Date(now.Year(), now.Month(), now.Day(), 23, 59, 59, 0, now.Location())
if err := commands.ListEvents(context.Background(), start, end); err != nil {
fmt.Println(err)
os.Exit(1)
}
case "listEvents":
start, end, err := parseStartEnd(os.Getenv("START"), os.Getenv("END"), false)
if err != nil {
Expand Down
23 changes: 4 additions & 19 deletions outlook/calendar/tool.gpt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Name: Outlook Calendar
Metadata: bundle: true
Description: Tools for interacting with Microsoft Outlook Calendar.
Share Tools: List Calendars, List Events Today, List Events, Get Event Details, Create Event, Invite User To Event, Delete Event, Search Events, Respond To Event
Share Tools: List Calendars, List Events, Get Event Details, Create Event, Invite User To Event, Delete Event, Search Events, Respond To Event

---
Name: List Calendars
Expand All @@ -12,15 +12,6 @@ Credential: ./credential

#!${GPTSCRIPT_TOOL_DIR}/bin/gptscript-go-tool listCalendars

---
Name: List Events Today
Description: List all events for today in all calendars available to the user.
Share Context: Outlook Calendar Context
Tools: github.com/gptscript-ai/datasets/filter
Credential: ./credential

#!${GPTSCRIPT_TOOL_DIR}/bin/gptscript-go-tool listEventsToday

---
Name: List Events
Description: List all events in the given time frame in all calendars available to the user.
Expand Down Expand Up @@ -139,15 +130,9 @@ You have access to tools for the Microsoft Outlook Calendar API.

Do not output calendar IDs or event IDs because they are not helpful for the user.

If creating a date/time in the UTC timezone, it must end with 'Z' to properly denote it's for UTC.

Display all dates and times in the user's preferred timezone.

When the user uses relative terms like "today", "tomorrow", or "last week", assume the date is the current day in the user's preferred timezone.

When the user asks you to create or modify events, assume that any dates or times they provide are in their preferred timezone unless otherwise stated.
Convert all dates and times to the user's local timezone before determining if you should include them in the response to the user. Always display events to the user in their preferred timezone unless otherwise specified by the user.

Ensure dates and times are converted properly to the user's default timezone when displaying them to the user.
When the user asks to create or modify events, assume that any dates or times they provide are in their preferred timezone unless otherwise stated by the user.

When listing events from different calendars and/or groups, show them grouped together and labeled using the name of the calender owner so that the user knows which calendar or group the event is from.

Expand Down Expand Up @@ -206,4 +191,4 @@ Outlook Calendar

---
!metadata:*:oauth
microsoft365
microsoft365