-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathfunctions.json
505 lines (505 loc) · 16.4 KB
/
functions.json
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
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
[
{
"name": "albums_by_artist",
"description": "Returns all albums by a given artist.",
"parameters": {
"type": "object",
"properties": {
"artist_name": {
"type": "string",
"description": "The name of the artist."
}
},
"required": ["artist_name"]
}
},
{
"name": "albums_by_genres",
"description": "Returns all albums that contain any of the genres specified in the provided genres list.",
"parameters": {
"type": "object",
"properties": {
"genres": {
"type": "array",
"items": {
"type": "string"
},
"description": "A list of genre strings to filter albums by."
}
},
"required": ["genres"]
}
},
{
"name": "top_streamed_songs",
"description": "Returns the n most streamed songs.",
"parameters": {
"type": "object",
"properties": {
"n": {
"type": "number",
"description": "The number of top-streamed songs to return. Default is 10."
}
},
"required": []
}
},
{
"name": "songs_by_release_date",
"description": "Retrieves all songs released on a specific date, in a specific month, or in a specific year, based on the provided release date.",
"parameters": {
"type": "object",
"properties": {
"release_date": {
"type": "string",
"description": "The release date to filter songs by. Can be in YYYY (year), YYYY-MM (year-month), or YYYY-MM-DD (specific date) format."
}
},
"required": ["release_date"]
}
},
{
"name": "songs_by_longest_duration",
"description": "Returns the top 'n' songs sorted by their duration, from longest to shortest.",
"parameters": {
"type": "object",
"properties": {
"n": {
"type": "number",
"description": "The number of top songs to return, based on duration. Defaults to 10 if not specified."
}
},
"required": []
}
},
{
"name": "songs_by_danceability",
"description": "Returns the top 10 songs sorted by streams that have a danceability rating above a specified threshold percentage.",
"parameters": {
"type": "object",
"properties": {
"danceability_threshold": {
"type": "number",
"description": "The minimum danceability rating (in percentage) to filter songs by."
}
},
"required": ["danceability_threshold"]
}
},
{
"name": "songs_by_explicitness",
"description": "Retrieves the top 10 songs filtered by their explicit content, sorted by a metric such as streams or popularity.",
"parameters": {
"type": "object",
"properties": {
"explicit": {
"type": "boolean",
"description": "True for explicit content, False otherwise. Defaults to True."
}
},
"required": []
}
},
{
"name": "filter_albums_by_date_range",
"description": "Filters and retrieves albums released within a specified date range. The range is inclusive of the start and end dates.",
"parameters": {
"type": "object",
"properties": {
"start_date": {
"type": "string",
"description": "The start date of the date range for filtering albums. Can be in YYYY, YYYY-MM, or YYYY-MM-DD format."
},
"end_date": {
"type": "string",
"description": "The end date of the date range for filtering albums. Can be in YYYY, YYYY-MM, or YYYY-MM-DD format."
}
},
"required": ["start_date", "end_date"]
}
},
{
"name": "albums_by_genres2",
"description": "Retrieves albums that match specified inclusion and exclusion genre criteria.",
"parameters": {
"type": "object",
"properties": {
"genres_in": {
"type": "array",
"items": {
"type": "string"
},
"description": "A list of genre strings the albums must contain."
},
"genres_out": {
"type": "array",
"items": {
"type": "string"
},
"description": "A list of genre strings the albums must not contain."
}
},
"required": ["genres_in", "genres_out"]
}
},
{
"name": "albums_by_date_and_genres",
"description": "Retrieves albums released on a specific date, in a specific month, or in a specific year that match any of the specified genres.",
"parameters": {
"type": "object",
"properties": {
"release_date": {
"type": "string",
"description": "The release date of the albums. Can be in YYYY, YYYY-MM, or YYYY-MM-DD format."
},
"genres": {
"type": "array",
"items": {
"type": "string"
},
"description": "A list of genre strings to filter albums by."
}
},
"required": ["release_date", "genres"]
}
},
{
"name": "high_rated_albums",
"description": "Retrieves albums with an average rating above a specified threshold and a minimum number of ratings.",
"parameters": {
"type": "object",
"properties": {
"rating_threshold": {
"type": "number",
"description": "The minimum average rating for the albums. Defaults to 4.0 if not specified."
},
"min_ratings": {
"type": "number",
"description": "The minimum number of ratings an album must have. Defaults to 100 if not specified."
}
},
"required": []
}
},
{
"name": "top_streamed_songs_by_genre",
"description": "Retrieves the top streamed songs within a specific genre, sorted by number of streams.",
"parameters": {
"type": "object",
"properties": {
"genre": {
"type": "string",
"description": "The genre of the songs."
},
"n": {
"type": "number",
"description": "The number of top-streamed songs to return. Defaults to 5 if not specified."
}
},
"required": ["genre"]
}
},
{
"name": "songs_by_danceability_explicitness",
"description": "Retrieves songs that meet a specified danceability threshold and explicitness criteria.",
"parameters": {
"type": "object",
"properties": {
"danceability_threshold": {
"type": "number",
"description": "The minimum danceability rating (percentage) to filter songs by."
},
"explicit": {
"type": "boolean",
"description": "Flag to filter songs by explicit content. Defaults to True if not specified."
}
},
"required": ["danceability_threshold"]
}
},
{
"name": "albums_by_year_genres_and_descriptors",
"description": "Retrieves albums released on a specific date, month, or year, that fit within specified genres and match given descriptors.",
"parameters": {
"type": "object",
"properties": {
"release_date": {
"type": "string",
"description": "Release date to filter albums by, in YYYY, YYYY-MM, or YYYY-MM-DD format."
},
"genres": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of genres to filter albums by."
},
"descriptors": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of descriptors to match albums with."
}
},
"required": ["release_date", "genres", "descriptors"]
}
},
{
"name": "high_rated_reviewed_albums",
"description": "Retrieves albums that meet specific criteria of high average ratings, a minimum number of ratings, and a minimum number of reviews.",
"parameters": {
"type": "object",
"properties": {
"rating_threshold": {
"type": "number",
"description": "The minimum average rating for the albums."
},
"min_ratings": {
"type": "number",
"description": "The minimum number of ratings an album must have."
},
"review_threshold": {
"type": "number",
"description": "The minimum number of reviews an album must have."
}
},
"required": ["rating_threshold", "min_ratings", "review_threshold"]
}
},
{
"name": "songs_by_danceability_explicitness_speechiness",
"description": "Retrieves songs based on specified thresholds for danceability, speechiness, and explicit content criteria.",
"parameters": {
"type": "object",
"properties": {
"danceability_threshold": {
"type": "number",
"description": "The minimum danceability rating (percentage) to filter songs by."
},
"speechiness_threshold": {
"type": "number",
"description": "The minimum speechiness rating (percentage) to filter songs by."
},
"explicit": {
"type": "boolean",
"description": "Flag to filter songs by explicit content. Defaults to True if not specified."
}
},
"required": ["danceability_threshold", "speechiness_threshold"]
}
},
{
"name": "top_streamed_songs_by_artist_date",
"description": "Retrieves the top streamed songs by a specific artist, released on a given date, month, or year.",
"parameters": {
"type": "object",
"properties": {
"artist_name": {
"type": "string",
"description": "The name of the artist whose songs are to be retrieved."
},
"release_date": {
"type": "string",
"description": "The release date of the songs to filter by, in YYYY, YYYY-MM, or YYYY-MM-DD format."
},
"n": {
"type": "number",
"description": "The number of top-streamed songs to return. Defaults to 5 if not specified."
}
},
"required": ["artist_name", "release_date"]
}
},
{
"name": "unique_albums",
"description": "Finds albums that are distinctive in terms of genre diversity and artist collaboration but have lower average ratings.",
"parameters": {
"type": "object",
"properties": {
"genres_threshold": {
"type": "number",
"description": "The minimum number of genres an album must cover."
},
"artist_count_threshold": {
"type": "number",
"description": "The minimum number of artists required to be involved in an album."
},
"max_rating_threshold": {
"type": "number",
"description": "The maximum average rating that an album can have."
}
},
"required": [
"genres_threshold",
"artist_count_threshold",
"max_rating_threshold"
]
}
},
{
"name": "albums_by_dates_genres_rating",
"description": "Retrieves albums released within a specific date range, filtered by genres to include and exclude, and having an average rating above a specified minimum threshold.",
"parameters": {
"type": "object",
"properties": {
"start_date": {
"type": "string",
"description": "The start date of the date range for filtering albums, in YYYY-MM-DD format."
},
"end_date": {
"type": "string",
"description": "The end date of the date range for filtering albums, in YYYY-MM-DD format."
},
"genre_in": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of genres that the albums must include."
},
"genre_out": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of genres that the albums must not include."
},
"min_rating": {
"type": "number",
"description": "The minimum average rating threshold for the albums."
}
},
"required": [
"start_date",
"end_date",
"genre_in",
"genre_out",
"min_rating"
]
}
},
{
"name": "high_rated_reviewed_albums_by_date",
"description": "Retrieves albums that exceed a certain rating threshold, have a minimum number of ratings and reviews, and are released on a specified date.",
"parameters": {
"type": "object",
"properties": {
"rating_threshold": {
"type": "number",
"description": "The minimum average rating for the albums."
},
"min_ratings": {
"type": "number",
"description": "The minimum number of ratings an album must have."
},
"review_threshold": {
"type": "number",
"description": "The minimum number of reviews an album must have."
},
"release_date": {
"type": "string",
"description": "The release date of the albums, in YYYY, YYYY-MM, or YYYY-MM-DD format."
}
},
"required": [
"rating_threshold",
"min_ratings",
"review_threshold",
"release_date"
]
}
},
{
"name": "top_streamed_songs_by_artist_date_range",
"description": "Finds the top streamed songs by a specific artist within a given date range, and returns a specified number of these top songs.",
"parameters": {
"type": "object",
"properties": {
"artist_name": {
"type": "string",
"description": "The name of the artist whose songs are to be retrieved."
},
"start_date": {
"type": "string",
"description": "The start date of the date range for filtering songs, in YYYY-MM-DD format."
},
"end_date": {
"type": "string",
"description": "The end date of the date range for filtering songs, in YYYY-MM-DD format."
},
"n": {
"type": "number",
"description": "The number of top-streamed songs to return. Defaults to 5 if not specified."
}
},
"required": ["artist_name", "start_date", "end_date", "n"]
}
},
{
"name": "speechiness_songs",
"description": "Finds songs based on specific criteria of speechiness, energy, explicit content, and BPM, allowing a tolerance range for speechiness and energy values.",
"parameters": {
"type": "object",
"properties": {
"speechiness": {
"type": "number",
"description": "Target threshold for speechiness with an acceptable deviation defined by the threshold."
},
"energy": {
"type": "number",
"description": "Target threshold for energy with an acceptable deviation defined by the threshold."
},
"explicit": {
"type": "boolean",
"description": "Flag indicating whether to filter for explicit content."
},
"bpm": {
"type": "number",
"description": "Target Beats Per Minute (BPM) to filter songs by."
},
"threshold": {
"type": "number",
"description": "Range value to determine the acceptable deviation from the speechiness and energy thresholds. Defaults to 20 if not specified."
}
},
"required": ["speechiness", "energy", "explicit", "bpm", "threshold"]
}
},
{
"name": "instrumental_songs",
"description": "Identifies songs based on specified levels of instrumentalness, valence, danceability, and BPM, with a tolerance range for each parameter.",
"parameters": {
"type": "object",
"properties": {
"instrumentalness": {
"type": "number",
"description": "Target threshold for instrumentalness, with a specified deviation range."
},
"valence": {
"type": "number",
"description": "Target threshold for valence, with a specified deviation range."
},
"danceability": {
"type": "number",
"description": "Target threshold for danceability, with a specified deviation range."
},
"bpm": {
"type": "number",
"description": "Target Beats Per Minute (BPM) to filter songs by."
},
"threshold": {
"type": "number",
"description": "Range value to determine the acceptable deviation from the instrumentalness, valence, and danceability thresholds."
}
},
"required": [
"instrumentalness",
"valence",
"danceability",
"bpm",
"threshold"
]
}
}
]