agentex-sdk 0.7.4__py3-none-any.whl → 0.8.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- agentex/_base_client.py +1 -1
- agentex/_client.py +38 -1
- agentex/_version.py +1 -1
- agentex/resources/messages/messages.py +1996 -4
- agentex/types/__init__.py +2 -2
- agentex/types/message_list_paginated_params.py +500 -1
- agentex/types/message_list_params.py +500 -1
- {agentex_sdk-0.7.4.dist-info → agentex_sdk-0.8.1.dist-info}/METADATA +1 -1
- {agentex_sdk-0.7.4.dist-info → agentex_sdk-0.8.1.dist-info}/RECORD +12 -12
- {agentex_sdk-0.7.4.dist-info → agentex_sdk-0.8.1.dist-info}/WHEEL +0 -0
- {agentex_sdk-0.7.4.dist-info → agentex_sdk-0.8.1.dist-info}/entry_points.txt +0 -0
- {agentex_sdk-0.7.4.dist-info → agentex_sdk-0.8.1.dist-info}/licenses/LICENSE +0 -0
|
@@ -207,7 +207,505 @@ class MessagesResource(SyncAPIResource):
|
|
|
207
207
|
Args:
|
|
208
208
|
task_id: The task ID
|
|
209
209
|
|
|
210
|
-
filters: JSON-encoded
|
|
210
|
+
filters: JSON-encoded array of TaskMessageEntityFilter objects.
|
|
211
|
+
|
|
212
|
+
Schema: {
|
|
213
|
+
"$defs": {
|
|
214
|
+
"DataContentEntityOptional": {
|
|
215
|
+
"properties": {
|
|
216
|
+
"type": {
|
|
217
|
+
"anyOf": [
|
|
218
|
+
{
|
|
219
|
+
"const": "data",
|
|
220
|
+
"type": "string"
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
"type": "null"
|
|
224
|
+
}
|
|
225
|
+
],
|
|
226
|
+
"default": null,
|
|
227
|
+
"description": "The type of the message, in this case `data`.",
|
|
228
|
+
"title": "Type"
|
|
229
|
+
},
|
|
230
|
+
"author": {
|
|
231
|
+
"anyOf": [
|
|
232
|
+
{
|
|
233
|
+
"$ref":
|
|
234
|
+
"#/$defs/MessageAuthor"
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
"type": "null"
|
|
238
|
+
}
|
|
239
|
+
],
|
|
240
|
+
"default": null,
|
|
241
|
+
"description": "The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`."
|
|
242
|
+
},
|
|
243
|
+
"style": {
|
|
244
|
+
"anyOf": [
|
|
245
|
+
{
|
|
246
|
+
"$ref":
|
|
247
|
+
"#/$defs/MessageStyle"
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
"type": "null"
|
|
251
|
+
}
|
|
252
|
+
],
|
|
253
|
+
"default": null,
|
|
254
|
+
"description": "The style of the message. This is used by the client to determine how to display the message."
|
|
255
|
+
},
|
|
256
|
+
"data": {
|
|
257
|
+
"anyOf": [
|
|
258
|
+
{
|
|
259
|
+
"additionalProperties": true,
|
|
260
|
+
"type": "object"
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
"type": "null"
|
|
264
|
+
}
|
|
265
|
+
],
|
|
266
|
+
"default": null,
|
|
267
|
+
"description": "The contents of the data message.",
|
|
268
|
+
"title": "Data"
|
|
269
|
+
}
|
|
270
|
+
},
|
|
271
|
+
"title": "DataContentEntityOptional",
|
|
272
|
+
"type": "object"
|
|
273
|
+
},
|
|
274
|
+
"FileAttachmentEntity": {
|
|
275
|
+
"description": "Represents a file attachment in messages.",
|
|
276
|
+
"properties": {
|
|
277
|
+
"file_id": {
|
|
278
|
+
"description": "The unique ID of the attached file",
|
|
279
|
+
"title": "File Id",
|
|
280
|
+
"type": "string"
|
|
281
|
+
},
|
|
282
|
+
"name": {
|
|
283
|
+
"description": "The name of the file",
|
|
284
|
+
"title": "Name",
|
|
285
|
+
"type": "string"
|
|
286
|
+
},
|
|
287
|
+
"size": {
|
|
288
|
+
"description": "The size of the file in bytes",
|
|
289
|
+
"title": "Size",
|
|
290
|
+
"type": "integer"
|
|
291
|
+
},
|
|
292
|
+
"type": {
|
|
293
|
+
"description": "The MIME type or content type of the file",
|
|
294
|
+
"title": "Type",
|
|
295
|
+
"type": "string"
|
|
296
|
+
}
|
|
297
|
+
},
|
|
298
|
+
"required": [
|
|
299
|
+
"file_id",
|
|
300
|
+
"name",
|
|
301
|
+
"size",
|
|
302
|
+
"type"
|
|
303
|
+
],
|
|
304
|
+
"title": "FileAttachmentEntity",
|
|
305
|
+
"type": "object"
|
|
306
|
+
},
|
|
307
|
+
"MessageAuthor": {
|
|
308
|
+
"enum": [
|
|
309
|
+
"user",
|
|
310
|
+
"agent"
|
|
311
|
+
],
|
|
312
|
+
"title": "MessageAuthor",
|
|
313
|
+
"type": "string"
|
|
314
|
+
},
|
|
315
|
+
"MessageStyle": {
|
|
316
|
+
"enum": [
|
|
317
|
+
"static",
|
|
318
|
+
"active"
|
|
319
|
+
],
|
|
320
|
+
"title": "MessageStyle",
|
|
321
|
+
"type": "string"
|
|
322
|
+
},
|
|
323
|
+
"ReasoningContentEntityOptional": {
|
|
324
|
+
"properties": {
|
|
325
|
+
"type": {
|
|
326
|
+
"anyOf": [
|
|
327
|
+
{
|
|
328
|
+
"const": "reasoning",
|
|
329
|
+
"type": "string"
|
|
330
|
+
},
|
|
331
|
+
{
|
|
332
|
+
"type": "null"
|
|
333
|
+
}
|
|
334
|
+
],
|
|
335
|
+
"default": null,
|
|
336
|
+
"description": "The type of the message, in this case `reasoning`.",
|
|
337
|
+
"title": "Type"
|
|
338
|
+
},
|
|
339
|
+
"author": {
|
|
340
|
+
"anyOf": [
|
|
341
|
+
{
|
|
342
|
+
"$ref":
|
|
343
|
+
"#/$defs/MessageAuthor"
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
"type": "null"
|
|
347
|
+
}
|
|
348
|
+
],
|
|
349
|
+
"default": null,
|
|
350
|
+
"description": "The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`."
|
|
351
|
+
},
|
|
352
|
+
"style": {
|
|
353
|
+
"anyOf": [
|
|
354
|
+
{
|
|
355
|
+
"$ref":
|
|
356
|
+
"#/$defs/MessageStyle"
|
|
357
|
+
},
|
|
358
|
+
{
|
|
359
|
+
"type": "null"
|
|
360
|
+
}
|
|
361
|
+
],
|
|
362
|
+
"default": null,
|
|
363
|
+
"description": "The style of the message. This is used by the client to determine how to display the message."
|
|
364
|
+
},
|
|
365
|
+
"summary": {
|
|
366
|
+
"anyOf": [
|
|
367
|
+
{
|
|
368
|
+
"items": {
|
|
369
|
+
"type": "string"
|
|
370
|
+
},
|
|
371
|
+
"type": "array"
|
|
372
|
+
},
|
|
373
|
+
{
|
|
374
|
+
"type": "null"
|
|
375
|
+
}
|
|
376
|
+
],
|
|
377
|
+
"default": null,
|
|
378
|
+
"description": "A list of short reasoning summaries",
|
|
379
|
+
"title": "Summary"
|
|
380
|
+
},
|
|
381
|
+
"content": {
|
|
382
|
+
"anyOf": [
|
|
383
|
+
{
|
|
384
|
+
"items": {
|
|
385
|
+
"type": "string"
|
|
386
|
+
},
|
|
387
|
+
"type": "array"
|
|
388
|
+
},
|
|
389
|
+
{
|
|
390
|
+
"type": "null"
|
|
391
|
+
}
|
|
392
|
+
],
|
|
393
|
+
"default": null,
|
|
394
|
+
"description": "The reasoning content or chain-of-thought text",
|
|
395
|
+
"title": "Content"
|
|
396
|
+
}
|
|
397
|
+
},
|
|
398
|
+
"title": "ReasoningContentEntityOptional",
|
|
399
|
+
"type": "object"
|
|
400
|
+
},
|
|
401
|
+
"TextContentEntityOptional": {
|
|
402
|
+
"properties": {
|
|
403
|
+
"type": {
|
|
404
|
+
"anyOf": [
|
|
405
|
+
{
|
|
406
|
+
"const": "text",
|
|
407
|
+
"type": "string"
|
|
408
|
+
},
|
|
409
|
+
{
|
|
410
|
+
"type": "null"
|
|
411
|
+
}
|
|
412
|
+
],
|
|
413
|
+
"default": null,
|
|
414
|
+
"description": "The type of the message, in this case `text`.",
|
|
415
|
+
"title": "Type"
|
|
416
|
+
},
|
|
417
|
+
"author": {
|
|
418
|
+
"anyOf": [
|
|
419
|
+
{
|
|
420
|
+
"$ref":
|
|
421
|
+
"#/$defs/MessageAuthor"
|
|
422
|
+
},
|
|
423
|
+
{
|
|
424
|
+
"type": "null"
|
|
425
|
+
}
|
|
426
|
+
],
|
|
427
|
+
"default": null,
|
|
428
|
+
"description": "The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`."
|
|
429
|
+
},
|
|
430
|
+
"style": {
|
|
431
|
+
"anyOf": [
|
|
432
|
+
{
|
|
433
|
+
"$ref":
|
|
434
|
+
"#/$defs/MessageStyle"
|
|
435
|
+
},
|
|
436
|
+
{
|
|
437
|
+
"type": "null"
|
|
438
|
+
}
|
|
439
|
+
],
|
|
440
|
+
"default": null,
|
|
441
|
+
"description": "The style of the message. This is used by the client to determine how to display the message."
|
|
442
|
+
},
|
|
443
|
+
"format": {
|
|
444
|
+
"anyOf": [
|
|
445
|
+
{
|
|
446
|
+
"$ref":
|
|
447
|
+
"#/$defs/TextFormat"
|
|
448
|
+
},
|
|
449
|
+
{
|
|
450
|
+
"type": "null"
|
|
451
|
+
}
|
|
452
|
+
],
|
|
453
|
+
"default": null,
|
|
454
|
+
"description": "The format of the message. This is used by the client to determine how to display the message."
|
|
455
|
+
},
|
|
456
|
+
"content": {
|
|
457
|
+
"anyOf": [
|
|
458
|
+
{
|
|
459
|
+
"type": "string"
|
|
460
|
+
},
|
|
461
|
+
{
|
|
462
|
+
"type": "null"
|
|
463
|
+
}
|
|
464
|
+
],
|
|
465
|
+
"default": null,
|
|
466
|
+
"description": "The contents of the text message.",
|
|
467
|
+
"title": "Content"
|
|
468
|
+
},
|
|
469
|
+
"attachments": {
|
|
470
|
+
"anyOf": [
|
|
471
|
+
{
|
|
472
|
+
"items": {
|
|
473
|
+
"$ref":
|
|
474
|
+
"#/$defs/FileAttachmentEntity"
|
|
475
|
+
},
|
|
476
|
+
"type": "array"
|
|
477
|
+
},
|
|
478
|
+
{
|
|
479
|
+
"type": "null"
|
|
480
|
+
}
|
|
481
|
+
],
|
|
482
|
+
"default": null,
|
|
483
|
+
"description": "Optional list of file attachments with structured metadata.",
|
|
484
|
+
"title": "Attachments"
|
|
485
|
+
}
|
|
486
|
+
},
|
|
487
|
+
"title": "TextContentEntityOptional",
|
|
488
|
+
"type": "object"
|
|
489
|
+
},
|
|
490
|
+
"TextFormat": {
|
|
491
|
+
"enum": [
|
|
492
|
+
"markdown",
|
|
493
|
+
"plain",
|
|
494
|
+
"code"
|
|
495
|
+
],
|
|
496
|
+
"title": "TextFormat",
|
|
497
|
+
"type": "string"
|
|
498
|
+
},
|
|
499
|
+
"ToolRequestContentEntityOptional": {
|
|
500
|
+
"properties": {
|
|
501
|
+
"type": {
|
|
502
|
+
"anyOf": [
|
|
503
|
+
{
|
|
504
|
+
"const": "tool_request",
|
|
505
|
+
"type": "string"
|
|
506
|
+
},
|
|
507
|
+
{
|
|
508
|
+
"type": "null"
|
|
509
|
+
}
|
|
510
|
+
],
|
|
511
|
+
"default": null,
|
|
512
|
+
"description": "The type of the message, in this case `tool_request`.",
|
|
513
|
+
"title": "Type"
|
|
514
|
+
},
|
|
515
|
+
"author": {
|
|
516
|
+
"anyOf": [
|
|
517
|
+
{
|
|
518
|
+
"$ref":
|
|
519
|
+
"#/$defs/MessageAuthor"
|
|
520
|
+
},
|
|
521
|
+
{
|
|
522
|
+
"type": "null"
|
|
523
|
+
}
|
|
524
|
+
],
|
|
525
|
+
"default": null,
|
|
526
|
+
"description": "The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`."
|
|
527
|
+
},
|
|
528
|
+
"style": {
|
|
529
|
+
"anyOf": [
|
|
530
|
+
{
|
|
531
|
+
"$ref":
|
|
532
|
+
"#/$defs/MessageStyle"
|
|
533
|
+
},
|
|
534
|
+
{
|
|
535
|
+
"type": "null"
|
|
536
|
+
}
|
|
537
|
+
],
|
|
538
|
+
"default": null,
|
|
539
|
+
"description": "The style of the message. This is used by the client to determine how to display the message."
|
|
540
|
+
},
|
|
541
|
+
"tool_call_id": {
|
|
542
|
+
"anyOf": [
|
|
543
|
+
{
|
|
544
|
+
"type": "string"
|
|
545
|
+
},
|
|
546
|
+
{
|
|
547
|
+
"type": "null"
|
|
548
|
+
}
|
|
549
|
+
],
|
|
550
|
+
"default": null,
|
|
551
|
+
"description": "The ID of the tool call that is being requested.",
|
|
552
|
+
"title": "Tool Call Id"
|
|
553
|
+
},
|
|
554
|
+
"name": {
|
|
555
|
+
"anyOf": [
|
|
556
|
+
{
|
|
557
|
+
"type": "string"
|
|
558
|
+
},
|
|
559
|
+
{
|
|
560
|
+
"type": "null"
|
|
561
|
+
}
|
|
562
|
+
],
|
|
563
|
+
"default": null,
|
|
564
|
+
"description": "The name of the tool that is being requested.",
|
|
565
|
+
"title": "Name"
|
|
566
|
+
},
|
|
567
|
+
"arguments": {
|
|
568
|
+
"anyOf": [
|
|
569
|
+
{
|
|
570
|
+
"additionalProperties": true,
|
|
571
|
+
"type": "object"
|
|
572
|
+
},
|
|
573
|
+
{
|
|
574
|
+
"type": "null"
|
|
575
|
+
}
|
|
576
|
+
],
|
|
577
|
+
"default": null,
|
|
578
|
+
"description": "The arguments to the tool.",
|
|
579
|
+
"title": "Arguments"
|
|
580
|
+
}
|
|
581
|
+
},
|
|
582
|
+
"title": "ToolRequestContentEntityOptional",
|
|
583
|
+
"type": "object"
|
|
584
|
+
},
|
|
585
|
+
"ToolResponseContentEntityOptional": {
|
|
586
|
+
"properties": {
|
|
587
|
+
"type": {
|
|
588
|
+
"anyOf": [
|
|
589
|
+
{
|
|
590
|
+
"const": "tool_response",
|
|
591
|
+
"type": "string"
|
|
592
|
+
},
|
|
593
|
+
{
|
|
594
|
+
"type": "null"
|
|
595
|
+
}
|
|
596
|
+
],
|
|
597
|
+
"default": null,
|
|
598
|
+
"description": "The type of the message, in this case `tool_response`.",
|
|
599
|
+
"title": "Type"
|
|
600
|
+
},
|
|
601
|
+
"author": {
|
|
602
|
+
"anyOf": [
|
|
603
|
+
{
|
|
604
|
+
"$ref":
|
|
605
|
+
"#/$defs/MessageAuthor"
|
|
606
|
+
},
|
|
607
|
+
{
|
|
608
|
+
"type": "null"
|
|
609
|
+
}
|
|
610
|
+
],
|
|
611
|
+
"default": null,
|
|
612
|
+
"description": "The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`."
|
|
613
|
+
},
|
|
614
|
+
"style": {
|
|
615
|
+
"anyOf": [
|
|
616
|
+
{
|
|
617
|
+
"$ref":
|
|
618
|
+
"#/$defs/MessageStyle"
|
|
619
|
+
},
|
|
620
|
+
{
|
|
621
|
+
"type": "null"
|
|
622
|
+
}
|
|
623
|
+
],
|
|
624
|
+
"default": null,
|
|
625
|
+
"description": "The style of the message. This is used by the client to determine how to display the message."
|
|
626
|
+
},
|
|
627
|
+
"tool_call_id": {
|
|
628
|
+
"anyOf": [
|
|
629
|
+
{
|
|
630
|
+
"type": "string"
|
|
631
|
+
},
|
|
632
|
+
{
|
|
633
|
+
"type": "null"
|
|
634
|
+
}
|
|
635
|
+
],
|
|
636
|
+
"default": null,
|
|
637
|
+
"description": "The ID of the tool call that is being responded to.",
|
|
638
|
+
"title": "Tool Call Id"
|
|
639
|
+
},
|
|
640
|
+
"name": {
|
|
641
|
+
"anyOf": [
|
|
642
|
+
{
|
|
643
|
+
"type": "string"
|
|
644
|
+
},
|
|
645
|
+
{
|
|
646
|
+
"type": "null"
|
|
647
|
+
}
|
|
648
|
+
],
|
|
649
|
+
"default": null,
|
|
650
|
+
"description": "The name of the tool that is being responded to.",
|
|
651
|
+
"title": "Name"
|
|
652
|
+
},
|
|
653
|
+
"content": {
|
|
654
|
+
"anyOf": [
|
|
655
|
+
{},
|
|
656
|
+
{
|
|
657
|
+
"type": "null"
|
|
658
|
+
}
|
|
659
|
+
],
|
|
660
|
+
"default": null,
|
|
661
|
+
"description": "The result of the tool.",
|
|
662
|
+
"title": "Content"
|
|
663
|
+
}
|
|
664
|
+
},
|
|
665
|
+
"title": "ToolResponseContentEntityOptional",
|
|
666
|
+
"type": "object"
|
|
667
|
+
}
|
|
668
|
+
},
|
|
669
|
+
"description": "Filter model for TaskMessage - all fields optional for flexible filtering.\n\nThe `exclude` field determines whether this filter is inclusionary or exclusionary.\nWhen multiple filters are provided:\n- Inclusionary filters (exclude=False) are OR'd together\n- Exclusionary filters (exclude=True) are OR'd together and negated with $nor\n- The two groups are AND'd: (include1 OR include2) AND NOT (exclude1 OR exclude2)",
|
|
670
|
+
"properties": {
|
|
671
|
+
"content": {
|
|
672
|
+
"anyOf": [
|
|
673
|
+
{
|
|
674
|
+
"$ref":
|
|
675
|
+
"#/$defs/ToolRequestContentEntityOptional"
|
|
676
|
+
},
|
|
677
|
+
{
|
|
678
|
+
"$ref":
|
|
679
|
+
"#/$defs/DataContentEntityOptional"
|
|
680
|
+
},
|
|
681
|
+
{
|
|
682
|
+
"$ref":
|
|
683
|
+
"#/$defs/TextContentEntityOptional"
|
|
684
|
+
},
|
|
685
|
+
{
|
|
686
|
+
"$ref":
|
|
687
|
+
"#/$defs/ToolResponseContentEntityOptional"
|
|
688
|
+
},
|
|
689
|
+
{
|
|
690
|
+
"$ref":
|
|
691
|
+
"#/$defs/ReasoningContentEntityOptional" }, { "type": "null" } ], "default":
|
|
692
|
+
null, "description": "Filter by message content", "title": "Content" },
|
|
693
|
+
"streaming_status": { "anyOf": [ { "enum": [ "IN_PROGRESS", "DONE" ], "type":
|
|
694
|
+
"string" }, { "type": "null" } ], "default": null, "description": "Filter by
|
|
695
|
+
streaming status", "title": "Streaming Status" }, "exclude": { "default": false,
|
|
696
|
+
"description": "If true, this filter excludes matching messages", "title":
|
|
697
|
+
"Exclude", "type": "boolean" } }, "title": "TaskMessageEntityFilter", "type":
|
|
698
|
+
"object" }
|
|
699
|
+
|
|
700
|
+
Each filter can include:
|
|
701
|
+
|
|
702
|
+
- `content`: Filter by message content (type, author, data fields)
|
|
703
|
+
- `streaming_status`: Filter by status ("IN_PROGRESS" or "DONE")
|
|
704
|
+
- `exclude`: If true, excludes matching messages (default: false)
|
|
705
|
+
|
|
706
|
+
Multiple filters are combined: inclusionary filters (exclude=false) are OR'd
|
|
707
|
+
together, exclusionary filters (exclude=true) are OR'd and negated, then both
|
|
708
|
+
groups are AND'd.
|
|
211
709
|
|
|
212
710
|
extra_headers: Send extra headers
|
|
213
711
|
|
|
@@ -276,7 +774,505 @@ class MessagesResource(SyncAPIResource):
|
|
|
276
774
|
Args:
|
|
277
775
|
task_id: The task ID
|
|
278
776
|
|
|
279
|
-
filters: JSON-encoded
|
|
777
|
+
filters: JSON-encoded array of TaskMessageEntityFilter objects.
|
|
778
|
+
|
|
779
|
+
Schema: {
|
|
780
|
+
"$defs": {
|
|
781
|
+
"DataContentEntityOptional": {
|
|
782
|
+
"properties": {
|
|
783
|
+
"type": {
|
|
784
|
+
"anyOf": [
|
|
785
|
+
{
|
|
786
|
+
"const": "data",
|
|
787
|
+
"type": "string"
|
|
788
|
+
},
|
|
789
|
+
{
|
|
790
|
+
"type": "null"
|
|
791
|
+
}
|
|
792
|
+
],
|
|
793
|
+
"default": null,
|
|
794
|
+
"description": "The type of the message, in this case `data`.",
|
|
795
|
+
"title": "Type"
|
|
796
|
+
},
|
|
797
|
+
"author": {
|
|
798
|
+
"anyOf": [
|
|
799
|
+
{
|
|
800
|
+
"$ref":
|
|
801
|
+
"#/$defs/MessageAuthor"
|
|
802
|
+
},
|
|
803
|
+
{
|
|
804
|
+
"type": "null"
|
|
805
|
+
}
|
|
806
|
+
],
|
|
807
|
+
"default": null,
|
|
808
|
+
"description": "The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`."
|
|
809
|
+
},
|
|
810
|
+
"style": {
|
|
811
|
+
"anyOf": [
|
|
812
|
+
{
|
|
813
|
+
"$ref":
|
|
814
|
+
"#/$defs/MessageStyle"
|
|
815
|
+
},
|
|
816
|
+
{
|
|
817
|
+
"type": "null"
|
|
818
|
+
}
|
|
819
|
+
],
|
|
820
|
+
"default": null,
|
|
821
|
+
"description": "The style of the message. This is used by the client to determine how to display the message."
|
|
822
|
+
},
|
|
823
|
+
"data": {
|
|
824
|
+
"anyOf": [
|
|
825
|
+
{
|
|
826
|
+
"additionalProperties": true,
|
|
827
|
+
"type": "object"
|
|
828
|
+
},
|
|
829
|
+
{
|
|
830
|
+
"type": "null"
|
|
831
|
+
}
|
|
832
|
+
],
|
|
833
|
+
"default": null,
|
|
834
|
+
"description": "The contents of the data message.",
|
|
835
|
+
"title": "Data"
|
|
836
|
+
}
|
|
837
|
+
},
|
|
838
|
+
"title": "DataContentEntityOptional",
|
|
839
|
+
"type": "object"
|
|
840
|
+
},
|
|
841
|
+
"FileAttachmentEntity": {
|
|
842
|
+
"description": "Represents a file attachment in messages.",
|
|
843
|
+
"properties": {
|
|
844
|
+
"file_id": {
|
|
845
|
+
"description": "The unique ID of the attached file",
|
|
846
|
+
"title": "File Id",
|
|
847
|
+
"type": "string"
|
|
848
|
+
},
|
|
849
|
+
"name": {
|
|
850
|
+
"description": "The name of the file",
|
|
851
|
+
"title": "Name",
|
|
852
|
+
"type": "string"
|
|
853
|
+
},
|
|
854
|
+
"size": {
|
|
855
|
+
"description": "The size of the file in bytes",
|
|
856
|
+
"title": "Size",
|
|
857
|
+
"type": "integer"
|
|
858
|
+
},
|
|
859
|
+
"type": {
|
|
860
|
+
"description": "The MIME type or content type of the file",
|
|
861
|
+
"title": "Type",
|
|
862
|
+
"type": "string"
|
|
863
|
+
}
|
|
864
|
+
},
|
|
865
|
+
"required": [
|
|
866
|
+
"file_id",
|
|
867
|
+
"name",
|
|
868
|
+
"size",
|
|
869
|
+
"type"
|
|
870
|
+
],
|
|
871
|
+
"title": "FileAttachmentEntity",
|
|
872
|
+
"type": "object"
|
|
873
|
+
},
|
|
874
|
+
"MessageAuthor": {
|
|
875
|
+
"enum": [
|
|
876
|
+
"user",
|
|
877
|
+
"agent"
|
|
878
|
+
],
|
|
879
|
+
"title": "MessageAuthor",
|
|
880
|
+
"type": "string"
|
|
881
|
+
},
|
|
882
|
+
"MessageStyle": {
|
|
883
|
+
"enum": [
|
|
884
|
+
"static",
|
|
885
|
+
"active"
|
|
886
|
+
],
|
|
887
|
+
"title": "MessageStyle",
|
|
888
|
+
"type": "string"
|
|
889
|
+
},
|
|
890
|
+
"ReasoningContentEntityOptional": {
|
|
891
|
+
"properties": {
|
|
892
|
+
"type": {
|
|
893
|
+
"anyOf": [
|
|
894
|
+
{
|
|
895
|
+
"const": "reasoning",
|
|
896
|
+
"type": "string"
|
|
897
|
+
},
|
|
898
|
+
{
|
|
899
|
+
"type": "null"
|
|
900
|
+
}
|
|
901
|
+
],
|
|
902
|
+
"default": null,
|
|
903
|
+
"description": "The type of the message, in this case `reasoning`.",
|
|
904
|
+
"title": "Type"
|
|
905
|
+
},
|
|
906
|
+
"author": {
|
|
907
|
+
"anyOf": [
|
|
908
|
+
{
|
|
909
|
+
"$ref":
|
|
910
|
+
"#/$defs/MessageAuthor"
|
|
911
|
+
},
|
|
912
|
+
{
|
|
913
|
+
"type": "null"
|
|
914
|
+
}
|
|
915
|
+
],
|
|
916
|
+
"default": null,
|
|
917
|
+
"description": "The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`."
|
|
918
|
+
},
|
|
919
|
+
"style": {
|
|
920
|
+
"anyOf": [
|
|
921
|
+
{
|
|
922
|
+
"$ref":
|
|
923
|
+
"#/$defs/MessageStyle"
|
|
924
|
+
},
|
|
925
|
+
{
|
|
926
|
+
"type": "null"
|
|
927
|
+
}
|
|
928
|
+
],
|
|
929
|
+
"default": null,
|
|
930
|
+
"description": "The style of the message. This is used by the client to determine how to display the message."
|
|
931
|
+
},
|
|
932
|
+
"summary": {
|
|
933
|
+
"anyOf": [
|
|
934
|
+
{
|
|
935
|
+
"items": {
|
|
936
|
+
"type": "string"
|
|
937
|
+
},
|
|
938
|
+
"type": "array"
|
|
939
|
+
},
|
|
940
|
+
{
|
|
941
|
+
"type": "null"
|
|
942
|
+
}
|
|
943
|
+
],
|
|
944
|
+
"default": null,
|
|
945
|
+
"description": "A list of short reasoning summaries",
|
|
946
|
+
"title": "Summary"
|
|
947
|
+
},
|
|
948
|
+
"content": {
|
|
949
|
+
"anyOf": [
|
|
950
|
+
{
|
|
951
|
+
"items": {
|
|
952
|
+
"type": "string"
|
|
953
|
+
},
|
|
954
|
+
"type": "array"
|
|
955
|
+
},
|
|
956
|
+
{
|
|
957
|
+
"type": "null"
|
|
958
|
+
}
|
|
959
|
+
],
|
|
960
|
+
"default": null,
|
|
961
|
+
"description": "The reasoning content or chain-of-thought text",
|
|
962
|
+
"title": "Content"
|
|
963
|
+
}
|
|
964
|
+
},
|
|
965
|
+
"title": "ReasoningContentEntityOptional",
|
|
966
|
+
"type": "object"
|
|
967
|
+
},
|
|
968
|
+
"TextContentEntityOptional": {
|
|
969
|
+
"properties": {
|
|
970
|
+
"type": {
|
|
971
|
+
"anyOf": [
|
|
972
|
+
{
|
|
973
|
+
"const": "text",
|
|
974
|
+
"type": "string"
|
|
975
|
+
},
|
|
976
|
+
{
|
|
977
|
+
"type": "null"
|
|
978
|
+
}
|
|
979
|
+
],
|
|
980
|
+
"default": null,
|
|
981
|
+
"description": "The type of the message, in this case `text`.",
|
|
982
|
+
"title": "Type"
|
|
983
|
+
},
|
|
984
|
+
"author": {
|
|
985
|
+
"anyOf": [
|
|
986
|
+
{
|
|
987
|
+
"$ref":
|
|
988
|
+
"#/$defs/MessageAuthor"
|
|
989
|
+
},
|
|
990
|
+
{
|
|
991
|
+
"type": "null"
|
|
992
|
+
}
|
|
993
|
+
],
|
|
994
|
+
"default": null,
|
|
995
|
+
"description": "The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`."
|
|
996
|
+
},
|
|
997
|
+
"style": {
|
|
998
|
+
"anyOf": [
|
|
999
|
+
{
|
|
1000
|
+
"$ref":
|
|
1001
|
+
"#/$defs/MessageStyle"
|
|
1002
|
+
},
|
|
1003
|
+
{
|
|
1004
|
+
"type": "null"
|
|
1005
|
+
}
|
|
1006
|
+
],
|
|
1007
|
+
"default": null,
|
|
1008
|
+
"description": "The style of the message. This is used by the client to determine how to display the message."
|
|
1009
|
+
},
|
|
1010
|
+
"format": {
|
|
1011
|
+
"anyOf": [
|
|
1012
|
+
{
|
|
1013
|
+
"$ref":
|
|
1014
|
+
"#/$defs/TextFormat"
|
|
1015
|
+
},
|
|
1016
|
+
{
|
|
1017
|
+
"type": "null"
|
|
1018
|
+
}
|
|
1019
|
+
],
|
|
1020
|
+
"default": null,
|
|
1021
|
+
"description": "The format of the message. This is used by the client to determine how to display the message."
|
|
1022
|
+
},
|
|
1023
|
+
"content": {
|
|
1024
|
+
"anyOf": [
|
|
1025
|
+
{
|
|
1026
|
+
"type": "string"
|
|
1027
|
+
},
|
|
1028
|
+
{
|
|
1029
|
+
"type": "null"
|
|
1030
|
+
}
|
|
1031
|
+
],
|
|
1032
|
+
"default": null,
|
|
1033
|
+
"description": "The contents of the text message.",
|
|
1034
|
+
"title": "Content"
|
|
1035
|
+
},
|
|
1036
|
+
"attachments": {
|
|
1037
|
+
"anyOf": [
|
|
1038
|
+
{
|
|
1039
|
+
"items": {
|
|
1040
|
+
"$ref":
|
|
1041
|
+
"#/$defs/FileAttachmentEntity"
|
|
1042
|
+
},
|
|
1043
|
+
"type": "array"
|
|
1044
|
+
},
|
|
1045
|
+
{
|
|
1046
|
+
"type": "null"
|
|
1047
|
+
}
|
|
1048
|
+
],
|
|
1049
|
+
"default": null,
|
|
1050
|
+
"description": "Optional list of file attachments with structured metadata.",
|
|
1051
|
+
"title": "Attachments"
|
|
1052
|
+
}
|
|
1053
|
+
},
|
|
1054
|
+
"title": "TextContentEntityOptional",
|
|
1055
|
+
"type": "object"
|
|
1056
|
+
},
|
|
1057
|
+
"TextFormat": {
|
|
1058
|
+
"enum": [
|
|
1059
|
+
"markdown",
|
|
1060
|
+
"plain",
|
|
1061
|
+
"code"
|
|
1062
|
+
],
|
|
1063
|
+
"title": "TextFormat",
|
|
1064
|
+
"type": "string"
|
|
1065
|
+
},
|
|
1066
|
+
"ToolRequestContentEntityOptional": {
|
|
1067
|
+
"properties": {
|
|
1068
|
+
"type": {
|
|
1069
|
+
"anyOf": [
|
|
1070
|
+
{
|
|
1071
|
+
"const": "tool_request",
|
|
1072
|
+
"type": "string"
|
|
1073
|
+
},
|
|
1074
|
+
{
|
|
1075
|
+
"type": "null"
|
|
1076
|
+
}
|
|
1077
|
+
],
|
|
1078
|
+
"default": null,
|
|
1079
|
+
"description": "The type of the message, in this case `tool_request`.",
|
|
1080
|
+
"title": "Type"
|
|
1081
|
+
},
|
|
1082
|
+
"author": {
|
|
1083
|
+
"anyOf": [
|
|
1084
|
+
{
|
|
1085
|
+
"$ref":
|
|
1086
|
+
"#/$defs/MessageAuthor"
|
|
1087
|
+
},
|
|
1088
|
+
{
|
|
1089
|
+
"type": "null"
|
|
1090
|
+
}
|
|
1091
|
+
],
|
|
1092
|
+
"default": null,
|
|
1093
|
+
"description": "The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`."
|
|
1094
|
+
},
|
|
1095
|
+
"style": {
|
|
1096
|
+
"anyOf": [
|
|
1097
|
+
{
|
|
1098
|
+
"$ref":
|
|
1099
|
+
"#/$defs/MessageStyle"
|
|
1100
|
+
},
|
|
1101
|
+
{
|
|
1102
|
+
"type": "null"
|
|
1103
|
+
}
|
|
1104
|
+
],
|
|
1105
|
+
"default": null,
|
|
1106
|
+
"description": "The style of the message. This is used by the client to determine how to display the message."
|
|
1107
|
+
},
|
|
1108
|
+
"tool_call_id": {
|
|
1109
|
+
"anyOf": [
|
|
1110
|
+
{
|
|
1111
|
+
"type": "string"
|
|
1112
|
+
},
|
|
1113
|
+
{
|
|
1114
|
+
"type": "null"
|
|
1115
|
+
}
|
|
1116
|
+
],
|
|
1117
|
+
"default": null,
|
|
1118
|
+
"description": "The ID of the tool call that is being requested.",
|
|
1119
|
+
"title": "Tool Call Id"
|
|
1120
|
+
},
|
|
1121
|
+
"name": {
|
|
1122
|
+
"anyOf": [
|
|
1123
|
+
{
|
|
1124
|
+
"type": "string"
|
|
1125
|
+
},
|
|
1126
|
+
{
|
|
1127
|
+
"type": "null"
|
|
1128
|
+
}
|
|
1129
|
+
],
|
|
1130
|
+
"default": null,
|
|
1131
|
+
"description": "The name of the tool that is being requested.",
|
|
1132
|
+
"title": "Name"
|
|
1133
|
+
},
|
|
1134
|
+
"arguments": {
|
|
1135
|
+
"anyOf": [
|
|
1136
|
+
{
|
|
1137
|
+
"additionalProperties": true,
|
|
1138
|
+
"type": "object"
|
|
1139
|
+
},
|
|
1140
|
+
{
|
|
1141
|
+
"type": "null"
|
|
1142
|
+
}
|
|
1143
|
+
],
|
|
1144
|
+
"default": null,
|
|
1145
|
+
"description": "The arguments to the tool.",
|
|
1146
|
+
"title": "Arguments"
|
|
1147
|
+
}
|
|
1148
|
+
},
|
|
1149
|
+
"title": "ToolRequestContentEntityOptional",
|
|
1150
|
+
"type": "object"
|
|
1151
|
+
},
|
|
1152
|
+
"ToolResponseContentEntityOptional": {
|
|
1153
|
+
"properties": {
|
|
1154
|
+
"type": {
|
|
1155
|
+
"anyOf": [
|
|
1156
|
+
{
|
|
1157
|
+
"const": "tool_response",
|
|
1158
|
+
"type": "string"
|
|
1159
|
+
},
|
|
1160
|
+
{
|
|
1161
|
+
"type": "null"
|
|
1162
|
+
}
|
|
1163
|
+
],
|
|
1164
|
+
"default": null,
|
|
1165
|
+
"description": "The type of the message, in this case `tool_response`.",
|
|
1166
|
+
"title": "Type"
|
|
1167
|
+
},
|
|
1168
|
+
"author": {
|
|
1169
|
+
"anyOf": [
|
|
1170
|
+
{
|
|
1171
|
+
"$ref":
|
|
1172
|
+
"#/$defs/MessageAuthor"
|
|
1173
|
+
},
|
|
1174
|
+
{
|
|
1175
|
+
"type": "null"
|
|
1176
|
+
}
|
|
1177
|
+
],
|
|
1178
|
+
"default": null,
|
|
1179
|
+
"description": "The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`."
|
|
1180
|
+
},
|
|
1181
|
+
"style": {
|
|
1182
|
+
"anyOf": [
|
|
1183
|
+
{
|
|
1184
|
+
"$ref":
|
|
1185
|
+
"#/$defs/MessageStyle"
|
|
1186
|
+
},
|
|
1187
|
+
{
|
|
1188
|
+
"type": "null"
|
|
1189
|
+
}
|
|
1190
|
+
],
|
|
1191
|
+
"default": null,
|
|
1192
|
+
"description": "The style of the message. This is used by the client to determine how to display the message."
|
|
1193
|
+
},
|
|
1194
|
+
"tool_call_id": {
|
|
1195
|
+
"anyOf": [
|
|
1196
|
+
{
|
|
1197
|
+
"type": "string"
|
|
1198
|
+
},
|
|
1199
|
+
{
|
|
1200
|
+
"type": "null"
|
|
1201
|
+
}
|
|
1202
|
+
],
|
|
1203
|
+
"default": null,
|
|
1204
|
+
"description": "The ID of the tool call that is being responded to.",
|
|
1205
|
+
"title": "Tool Call Id"
|
|
1206
|
+
},
|
|
1207
|
+
"name": {
|
|
1208
|
+
"anyOf": [
|
|
1209
|
+
{
|
|
1210
|
+
"type": "string"
|
|
1211
|
+
},
|
|
1212
|
+
{
|
|
1213
|
+
"type": "null"
|
|
1214
|
+
}
|
|
1215
|
+
],
|
|
1216
|
+
"default": null,
|
|
1217
|
+
"description": "The name of the tool that is being responded to.",
|
|
1218
|
+
"title": "Name"
|
|
1219
|
+
},
|
|
1220
|
+
"content": {
|
|
1221
|
+
"anyOf": [
|
|
1222
|
+
{},
|
|
1223
|
+
{
|
|
1224
|
+
"type": "null"
|
|
1225
|
+
}
|
|
1226
|
+
],
|
|
1227
|
+
"default": null,
|
|
1228
|
+
"description": "The result of the tool.",
|
|
1229
|
+
"title": "Content"
|
|
1230
|
+
}
|
|
1231
|
+
},
|
|
1232
|
+
"title": "ToolResponseContentEntityOptional",
|
|
1233
|
+
"type": "object"
|
|
1234
|
+
}
|
|
1235
|
+
},
|
|
1236
|
+
"description": "Filter model for TaskMessage - all fields optional for flexible filtering.\n\nThe `exclude` field determines whether this filter is inclusionary or exclusionary.\nWhen multiple filters are provided:\n- Inclusionary filters (exclude=False) are OR'd together\n- Exclusionary filters (exclude=True) are OR'd together and negated with $nor\n- The two groups are AND'd: (include1 OR include2) AND NOT (exclude1 OR exclude2)",
|
|
1237
|
+
"properties": {
|
|
1238
|
+
"content": {
|
|
1239
|
+
"anyOf": [
|
|
1240
|
+
{
|
|
1241
|
+
"$ref":
|
|
1242
|
+
"#/$defs/ToolRequestContentEntityOptional"
|
|
1243
|
+
},
|
|
1244
|
+
{
|
|
1245
|
+
"$ref":
|
|
1246
|
+
"#/$defs/DataContentEntityOptional"
|
|
1247
|
+
},
|
|
1248
|
+
{
|
|
1249
|
+
"$ref":
|
|
1250
|
+
"#/$defs/TextContentEntityOptional"
|
|
1251
|
+
},
|
|
1252
|
+
{
|
|
1253
|
+
"$ref":
|
|
1254
|
+
"#/$defs/ToolResponseContentEntityOptional"
|
|
1255
|
+
},
|
|
1256
|
+
{
|
|
1257
|
+
"$ref":
|
|
1258
|
+
"#/$defs/ReasoningContentEntityOptional" }, { "type": "null" } ], "default":
|
|
1259
|
+
null, "description": "Filter by message content", "title": "Content" },
|
|
1260
|
+
"streaming_status": { "anyOf": [ { "enum": [ "IN_PROGRESS", "DONE" ], "type":
|
|
1261
|
+
"string" }, { "type": "null" } ], "default": null, "description": "Filter by
|
|
1262
|
+
streaming status", "title": "Streaming Status" }, "exclude": { "default": false,
|
|
1263
|
+
"description": "If true, this filter excludes matching messages", "title":
|
|
1264
|
+
"Exclude", "type": "boolean" } }, "title": "TaskMessageEntityFilter", "type":
|
|
1265
|
+
"object" }
|
|
1266
|
+
|
|
1267
|
+
Each filter can include:
|
|
1268
|
+
|
|
1269
|
+
- `content`: Filter by message content (type, author, data fields)
|
|
1270
|
+
- `streaming_status`: Filter by status ("IN_PROGRESS" or "DONE")
|
|
1271
|
+
- `exclude`: If true, excludes matching messages (default: false)
|
|
1272
|
+
|
|
1273
|
+
Multiple filters are combined: inclusionary filters (exclude=false) are OR'd
|
|
1274
|
+
together, exclusionary filters (exclude=true) are OR'd and negated, then both
|
|
1275
|
+
groups are AND'd.
|
|
280
1276
|
|
|
281
1277
|
extra_headers: Send extra headers
|
|
282
1278
|
|
|
@@ -475,7 +1471,505 @@ class AsyncMessagesResource(AsyncAPIResource):
|
|
|
475
1471
|
Args:
|
|
476
1472
|
task_id: The task ID
|
|
477
1473
|
|
|
478
|
-
filters: JSON-encoded
|
|
1474
|
+
filters: JSON-encoded array of TaskMessageEntityFilter objects.
|
|
1475
|
+
|
|
1476
|
+
Schema: {
|
|
1477
|
+
"$defs": {
|
|
1478
|
+
"DataContentEntityOptional": {
|
|
1479
|
+
"properties": {
|
|
1480
|
+
"type": {
|
|
1481
|
+
"anyOf": [
|
|
1482
|
+
{
|
|
1483
|
+
"const": "data",
|
|
1484
|
+
"type": "string"
|
|
1485
|
+
},
|
|
1486
|
+
{
|
|
1487
|
+
"type": "null"
|
|
1488
|
+
}
|
|
1489
|
+
],
|
|
1490
|
+
"default": null,
|
|
1491
|
+
"description": "The type of the message, in this case `data`.",
|
|
1492
|
+
"title": "Type"
|
|
1493
|
+
},
|
|
1494
|
+
"author": {
|
|
1495
|
+
"anyOf": [
|
|
1496
|
+
{
|
|
1497
|
+
"$ref":
|
|
1498
|
+
"#/$defs/MessageAuthor"
|
|
1499
|
+
},
|
|
1500
|
+
{
|
|
1501
|
+
"type": "null"
|
|
1502
|
+
}
|
|
1503
|
+
],
|
|
1504
|
+
"default": null,
|
|
1505
|
+
"description": "The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`."
|
|
1506
|
+
},
|
|
1507
|
+
"style": {
|
|
1508
|
+
"anyOf": [
|
|
1509
|
+
{
|
|
1510
|
+
"$ref":
|
|
1511
|
+
"#/$defs/MessageStyle"
|
|
1512
|
+
},
|
|
1513
|
+
{
|
|
1514
|
+
"type": "null"
|
|
1515
|
+
}
|
|
1516
|
+
],
|
|
1517
|
+
"default": null,
|
|
1518
|
+
"description": "The style of the message. This is used by the client to determine how to display the message."
|
|
1519
|
+
},
|
|
1520
|
+
"data": {
|
|
1521
|
+
"anyOf": [
|
|
1522
|
+
{
|
|
1523
|
+
"additionalProperties": true,
|
|
1524
|
+
"type": "object"
|
|
1525
|
+
},
|
|
1526
|
+
{
|
|
1527
|
+
"type": "null"
|
|
1528
|
+
}
|
|
1529
|
+
],
|
|
1530
|
+
"default": null,
|
|
1531
|
+
"description": "The contents of the data message.",
|
|
1532
|
+
"title": "Data"
|
|
1533
|
+
}
|
|
1534
|
+
},
|
|
1535
|
+
"title": "DataContentEntityOptional",
|
|
1536
|
+
"type": "object"
|
|
1537
|
+
},
|
|
1538
|
+
"FileAttachmentEntity": {
|
|
1539
|
+
"description": "Represents a file attachment in messages.",
|
|
1540
|
+
"properties": {
|
|
1541
|
+
"file_id": {
|
|
1542
|
+
"description": "The unique ID of the attached file",
|
|
1543
|
+
"title": "File Id",
|
|
1544
|
+
"type": "string"
|
|
1545
|
+
},
|
|
1546
|
+
"name": {
|
|
1547
|
+
"description": "The name of the file",
|
|
1548
|
+
"title": "Name",
|
|
1549
|
+
"type": "string"
|
|
1550
|
+
},
|
|
1551
|
+
"size": {
|
|
1552
|
+
"description": "The size of the file in bytes",
|
|
1553
|
+
"title": "Size",
|
|
1554
|
+
"type": "integer"
|
|
1555
|
+
},
|
|
1556
|
+
"type": {
|
|
1557
|
+
"description": "The MIME type or content type of the file",
|
|
1558
|
+
"title": "Type",
|
|
1559
|
+
"type": "string"
|
|
1560
|
+
}
|
|
1561
|
+
},
|
|
1562
|
+
"required": [
|
|
1563
|
+
"file_id",
|
|
1564
|
+
"name",
|
|
1565
|
+
"size",
|
|
1566
|
+
"type"
|
|
1567
|
+
],
|
|
1568
|
+
"title": "FileAttachmentEntity",
|
|
1569
|
+
"type": "object"
|
|
1570
|
+
},
|
|
1571
|
+
"MessageAuthor": {
|
|
1572
|
+
"enum": [
|
|
1573
|
+
"user",
|
|
1574
|
+
"agent"
|
|
1575
|
+
],
|
|
1576
|
+
"title": "MessageAuthor",
|
|
1577
|
+
"type": "string"
|
|
1578
|
+
},
|
|
1579
|
+
"MessageStyle": {
|
|
1580
|
+
"enum": [
|
|
1581
|
+
"static",
|
|
1582
|
+
"active"
|
|
1583
|
+
],
|
|
1584
|
+
"title": "MessageStyle",
|
|
1585
|
+
"type": "string"
|
|
1586
|
+
},
|
|
1587
|
+
"ReasoningContentEntityOptional": {
|
|
1588
|
+
"properties": {
|
|
1589
|
+
"type": {
|
|
1590
|
+
"anyOf": [
|
|
1591
|
+
{
|
|
1592
|
+
"const": "reasoning",
|
|
1593
|
+
"type": "string"
|
|
1594
|
+
},
|
|
1595
|
+
{
|
|
1596
|
+
"type": "null"
|
|
1597
|
+
}
|
|
1598
|
+
],
|
|
1599
|
+
"default": null,
|
|
1600
|
+
"description": "The type of the message, in this case `reasoning`.",
|
|
1601
|
+
"title": "Type"
|
|
1602
|
+
},
|
|
1603
|
+
"author": {
|
|
1604
|
+
"anyOf": [
|
|
1605
|
+
{
|
|
1606
|
+
"$ref":
|
|
1607
|
+
"#/$defs/MessageAuthor"
|
|
1608
|
+
},
|
|
1609
|
+
{
|
|
1610
|
+
"type": "null"
|
|
1611
|
+
}
|
|
1612
|
+
],
|
|
1613
|
+
"default": null,
|
|
1614
|
+
"description": "The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`."
|
|
1615
|
+
},
|
|
1616
|
+
"style": {
|
|
1617
|
+
"anyOf": [
|
|
1618
|
+
{
|
|
1619
|
+
"$ref":
|
|
1620
|
+
"#/$defs/MessageStyle"
|
|
1621
|
+
},
|
|
1622
|
+
{
|
|
1623
|
+
"type": "null"
|
|
1624
|
+
}
|
|
1625
|
+
],
|
|
1626
|
+
"default": null,
|
|
1627
|
+
"description": "The style of the message. This is used by the client to determine how to display the message."
|
|
1628
|
+
},
|
|
1629
|
+
"summary": {
|
|
1630
|
+
"anyOf": [
|
|
1631
|
+
{
|
|
1632
|
+
"items": {
|
|
1633
|
+
"type": "string"
|
|
1634
|
+
},
|
|
1635
|
+
"type": "array"
|
|
1636
|
+
},
|
|
1637
|
+
{
|
|
1638
|
+
"type": "null"
|
|
1639
|
+
}
|
|
1640
|
+
],
|
|
1641
|
+
"default": null,
|
|
1642
|
+
"description": "A list of short reasoning summaries",
|
|
1643
|
+
"title": "Summary"
|
|
1644
|
+
},
|
|
1645
|
+
"content": {
|
|
1646
|
+
"anyOf": [
|
|
1647
|
+
{
|
|
1648
|
+
"items": {
|
|
1649
|
+
"type": "string"
|
|
1650
|
+
},
|
|
1651
|
+
"type": "array"
|
|
1652
|
+
},
|
|
1653
|
+
{
|
|
1654
|
+
"type": "null"
|
|
1655
|
+
}
|
|
1656
|
+
],
|
|
1657
|
+
"default": null,
|
|
1658
|
+
"description": "The reasoning content or chain-of-thought text",
|
|
1659
|
+
"title": "Content"
|
|
1660
|
+
}
|
|
1661
|
+
},
|
|
1662
|
+
"title": "ReasoningContentEntityOptional",
|
|
1663
|
+
"type": "object"
|
|
1664
|
+
},
|
|
1665
|
+
"TextContentEntityOptional": {
|
|
1666
|
+
"properties": {
|
|
1667
|
+
"type": {
|
|
1668
|
+
"anyOf": [
|
|
1669
|
+
{
|
|
1670
|
+
"const": "text",
|
|
1671
|
+
"type": "string"
|
|
1672
|
+
},
|
|
1673
|
+
{
|
|
1674
|
+
"type": "null"
|
|
1675
|
+
}
|
|
1676
|
+
],
|
|
1677
|
+
"default": null,
|
|
1678
|
+
"description": "The type of the message, in this case `text`.",
|
|
1679
|
+
"title": "Type"
|
|
1680
|
+
},
|
|
1681
|
+
"author": {
|
|
1682
|
+
"anyOf": [
|
|
1683
|
+
{
|
|
1684
|
+
"$ref":
|
|
1685
|
+
"#/$defs/MessageAuthor"
|
|
1686
|
+
},
|
|
1687
|
+
{
|
|
1688
|
+
"type": "null"
|
|
1689
|
+
}
|
|
1690
|
+
],
|
|
1691
|
+
"default": null,
|
|
1692
|
+
"description": "The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`."
|
|
1693
|
+
},
|
|
1694
|
+
"style": {
|
|
1695
|
+
"anyOf": [
|
|
1696
|
+
{
|
|
1697
|
+
"$ref":
|
|
1698
|
+
"#/$defs/MessageStyle"
|
|
1699
|
+
},
|
|
1700
|
+
{
|
|
1701
|
+
"type": "null"
|
|
1702
|
+
}
|
|
1703
|
+
],
|
|
1704
|
+
"default": null,
|
|
1705
|
+
"description": "The style of the message. This is used by the client to determine how to display the message."
|
|
1706
|
+
},
|
|
1707
|
+
"format": {
|
|
1708
|
+
"anyOf": [
|
|
1709
|
+
{
|
|
1710
|
+
"$ref":
|
|
1711
|
+
"#/$defs/TextFormat"
|
|
1712
|
+
},
|
|
1713
|
+
{
|
|
1714
|
+
"type": "null"
|
|
1715
|
+
}
|
|
1716
|
+
],
|
|
1717
|
+
"default": null,
|
|
1718
|
+
"description": "The format of the message. This is used by the client to determine how to display the message."
|
|
1719
|
+
},
|
|
1720
|
+
"content": {
|
|
1721
|
+
"anyOf": [
|
|
1722
|
+
{
|
|
1723
|
+
"type": "string"
|
|
1724
|
+
},
|
|
1725
|
+
{
|
|
1726
|
+
"type": "null"
|
|
1727
|
+
}
|
|
1728
|
+
],
|
|
1729
|
+
"default": null,
|
|
1730
|
+
"description": "The contents of the text message.",
|
|
1731
|
+
"title": "Content"
|
|
1732
|
+
},
|
|
1733
|
+
"attachments": {
|
|
1734
|
+
"anyOf": [
|
|
1735
|
+
{
|
|
1736
|
+
"items": {
|
|
1737
|
+
"$ref":
|
|
1738
|
+
"#/$defs/FileAttachmentEntity"
|
|
1739
|
+
},
|
|
1740
|
+
"type": "array"
|
|
1741
|
+
},
|
|
1742
|
+
{
|
|
1743
|
+
"type": "null"
|
|
1744
|
+
}
|
|
1745
|
+
],
|
|
1746
|
+
"default": null,
|
|
1747
|
+
"description": "Optional list of file attachments with structured metadata.",
|
|
1748
|
+
"title": "Attachments"
|
|
1749
|
+
}
|
|
1750
|
+
},
|
|
1751
|
+
"title": "TextContentEntityOptional",
|
|
1752
|
+
"type": "object"
|
|
1753
|
+
},
|
|
1754
|
+
"TextFormat": {
|
|
1755
|
+
"enum": [
|
|
1756
|
+
"markdown",
|
|
1757
|
+
"plain",
|
|
1758
|
+
"code"
|
|
1759
|
+
],
|
|
1760
|
+
"title": "TextFormat",
|
|
1761
|
+
"type": "string"
|
|
1762
|
+
},
|
|
1763
|
+
"ToolRequestContentEntityOptional": {
|
|
1764
|
+
"properties": {
|
|
1765
|
+
"type": {
|
|
1766
|
+
"anyOf": [
|
|
1767
|
+
{
|
|
1768
|
+
"const": "tool_request",
|
|
1769
|
+
"type": "string"
|
|
1770
|
+
},
|
|
1771
|
+
{
|
|
1772
|
+
"type": "null"
|
|
1773
|
+
}
|
|
1774
|
+
],
|
|
1775
|
+
"default": null,
|
|
1776
|
+
"description": "The type of the message, in this case `tool_request`.",
|
|
1777
|
+
"title": "Type"
|
|
1778
|
+
},
|
|
1779
|
+
"author": {
|
|
1780
|
+
"anyOf": [
|
|
1781
|
+
{
|
|
1782
|
+
"$ref":
|
|
1783
|
+
"#/$defs/MessageAuthor"
|
|
1784
|
+
},
|
|
1785
|
+
{
|
|
1786
|
+
"type": "null"
|
|
1787
|
+
}
|
|
1788
|
+
],
|
|
1789
|
+
"default": null,
|
|
1790
|
+
"description": "The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`."
|
|
1791
|
+
},
|
|
1792
|
+
"style": {
|
|
1793
|
+
"anyOf": [
|
|
1794
|
+
{
|
|
1795
|
+
"$ref":
|
|
1796
|
+
"#/$defs/MessageStyle"
|
|
1797
|
+
},
|
|
1798
|
+
{
|
|
1799
|
+
"type": "null"
|
|
1800
|
+
}
|
|
1801
|
+
],
|
|
1802
|
+
"default": null,
|
|
1803
|
+
"description": "The style of the message. This is used by the client to determine how to display the message."
|
|
1804
|
+
},
|
|
1805
|
+
"tool_call_id": {
|
|
1806
|
+
"anyOf": [
|
|
1807
|
+
{
|
|
1808
|
+
"type": "string"
|
|
1809
|
+
},
|
|
1810
|
+
{
|
|
1811
|
+
"type": "null"
|
|
1812
|
+
}
|
|
1813
|
+
],
|
|
1814
|
+
"default": null,
|
|
1815
|
+
"description": "The ID of the tool call that is being requested.",
|
|
1816
|
+
"title": "Tool Call Id"
|
|
1817
|
+
},
|
|
1818
|
+
"name": {
|
|
1819
|
+
"anyOf": [
|
|
1820
|
+
{
|
|
1821
|
+
"type": "string"
|
|
1822
|
+
},
|
|
1823
|
+
{
|
|
1824
|
+
"type": "null"
|
|
1825
|
+
}
|
|
1826
|
+
],
|
|
1827
|
+
"default": null,
|
|
1828
|
+
"description": "The name of the tool that is being requested.",
|
|
1829
|
+
"title": "Name"
|
|
1830
|
+
},
|
|
1831
|
+
"arguments": {
|
|
1832
|
+
"anyOf": [
|
|
1833
|
+
{
|
|
1834
|
+
"additionalProperties": true,
|
|
1835
|
+
"type": "object"
|
|
1836
|
+
},
|
|
1837
|
+
{
|
|
1838
|
+
"type": "null"
|
|
1839
|
+
}
|
|
1840
|
+
],
|
|
1841
|
+
"default": null,
|
|
1842
|
+
"description": "The arguments to the tool.",
|
|
1843
|
+
"title": "Arguments"
|
|
1844
|
+
}
|
|
1845
|
+
},
|
|
1846
|
+
"title": "ToolRequestContentEntityOptional",
|
|
1847
|
+
"type": "object"
|
|
1848
|
+
},
|
|
1849
|
+
"ToolResponseContentEntityOptional": {
|
|
1850
|
+
"properties": {
|
|
1851
|
+
"type": {
|
|
1852
|
+
"anyOf": [
|
|
1853
|
+
{
|
|
1854
|
+
"const": "tool_response",
|
|
1855
|
+
"type": "string"
|
|
1856
|
+
},
|
|
1857
|
+
{
|
|
1858
|
+
"type": "null"
|
|
1859
|
+
}
|
|
1860
|
+
],
|
|
1861
|
+
"default": null,
|
|
1862
|
+
"description": "The type of the message, in this case `tool_response`.",
|
|
1863
|
+
"title": "Type"
|
|
1864
|
+
},
|
|
1865
|
+
"author": {
|
|
1866
|
+
"anyOf": [
|
|
1867
|
+
{
|
|
1868
|
+
"$ref":
|
|
1869
|
+
"#/$defs/MessageAuthor"
|
|
1870
|
+
},
|
|
1871
|
+
{
|
|
1872
|
+
"type": "null"
|
|
1873
|
+
}
|
|
1874
|
+
],
|
|
1875
|
+
"default": null,
|
|
1876
|
+
"description": "The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`."
|
|
1877
|
+
},
|
|
1878
|
+
"style": {
|
|
1879
|
+
"anyOf": [
|
|
1880
|
+
{
|
|
1881
|
+
"$ref":
|
|
1882
|
+
"#/$defs/MessageStyle"
|
|
1883
|
+
},
|
|
1884
|
+
{
|
|
1885
|
+
"type": "null"
|
|
1886
|
+
}
|
|
1887
|
+
],
|
|
1888
|
+
"default": null,
|
|
1889
|
+
"description": "The style of the message. This is used by the client to determine how to display the message."
|
|
1890
|
+
},
|
|
1891
|
+
"tool_call_id": {
|
|
1892
|
+
"anyOf": [
|
|
1893
|
+
{
|
|
1894
|
+
"type": "string"
|
|
1895
|
+
},
|
|
1896
|
+
{
|
|
1897
|
+
"type": "null"
|
|
1898
|
+
}
|
|
1899
|
+
],
|
|
1900
|
+
"default": null,
|
|
1901
|
+
"description": "The ID of the tool call that is being responded to.",
|
|
1902
|
+
"title": "Tool Call Id"
|
|
1903
|
+
},
|
|
1904
|
+
"name": {
|
|
1905
|
+
"anyOf": [
|
|
1906
|
+
{
|
|
1907
|
+
"type": "string"
|
|
1908
|
+
},
|
|
1909
|
+
{
|
|
1910
|
+
"type": "null"
|
|
1911
|
+
}
|
|
1912
|
+
],
|
|
1913
|
+
"default": null,
|
|
1914
|
+
"description": "The name of the tool that is being responded to.",
|
|
1915
|
+
"title": "Name"
|
|
1916
|
+
},
|
|
1917
|
+
"content": {
|
|
1918
|
+
"anyOf": [
|
|
1919
|
+
{},
|
|
1920
|
+
{
|
|
1921
|
+
"type": "null"
|
|
1922
|
+
}
|
|
1923
|
+
],
|
|
1924
|
+
"default": null,
|
|
1925
|
+
"description": "The result of the tool.",
|
|
1926
|
+
"title": "Content"
|
|
1927
|
+
}
|
|
1928
|
+
},
|
|
1929
|
+
"title": "ToolResponseContentEntityOptional",
|
|
1930
|
+
"type": "object"
|
|
1931
|
+
}
|
|
1932
|
+
},
|
|
1933
|
+
"description": "Filter model for TaskMessage - all fields optional for flexible filtering.\n\nThe `exclude` field determines whether this filter is inclusionary or exclusionary.\nWhen multiple filters are provided:\n- Inclusionary filters (exclude=False) are OR'd together\n- Exclusionary filters (exclude=True) are OR'd together and negated with $nor\n- The two groups are AND'd: (include1 OR include2) AND NOT (exclude1 OR exclude2)",
|
|
1934
|
+
"properties": {
|
|
1935
|
+
"content": {
|
|
1936
|
+
"anyOf": [
|
|
1937
|
+
{
|
|
1938
|
+
"$ref":
|
|
1939
|
+
"#/$defs/ToolRequestContentEntityOptional"
|
|
1940
|
+
},
|
|
1941
|
+
{
|
|
1942
|
+
"$ref":
|
|
1943
|
+
"#/$defs/DataContentEntityOptional"
|
|
1944
|
+
},
|
|
1945
|
+
{
|
|
1946
|
+
"$ref":
|
|
1947
|
+
"#/$defs/TextContentEntityOptional"
|
|
1948
|
+
},
|
|
1949
|
+
{
|
|
1950
|
+
"$ref":
|
|
1951
|
+
"#/$defs/ToolResponseContentEntityOptional"
|
|
1952
|
+
},
|
|
1953
|
+
{
|
|
1954
|
+
"$ref":
|
|
1955
|
+
"#/$defs/ReasoningContentEntityOptional" }, { "type": "null" } ], "default":
|
|
1956
|
+
null, "description": "Filter by message content", "title": "Content" },
|
|
1957
|
+
"streaming_status": { "anyOf": [ { "enum": [ "IN_PROGRESS", "DONE" ], "type":
|
|
1958
|
+
"string" }, { "type": "null" } ], "default": null, "description": "Filter by
|
|
1959
|
+
streaming status", "title": "Streaming Status" }, "exclude": { "default": false,
|
|
1960
|
+
"description": "If true, this filter excludes matching messages", "title":
|
|
1961
|
+
"Exclude", "type": "boolean" } }, "title": "TaskMessageEntityFilter", "type":
|
|
1962
|
+
"object" }
|
|
1963
|
+
|
|
1964
|
+
Each filter can include:
|
|
1965
|
+
|
|
1966
|
+
- `content`: Filter by message content (type, author, data fields)
|
|
1967
|
+
- `streaming_status`: Filter by status ("IN_PROGRESS" or "DONE")
|
|
1968
|
+
- `exclude`: If true, excludes matching messages (default: false)
|
|
1969
|
+
|
|
1970
|
+
Multiple filters are combined: inclusionary filters (exclude=false) are OR'd
|
|
1971
|
+
together, exclusionary filters (exclude=true) are OR'd and negated, then both
|
|
1972
|
+
groups are AND'd.
|
|
479
1973
|
|
|
480
1974
|
extra_headers: Send extra headers
|
|
481
1975
|
|
|
@@ -544,7 +2038,505 @@ class AsyncMessagesResource(AsyncAPIResource):
|
|
|
544
2038
|
Args:
|
|
545
2039
|
task_id: The task ID
|
|
546
2040
|
|
|
547
|
-
filters: JSON-encoded
|
|
2041
|
+
filters: JSON-encoded array of TaskMessageEntityFilter objects.
|
|
2042
|
+
|
|
2043
|
+
Schema: {
|
|
2044
|
+
"$defs": {
|
|
2045
|
+
"DataContentEntityOptional": {
|
|
2046
|
+
"properties": {
|
|
2047
|
+
"type": {
|
|
2048
|
+
"anyOf": [
|
|
2049
|
+
{
|
|
2050
|
+
"const": "data",
|
|
2051
|
+
"type": "string"
|
|
2052
|
+
},
|
|
2053
|
+
{
|
|
2054
|
+
"type": "null"
|
|
2055
|
+
}
|
|
2056
|
+
],
|
|
2057
|
+
"default": null,
|
|
2058
|
+
"description": "The type of the message, in this case `data`.",
|
|
2059
|
+
"title": "Type"
|
|
2060
|
+
},
|
|
2061
|
+
"author": {
|
|
2062
|
+
"anyOf": [
|
|
2063
|
+
{
|
|
2064
|
+
"$ref":
|
|
2065
|
+
"#/$defs/MessageAuthor"
|
|
2066
|
+
},
|
|
2067
|
+
{
|
|
2068
|
+
"type": "null"
|
|
2069
|
+
}
|
|
2070
|
+
],
|
|
2071
|
+
"default": null,
|
|
2072
|
+
"description": "The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`."
|
|
2073
|
+
},
|
|
2074
|
+
"style": {
|
|
2075
|
+
"anyOf": [
|
|
2076
|
+
{
|
|
2077
|
+
"$ref":
|
|
2078
|
+
"#/$defs/MessageStyle"
|
|
2079
|
+
},
|
|
2080
|
+
{
|
|
2081
|
+
"type": "null"
|
|
2082
|
+
}
|
|
2083
|
+
],
|
|
2084
|
+
"default": null,
|
|
2085
|
+
"description": "The style of the message. This is used by the client to determine how to display the message."
|
|
2086
|
+
},
|
|
2087
|
+
"data": {
|
|
2088
|
+
"anyOf": [
|
|
2089
|
+
{
|
|
2090
|
+
"additionalProperties": true,
|
|
2091
|
+
"type": "object"
|
|
2092
|
+
},
|
|
2093
|
+
{
|
|
2094
|
+
"type": "null"
|
|
2095
|
+
}
|
|
2096
|
+
],
|
|
2097
|
+
"default": null,
|
|
2098
|
+
"description": "The contents of the data message.",
|
|
2099
|
+
"title": "Data"
|
|
2100
|
+
}
|
|
2101
|
+
},
|
|
2102
|
+
"title": "DataContentEntityOptional",
|
|
2103
|
+
"type": "object"
|
|
2104
|
+
},
|
|
2105
|
+
"FileAttachmentEntity": {
|
|
2106
|
+
"description": "Represents a file attachment in messages.",
|
|
2107
|
+
"properties": {
|
|
2108
|
+
"file_id": {
|
|
2109
|
+
"description": "The unique ID of the attached file",
|
|
2110
|
+
"title": "File Id",
|
|
2111
|
+
"type": "string"
|
|
2112
|
+
},
|
|
2113
|
+
"name": {
|
|
2114
|
+
"description": "The name of the file",
|
|
2115
|
+
"title": "Name",
|
|
2116
|
+
"type": "string"
|
|
2117
|
+
},
|
|
2118
|
+
"size": {
|
|
2119
|
+
"description": "The size of the file in bytes",
|
|
2120
|
+
"title": "Size",
|
|
2121
|
+
"type": "integer"
|
|
2122
|
+
},
|
|
2123
|
+
"type": {
|
|
2124
|
+
"description": "The MIME type or content type of the file",
|
|
2125
|
+
"title": "Type",
|
|
2126
|
+
"type": "string"
|
|
2127
|
+
}
|
|
2128
|
+
},
|
|
2129
|
+
"required": [
|
|
2130
|
+
"file_id",
|
|
2131
|
+
"name",
|
|
2132
|
+
"size",
|
|
2133
|
+
"type"
|
|
2134
|
+
],
|
|
2135
|
+
"title": "FileAttachmentEntity",
|
|
2136
|
+
"type": "object"
|
|
2137
|
+
},
|
|
2138
|
+
"MessageAuthor": {
|
|
2139
|
+
"enum": [
|
|
2140
|
+
"user",
|
|
2141
|
+
"agent"
|
|
2142
|
+
],
|
|
2143
|
+
"title": "MessageAuthor",
|
|
2144
|
+
"type": "string"
|
|
2145
|
+
},
|
|
2146
|
+
"MessageStyle": {
|
|
2147
|
+
"enum": [
|
|
2148
|
+
"static",
|
|
2149
|
+
"active"
|
|
2150
|
+
],
|
|
2151
|
+
"title": "MessageStyle",
|
|
2152
|
+
"type": "string"
|
|
2153
|
+
},
|
|
2154
|
+
"ReasoningContentEntityOptional": {
|
|
2155
|
+
"properties": {
|
|
2156
|
+
"type": {
|
|
2157
|
+
"anyOf": [
|
|
2158
|
+
{
|
|
2159
|
+
"const": "reasoning",
|
|
2160
|
+
"type": "string"
|
|
2161
|
+
},
|
|
2162
|
+
{
|
|
2163
|
+
"type": "null"
|
|
2164
|
+
}
|
|
2165
|
+
],
|
|
2166
|
+
"default": null,
|
|
2167
|
+
"description": "The type of the message, in this case `reasoning`.",
|
|
2168
|
+
"title": "Type"
|
|
2169
|
+
},
|
|
2170
|
+
"author": {
|
|
2171
|
+
"anyOf": [
|
|
2172
|
+
{
|
|
2173
|
+
"$ref":
|
|
2174
|
+
"#/$defs/MessageAuthor"
|
|
2175
|
+
},
|
|
2176
|
+
{
|
|
2177
|
+
"type": "null"
|
|
2178
|
+
}
|
|
2179
|
+
],
|
|
2180
|
+
"default": null,
|
|
2181
|
+
"description": "The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`."
|
|
2182
|
+
},
|
|
2183
|
+
"style": {
|
|
2184
|
+
"anyOf": [
|
|
2185
|
+
{
|
|
2186
|
+
"$ref":
|
|
2187
|
+
"#/$defs/MessageStyle"
|
|
2188
|
+
},
|
|
2189
|
+
{
|
|
2190
|
+
"type": "null"
|
|
2191
|
+
}
|
|
2192
|
+
],
|
|
2193
|
+
"default": null,
|
|
2194
|
+
"description": "The style of the message. This is used by the client to determine how to display the message."
|
|
2195
|
+
},
|
|
2196
|
+
"summary": {
|
|
2197
|
+
"anyOf": [
|
|
2198
|
+
{
|
|
2199
|
+
"items": {
|
|
2200
|
+
"type": "string"
|
|
2201
|
+
},
|
|
2202
|
+
"type": "array"
|
|
2203
|
+
},
|
|
2204
|
+
{
|
|
2205
|
+
"type": "null"
|
|
2206
|
+
}
|
|
2207
|
+
],
|
|
2208
|
+
"default": null,
|
|
2209
|
+
"description": "A list of short reasoning summaries",
|
|
2210
|
+
"title": "Summary"
|
|
2211
|
+
},
|
|
2212
|
+
"content": {
|
|
2213
|
+
"anyOf": [
|
|
2214
|
+
{
|
|
2215
|
+
"items": {
|
|
2216
|
+
"type": "string"
|
|
2217
|
+
},
|
|
2218
|
+
"type": "array"
|
|
2219
|
+
},
|
|
2220
|
+
{
|
|
2221
|
+
"type": "null"
|
|
2222
|
+
}
|
|
2223
|
+
],
|
|
2224
|
+
"default": null,
|
|
2225
|
+
"description": "The reasoning content or chain-of-thought text",
|
|
2226
|
+
"title": "Content"
|
|
2227
|
+
}
|
|
2228
|
+
},
|
|
2229
|
+
"title": "ReasoningContentEntityOptional",
|
|
2230
|
+
"type": "object"
|
|
2231
|
+
},
|
|
2232
|
+
"TextContentEntityOptional": {
|
|
2233
|
+
"properties": {
|
|
2234
|
+
"type": {
|
|
2235
|
+
"anyOf": [
|
|
2236
|
+
{
|
|
2237
|
+
"const": "text",
|
|
2238
|
+
"type": "string"
|
|
2239
|
+
},
|
|
2240
|
+
{
|
|
2241
|
+
"type": "null"
|
|
2242
|
+
}
|
|
2243
|
+
],
|
|
2244
|
+
"default": null,
|
|
2245
|
+
"description": "The type of the message, in this case `text`.",
|
|
2246
|
+
"title": "Type"
|
|
2247
|
+
},
|
|
2248
|
+
"author": {
|
|
2249
|
+
"anyOf": [
|
|
2250
|
+
{
|
|
2251
|
+
"$ref":
|
|
2252
|
+
"#/$defs/MessageAuthor"
|
|
2253
|
+
},
|
|
2254
|
+
{
|
|
2255
|
+
"type": "null"
|
|
2256
|
+
}
|
|
2257
|
+
],
|
|
2258
|
+
"default": null,
|
|
2259
|
+
"description": "The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`."
|
|
2260
|
+
},
|
|
2261
|
+
"style": {
|
|
2262
|
+
"anyOf": [
|
|
2263
|
+
{
|
|
2264
|
+
"$ref":
|
|
2265
|
+
"#/$defs/MessageStyle"
|
|
2266
|
+
},
|
|
2267
|
+
{
|
|
2268
|
+
"type": "null"
|
|
2269
|
+
}
|
|
2270
|
+
],
|
|
2271
|
+
"default": null,
|
|
2272
|
+
"description": "The style of the message. This is used by the client to determine how to display the message."
|
|
2273
|
+
},
|
|
2274
|
+
"format": {
|
|
2275
|
+
"anyOf": [
|
|
2276
|
+
{
|
|
2277
|
+
"$ref":
|
|
2278
|
+
"#/$defs/TextFormat"
|
|
2279
|
+
},
|
|
2280
|
+
{
|
|
2281
|
+
"type": "null"
|
|
2282
|
+
}
|
|
2283
|
+
],
|
|
2284
|
+
"default": null,
|
|
2285
|
+
"description": "The format of the message. This is used by the client to determine how to display the message."
|
|
2286
|
+
},
|
|
2287
|
+
"content": {
|
|
2288
|
+
"anyOf": [
|
|
2289
|
+
{
|
|
2290
|
+
"type": "string"
|
|
2291
|
+
},
|
|
2292
|
+
{
|
|
2293
|
+
"type": "null"
|
|
2294
|
+
}
|
|
2295
|
+
],
|
|
2296
|
+
"default": null,
|
|
2297
|
+
"description": "The contents of the text message.",
|
|
2298
|
+
"title": "Content"
|
|
2299
|
+
},
|
|
2300
|
+
"attachments": {
|
|
2301
|
+
"anyOf": [
|
|
2302
|
+
{
|
|
2303
|
+
"items": {
|
|
2304
|
+
"$ref":
|
|
2305
|
+
"#/$defs/FileAttachmentEntity"
|
|
2306
|
+
},
|
|
2307
|
+
"type": "array"
|
|
2308
|
+
},
|
|
2309
|
+
{
|
|
2310
|
+
"type": "null"
|
|
2311
|
+
}
|
|
2312
|
+
],
|
|
2313
|
+
"default": null,
|
|
2314
|
+
"description": "Optional list of file attachments with structured metadata.",
|
|
2315
|
+
"title": "Attachments"
|
|
2316
|
+
}
|
|
2317
|
+
},
|
|
2318
|
+
"title": "TextContentEntityOptional",
|
|
2319
|
+
"type": "object"
|
|
2320
|
+
},
|
|
2321
|
+
"TextFormat": {
|
|
2322
|
+
"enum": [
|
|
2323
|
+
"markdown",
|
|
2324
|
+
"plain",
|
|
2325
|
+
"code"
|
|
2326
|
+
],
|
|
2327
|
+
"title": "TextFormat",
|
|
2328
|
+
"type": "string"
|
|
2329
|
+
},
|
|
2330
|
+
"ToolRequestContentEntityOptional": {
|
|
2331
|
+
"properties": {
|
|
2332
|
+
"type": {
|
|
2333
|
+
"anyOf": [
|
|
2334
|
+
{
|
|
2335
|
+
"const": "tool_request",
|
|
2336
|
+
"type": "string"
|
|
2337
|
+
},
|
|
2338
|
+
{
|
|
2339
|
+
"type": "null"
|
|
2340
|
+
}
|
|
2341
|
+
],
|
|
2342
|
+
"default": null,
|
|
2343
|
+
"description": "The type of the message, in this case `tool_request`.",
|
|
2344
|
+
"title": "Type"
|
|
2345
|
+
},
|
|
2346
|
+
"author": {
|
|
2347
|
+
"anyOf": [
|
|
2348
|
+
{
|
|
2349
|
+
"$ref":
|
|
2350
|
+
"#/$defs/MessageAuthor"
|
|
2351
|
+
},
|
|
2352
|
+
{
|
|
2353
|
+
"type": "null"
|
|
2354
|
+
}
|
|
2355
|
+
],
|
|
2356
|
+
"default": null,
|
|
2357
|
+
"description": "The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`."
|
|
2358
|
+
},
|
|
2359
|
+
"style": {
|
|
2360
|
+
"anyOf": [
|
|
2361
|
+
{
|
|
2362
|
+
"$ref":
|
|
2363
|
+
"#/$defs/MessageStyle"
|
|
2364
|
+
},
|
|
2365
|
+
{
|
|
2366
|
+
"type": "null"
|
|
2367
|
+
}
|
|
2368
|
+
],
|
|
2369
|
+
"default": null,
|
|
2370
|
+
"description": "The style of the message. This is used by the client to determine how to display the message."
|
|
2371
|
+
},
|
|
2372
|
+
"tool_call_id": {
|
|
2373
|
+
"anyOf": [
|
|
2374
|
+
{
|
|
2375
|
+
"type": "string"
|
|
2376
|
+
},
|
|
2377
|
+
{
|
|
2378
|
+
"type": "null"
|
|
2379
|
+
}
|
|
2380
|
+
],
|
|
2381
|
+
"default": null,
|
|
2382
|
+
"description": "The ID of the tool call that is being requested.",
|
|
2383
|
+
"title": "Tool Call Id"
|
|
2384
|
+
},
|
|
2385
|
+
"name": {
|
|
2386
|
+
"anyOf": [
|
|
2387
|
+
{
|
|
2388
|
+
"type": "string"
|
|
2389
|
+
},
|
|
2390
|
+
{
|
|
2391
|
+
"type": "null"
|
|
2392
|
+
}
|
|
2393
|
+
],
|
|
2394
|
+
"default": null,
|
|
2395
|
+
"description": "The name of the tool that is being requested.",
|
|
2396
|
+
"title": "Name"
|
|
2397
|
+
},
|
|
2398
|
+
"arguments": {
|
|
2399
|
+
"anyOf": [
|
|
2400
|
+
{
|
|
2401
|
+
"additionalProperties": true,
|
|
2402
|
+
"type": "object"
|
|
2403
|
+
},
|
|
2404
|
+
{
|
|
2405
|
+
"type": "null"
|
|
2406
|
+
}
|
|
2407
|
+
],
|
|
2408
|
+
"default": null,
|
|
2409
|
+
"description": "The arguments to the tool.",
|
|
2410
|
+
"title": "Arguments"
|
|
2411
|
+
}
|
|
2412
|
+
},
|
|
2413
|
+
"title": "ToolRequestContentEntityOptional",
|
|
2414
|
+
"type": "object"
|
|
2415
|
+
},
|
|
2416
|
+
"ToolResponseContentEntityOptional": {
|
|
2417
|
+
"properties": {
|
|
2418
|
+
"type": {
|
|
2419
|
+
"anyOf": [
|
|
2420
|
+
{
|
|
2421
|
+
"const": "tool_response",
|
|
2422
|
+
"type": "string"
|
|
2423
|
+
},
|
|
2424
|
+
{
|
|
2425
|
+
"type": "null"
|
|
2426
|
+
}
|
|
2427
|
+
],
|
|
2428
|
+
"default": null,
|
|
2429
|
+
"description": "The type of the message, in this case `tool_response`.",
|
|
2430
|
+
"title": "Type"
|
|
2431
|
+
},
|
|
2432
|
+
"author": {
|
|
2433
|
+
"anyOf": [
|
|
2434
|
+
{
|
|
2435
|
+
"$ref":
|
|
2436
|
+
"#/$defs/MessageAuthor"
|
|
2437
|
+
},
|
|
2438
|
+
{
|
|
2439
|
+
"type": "null"
|
|
2440
|
+
}
|
|
2441
|
+
],
|
|
2442
|
+
"default": null,
|
|
2443
|
+
"description": "The role of the messages author, in this case `system`, `user`, `assistant`, or `tool`."
|
|
2444
|
+
},
|
|
2445
|
+
"style": {
|
|
2446
|
+
"anyOf": [
|
|
2447
|
+
{
|
|
2448
|
+
"$ref":
|
|
2449
|
+
"#/$defs/MessageStyle"
|
|
2450
|
+
},
|
|
2451
|
+
{
|
|
2452
|
+
"type": "null"
|
|
2453
|
+
}
|
|
2454
|
+
],
|
|
2455
|
+
"default": null,
|
|
2456
|
+
"description": "The style of the message. This is used by the client to determine how to display the message."
|
|
2457
|
+
},
|
|
2458
|
+
"tool_call_id": {
|
|
2459
|
+
"anyOf": [
|
|
2460
|
+
{
|
|
2461
|
+
"type": "string"
|
|
2462
|
+
},
|
|
2463
|
+
{
|
|
2464
|
+
"type": "null"
|
|
2465
|
+
}
|
|
2466
|
+
],
|
|
2467
|
+
"default": null,
|
|
2468
|
+
"description": "The ID of the tool call that is being responded to.",
|
|
2469
|
+
"title": "Tool Call Id"
|
|
2470
|
+
},
|
|
2471
|
+
"name": {
|
|
2472
|
+
"anyOf": [
|
|
2473
|
+
{
|
|
2474
|
+
"type": "string"
|
|
2475
|
+
},
|
|
2476
|
+
{
|
|
2477
|
+
"type": "null"
|
|
2478
|
+
}
|
|
2479
|
+
],
|
|
2480
|
+
"default": null,
|
|
2481
|
+
"description": "The name of the tool that is being responded to.",
|
|
2482
|
+
"title": "Name"
|
|
2483
|
+
},
|
|
2484
|
+
"content": {
|
|
2485
|
+
"anyOf": [
|
|
2486
|
+
{},
|
|
2487
|
+
{
|
|
2488
|
+
"type": "null"
|
|
2489
|
+
}
|
|
2490
|
+
],
|
|
2491
|
+
"default": null,
|
|
2492
|
+
"description": "The result of the tool.",
|
|
2493
|
+
"title": "Content"
|
|
2494
|
+
}
|
|
2495
|
+
},
|
|
2496
|
+
"title": "ToolResponseContentEntityOptional",
|
|
2497
|
+
"type": "object"
|
|
2498
|
+
}
|
|
2499
|
+
},
|
|
2500
|
+
"description": "Filter model for TaskMessage - all fields optional for flexible filtering.\n\nThe `exclude` field determines whether this filter is inclusionary or exclusionary.\nWhen multiple filters are provided:\n- Inclusionary filters (exclude=False) are OR'd together\n- Exclusionary filters (exclude=True) are OR'd together and negated with $nor\n- The two groups are AND'd: (include1 OR include2) AND NOT (exclude1 OR exclude2)",
|
|
2501
|
+
"properties": {
|
|
2502
|
+
"content": {
|
|
2503
|
+
"anyOf": [
|
|
2504
|
+
{
|
|
2505
|
+
"$ref":
|
|
2506
|
+
"#/$defs/ToolRequestContentEntityOptional"
|
|
2507
|
+
},
|
|
2508
|
+
{
|
|
2509
|
+
"$ref":
|
|
2510
|
+
"#/$defs/DataContentEntityOptional"
|
|
2511
|
+
},
|
|
2512
|
+
{
|
|
2513
|
+
"$ref":
|
|
2514
|
+
"#/$defs/TextContentEntityOptional"
|
|
2515
|
+
},
|
|
2516
|
+
{
|
|
2517
|
+
"$ref":
|
|
2518
|
+
"#/$defs/ToolResponseContentEntityOptional"
|
|
2519
|
+
},
|
|
2520
|
+
{
|
|
2521
|
+
"$ref":
|
|
2522
|
+
"#/$defs/ReasoningContentEntityOptional" }, { "type": "null" } ], "default":
|
|
2523
|
+
null, "description": "Filter by message content", "title": "Content" },
|
|
2524
|
+
"streaming_status": { "anyOf": [ { "enum": [ "IN_PROGRESS", "DONE" ], "type":
|
|
2525
|
+
"string" }, { "type": "null" } ], "default": null, "description": "Filter by
|
|
2526
|
+
streaming status", "title": "Streaming Status" }, "exclude": { "default": false,
|
|
2527
|
+
"description": "If true, this filter excludes matching messages", "title":
|
|
2528
|
+
"Exclude", "type": "boolean" } }, "title": "TaskMessageEntityFilter", "type":
|
|
2529
|
+
"object" }
|
|
2530
|
+
|
|
2531
|
+
Each filter can include:
|
|
2532
|
+
|
|
2533
|
+
- `content`: Filter by message content (type, author, data fields)
|
|
2534
|
+
- `streaming_status`: Filter by status ("IN_PROGRESS" or "DONE")
|
|
2535
|
+
- `exclude`: If true, excludes matching messages (default: false)
|
|
2536
|
+
|
|
2537
|
+
Multiple filters are combined: inclusionary filters (exclude=false) are OR'd
|
|
2538
|
+
together, exclusionary filters (exclude=true) are OR'd and negated, then both
|
|
2539
|
+
groups are AND'd.
|
|
548
2540
|
|
|
549
2541
|
extra_headers: Send extra headers
|
|
550
2542
|
|