llama-stack-client 0.2.16 → 0.2.17

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.
Files changed (149) hide show
  1. package/LICENSE +4 -198
  2. package/index.d.mts +2 -2
  3. package/index.d.ts +2 -2
  4. package/index.d.ts.map +1 -1
  5. package/index.js.map +1 -1
  6. package/index.mjs +1 -1
  7. package/index.mjs.map +1 -1
  8. package/package.json +2 -6
  9. package/resources/agents/agents.d.ts +29 -2
  10. package/resources/agents/agents.d.ts.map +1 -1
  11. package/resources/agents/agents.js.map +1 -1
  12. package/resources/agents/agents.mjs.map +1 -1
  13. package/resources/agents/session.d.ts +18 -0
  14. package/resources/agents/session.d.ts.map +1 -1
  15. package/resources/agents/steps.d.ts +4 -1
  16. package/resources/agents/steps.d.ts.map +1 -1
  17. package/resources/agents/turn.d.ts +113 -8
  18. package/resources/agents/turn.d.ts.map +1 -1
  19. package/resources/benchmarks.d.ts +15 -0
  20. package/resources/benchmarks.d.ts.map +1 -1
  21. package/resources/chat/chat.d.ts +24 -0
  22. package/resources/chat/chat.d.ts.map +1 -1
  23. package/resources/chat/chat.js.map +1 -1
  24. package/resources/chat/chat.mjs.map +1 -1
  25. package/resources/chat/completions.d.ts +648 -6
  26. package/resources/chat/completions.d.ts.map +1 -1
  27. package/resources/datasets.d.ts +42 -6
  28. package/resources/datasets.d.ts.map +1 -1
  29. package/resources/eval/eval.d.ts +9 -0
  30. package/resources/eval/eval.d.ts.map +1 -1
  31. package/resources/eval/eval.js.map +1 -1
  32. package/resources/eval/eval.mjs.map +1 -1
  33. package/resources/files.d.ts +9 -0
  34. package/resources/files.d.ts.map +1 -1
  35. package/resources/index.d.ts +1 -1
  36. package/resources/index.d.ts.map +1 -1
  37. package/resources/index.js.map +1 -1
  38. package/resources/index.mjs +1 -1
  39. package/resources/index.mjs.map +1 -1
  40. package/resources/inference.d.ts +36 -0
  41. package/resources/inference.d.ts.map +1 -1
  42. package/resources/inspect.d.ts +45 -1
  43. package/resources/inspect.d.ts.map +1 -1
  44. package/resources/inspect.js +1 -1
  45. package/resources/inspect.mjs +1 -1
  46. package/resources/models.d.ts +21 -0
  47. package/resources/models.d.ts.map +1 -1
  48. package/resources/post-training/job.d.ts +95 -2
  49. package/resources/post-training/job.d.ts.map +1 -1
  50. package/resources/post-training/post-training.d.ts +206 -0
  51. package/resources/post-training/post-training.d.ts.map +1 -1
  52. package/resources/post-training/post-training.js.map +1 -1
  53. package/resources/post-training/post-training.mjs.map +1 -1
  54. package/resources/providers.d.ts +9 -0
  55. package/resources/providers.d.ts.map +1 -1
  56. package/resources/responses/input-items.d.ts +114 -0
  57. package/resources/responses/input-items.d.ts.map +1 -1
  58. package/resources/responses/responses.d.ts +1265 -12
  59. package/resources/responses/responses.d.ts.map +1 -1
  60. package/resources/responses/responses.js.map +1 -1
  61. package/resources/responses/responses.mjs.map +1 -1
  62. package/resources/routes.d.ts +10 -1
  63. package/resources/routes.d.ts.map +1 -1
  64. package/resources/routes.js +1 -1
  65. package/resources/routes.mjs +1 -1
  66. package/resources/safety.d.ts +72 -1
  67. package/resources/safety.d.ts.map +1 -1
  68. package/resources/safety.js +6 -0
  69. package/resources/safety.js.map +1 -1
  70. package/resources/safety.mjs +6 -0
  71. package/resources/safety.mjs.map +1 -1
  72. package/resources/scoring-functions.d.ts +51 -0
  73. package/resources/scoring-functions.d.ts.map +1 -1
  74. package/resources/scoring.d.ts +9 -0
  75. package/resources/scoring.d.ts.map +1 -1
  76. package/resources/shared.d.ts +209 -3
  77. package/resources/shared.d.ts.map +1 -1
  78. package/resources/shields.d.ts +7 -1
  79. package/resources/shields.d.ts.map +1 -1
  80. package/resources/synthetic-data-generation.d.ts +18 -1
  81. package/resources/synthetic-data-generation.d.ts.map +1 -1
  82. package/resources/synthetic-data-generation.js +3 -0
  83. package/resources/synthetic-data-generation.js.map +1 -1
  84. package/resources/synthetic-data-generation.mjs +3 -0
  85. package/resources/synthetic-data-generation.mjs.map +1 -1
  86. package/resources/telemetry.d.ts +214 -0
  87. package/resources/telemetry.d.ts.map +1 -1
  88. package/resources/tool-runtime/rag-tool.d.ts +16 -4
  89. package/resources/tool-runtime/rag-tool.d.ts.map +1 -1
  90. package/resources/tool-runtime/rag-tool.js +2 -2
  91. package/resources/tool-runtime/rag-tool.mjs +2 -2
  92. package/resources/tool-runtime/tool-runtime.d.ts +52 -1
  93. package/resources/tool-runtime/tool-runtime.d.ts.map +1 -1
  94. package/resources/tool-runtime/tool-runtime.js.map +1 -1
  95. package/resources/tool-runtime/tool-runtime.mjs.map +1 -1
  96. package/resources/toolgroups.d.ts +30 -0
  97. package/resources/toolgroups.d.ts.map +1 -1
  98. package/resources/tools.d.ts +45 -0
  99. package/resources/tools.d.ts.map +1 -1
  100. package/resources/vector-dbs.d.ts +45 -0
  101. package/resources/vector-dbs.d.ts.map +1 -1
  102. package/resources/vector-io.d.ts +9 -0
  103. package/resources/vector-io.d.ts.map +1 -1
  104. package/resources/vector-stores/files.d.ts +149 -1
  105. package/resources/vector-stores/files.d.ts.map +1 -1
  106. package/resources/vector-stores/vector-stores.d.ts +121 -1
  107. package/resources/vector-stores/vector-stores.d.ts.map +1 -1
  108. package/resources/vector-stores/vector-stores.js.map +1 -1
  109. package/resources/vector-stores/vector-stores.mjs.map +1 -1
  110. package/src/index.ts +9 -1
  111. package/src/resources/agents/agents.ts +29 -2
  112. package/src/resources/agents/session.ts +18 -0
  113. package/src/resources/agents/steps.ts +4 -1
  114. package/src/resources/agents/turn.ts +113 -8
  115. package/src/resources/benchmarks.ts +15 -0
  116. package/src/resources/chat/chat.ts +24 -0
  117. package/src/resources/chat/completions.ts +678 -0
  118. package/src/resources/datasets.ts +42 -6
  119. package/src/resources/eval/eval.ts +9 -0
  120. package/src/resources/files.ts +9 -0
  121. package/src/resources/index.ts +7 -1
  122. package/src/resources/inference.ts +36 -0
  123. package/src/resources/inspect.ts +45 -1
  124. package/src/resources/models.ts +21 -0
  125. package/src/resources/post-training/job.ts +95 -2
  126. package/src/resources/post-training/post-training.ts +206 -0
  127. package/src/resources/providers.ts +9 -0
  128. package/src/resources/responses/input-items.ts +114 -0
  129. package/src/resources/responses/responses.ts +1265 -12
  130. package/src/resources/routes.ts +10 -1
  131. package/src/resources/safety.ts +83 -1
  132. package/src/resources/scoring-functions.ts +51 -0
  133. package/src/resources/scoring.ts +9 -0
  134. package/src/resources/shared.ts +209 -3
  135. package/src/resources/shields.ts +7 -1
  136. package/src/resources/synthetic-data-generation.ts +18 -1
  137. package/src/resources/telemetry.ts +214 -0
  138. package/src/resources/tool-runtime/rag-tool.ts +16 -4
  139. package/src/resources/tool-runtime/tool-runtime.ts +52 -1
  140. package/src/resources/toolgroups.ts +30 -0
  141. package/src/resources/tools.ts +45 -0
  142. package/src/resources/vector-dbs.ts +45 -0
  143. package/src/resources/vector-io.ts +9 -0
  144. package/src/resources/vector-stores/files.ts +149 -1
  145. package/src/resources/vector-stores/vector-stores.ts +121 -1
  146. package/src/version.ts +1 -1
  147. package/version.d.ts +1 -1
  148. package/version.js +1 -1
  149. package/version.mjs +1 -1
@@ -82,7 +82,7 @@ export declare namespace CompletionCreateResponse {
82
82
  /**
83
83
  * The content of the message, which can include text and other media
84
84
  */
85
- content: string | Array<OpenAIUserMessageParam.OpenAIChatCompletionContentPartTextParam | OpenAIUserMessageParam.OpenAIChatCompletionContentPartImageParam>;
85
+ content: string | Array<OpenAIUserMessageParam.OpenAIChatCompletionContentPartTextParam | OpenAIUserMessageParam.OpenAIChatCompletionContentPartImageParam | OpenAIUserMessageParam.OpenAIFile>;
86
86
  /**
87
87
  * Must be "user" to identify this as a user message
88
88
  */
@@ -93,20 +93,58 @@ export declare namespace CompletionCreateResponse {
93
93
  name?: string;
94
94
  }
95
95
  namespace OpenAIUserMessageParam {
96
+ /**
97
+ * Text content part for OpenAI-compatible chat completion messages.
98
+ */
96
99
  interface OpenAIChatCompletionContentPartTextParam {
100
+ /**
101
+ * The text content of the message
102
+ */
97
103
  text: string;
104
+ /**
105
+ * Must be "text" to identify this as text content
106
+ */
98
107
  type: 'text';
99
108
  }
109
+ /**
110
+ * Image content part for OpenAI-compatible chat completion messages.
111
+ */
100
112
  interface OpenAIChatCompletionContentPartImageParam {
113
+ /**
114
+ * Image URL specification and processing details
115
+ */
101
116
  image_url: OpenAIChatCompletionContentPartImageParam.ImageURL;
117
+ /**
118
+ * Must be "image_url" to identify this as image content
119
+ */
102
120
  type: 'image_url';
103
121
  }
104
122
  namespace OpenAIChatCompletionContentPartImageParam {
123
+ /**
124
+ * Image URL specification and processing details
125
+ */
105
126
  interface ImageURL {
127
+ /**
128
+ * URL of the image to include in the message
129
+ */
106
130
  url: string;
131
+ /**
132
+ * (Optional) Level of detail for image processing. Can be "low", "high", or "auto"
133
+ */
107
134
  detail?: string;
108
135
  }
109
136
  }
137
+ interface OpenAIFile {
138
+ file: OpenAIFile.File;
139
+ type: 'file';
140
+ }
141
+ namespace OpenAIFile {
142
+ interface File {
143
+ file_data?: string;
144
+ file_id?: string;
145
+ filename?: string;
146
+ }
147
+ }
110
148
  }
111
149
  /**
112
150
  * A system message providing instructions or context to the model.
@@ -128,8 +166,17 @@ export declare namespace CompletionCreateResponse {
128
166
  name?: string;
129
167
  }
130
168
  namespace OpenAISystemMessageParam {
169
+ /**
170
+ * Text content part for OpenAI-compatible chat completion messages.
171
+ */
131
172
  interface UnionMember1 {
173
+ /**
174
+ * The text content of the message
175
+ */
132
176
  text: string;
177
+ /**
178
+ * Must be "text" to identify this as text content
179
+ */
133
180
  type: 'text';
134
181
  }
135
182
  }
@@ -156,19 +203,52 @@ export declare namespace CompletionCreateResponse {
156
203
  tool_calls?: Array<OpenAIAssistantMessageParam.ToolCall>;
157
204
  }
158
205
  namespace OpenAIAssistantMessageParam {
206
+ /**
207
+ * Text content part for OpenAI-compatible chat completion messages.
208
+ */
159
209
  interface UnionMember1 {
210
+ /**
211
+ * The text content of the message
212
+ */
160
213
  text: string;
214
+ /**
215
+ * Must be "text" to identify this as text content
216
+ */
161
217
  type: 'text';
162
218
  }
219
+ /**
220
+ * Tool call specification for OpenAI-compatible chat completion responses.
221
+ */
163
222
  interface ToolCall {
223
+ /**
224
+ * Must be "function" to identify this as a function call
225
+ */
164
226
  type: 'function';
227
+ /**
228
+ * (Optional) Unique identifier for the tool call
229
+ */
165
230
  id?: string;
231
+ /**
232
+ * (Optional) Function call details
233
+ */
166
234
  function?: ToolCall.Function;
235
+ /**
236
+ * (Optional) Index of the tool call in the list
237
+ */
167
238
  index?: number;
168
239
  }
169
240
  namespace ToolCall {
241
+ /**
242
+ * (Optional) Function call details
243
+ */
170
244
  interface Function {
245
+ /**
246
+ * (Optional) Arguments to pass to the function as a JSON string
247
+ */
171
248
  arguments?: string;
249
+ /**
250
+ * (Optional) Name of the function to call
251
+ */
172
252
  name?: string;
173
253
  }
174
254
  }
@@ -192,8 +272,17 @@ export declare namespace CompletionCreateResponse {
192
272
  tool_call_id: string;
193
273
  }
194
274
  namespace OpenAIToolMessageParam {
275
+ /**
276
+ * Text content part for OpenAI-compatible chat completion messages.
277
+ */
195
278
  interface UnionMember1 {
279
+ /**
280
+ * The text content of the message
281
+ */
196
282
  text: string;
283
+ /**
284
+ * Must be "text" to identify this as text content
285
+ */
197
286
  type: 'text';
198
287
  }
199
288
  }
@@ -215,8 +304,17 @@ export declare namespace CompletionCreateResponse {
215
304
  name?: string;
216
305
  }
217
306
  namespace OpenAIDeveloperMessageParam {
307
+ /**
308
+ * Text content part for OpenAI-compatible chat completion messages.
309
+ */
218
310
  interface UnionMember1 {
311
+ /**
312
+ * The text content of the message
313
+ */
219
314
  text: string;
315
+ /**
316
+ * Must be "text" to identify this as text content
317
+ */
220
318
  type: 'text';
221
319
  }
222
320
  }
@@ -333,7 +431,7 @@ export declare namespace CompletionRetrieveResponse {
333
431
  /**
334
432
  * The content of the message, which can include text and other media
335
433
  */
336
- content: string | Array<OpenAIUserMessageParam.OpenAIChatCompletionContentPartTextParam | OpenAIUserMessageParam.OpenAIChatCompletionContentPartImageParam>;
434
+ content: string | Array<OpenAIUserMessageParam.OpenAIChatCompletionContentPartTextParam | OpenAIUserMessageParam.OpenAIChatCompletionContentPartImageParam | OpenAIUserMessageParam.OpenAIFile>;
337
435
  /**
338
436
  * Must be "user" to identify this as a user message
339
437
  */
@@ -344,20 +442,58 @@ export declare namespace CompletionRetrieveResponse {
344
442
  name?: string;
345
443
  }
346
444
  namespace OpenAIUserMessageParam {
445
+ /**
446
+ * Text content part for OpenAI-compatible chat completion messages.
447
+ */
347
448
  interface OpenAIChatCompletionContentPartTextParam {
449
+ /**
450
+ * The text content of the message
451
+ */
348
452
  text: string;
453
+ /**
454
+ * Must be "text" to identify this as text content
455
+ */
349
456
  type: 'text';
350
457
  }
458
+ /**
459
+ * Image content part for OpenAI-compatible chat completion messages.
460
+ */
351
461
  interface OpenAIChatCompletionContentPartImageParam {
462
+ /**
463
+ * Image URL specification and processing details
464
+ */
352
465
  image_url: OpenAIChatCompletionContentPartImageParam.ImageURL;
466
+ /**
467
+ * Must be "image_url" to identify this as image content
468
+ */
353
469
  type: 'image_url';
354
470
  }
355
471
  namespace OpenAIChatCompletionContentPartImageParam {
472
+ /**
473
+ * Image URL specification and processing details
474
+ */
356
475
  interface ImageURL {
476
+ /**
477
+ * URL of the image to include in the message
478
+ */
357
479
  url: string;
480
+ /**
481
+ * (Optional) Level of detail for image processing. Can be "low", "high", or "auto"
482
+ */
358
483
  detail?: string;
359
484
  }
360
485
  }
486
+ interface OpenAIFile {
487
+ file: OpenAIFile.File;
488
+ type: 'file';
489
+ }
490
+ namespace OpenAIFile {
491
+ interface File {
492
+ file_data?: string;
493
+ file_id?: string;
494
+ filename?: string;
495
+ }
496
+ }
361
497
  }
362
498
  /**
363
499
  * A system message providing instructions or context to the model.
@@ -379,8 +515,17 @@ export declare namespace CompletionRetrieveResponse {
379
515
  name?: string;
380
516
  }
381
517
  namespace OpenAISystemMessageParam {
518
+ /**
519
+ * Text content part for OpenAI-compatible chat completion messages.
520
+ */
382
521
  interface UnionMember1 {
522
+ /**
523
+ * The text content of the message
524
+ */
383
525
  text: string;
526
+ /**
527
+ * Must be "text" to identify this as text content
528
+ */
384
529
  type: 'text';
385
530
  }
386
531
  }
@@ -407,19 +552,52 @@ export declare namespace CompletionRetrieveResponse {
407
552
  tool_calls?: Array<OpenAIAssistantMessageParam.ToolCall>;
408
553
  }
409
554
  namespace OpenAIAssistantMessageParam {
555
+ /**
556
+ * Text content part for OpenAI-compatible chat completion messages.
557
+ */
410
558
  interface UnionMember1 {
559
+ /**
560
+ * The text content of the message
561
+ */
411
562
  text: string;
563
+ /**
564
+ * Must be "text" to identify this as text content
565
+ */
412
566
  type: 'text';
413
567
  }
568
+ /**
569
+ * Tool call specification for OpenAI-compatible chat completion responses.
570
+ */
414
571
  interface ToolCall {
572
+ /**
573
+ * Must be "function" to identify this as a function call
574
+ */
415
575
  type: 'function';
576
+ /**
577
+ * (Optional) Unique identifier for the tool call
578
+ */
416
579
  id?: string;
580
+ /**
581
+ * (Optional) Function call details
582
+ */
417
583
  function?: ToolCall.Function;
584
+ /**
585
+ * (Optional) Index of the tool call in the list
586
+ */
418
587
  index?: number;
419
588
  }
420
589
  namespace ToolCall {
590
+ /**
591
+ * (Optional) Function call details
592
+ */
421
593
  interface Function {
594
+ /**
595
+ * (Optional) Arguments to pass to the function as a JSON string
596
+ */
422
597
  arguments?: string;
598
+ /**
599
+ * (Optional) Name of the function to call
600
+ */
423
601
  name?: string;
424
602
  }
425
603
  }
@@ -443,8 +621,17 @@ export declare namespace CompletionRetrieveResponse {
443
621
  tool_call_id: string;
444
622
  }
445
623
  namespace OpenAIToolMessageParam {
624
+ /**
625
+ * Text content part for OpenAI-compatible chat completion messages.
626
+ */
446
627
  interface UnionMember1 {
628
+ /**
629
+ * The text content of the message
630
+ */
447
631
  text: string;
632
+ /**
633
+ * Must be "text" to identify this as text content
634
+ */
448
635
  type: 'text';
449
636
  }
450
637
  }
@@ -466,8 +653,17 @@ export declare namespace CompletionRetrieveResponse {
466
653
  name?: string;
467
654
  }
468
655
  namespace OpenAIDeveloperMessageParam {
656
+ /**
657
+ * Text content part for OpenAI-compatible chat completion messages.
658
+ */
469
659
  interface UnionMember1 {
660
+ /**
661
+ * The text content of the message
662
+ */
470
663
  text: string;
664
+ /**
665
+ * Must be "text" to identify this as text content
666
+ */
471
667
  type: 'text';
472
668
  }
473
669
  }
@@ -536,7 +732,7 @@ export declare namespace CompletionRetrieveResponse {
536
732
  /**
537
733
  * The content of the message, which can include text and other media
538
734
  */
539
- content: string | Array<OpenAIUserMessageParam.OpenAIChatCompletionContentPartTextParam | OpenAIUserMessageParam.OpenAIChatCompletionContentPartImageParam>;
735
+ content: string | Array<OpenAIUserMessageParam.OpenAIChatCompletionContentPartTextParam | OpenAIUserMessageParam.OpenAIChatCompletionContentPartImageParam | OpenAIUserMessageParam.OpenAIFile>;
540
736
  /**
541
737
  * Must be "user" to identify this as a user message
542
738
  */
@@ -547,20 +743,58 @@ export declare namespace CompletionRetrieveResponse {
547
743
  name?: string;
548
744
  }
549
745
  namespace OpenAIUserMessageParam {
746
+ /**
747
+ * Text content part for OpenAI-compatible chat completion messages.
748
+ */
550
749
  interface OpenAIChatCompletionContentPartTextParam {
750
+ /**
751
+ * The text content of the message
752
+ */
551
753
  text: string;
754
+ /**
755
+ * Must be "text" to identify this as text content
756
+ */
552
757
  type: 'text';
553
758
  }
759
+ /**
760
+ * Image content part for OpenAI-compatible chat completion messages.
761
+ */
554
762
  interface OpenAIChatCompletionContentPartImageParam {
763
+ /**
764
+ * Image URL specification and processing details
765
+ */
555
766
  image_url: OpenAIChatCompletionContentPartImageParam.ImageURL;
767
+ /**
768
+ * Must be "image_url" to identify this as image content
769
+ */
556
770
  type: 'image_url';
557
771
  }
558
772
  namespace OpenAIChatCompletionContentPartImageParam {
773
+ /**
774
+ * Image URL specification and processing details
775
+ */
559
776
  interface ImageURL {
777
+ /**
778
+ * URL of the image to include in the message
779
+ */
560
780
  url: string;
781
+ /**
782
+ * (Optional) Level of detail for image processing. Can be "low", "high", or "auto"
783
+ */
561
784
  detail?: string;
562
785
  }
563
786
  }
787
+ interface OpenAIFile {
788
+ file: OpenAIFile.File;
789
+ type: 'file';
790
+ }
791
+ namespace OpenAIFile {
792
+ interface File {
793
+ file_data?: string;
794
+ file_id?: string;
795
+ filename?: string;
796
+ }
797
+ }
564
798
  }
565
799
  /**
566
800
  * A system message providing instructions or context to the model.
@@ -582,8 +816,17 @@ export declare namespace CompletionRetrieveResponse {
582
816
  name?: string;
583
817
  }
584
818
  namespace OpenAISystemMessageParam {
819
+ /**
820
+ * Text content part for OpenAI-compatible chat completion messages.
821
+ */
585
822
  interface UnionMember1 {
823
+ /**
824
+ * The text content of the message
825
+ */
586
826
  text: string;
827
+ /**
828
+ * Must be "text" to identify this as text content
829
+ */
587
830
  type: 'text';
588
831
  }
589
832
  }
@@ -610,19 +853,52 @@ export declare namespace CompletionRetrieveResponse {
610
853
  tool_calls?: Array<OpenAIAssistantMessageParam.ToolCall>;
611
854
  }
612
855
  namespace OpenAIAssistantMessageParam {
856
+ /**
857
+ * Text content part for OpenAI-compatible chat completion messages.
858
+ */
613
859
  interface UnionMember1 {
860
+ /**
861
+ * The text content of the message
862
+ */
614
863
  text: string;
864
+ /**
865
+ * Must be "text" to identify this as text content
866
+ */
615
867
  type: 'text';
616
868
  }
869
+ /**
870
+ * Tool call specification for OpenAI-compatible chat completion responses.
871
+ */
617
872
  interface ToolCall {
873
+ /**
874
+ * Must be "function" to identify this as a function call
875
+ */
618
876
  type: 'function';
877
+ /**
878
+ * (Optional) Unique identifier for the tool call
879
+ */
619
880
  id?: string;
881
+ /**
882
+ * (Optional) Function call details
883
+ */
620
884
  function?: ToolCall.Function;
885
+ /**
886
+ * (Optional) Index of the tool call in the list
887
+ */
621
888
  index?: number;
622
889
  }
623
890
  namespace ToolCall {
891
+ /**
892
+ * (Optional) Function call details
893
+ */
624
894
  interface Function {
895
+ /**
896
+ * (Optional) Arguments to pass to the function as a JSON string
897
+ */
625
898
  arguments?: string;
899
+ /**
900
+ * (Optional) Name of the function to call
901
+ */
626
902
  name?: string;
627
903
  }
628
904
  }
@@ -646,8 +922,17 @@ export declare namespace CompletionRetrieveResponse {
646
922
  tool_call_id: string;
647
923
  }
648
924
  namespace OpenAIToolMessageParam {
925
+ /**
926
+ * Text content part for OpenAI-compatible chat completion messages.
927
+ */
649
928
  interface UnionMember1 {
929
+ /**
930
+ * The text content of the message
931
+ */
650
932
  text: string;
933
+ /**
934
+ * Must be "text" to identify this as text content
935
+ */
651
936
  type: 'text';
652
937
  }
653
938
  }
@@ -669,17 +954,44 @@ export declare namespace CompletionRetrieveResponse {
669
954
  name?: string;
670
955
  }
671
956
  namespace OpenAIDeveloperMessageParam {
957
+ /**
958
+ * Text content part for OpenAI-compatible chat completion messages.
959
+ */
672
960
  interface UnionMember1 {
961
+ /**
962
+ * The text content of the message
963
+ */
673
964
  text: string;
965
+ /**
966
+ * Must be "text" to identify this as text content
967
+ */
674
968
  type: 'text';
675
969
  }
676
970
  }
677
971
  }
972
+ /**
973
+ * Response from listing OpenAI-compatible chat completions.
974
+ */
678
975
  export interface CompletionListResponse {
976
+ /**
977
+ * List of chat completion objects with their input messages
978
+ */
679
979
  data: Array<CompletionListResponse.Data>;
980
+ /**
981
+ * ID of the first completion in this list
982
+ */
680
983
  first_id: string;
984
+ /**
985
+ * Whether there are more completions available beyond this list
986
+ */
681
987
  has_more: boolean;
988
+ /**
989
+ * ID of the last completion in this list
990
+ */
682
991
  last_id: string;
992
+ /**
993
+ * Must be "list" to identify this as a list response
994
+ */
683
995
  object: 'list';
684
996
  }
685
997
  export declare namespace CompletionListResponse {
@@ -736,7 +1048,7 @@ export declare namespace CompletionListResponse {
736
1048
  /**
737
1049
  * The content of the message, which can include text and other media
738
1050
  */
739
- content: string | Array<OpenAIUserMessageParam.OpenAIChatCompletionContentPartTextParam | OpenAIUserMessageParam.OpenAIChatCompletionContentPartImageParam>;
1051
+ content: string | Array<OpenAIUserMessageParam.OpenAIChatCompletionContentPartTextParam | OpenAIUserMessageParam.OpenAIChatCompletionContentPartImageParam | OpenAIUserMessageParam.OpenAIFile>;
740
1052
  /**
741
1053
  * Must be "user" to identify this as a user message
742
1054
  */
@@ -747,20 +1059,58 @@ export declare namespace CompletionListResponse {
747
1059
  name?: string;
748
1060
  }
749
1061
  namespace OpenAIUserMessageParam {
1062
+ /**
1063
+ * Text content part for OpenAI-compatible chat completion messages.
1064
+ */
750
1065
  interface OpenAIChatCompletionContentPartTextParam {
1066
+ /**
1067
+ * The text content of the message
1068
+ */
751
1069
  text: string;
1070
+ /**
1071
+ * Must be "text" to identify this as text content
1072
+ */
752
1073
  type: 'text';
753
1074
  }
1075
+ /**
1076
+ * Image content part for OpenAI-compatible chat completion messages.
1077
+ */
754
1078
  interface OpenAIChatCompletionContentPartImageParam {
1079
+ /**
1080
+ * Image URL specification and processing details
1081
+ */
755
1082
  image_url: OpenAIChatCompletionContentPartImageParam.ImageURL;
1083
+ /**
1084
+ * Must be "image_url" to identify this as image content
1085
+ */
756
1086
  type: 'image_url';
757
1087
  }
758
1088
  namespace OpenAIChatCompletionContentPartImageParam {
1089
+ /**
1090
+ * Image URL specification and processing details
1091
+ */
759
1092
  interface ImageURL {
1093
+ /**
1094
+ * URL of the image to include in the message
1095
+ */
760
1096
  url: string;
1097
+ /**
1098
+ * (Optional) Level of detail for image processing. Can be "low", "high", or "auto"
1099
+ */
761
1100
  detail?: string;
762
1101
  }
763
1102
  }
1103
+ interface OpenAIFile {
1104
+ file: OpenAIFile.File;
1105
+ type: 'file';
1106
+ }
1107
+ namespace OpenAIFile {
1108
+ interface File {
1109
+ file_data?: string;
1110
+ file_id?: string;
1111
+ filename?: string;
1112
+ }
1113
+ }
764
1114
  }
765
1115
  /**
766
1116
  * A system message providing instructions or context to the model.
@@ -782,8 +1132,17 @@ export declare namespace CompletionListResponse {
782
1132
  name?: string;
783
1133
  }
784
1134
  namespace OpenAISystemMessageParam {
1135
+ /**
1136
+ * Text content part for OpenAI-compatible chat completion messages.
1137
+ */
785
1138
  interface UnionMember1 {
1139
+ /**
1140
+ * The text content of the message
1141
+ */
786
1142
  text: string;
1143
+ /**
1144
+ * Must be "text" to identify this as text content
1145
+ */
787
1146
  type: 'text';
788
1147
  }
789
1148
  }
@@ -810,19 +1169,52 @@ export declare namespace CompletionListResponse {
810
1169
  tool_calls?: Array<OpenAIAssistantMessageParam.ToolCall>;
811
1170
  }
812
1171
  namespace OpenAIAssistantMessageParam {
1172
+ /**
1173
+ * Text content part for OpenAI-compatible chat completion messages.
1174
+ */
813
1175
  interface UnionMember1 {
1176
+ /**
1177
+ * The text content of the message
1178
+ */
814
1179
  text: string;
1180
+ /**
1181
+ * Must be "text" to identify this as text content
1182
+ */
815
1183
  type: 'text';
816
1184
  }
1185
+ /**
1186
+ * Tool call specification for OpenAI-compatible chat completion responses.
1187
+ */
817
1188
  interface ToolCall {
1189
+ /**
1190
+ * Must be "function" to identify this as a function call
1191
+ */
818
1192
  type: 'function';
1193
+ /**
1194
+ * (Optional) Unique identifier for the tool call
1195
+ */
819
1196
  id?: string;
1197
+ /**
1198
+ * (Optional) Function call details
1199
+ */
820
1200
  function?: ToolCall.Function;
1201
+ /**
1202
+ * (Optional) Index of the tool call in the list
1203
+ */
821
1204
  index?: number;
822
1205
  }
823
1206
  namespace ToolCall {
1207
+ /**
1208
+ * (Optional) Function call details
1209
+ */
824
1210
  interface Function {
1211
+ /**
1212
+ * (Optional) Arguments to pass to the function as a JSON string
1213
+ */
825
1214
  arguments?: string;
1215
+ /**
1216
+ * (Optional) Name of the function to call
1217
+ */
826
1218
  name?: string;
827
1219
  }
828
1220
  }
@@ -846,8 +1238,17 @@ export declare namespace CompletionListResponse {
846
1238
  tool_call_id: string;
847
1239
  }
848
1240
  namespace OpenAIToolMessageParam {
1241
+ /**
1242
+ * Text content part for OpenAI-compatible chat completion messages.
1243
+ */
849
1244
  interface UnionMember1 {
1245
+ /**
1246
+ * The text content of the message
1247
+ */
850
1248
  text: string;
1249
+ /**
1250
+ * Must be "text" to identify this as text content
1251
+ */
851
1252
  type: 'text';
852
1253
  }
853
1254
  }
@@ -869,8 +1270,17 @@ export declare namespace CompletionListResponse {
869
1270
  name?: string;
870
1271
  }
871
1272
  namespace OpenAIDeveloperMessageParam {
1273
+ /**
1274
+ * Text content part for OpenAI-compatible chat completion messages.
1275
+ */
872
1276
  interface UnionMember1 {
1277
+ /**
1278
+ * The text content of the message
1279
+ */
873
1280
  text: string;
1281
+ /**
1282
+ * Must be "text" to identify this as text content
1283
+ */
874
1284
  type: 'text';
875
1285
  }
876
1286
  }
@@ -939,7 +1349,7 @@ export declare namespace CompletionListResponse {
939
1349
  /**
940
1350
  * The content of the message, which can include text and other media
941
1351
  */
942
- content: string | Array<OpenAIUserMessageParam.OpenAIChatCompletionContentPartTextParam | OpenAIUserMessageParam.OpenAIChatCompletionContentPartImageParam>;
1352
+ content: string | Array<OpenAIUserMessageParam.OpenAIChatCompletionContentPartTextParam | OpenAIUserMessageParam.OpenAIChatCompletionContentPartImageParam | OpenAIUserMessageParam.OpenAIFile>;
943
1353
  /**
944
1354
  * Must be "user" to identify this as a user message
945
1355
  */
@@ -950,20 +1360,58 @@ export declare namespace CompletionListResponse {
950
1360
  name?: string;
951
1361
  }
952
1362
  namespace OpenAIUserMessageParam {
1363
+ /**
1364
+ * Text content part for OpenAI-compatible chat completion messages.
1365
+ */
953
1366
  interface OpenAIChatCompletionContentPartTextParam {
1367
+ /**
1368
+ * The text content of the message
1369
+ */
954
1370
  text: string;
1371
+ /**
1372
+ * Must be "text" to identify this as text content
1373
+ */
955
1374
  type: 'text';
956
1375
  }
1376
+ /**
1377
+ * Image content part for OpenAI-compatible chat completion messages.
1378
+ */
957
1379
  interface OpenAIChatCompletionContentPartImageParam {
1380
+ /**
1381
+ * Image URL specification and processing details
1382
+ */
958
1383
  image_url: OpenAIChatCompletionContentPartImageParam.ImageURL;
1384
+ /**
1385
+ * Must be "image_url" to identify this as image content
1386
+ */
959
1387
  type: 'image_url';
960
1388
  }
961
1389
  namespace OpenAIChatCompletionContentPartImageParam {
1390
+ /**
1391
+ * Image URL specification and processing details
1392
+ */
962
1393
  interface ImageURL {
1394
+ /**
1395
+ * URL of the image to include in the message
1396
+ */
963
1397
  url: string;
1398
+ /**
1399
+ * (Optional) Level of detail for image processing. Can be "low", "high", or "auto"
1400
+ */
964
1401
  detail?: string;
965
1402
  }
966
1403
  }
1404
+ interface OpenAIFile {
1405
+ file: OpenAIFile.File;
1406
+ type: 'file';
1407
+ }
1408
+ namespace OpenAIFile {
1409
+ interface File {
1410
+ file_data?: string;
1411
+ file_id?: string;
1412
+ filename?: string;
1413
+ }
1414
+ }
967
1415
  }
968
1416
  /**
969
1417
  * A system message providing instructions or context to the model.
@@ -985,8 +1433,17 @@ export declare namespace CompletionListResponse {
985
1433
  name?: string;
986
1434
  }
987
1435
  namespace OpenAISystemMessageParam {
1436
+ /**
1437
+ * Text content part for OpenAI-compatible chat completion messages.
1438
+ */
988
1439
  interface UnionMember1 {
1440
+ /**
1441
+ * The text content of the message
1442
+ */
989
1443
  text: string;
1444
+ /**
1445
+ * Must be "text" to identify this as text content
1446
+ */
990
1447
  type: 'text';
991
1448
  }
992
1449
  }
@@ -1013,19 +1470,52 @@ export declare namespace CompletionListResponse {
1013
1470
  tool_calls?: Array<OpenAIAssistantMessageParam.ToolCall>;
1014
1471
  }
1015
1472
  namespace OpenAIAssistantMessageParam {
1473
+ /**
1474
+ * Text content part for OpenAI-compatible chat completion messages.
1475
+ */
1016
1476
  interface UnionMember1 {
1477
+ /**
1478
+ * The text content of the message
1479
+ */
1017
1480
  text: string;
1481
+ /**
1482
+ * Must be "text" to identify this as text content
1483
+ */
1018
1484
  type: 'text';
1019
1485
  }
1486
+ /**
1487
+ * Tool call specification for OpenAI-compatible chat completion responses.
1488
+ */
1020
1489
  interface ToolCall {
1490
+ /**
1491
+ * Must be "function" to identify this as a function call
1492
+ */
1021
1493
  type: 'function';
1494
+ /**
1495
+ * (Optional) Unique identifier for the tool call
1496
+ */
1022
1497
  id?: string;
1498
+ /**
1499
+ * (Optional) Function call details
1500
+ */
1023
1501
  function?: ToolCall.Function;
1502
+ /**
1503
+ * (Optional) Index of the tool call in the list
1504
+ */
1024
1505
  index?: number;
1025
1506
  }
1026
1507
  namespace ToolCall {
1508
+ /**
1509
+ * (Optional) Function call details
1510
+ */
1027
1511
  interface Function {
1512
+ /**
1513
+ * (Optional) Arguments to pass to the function as a JSON string
1514
+ */
1028
1515
  arguments?: string;
1516
+ /**
1517
+ * (Optional) Name of the function to call
1518
+ */
1029
1519
  name?: string;
1030
1520
  }
1031
1521
  }
@@ -1049,8 +1539,17 @@ export declare namespace CompletionListResponse {
1049
1539
  tool_call_id: string;
1050
1540
  }
1051
1541
  namespace OpenAIToolMessageParam {
1542
+ /**
1543
+ * Text content part for OpenAI-compatible chat completion messages.
1544
+ */
1052
1545
  interface UnionMember1 {
1546
+ /**
1547
+ * The text content of the message
1548
+ */
1053
1549
  text: string;
1550
+ /**
1551
+ * Must be "text" to identify this as text content
1552
+ */
1054
1553
  type: 'text';
1055
1554
  }
1056
1555
  }
@@ -1072,8 +1571,17 @@ export declare namespace CompletionListResponse {
1072
1571
  name?: string;
1073
1572
  }
1074
1573
  namespace OpenAIDeveloperMessageParam {
1574
+ /**
1575
+ * Text content part for OpenAI-compatible chat completion messages.
1576
+ */
1075
1577
  interface UnionMember1 {
1578
+ /**
1579
+ * The text content of the message
1580
+ */
1076
1581
  text: string;
1582
+ /**
1583
+ * Must be "text" to identify this as text content
1584
+ */
1077
1585
  type: 'text';
1078
1586
  }
1079
1587
  }
@@ -1195,7 +1703,7 @@ export declare namespace CompletionCreateParams {
1195
1703
  /**
1196
1704
  * The content of the message, which can include text and other media
1197
1705
  */
1198
- content: string | Array<OpenAIUserMessageParam.OpenAIChatCompletionContentPartTextParam | OpenAIUserMessageParam.OpenAIChatCompletionContentPartImageParam>;
1706
+ content: string | Array<OpenAIUserMessageParam.OpenAIChatCompletionContentPartTextParam | OpenAIUserMessageParam.OpenAIChatCompletionContentPartImageParam | OpenAIUserMessageParam.OpenAIFile>;
1199
1707
  /**
1200
1708
  * Must be "user" to identify this as a user message
1201
1709
  */
@@ -1206,20 +1714,58 @@ export declare namespace CompletionCreateParams {
1206
1714
  name?: string;
1207
1715
  }
1208
1716
  namespace OpenAIUserMessageParam {
1717
+ /**
1718
+ * Text content part for OpenAI-compatible chat completion messages.
1719
+ */
1209
1720
  interface OpenAIChatCompletionContentPartTextParam {
1721
+ /**
1722
+ * The text content of the message
1723
+ */
1210
1724
  text: string;
1725
+ /**
1726
+ * Must be "text" to identify this as text content
1727
+ */
1211
1728
  type: 'text';
1212
1729
  }
1730
+ /**
1731
+ * Image content part for OpenAI-compatible chat completion messages.
1732
+ */
1213
1733
  interface OpenAIChatCompletionContentPartImageParam {
1734
+ /**
1735
+ * Image URL specification and processing details
1736
+ */
1214
1737
  image_url: OpenAIChatCompletionContentPartImageParam.ImageURL;
1738
+ /**
1739
+ * Must be "image_url" to identify this as image content
1740
+ */
1215
1741
  type: 'image_url';
1216
1742
  }
1217
1743
  namespace OpenAIChatCompletionContentPartImageParam {
1744
+ /**
1745
+ * Image URL specification and processing details
1746
+ */
1218
1747
  interface ImageURL {
1748
+ /**
1749
+ * URL of the image to include in the message
1750
+ */
1219
1751
  url: string;
1752
+ /**
1753
+ * (Optional) Level of detail for image processing. Can be "low", "high", or "auto"
1754
+ */
1220
1755
  detail?: string;
1221
1756
  }
1222
1757
  }
1758
+ interface OpenAIFile {
1759
+ file: OpenAIFile.File;
1760
+ type: 'file';
1761
+ }
1762
+ namespace OpenAIFile {
1763
+ interface File {
1764
+ file_data?: string;
1765
+ file_id?: string;
1766
+ filename?: string;
1767
+ }
1768
+ }
1223
1769
  }
1224
1770
  /**
1225
1771
  * A system message providing instructions or context to the model.
@@ -1241,8 +1787,17 @@ export declare namespace CompletionCreateParams {
1241
1787
  name?: string;
1242
1788
  }
1243
1789
  namespace OpenAISystemMessageParam {
1790
+ /**
1791
+ * Text content part for OpenAI-compatible chat completion messages.
1792
+ */
1244
1793
  interface UnionMember1 {
1794
+ /**
1795
+ * The text content of the message
1796
+ */
1245
1797
  text: string;
1798
+ /**
1799
+ * Must be "text" to identify this as text content
1800
+ */
1246
1801
  type: 'text';
1247
1802
  }
1248
1803
  }
@@ -1269,19 +1824,52 @@ export declare namespace CompletionCreateParams {
1269
1824
  tool_calls?: Array<OpenAIAssistantMessageParam.ToolCall>;
1270
1825
  }
1271
1826
  namespace OpenAIAssistantMessageParam {
1827
+ /**
1828
+ * Text content part for OpenAI-compatible chat completion messages.
1829
+ */
1272
1830
  interface UnionMember1 {
1831
+ /**
1832
+ * The text content of the message
1833
+ */
1273
1834
  text: string;
1835
+ /**
1836
+ * Must be "text" to identify this as text content
1837
+ */
1274
1838
  type: 'text';
1275
1839
  }
1840
+ /**
1841
+ * Tool call specification for OpenAI-compatible chat completion responses.
1842
+ */
1276
1843
  interface ToolCall {
1844
+ /**
1845
+ * Must be "function" to identify this as a function call
1846
+ */
1277
1847
  type: 'function';
1848
+ /**
1849
+ * (Optional) Unique identifier for the tool call
1850
+ */
1278
1851
  id?: string;
1852
+ /**
1853
+ * (Optional) Function call details
1854
+ */
1279
1855
  function?: ToolCall.Function;
1856
+ /**
1857
+ * (Optional) Index of the tool call in the list
1858
+ */
1280
1859
  index?: number;
1281
1860
  }
1282
1861
  namespace ToolCall {
1862
+ /**
1863
+ * (Optional) Function call details
1864
+ */
1283
1865
  interface Function {
1866
+ /**
1867
+ * (Optional) Arguments to pass to the function as a JSON string
1868
+ */
1284
1869
  arguments?: string;
1870
+ /**
1871
+ * (Optional) Name of the function to call
1872
+ */
1285
1873
  name?: string;
1286
1874
  }
1287
1875
  }
@@ -1305,8 +1893,17 @@ export declare namespace CompletionCreateParams {
1305
1893
  tool_call_id: string;
1306
1894
  }
1307
1895
  namespace OpenAIToolMessageParam {
1896
+ /**
1897
+ * Text content part for OpenAI-compatible chat completion messages.
1898
+ */
1308
1899
  interface UnionMember1 {
1900
+ /**
1901
+ * The text content of the message
1902
+ */
1309
1903
  text: string;
1904
+ /**
1905
+ * Must be "text" to identify this as text content
1906
+ */
1310
1907
  type: 'text';
1311
1908
  }
1312
1909
  }
@@ -1328,29 +1925,74 @@ export declare namespace CompletionCreateParams {
1328
1925
  name?: string;
1329
1926
  }
1330
1927
  namespace OpenAIDeveloperMessageParam {
1928
+ /**
1929
+ * Text content part for OpenAI-compatible chat completion messages.
1930
+ */
1331
1931
  interface UnionMember1 {
1932
+ /**
1933
+ * The text content of the message
1934
+ */
1332
1935
  text: string;
1936
+ /**
1937
+ * Must be "text" to identify this as text content
1938
+ */
1333
1939
  type: 'text';
1334
1940
  }
1335
1941
  }
1942
+ /**
1943
+ * Text response format for OpenAI-compatible chat completion requests.
1944
+ */
1336
1945
  interface OpenAIResponseFormatText {
1946
+ /**
1947
+ * Must be "text" to indicate plain text response format
1948
+ */
1337
1949
  type: 'text';
1338
1950
  }
1951
+ /**
1952
+ * JSON schema response format for OpenAI-compatible chat completion requests.
1953
+ */
1339
1954
  interface OpenAIResponseFormatJsonSchema {
1955
+ /**
1956
+ * The JSON schema specification for the response
1957
+ */
1340
1958
  json_schema: OpenAIResponseFormatJsonSchema.JsonSchema;
1959
+ /**
1960
+ * Must be "json_schema" to indicate structured JSON response format
1961
+ */
1341
1962
  type: 'json_schema';
1342
1963
  }
1343
1964
  namespace OpenAIResponseFormatJsonSchema {
1965
+ /**
1966
+ * The JSON schema specification for the response
1967
+ */
1344
1968
  interface JsonSchema {
1969
+ /**
1970
+ * Name of the schema
1971
+ */
1345
1972
  name: string;
1973
+ /**
1974
+ * (Optional) Description of the schema
1975
+ */
1346
1976
  description?: string;
1977
+ /**
1978
+ * (Optional) The JSON schema definition
1979
+ */
1347
1980
  schema?: {
1348
1981
  [key: string]: boolean | number | string | Array<unknown> | unknown | null;
1349
1982
  };
1983
+ /**
1984
+ * (Optional) Whether to enforce strict adherence to the schema
1985
+ */
1350
1986
  strict?: boolean;
1351
1987
  }
1352
1988
  }
1989
+ /**
1990
+ * JSON object response format for OpenAI-compatible chat completion requests.
1991
+ */
1353
1992
  interface OpenAIResponseFormatJsonObject {
1993
+ /**
1994
+ * Must be "json_object" to indicate generic JSON object response format
1995
+ */
1354
1996
  type: 'json_object';
1355
1997
  }
1356
1998
  type CompletionCreateParamsNonStreaming = CompletionsAPI.CompletionCreateParamsNonStreaming;