Skip to content

Commit 5f42649

Browse files
tybalexg-linville
andauthored
enhance: add support to get past meeting instances (#465)
* enhance: add support to get past meeting instances and prompts for PMI instances * enhance: prompt agent to be better aware of date & time, and the case of instant meetings in personal meeting rooms * fix: add logger to print some debug log to stderr * fix: Update zoom/tools/helper.py Co-authored-by: Grant Linville <[email protected]> * fix: typo fix as Grant pointed out --------- Co-authored-by: Grant Linville <[email protected]>
1 parent dab183e commit 5f42649

File tree

4 files changed

+167
-66
lines changed

4 files changed

+167
-66
lines changed

zoom/tool.gpt

Lines changed: 28 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
Name: Zoom
33
Description: Tools for interacting with Zoom
44
Metadata: bundle: true
5-
Share Tools: Get User, Create Meeting, Update Meeting, List Meeting Templates, Get Meeting, Delete Meeting, List Meetings, List Upcoming Meetings, Get Meeting Invitation, Get Meeting Recordings, List User Recordings, Get Meeting Summary, Get Past Meeting Details, List Available Timezones
5+
Share Tools: Get User, Create Meeting, Update Meeting, List Meeting Templates, Get Meeting, Delete Meeting, List Meetings, List Upcoming Meetings, List Past Meeting Instances, Get Past Meeting Details, Get Meeting Invitation, Get Meeting Recordings, List User Recordings, Get Meeting Summary, List Available Timezones
66

77
---
88
Name: Get User
9-
Description: Get the information of the current zoom user. In the response, `type` will indicate user's plan type. 1 - Basic. 2 - Licensed. 4 - Unassigned without Meetings Basic. 99 - None, which can only be set with ssoCreate.
9+
Description: Get the information of the current zoom user. In the response, `type` will indicate user's plan type. 1 - Basic. 2 - Licensed. 4 - Unassigned without Meetings Basic. 99 - None, which can only be set with ssoCreate. This also returns the user's Personal Meeting ID(PMI).
1010
Credential: ./credential
1111
Share Context: Zoom Context
1212

@@ -33,7 +33,7 @@ Param: timezone: Optional. The timezone of the meeting, if not provided, the mee
3333
Param: topic: Optional. Defaults to empty. The topic of the meeting, up to 2000 characters
3434
Param: meeting_type: Optional. Defaults to 2(scheduled meeting). The type of the meeting: 1 for instant meeting, 2 for scheduled meeting, 3 for recurring meeting with no fixed time, 8 for recurring meeting with fixed time, 10 for screen share only meeting
3535
Param: recurrence: Optional. Use this only for a meeting with meeting_type 8, a recurring meeting with a fixed time. Defaults to empty. If provided, it must be a valid JSON string that can be loaded with json.loads(). Attributes of the recurrence object are -- end_date_time (string, date-time): Select the final date when the meeting will recur before it is canceled. Should be in UTC time, such as 2017-11-25T12:00:00Z. Cannot be used with end_times. | end_times (integer, max: 60, default: 1): Select how many times the meeting should recur before it is canceled. If end_times is set to 0, it means there is no end time. The maximum number of recurring is 60. Cannot be used with end_date_time. | monthly_day (integer, default: 1): Use this field only if you're scheduling a recurring meeting of type 3 to state the day in a month when the meeting should recur. The value range is from 1 to 31. For the meeting to recur on 23rd of each month, provide 23 as this field's value and 1 as the repeat_interval field's value. To have the meeting recur every three months on the 23rd, change the repeat_interval field value to 3. | monthly_week (integer, enum: -1, 1, 2, 3, 4): Use this field only if you're scheduling a recurring meeting of type 3 to state the week of the month when the meeting should recur. If you use this field, you must also use the monthly_week_day field to state the day of the week when the meeting should recur. -1 = Last week of the month, 1 = First week, 2 = Second week, 3 = Third week, 4 = Fourth week. | monthly_week_day (integer, enum: 1, 2, 3, 4, 5, 6, 7): Use this field only if you're scheduling a recurring meeting of type 3 to state a specific day in a week when the monthly meeting should recur. To use this field, you must also use the monthly_week field. 1 = Sunday, 2 = Monday, 3 = Tuesday, 4 = Wednesday, 5 = Thursday, 6 = Friday, 7 = Saturday. | repeat_interval (integer): Define the interval when the meeting should recur. For instance, to schedule a meeting that recurs every two months, set this field's value as 2 and the value of the type parameter as 3. For a daily meeting, the maximum number of recurrences is 99 days. For a weekly meeting, the maximum is 50 weeks. For a monthly meeting, the maximum is 10 months. | type (integer, enum: 1, 2, 3, required): Recurrence meeting types. 1 = Daily, 2 = Weekly, 3 = Monthly. | weekly_days (string, enum: 1, 2, 3, 4, 5, 6, 7, default: 1): Required if you're scheduling a recurring meeting of type 2 to state the days of the week when the meeting should repeat. This field's value could be a number between 1 to 7 in string format. For instance, if the meeting should recur on Sunday, provide "1" as this field's value. To set the meeting to occur on multiple days of a week, provide comma-separated values. For instance, for Sundays and Tuesdays, provide "1,3". 1 = Sunday, 2 = Monday, 3 = Tuesday, 4 = Wednesday, 5 = Thursday, 6 = Friday, 7 = Saturday.
36-
36+
Param: auto_start_meeting_summary: Optional. Default to false. Set to true to automatically start Zoom's AI meeting summary.
3737

3838
#!/usr/bin/env python3 ${GPTSCRIPT_TOOL_DIR}/main.py CreateMeeting
3939

@@ -50,15 +50,16 @@ Param: duration: Optional. The duration of the meeting in minutes
5050
Param: password: Optional. The password for the meeting, if not provided, a random password will be generated
5151
Param: pre_schedule: Optional. Whether to create a prescheduled meeting. This only supports the meeting type value of 2 (scheduled meetings) and 3 (recurring meetings with no fixed time).
5252
Param: audio_recording: Optional. none, local or cloud. The audio recording setting for the meeting
53-
Param: contact_email: Optional. The email of the contact for the meeting, should be user's email
54-
Param: contact_name: Optional. The name of the contact for the meeting, should be user's name
53+
Param: contact_email: Optional. The email of the contact for the meeting, should be user's email
54+
Param: contact_name: Optional. The name of the contact for the meeting, should be user's name
5555
Param: private_meeting: Optional. Whether the meeting is private
5656
Param: start_time: Optional. The meeting's start time. This field is only used for scheduled or recurring meetings with a fixed time. This supports local time and GMT formats.To set a meeting's start time in GMT, use the yyyy-MM-ddTHH:mm:ssZ date-time format. For example, 2020-03-31T12:02:00Z. To set a meeting's start time using a specific timezone, use the yyyy-MM-ddTHH:mm:ss date-time format and specify the timezone ID in the timezone field. If you do not specify a timezone, the timezone value defaults to your Zoom account's timezone. You can also use UTC for the timezone value. Note: If no start_time is set for a scheduled meeting, the start_time is set at the current time and the meeting type changes to an instant meeting, which expires after 30 days.
5757
Param: meeting_template_id: Optional. The ID of the meeting template to use.
5858
Param: timezone: Optional. The timezone of the meeting, if not provided, the meeting will be created in the user's account timezone.
5959
Param: topic: Optional. The topic of the meeting, up to 2000 characters
6060
Param: meeting_type: Optional. The type of the meeting. 1 for instant meeting, 2 for scheduled meeting, 3 for recurring meeting with no fixed time, 8 for recurring meeting with fixed time, 10 for screen share only meeting
6161
Param: recurrence: Optional. Use this only for a meeting with meeting_type 8, a recurring meeting with a fixed time. If provided, it must be a valid JSON string that can be loaded with json.loads(), and should include full recurrence information. Attributes of the recurrence object are -- end_date_time (string, date-time): Select the final date when the meeting will recur before it is canceled. Should be in UTC time, such as 2017-11-25T12:00:00Z. Cannot be used with end_times. | end_times (integer, max: 60, default: 1): Select how many times the meeting should recur before it is canceled. If end_times is set to 0, it means there is no end time. The maximum number of recurring is 60. Cannot be used with end_date_time. | monthly_day (integer, default: 1): Use this field only if you're scheduling a recurring meeting of type 3 to state the day in a month when the meeting should recur. The value range is from 1 to 31. For the meeting to recur on 23rd of each month, provide 23 as this field's value and 1 as the repeat_interval field's value. To have the meeting recur every three months on the 23rd, change the repeat_interval field value to 3. | monthly_week (integer, enum: -1, 1, 2, 3, 4): Use this field only if you're scheduling a recurring meeting of type 3 to state the week of the month when the meeting should recur. If you use this field, you must also use the monthly_week_day field to state the day of the week when the meeting should recur. -1 = Last week of the month, 1 = First week, 2 = Second week, 3 = Third week, 4 = Fourth week. | monthly_week_day (integer, enum: 1, 2, 3, 4, 5, 6, 7): Use this field only if you're scheduling a recurring meeting of type 3 to state a specific day in a week when the monthly meeting should recur. To use this field, you must also use the monthly_week field. 1 = Sunday, 2 = Monday, 3 = Tuesday, 4 = Wednesday, 5 = Thursday, 6 = Friday, 7 = Saturday. | repeat_interval (integer): Define the interval when the meeting should recur. For instance, to schedule a meeting that recurs every two months, set this field's value as 2 and the value of the type parameter as 3. For a daily meeting, the maximum number of recurrences is 99 days. For a weekly meeting, the maximum is 50 weeks. For a monthly meeting, the maximum is 10 months. | type (integer, enum: 1, 2, 3, required): Recurrence meeting types. 1 = Daily, 2 = Weekly, 3 = Monthly. | weekly_days (string, enum: 1, 2, 3, 4, 5, 6, 7, default: 1): Required if you're scheduling a recurring meeting of type 2 to state the days of the week when the meeting should repeat. This field's value could be a number between 1 to 7 in string format. For instance, if the meeting should recur on Sunday, provide "1" as this field's value. To set the meeting to occur on multiple days of a week, provide comma-separated values. For instance, for Sundays and Tuesdays, provide "1,3". 1 = Sunday, 2 = Monday, 3 = Tuesday, 4 = Wednesday, 5 = Thursday, 6 = Friday, 7 = Saturday.
62+
Param: auto_start_meeting_summary: Optional. Default to false. Set to true to automatically start Zoom's AI meeting summary.
6263

6364
#!/usr/bin/env python3 ${GPTSCRIPT_TOOL_DIR}/main.py UpdateMeeting
6465

@@ -91,9 +92,10 @@ Param: meeting_id: The ID of the meeting to delete
9192

9293
---
9394
Name: List Meetings
94-
Description: List all meetings hosted by the current Zoom user.
95+
Description: List all scheduled meetings hosted by the current Zoom user. This does not return information about instant meetings.
9596
Credential: ./credential
9697
Share Context: Zoom Context
98+
Param: type: Optional. The type of the meetings to list. Default to scheduled, which will return all valid previous (unexpired) meetings, live meetings, and upcoming scheduled meetings. Must be one of: scheduled, live, upcoming, upcoming_meetings, previous_meetings.
9799

98100
#!/usr/bin/env python3 ${GPTSCRIPT_TOOL_DIR}/main.py ListMeetings
99101

@@ -108,7 +110,7 @@ Param: meeting_id: The ID of the meeting to get the invitation for
108110

109111
---
110112
Name: List Upcoming Meetings
111-
Description: List all upcoming meetings hosted by the current Zoom user.
113+
Description: List upcoming meetings(within the next 24 hours) that the current Zoom user scheduled or invited to join.
112114
Credential: ./credential
113115
Share Context: Zoom Context
114116

@@ -119,7 +121,7 @@ Name: Get Meeting Recordings
119121
Description: Get the cloud recordings of a Zoom meeting. Cloud rerordings are only available for licensed users.
120122
Credential: ./credential
121123
Share Context: Zoom Context
122-
Param: meeting_id: The ID of the meeting to get the recordings for
124+
Param: meeting_id_or_uuid: The ID or UUID of the meeting to get the recordings for. If providing the meeting ID instead of UUID, the response will be for the latest meeting instance.
123125

124126
#!/usr/bin/env python3 ${GPTSCRIPT_TOOL_DIR}/main.py GetMeetingRecordings
125127

@@ -133,19 +135,27 @@ Share Context: Zoom Context
133135

134136
---
135137
Name: Get Past Meeting Details
136-
Description: Get the details of a past Zoom meeting.
138+
Description: Get the details of a Zoom meeting instance. It is possible that the meeting has not occurred yet.
137139
Credential: ./credential
138140
Share Context: Zoom Context
139-
Param: meeting_id: The ID of the meeting to get the details for
141+
Param: meeting_id_or_uuid: The ID or UUID of the meeting to get the details for. If providing the meeting ID instead of UUID, the response will be for the latest meeting instance.
140142

141143
#!/usr/bin/env python3 ${GPTSCRIPT_TOOL_DIR}/main.py GetPastMeetingDetails
142144

145+
---
146+
Name: List Past Meeting Instances
147+
Description: List all instances of a Zoom meeting.
148+
Credential: ./credential
149+
Share Context: Zoom Context
150+
Param: meeting_id: The ID of the meeting to get the instances for
151+
152+
#!/usr/bin/env python3 ${GPTSCRIPT_TOOL_DIR}/main.py ListPastMeetingInstances
153+
143154
---
144155
Name: Get Meeting Summary
145156
Description: Retrieve the Zoom AI-generated summary of a Zoom meeting. This feature is available exclusively to licensed users. To access it, the host must ensure that the `Meeting Summary with AI Companion` feature is enabled in their account settings. The meeting summary's accessibility depends on the host's sharing settings, by default only the host has the access.
146157
Credential: ./credential
147158
Share Context: Zoom Context
148-
Share Tools: Get Past Meeting Details
149159
Param: meeting_uuid: The UUID of the meeting to get the summary for, NOT the meeting ID. Must use the UUID obtained from `Get Past Meeting Details` tool.
150160

151161
#!/usr/bin/env python3 ${GPTSCRIPT_TOOL_DIR}/main.py GetMeetingSummary
@@ -165,10 +175,14 @@ Share Context: ../time
165175

166176
#!sys.echo
167177

168-
# Instructions for using Zoom tools
169-
170-
You can use this tool to interact with Zoom with Zoom APIs.
178+
# KEY Instructions for using Zoom tools
171179

180+
- Ensure that when displaying meeting dates and times, both the original meeting timezone and the user's timezone are shown if they differ.
181+
- When the user provides dates and times, assume they are in the user's preferred timezone unless explicitly stated otherwise.
182+
- When the user initiates a meeting creation, politely confirm all optional parameters with them.
183+
- You can use the Get User Tool to get the user's personal meeting ID(PMI).
184+
- The List Meetings Tool only returns scheduled meetings hosted by the current user. However, users may create meeting events and use instant meetings in their personal meeting room instead. If a user requests to list meetings or find recordings/summaries but finds no results, kindly remind them that you can also check instances of instant meetings held in their personal meeting room.
185+
- Note that if an instant meeting was not hosted in the user's personal meeting room, you would need the user to provide the meeting ID to get the instances/recordings/summaries of the meeting.
172186
# End of instructions for using Zoom tools
173187

174188
---

zoom/tools/helper.py

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
import os
2+
import logging
3+
import sys
24

35
ACCESS_TOKEN = os.getenv("ZOOM_OAUTH_TOKEN")
46

@@ -8,6 +10,37 @@
810
ZOOM_API_URL = "https://api.zoom.us/v2"
911

1012

13+
def setup_logger(name):
14+
"""Setup a logger that writes to sys.stderr. This will eventually show up in GPTScript's debugging logs.
15+
16+
Args:
17+
name (str): The name of the logger.
18+
19+
Returns:
20+
logging.Logger: The logger.
21+
"""
22+
# Create a logger
23+
logger = logging.getLogger(name)
24+
logger.setLevel(logging.DEBUG) # Set the logging level
25+
26+
# Create a stream handler that writes to sys.stderr
27+
stderr_handler = logging.StreamHandler(sys.stderr)
28+
29+
# Create a log formatter
30+
formatter = logging.Formatter(
31+
"[Zoom Tool Debugging Log]: %(asctime)s - %(name)s - %(levelname)s - %(message)s"
32+
)
33+
stderr_handler.setFormatter(formatter)
34+
35+
# Add the handler to the logger
36+
logger.addHandler(stderr_handler)
37+
38+
return logger
39+
40+
41+
logger = setup_logger(__name__)
42+
43+
1144
def str_to_bool(value):
1245
"""Convert a string to a boolean."""
1346
return str(value).lower() in ("true", "1", "yes")

0 commit comments

Comments
 (0)