-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtools.py
More file actions
189 lines (189 loc) · 6.82 KB
/
tools.py
File metadata and controls
189 lines (189 loc) · 6.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
TOOLS = [
{
"type": "function",
"function": {
"name": "schedule_once",
"description": "Schedule a one-time reminder at a specific date and time",
"parameters": {
"type": "object",
"properties": {
"reminder_text": {
"type": "string",
"description": "What to remind the user about"
},
"datetime_iso": {
"type": "string",
"description": "ISO 8601 datetime string (e.g., '2026-01-28T15:00:00')"
},
"timezone": {
"type": "string",
"description": "IANA timezone (use user's stored timezone)"
}
},
"required": ["reminder_text", "datetime_iso", "timezone"]
}
}
},
{
"type": "function",
"function": {
"name": "schedule_cron",
"description": "Schedule a recurring reminder using cron syntax (no end date)",
"parameters": {
"type": "object",
"properties": {
"reminder_text": {
"type": "string",
"description": "What to remind the user about"
},
"cron_expression": {
"type": "string",
"description": "5-field cron expression (minute hour day month weekday). Example: '0 9 * * *' for daily at 9am"
},
"timezone": {
"type": "string",
"description": "IANA timezone (use user's stored timezone)"
}
},
"required": ["reminder_text", "cron_expression", "timezone"]
}
}
},
{
"type": "function",
"function": {
"name": "schedule_cron_finite",
"description": "Schedule a recurring reminder using cron syntax with a required end datetime",
"parameters": {
"type": "object",
"properties": {
"reminder_text": {
"type": "string",
"description": "What to remind the user about"
},
"cron_expression": {
"type": "string",
"description": "5-field cron expression (minute hour day month weekday). Example: '0 9 * * *' for daily at 9am"
},
"end_datetime_iso": {
"type": "string",
"description": "ISO 8601 end datetime (e.g., '2026-01-30T01:40:00')"
},
"timezone": {
"type": "string",
"description": "IANA timezone (use user's stored timezone)"
}
},
"required": ["reminder_text", "cron_expression", "end_datetime_iso", "timezone"]
}
}
},
{
"type": "function",
"function": {
"name": "list_reminders",
"description": "List all active reminders for the user",
"parameters": {
"type": "object",
"properties": {},
"required": []
}
}
},
{
"type": "function",
"function": {
"name": "cancel_reminder",
"description": "Cancel/delete a specific reminder by its ID",
"parameters": {
"type": "object",
"properties": {
"reminder_id": {
"type": "string",
"description": "The ID of the reminder to cancel"
}
},
"required": ["reminder_id"]
}
}
},
{
"type": "function",
"function": {
"name": "edit_reminder",
"description": "Edit an existing reminder by ID. Cancel old reminder, then schedule a new one from natural language.",
"parameters": {
"type": "object",
"properties": {
"reminder_id": {
"type": "string",
"description": "Existing reminder ID to edit"
},
"reminder_name": {
"type": "string",
"description": "Existing reminder name/text (for verification)"
},
"new_reminder_name": {
"type": "string",
"description": "New reminder name/text (use same as existing if unchanged)"
},
"new_query": {
"type": "string",
"description": "Natural language description of the updated reminder (must include new reminder name and schedule)"
},
"timezone": {
"type": "string",
"description": "IANA timezone (use user's stored timezone)"
}
},
"required": ["reminder_id", "reminder_name", "new_reminder_name", "new_query", "timezone"]
}
}
},
{
"type": "function",
"function": {
"name": "cancel_all_reminders",
"description": "Cancel/delete ALL reminders for the user",
"parameters": {
"type": "object",
"properties": {},
"required": []
}
}
},
{
"type": "function",
"function": {
"name": "ask_user",
"description": "Ask the user for missing information - USE SPARINGLY, only when absolutely necessary",
"parameters": {
"type": "object",
"properties": {
"question": {
"type": "string",
"description": "The question to ask the user"
}
},
"required": ["question"]
}
}
},
{
"type": "function",
"function": {
"name": "set_timezone",
"description": "Set the user's preferred timezone for all reminders",
"parameters": {
"type": "object",
"properties": {
"timezone": {
"type": "string",
"description": "IANA timezone (e.g., 'Europe/London', 'America/New_York', 'UTC')"
}
},
"required": ["timezone"]
}
}
}
]