llama-stack-client 0.2.7-rc1 → 0.2.8-rc1

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 (196) hide show
  1. package/index.d.mts +3 -0
  2. package/index.d.ts +3 -0
  3. package/index.d.ts.map +1 -1
  4. package/index.js +3 -0
  5. package/index.js.map +1 -1
  6. package/index.mjs +3 -0
  7. package/index.mjs.map +1 -1
  8. package/package.json +1 -1
  9. package/resources/agents/agents.d.ts +13 -1
  10. package/resources/agents/agents.d.ts.map +1 -1
  11. package/resources/agents/agents.js +1 -1
  12. package/resources/agents/agents.js.map +1 -1
  13. package/resources/agents/agents.mjs +1 -1
  14. package/resources/agents/agents.mjs.map +1 -1
  15. package/resources/agents/session.d.ts +1 -1
  16. package/resources/agents/session.js +1 -1
  17. package/resources/agents/session.mjs +1 -1
  18. package/resources/benchmarks.d.ts +28 -1
  19. package/resources/benchmarks.d.ts.map +1 -1
  20. package/resources/benchmarks.js +9 -0
  21. package/resources/benchmarks.js.map +1 -1
  22. package/resources/benchmarks.mjs +9 -0
  23. package/resources/benchmarks.mjs.map +1 -1
  24. package/resources/chat/chat.d.ts +2 -2
  25. package/resources/chat/chat.d.ts.map +1 -1
  26. package/resources/chat/chat.js.map +1 -1
  27. package/resources/chat/chat.mjs.map +1 -1
  28. package/resources/chat/completions.d.ts +1015 -29
  29. package/resources/chat/completions.d.ts.map +1 -1
  30. package/resources/chat/completions.js +13 -0
  31. package/resources/chat/completions.js.map +1 -1
  32. package/resources/chat/completions.mjs +13 -0
  33. package/resources/chat/completions.mjs.map +1 -1
  34. package/resources/chat/index.d.ts +1 -1
  35. package/resources/chat/index.d.ts.map +1 -1
  36. package/resources/chat/index.js.map +1 -1
  37. package/resources/chat/index.mjs.map +1 -1
  38. package/resources/completions.d.ts +18 -18
  39. package/resources/datasets.d.ts +16 -7
  40. package/resources/datasets.d.ts.map +1 -1
  41. package/resources/datasets.js +9 -0
  42. package/resources/datasets.js.map +1 -1
  43. package/resources/datasets.mjs +9 -0
  44. package/resources/datasets.mjs.map +1 -1
  45. package/resources/index.d.ts +1 -0
  46. package/resources/index.d.ts.map +1 -1
  47. package/resources/index.js +3 -1
  48. package/resources/index.js.map +1 -1
  49. package/resources/index.mjs +1 -0
  50. package/resources/index.mjs.map +1 -1
  51. package/resources/inference.d.ts +51 -12
  52. package/resources/inference.d.ts.map +1 -1
  53. package/resources/inference.js +6 -0
  54. package/resources/inference.js.map +1 -1
  55. package/resources/inference.mjs +6 -0
  56. package/resources/inference.mjs.map +1 -1
  57. package/resources/inspect.d.ts +6 -0
  58. package/resources/inspect.d.ts.map +1 -1
  59. package/resources/inspect.js +6 -0
  60. package/resources/inspect.js.map +1 -1
  61. package/resources/inspect.mjs +6 -0
  62. package/resources/inspect.mjs.map +1 -1
  63. package/resources/models.d.ts +28 -1
  64. package/resources/models.d.ts.map +1 -1
  65. package/resources/models.js +12 -0
  66. package/resources/models.js.map +1 -1
  67. package/resources/models.mjs +12 -0
  68. package/resources/models.mjs.map +1 -1
  69. package/resources/post-training/job.d.ts +21 -0
  70. package/resources/post-training/job.d.ts.map +1 -1
  71. package/resources/post-training/job.js +12 -0
  72. package/resources/post-training/job.js.map +1 -1
  73. package/resources/post-training/job.mjs +12 -0
  74. package/resources/post-training/job.mjs.map +1 -1
  75. package/resources/post-training/post-training.d.ts +54 -0
  76. package/resources/post-training/post-training.d.ts.map +1 -1
  77. package/resources/post-training/post-training.js +6 -0
  78. package/resources/post-training/post-training.js.map +1 -1
  79. package/resources/post-training/post-training.mjs +6 -0
  80. package/resources/post-training/post-training.mjs.map +1 -1
  81. package/resources/providers.d.ts +6 -0
  82. package/resources/providers.d.ts.map +1 -1
  83. package/resources/providers.js +6 -0
  84. package/resources/providers.js.map +1 -1
  85. package/resources/providers.mjs +6 -0
  86. package/resources/providers.mjs.map +1 -1
  87. package/resources/responses.d.ts +360 -0
  88. package/resources/responses.d.ts.map +1 -0
  89. package/resources/responses.js +29 -0
  90. package/resources/responses.js.map +1 -0
  91. package/resources/responses.mjs +25 -0
  92. package/resources/responses.mjs.map +1 -0
  93. package/resources/routes.d.ts +3 -0
  94. package/resources/routes.d.ts.map +1 -1
  95. package/resources/routes.js +3 -0
  96. package/resources/routes.js.map +1 -1
  97. package/resources/routes.mjs +3 -0
  98. package/resources/routes.mjs.map +1 -1
  99. package/resources/safety.d.ts +12 -0
  100. package/resources/safety.d.ts.map +1 -1
  101. package/resources/safety.js +3 -0
  102. package/resources/safety.js.map +1 -1
  103. package/resources/safety.mjs +3 -0
  104. package/resources/safety.mjs.map +1 -1
  105. package/resources/scoring-functions.d.ts +31 -6
  106. package/resources/scoring-functions.d.ts.map +1 -1
  107. package/resources/scoring-functions.js +9 -0
  108. package/resources/scoring-functions.js.map +1 -1
  109. package/resources/scoring-functions.mjs +9 -0
  110. package/resources/scoring-functions.mjs.map +1 -1
  111. package/resources/scoring.d.ts +12 -0
  112. package/resources/scoring.d.ts.map +1 -1
  113. package/resources/scoring.js +3 -0
  114. package/resources/scoring.js.map +1 -1
  115. package/resources/scoring.mjs +3 -0
  116. package/resources/scoring.mjs.map +1 -1
  117. package/resources/shared.d.ts +23 -0
  118. package/resources/shared.d.ts.map +1 -1
  119. package/resources/shields.d.ts +22 -1
  120. package/resources/shields.d.ts.map +1 -1
  121. package/resources/shields.js +9 -0
  122. package/resources/shields.js.map +1 -1
  123. package/resources/shields.mjs +9 -0
  124. package/resources/shields.mjs.map +1 -1
  125. package/resources/telemetry.d.ts +66 -0
  126. package/resources/telemetry.d.ts.map +1 -1
  127. package/resources/telemetry.js +21 -0
  128. package/resources/telemetry.js.map +1 -1
  129. package/resources/telemetry.mjs +21 -0
  130. package/resources/telemetry.mjs.map +1 -1
  131. package/resources/tool-runtime/rag-tool.d.ts +3 -0
  132. package/resources/tool-runtime/rag-tool.d.ts.map +1 -1
  133. package/resources/tool-runtime/tool-runtime.d.ts +19 -1
  134. package/resources/tool-runtime/tool-runtime.d.ts.map +1 -1
  135. package/resources/tool-runtime/tool-runtime.js +1 -1
  136. package/resources/tool-runtime/tool-runtime.js.map +1 -1
  137. package/resources/tool-runtime/tool-runtime.mjs +1 -1
  138. package/resources/tool-runtime/tool-runtime.mjs.map +1 -1
  139. package/resources/toolgroups.d.ts +22 -4
  140. package/resources/toolgroups.d.ts.map +1 -1
  141. package/resources/toolgroups.js +6 -3
  142. package/resources/toolgroups.js.map +1 -1
  143. package/resources/toolgroups.mjs +6 -3
  144. package/resources/toolgroups.mjs.map +1 -1
  145. package/resources/tools.d.ts +8 -2
  146. package/resources/tools.d.ts.map +1 -1
  147. package/resources/tools.js +3 -0
  148. package/resources/tools.js.map +1 -1
  149. package/resources/tools.mjs +3 -0
  150. package/resources/tools.mjs.map +1 -1
  151. package/resources/vector-dbs.d.ts +30 -3
  152. package/resources/vector-dbs.d.ts.map +1 -1
  153. package/resources/vector-dbs.js +12 -0
  154. package/resources/vector-dbs.js.map +1 -1
  155. package/resources/vector-dbs.mjs +12 -0
  156. package/resources/vector-dbs.mjs.map +1 -1
  157. package/resources/vector-io.d.ts +22 -1
  158. package/resources/vector-io.d.ts.map +1 -1
  159. package/resources/vector-io.js +6 -0
  160. package/resources/vector-io.js.map +1 -1
  161. package/resources/vector-io.mjs +6 -0
  162. package/resources/vector-io.mjs.map +1 -1
  163. package/src/index.ts +23 -0
  164. package/src/resources/agents/agents.ts +13 -1
  165. package/src/resources/agents/session.ts +1 -1
  166. package/src/resources/benchmarks.ts +29 -2
  167. package/src/resources/chat/chat.ts +6 -0
  168. package/src/resources/chat/completions.ts +1429 -35
  169. package/src/resources/chat/index.ts +3 -0
  170. package/src/resources/completions.ts +18 -18
  171. package/src/resources/datasets.ts +19 -10
  172. package/src/resources/index.ts +10 -0
  173. package/src/resources/inference.ts +51 -12
  174. package/src/resources/inspect.ts +6 -0
  175. package/src/resources/models.ts +29 -2
  176. package/src/resources/post-training/job.ts +21 -0
  177. package/src/resources/post-training/post-training.ts +54 -0
  178. package/src/resources/providers.ts +6 -0
  179. package/src/resources/responses.ts +624 -0
  180. package/src/resources/routes.ts +3 -0
  181. package/src/resources/safety.ts +12 -0
  182. package/src/resources/scoring-functions.ts +40 -15
  183. package/src/resources/scoring.ts +12 -0
  184. package/src/resources/shared.ts +25 -0
  185. package/src/resources/shields.ts +23 -2
  186. package/src/resources/telemetry.ts +66 -0
  187. package/src/resources/tool-runtime/rag-tool.ts +3 -0
  188. package/src/resources/tool-runtime/tool-runtime.ts +19 -1
  189. package/src/resources/toolgroups.ts +23 -5
  190. package/src/resources/tools.ts +9 -3
  191. package/src/resources/vector-dbs.ts +33 -6
  192. package/src/resources/vector-io.ts +22 -1
  193. package/src/version.ts +1 -1
  194. package/version.d.ts +1 -1
  195. package/version.js +1 -1
  196. package/version.mjs +1 -1
@@ -12,6 +12,15 @@ export declare class Completions extends APIResource {
12
12
  create(body: CompletionCreateParamsNonStreaming, options?: Core.RequestOptions): APIPromise<CompletionCreateResponse>;
13
13
  create(body: CompletionCreateParamsStreaming, options?: Core.RequestOptions): APIPromise<Stream<ChatAPI.ChatCompletionChunk>>;
14
14
  create(body: CompletionCreateParamsBase, options?: Core.RequestOptions): APIPromise<Stream<ChatAPI.ChatCompletionChunk> | CompletionCreateResponse>;
15
+ /**
16
+ * Describe a chat completion by its ID.
17
+ */
18
+ retrieve(completionId: string, options?: Core.RequestOptions): Core.APIPromise<CompletionRetrieveResponse>;
19
+ /**
20
+ * List all chat completions.
21
+ */
22
+ list(query?: CompletionListParams, options?: Core.RequestOptions): Core.APIPromise<CompletionListResponse>;
23
+ list(options?: Core.RequestOptions): Core.APIPromise<CompletionListResponse>;
15
24
  }
16
25
  /**
17
26
  * Response from an OpenAI-compatible chat completion request.
@@ -19,9 +28,782 @@ export declare class Completions extends APIResource {
19
28
  export type CompletionCreateResponse = CompletionCreateResponse.OpenAIChatCompletion | ChatAPI.ChatCompletionChunk;
20
29
  export declare namespace CompletionCreateResponse {
21
30
  /**
22
- * Response from an OpenAI-compatible chat completion request.
31
+ * Response from an OpenAI-compatible chat completion request.
32
+ */
33
+ interface OpenAIChatCompletion {
34
+ /**
35
+ * The ID of the chat completion
36
+ */
37
+ id: string;
38
+ /**
39
+ * List of choices
40
+ */
41
+ choices: Array<OpenAIChatCompletion.Choice>;
42
+ /**
43
+ * The Unix timestamp in seconds when the chat completion was created
44
+ */
45
+ created: number;
46
+ /**
47
+ * The model that was used to generate the chat completion
48
+ */
49
+ model: string;
50
+ /**
51
+ * The object type, which will be "chat.completion"
52
+ */
53
+ object: 'chat.completion';
54
+ }
55
+ namespace OpenAIChatCompletion {
56
+ /**
57
+ * A choice from an OpenAI-compatible chat completion response.
58
+ */
59
+ interface Choice {
60
+ /**
61
+ * The reason the model stopped generating
62
+ */
63
+ finish_reason: string;
64
+ /**
65
+ * The index of the choice
66
+ */
67
+ index: number;
68
+ /**
69
+ * The message from the model
70
+ */
71
+ message: Choice.OpenAIUserMessageParam | Choice.OpenAISystemMessageParam | Choice.OpenAIAssistantMessageParam | Choice.OpenAIToolMessageParam | Choice.OpenAIDeveloperMessageParam;
72
+ /**
73
+ * (Optional) The log probabilities for the tokens in the message
74
+ */
75
+ logprobs?: Choice.Logprobs;
76
+ }
77
+ namespace Choice {
78
+ /**
79
+ * A message from the user in an OpenAI-compatible chat completion request.
80
+ */
81
+ interface OpenAIUserMessageParam {
82
+ /**
83
+ * The content of the message, which can include text and other media
84
+ */
85
+ content: string | Array<OpenAIUserMessageParam.OpenAIChatCompletionContentPartTextParam | OpenAIUserMessageParam.OpenAIChatCompletionContentPartImageParam>;
86
+ /**
87
+ * Must be "user" to identify this as a user message
88
+ */
89
+ role: 'user';
90
+ /**
91
+ * (Optional) The name of the user message participant.
92
+ */
93
+ name?: string;
94
+ }
95
+ namespace OpenAIUserMessageParam {
96
+ interface OpenAIChatCompletionContentPartTextParam {
97
+ text: string;
98
+ type: 'text';
99
+ }
100
+ interface OpenAIChatCompletionContentPartImageParam {
101
+ image_url: OpenAIChatCompletionContentPartImageParam.ImageURL;
102
+ type: 'image_url';
103
+ }
104
+ namespace OpenAIChatCompletionContentPartImageParam {
105
+ interface ImageURL {
106
+ url: string;
107
+ detail?: string;
108
+ }
109
+ }
110
+ }
111
+ /**
112
+ * A system message providing instructions or context to the model.
113
+ */
114
+ interface OpenAISystemMessageParam {
115
+ /**
116
+ * The content of the "system prompt". If multiple system messages are provided,
117
+ * they are concatenated. The underlying Llama Stack code may also add other system
118
+ * messages (for example, for formatting tool definitions).
119
+ */
120
+ content: string | Array<OpenAISystemMessageParam.OpenAIChatCompletionContentPartTextParam | OpenAISystemMessageParam.OpenAIChatCompletionContentPartImageParam>;
121
+ /**
122
+ * Must be "system" to identify this as a system message
123
+ */
124
+ role: 'system';
125
+ /**
126
+ * (Optional) The name of the system message participant.
127
+ */
128
+ name?: string;
129
+ }
130
+ namespace OpenAISystemMessageParam {
131
+ interface OpenAIChatCompletionContentPartTextParam {
132
+ text: string;
133
+ type: 'text';
134
+ }
135
+ interface OpenAIChatCompletionContentPartImageParam {
136
+ image_url: OpenAIChatCompletionContentPartImageParam.ImageURL;
137
+ type: 'image_url';
138
+ }
139
+ namespace OpenAIChatCompletionContentPartImageParam {
140
+ interface ImageURL {
141
+ url: string;
142
+ detail?: string;
143
+ }
144
+ }
145
+ }
146
+ /**
147
+ * A message containing the model's (assistant) response in an OpenAI-compatible
148
+ * chat completion request.
149
+ */
150
+ interface OpenAIAssistantMessageParam {
151
+ /**
152
+ * Must be "assistant" to identify this as the model's response
153
+ */
154
+ role: 'assistant';
155
+ /**
156
+ * The content of the model's response
157
+ */
158
+ content?: string | Array<OpenAIAssistantMessageParam.OpenAIChatCompletionContentPartTextParam | OpenAIAssistantMessageParam.OpenAIChatCompletionContentPartImageParam>;
159
+ /**
160
+ * (Optional) The name of the assistant message participant.
161
+ */
162
+ name?: string;
163
+ /**
164
+ * List of tool calls. Each tool call is an OpenAIChatCompletionToolCall object.
165
+ */
166
+ tool_calls?: Array<OpenAIAssistantMessageParam.ToolCall>;
167
+ }
168
+ namespace OpenAIAssistantMessageParam {
169
+ interface OpenAIChatCompletionContentPartTextParam {
170
+ text: string;
171
+ type: 'text';
172
+ }
173
+ interface OpenAIChatCompletionContentPartImageParam {
174
+ image_url: OpenAIChatCompletionContentPartImageParam.ImageURL;
175
+ type: 'image_url';
176
+ }
177
+ namespace OpenAIChatCompletionContentPartImageParam {
178
+ interface ImageURL {
179
+ url: string;
180
+ detail?: string;
181
+ }
182
+ }
183
+ interface ToolCall {
184
+ type: 'function';
185
+ id?: string;
186
+ function?: ToolCall.Function;
187
+ index?: number;
188
+ }
189
+ namespace ToolCall {
190
+ interface Function {
191
+ arguments?: string;
192
+ name?: string;
193
+ }
194
+ }
195
+ }
196
+ /**
197
+ * A message representing the result of a tool invocation in an OpenAI-compatible
198
+ * chat completion request.
199
+ */
200
+ interface OpenAIToolMessageParam {
201
+ /**
202
+ * The response content from the tool
203
+ */
204
+ content: string | Array<OpenAIToolMessageParam.OpenAIChatCompletionContentPartTextParam | OpenAIToolMessageParam.OpenAIChatCompletionContentPartImageParam>;
205
+ /**
206
+ * Must be "tool" to identify this as a tool response
207
+ */
208
+ role: 'tool';
209
+ /**
210
+ * Unique identifier for the tool call this response is for
211
+ */
212
+ tool_call_id: string;
213
+ }
214
+ namespace OpenAIToolMessageParam {
215
+ interface OpenAIChatCompletionContentPartTextParam {
216
+ text: string;
217
+ type: 'text';
218
+ }
219
+ interface OpenAIChatCompletionContentPartImageParam {
220
+ image_url: OpenAIChatCompletionContentPartImageParam.ImageURL;
221
+ type: 'image_url';
222
+ }
223
+ namespace OpenAIChatCompletionContentPartImageParam {
224
+ interface ImageURL {
225
+ url: string;
226
+ detail?: string;
227
+ }
228
+ }
229
+ }
230
+ /**
231
+ * A message from the developer in an OpenAI-compatible chat completion request.
232
+ */
233
+ interface OpenAIDeveloperMessageParam {
234
+ /**
235
+ * The content of the developer message
236
+ */
237
+ content: string | Array<OpenAIDeveloperMessageParam.OpenAIChatCompletionContentPartTextParam | OpenAIDeveloperMessageParam.OpenAIChatCompletionContentPartImageParam>;
238
+ /**
239
+ * Must be "developer" to identify this as a developer message
240
+ */
241
+ role: 'developer';
242
+ /**
243
+ * (Optional) The name of the developer message participant.
244
+ */
245
+ name?: string;
246
+ }
247
+ namespace OpenAIDeveloperMessageParam {
248
+ interface OpenAIChatCompletionContentPartTextParam {
249
+ text: string;
250
+ type: 'text';
251
+ }
252
+ interface OpenAIChatCompletionContentPartImageParam {
253
+ image_url: OpenAIChatCompletionContentPartImageParam.ImageURL;
254
+ type: 'image_url';
255
+ }
256
+ namespace OpenAIChatCompletionContentPartImageParam {
257
+ interface ImageURL {
258
+ url: string;
259
+ detail?: string;
260
+ }
261
+ }
262
+ }
263
+ /**
264
+ * (Optional) The log probabilities for the tokens in the message
265
+ */
266
+ interface Logprobs {
267
+ /**
268
+ * (Optional) The log probabilities for the tokens in the message
269
+ */
270
+ content?: Array<Logprobs.Content>;
271
+ /**
272
+ * (Optional) The log probabilities for the tokens in the message
273
+ */
274
+ refusal?: Array<Logprobs.Refusal>;
275
+ }
276
+ namespace Logprobs {
277
+ /**
278
+ * The log probability for a token from an OpenAI-compatible chat completion
279
+ * response.
280
+ */
281
+ interface Content {
282
+ token: string;
283
+ logprob: number;
284
+ top_logprobs: Array<Content.TopLogprob>;
285
+ bytes?: Array<number>;
286
+ }
287
+ namespace Content {
288
+ /**
289
+ * The top log probability for a token from an OpenAI-compatible chat completion
290
+ * response.
291
+ */
292
+ interface TopLogprob {
293
+ token: string;
294
+ logprob: number;
295
+ bytes?: Array<number>;
296
+ }
297
+ }
298
+ /**
299
+ * The log probability for a token from an OpenAI-compatible chat completion
300
+ * response.
301
+ */
302
+ interface Refusal {
303
+ token: string;
304
+ logprob: number;
305
+ top_logprobs: Array<Refusal.TopLogprob>;
306
+ bytes?: Array<number>;
307
+ }
308
+ namespace Refusal {
309
+ /**
310
+ * The top log probability for a token from an OpenAI-compatible chat completion
311
+ * response.
312
+ */
313
+ interface TopLogprob {
314
+ token: string;
315
+ logprob: number;
316
+ bytes?: Array<number>;
317
+ }
318
+ }
319
+ }
320
+ }
321
+ }
322
+ }
323
+ export interface CompletionRetrieveResponse {
324
+ /**
325
+ * The ID of the chat completion
326
+ */
327
+ id: string;
328
+ /**
329
+ * List of choices
330
+ */
331
+ choices: Array<CompletionRetrieveResponse.Choice>;
332
+ /**
333
+ * The Unix timestamp in seconds when the chat completion was created
334
+ */
335
+ created: number;
336
+ input_messages: Array<CompletionRetrieveResponse.OpenAIUserMessageParam | CompletionRetrieveResponse.OpenAISystemMessageParam | CompletionRetrieveResponse.OpenAIAssistantMessageParam | CompletionRetrieveResponse.OpenAIToolMessageParam | CompletionRetrieveResponse.OpenAIDeveloperMessageParam>;
337
+ /**
338
+ * The model that was used to generate the chat completion
339
+ */
340
+ model: string;
341
+ /**
342
+ * The object type, which will be "chat.completion"
343
+ */
344
+ object: 'chat.completion';
345
+ }
346
+ export declare namespace CompletionRetrieveResponse {
347
+ /**
348
+ * A choice from an OpenAI-compatible chat completion response.
349
+ */
350
+ interface Choice {
351
+ /**
352
+ * The reason the model stopped generating
353
+ */
354
+ finish_reason: string;
355
+ /**
356
+ * The index of the choice
357
+ */
358
+ index: number;
359
+ /**
360
+ * The message from the model
361
+ */
362
+ message: Choice.OpenAIUserMessageParam | Choice.OpenAISystemMessageParam | Choice.OpenAIAssistantMessageParam | Choice.OpenAIToolMessageParam | Choice.OpenAIDeveloperMessageParam;
363
+ /**
364
+ * (Optional) The log probabilities for the tokens in the message
365
+ */
366
+ logprobs?: Choice.Logprobs;
367
+ }
368
+ namespace Choice {
369
+ /**
370
+ * A message from the user in an OpenAI-compatible chat completion request.
371
+ */
372
+ interface OpenAIUserMessageParam {
373
+ /**
374
+ * The content of the message, which can include text and other media
375
+ */
376
+ content: string | Array<OpenAIUserMessageParam.OpenAIChatCompletionContentPartTextParam | OpenAIUserMessageParam.OpenAIChatCompletionContentPartImageParam>;
377
+ /**
378
+ * Must be "user" to identify this as a user message
379
+ */
380
+ role: 'user';
381
+ /**
382
+ * (Optional) The name of the user message participant.
383
+ */
384
+ name?: string;
385
+ }
386
+ namespace OpenAIUserMessageParam {
387
+ interface OpenAIChatCompletionContentPartTextParam {
388
+ text: string;
389
+ type: 'text';
390
+ }
391
+ interface OpenAIChatCompletionContentPartImageParam {
392
+ image_url: OpenAIChatCompletionContentPartImageParam.ImageURL;
393
+ type: 'image_url';
394
+ }
395
+ namespace OpenAIChatCompletionContentPartImageParam {
396
+ interface ImageURL {
397
+ url: string;
398
+ detail?: string;
399
+ }
400
+ }
401
+ }
402
+ /**
403
+ * A system message providing instructions or context to the model.
404
+ */
405
+ interface OpenAISystemMessageParam {
406
+ /**
407
+ * The content of the "system prompt". If multiple system messages are provided,
408
+ * they are concatenated. The underlying Llama Stack code may also add other system
409
+ * messages (for example, for formatting tool definitions).
410
+ */
411
+ content: string | Array<OpenAISystemMessageParam.OpenAIChatCompletionContentPartTextParam | OpenAISystemMessageParam.OpenAIChatCompletionContentPartImageParam>;
412
+ /**
413
+ * Must be "system" to identify this as a system message
414
+ */
415
+ role: 'system';
416
+ /**
417
+ * (Optional) The name of the system message participant.
418
+ */
419
+ name?: string;
420
+ }
421
+ namespace OpenAISystemMessageParam {
422
+ interface OpenAIChatCompletionContentPartTextParam {
423
+ text: string;
424
+ type: 'text';
425
+ }
426
+ interface OpenAIChatCompletionContentPartImageParam {
427
+ image_url: OpenAIChatCompletionContentPartImageParam.ImageURL;
428
+ type: 'image_url';
429
+ }
430
+ namespace OpenAIChatCompletionContentPartImageParam {
431
+ interface ImageURL {
432
+ url: string;
433
+ detail?: string;
434
+ }
435
+ }
436
+ }
437
+ /**
438
+ * A message containing the model's (assistant) response in an OpenAI-compatible
439
+ * chat completion request.
440
+ */
441
+ interface OpenAIAssistantMessageParam {
442
+ /**
443
+ * Must be "assistant" to identify this as the model's response
444
+ */
445
+ role: 'assistant';
446
+ /**
447
+ * The content of the model's response
448
+ */
449
+ content?: string | Array<OpenAIAssistantMessageParam.OpenAIChatCompletionContentPartTextParam | OpenAIAssistantMessageParam.OpenAIChatCompletionContentPartImageParam>;
450
+ /**
451
+ * (Optional) The name of the assistant message participant.
452
+ */
453
+ name?: string;
454
+ /**
455
+ * List of tool calls. Each tool call is an OpenAIChatCompletionToolCall object.
456
+ */
457
+ tool_calls?: Array<OpenAIAssistantMessageParam.ToolCall>;
458
+ }
459
+ namespace OpenAIAssistantMessageParam {
460
+ interface OpenAIChatCompletionContentPartTextParam {
461
+ text: string;
462
+ type: 'text';
463
+ }
464
+ interface OpenAIChatCompletionContentPartImageParam {
465
+ image_url: OpenAIChatCompletionContentPartImageParam.ImageURL;
466
+ type: 'image_url';
467
+ }
468
+ namespace OpenAIChatCompletionContentPartImageParam {
469
+ interface ImageURL {
470
+ url: string;
471
+ detail?: string;
472
+ }
473
+ }
474
+ interface ToolCall {
475
+ type: 'function';
476
+ id?: string;
477
+ function?: ToolCall.Function;
478
+ index?: number;
479
+ }
480
+ namespace ToolCall {
481
+ interface Function {
482
+ arguments?: string;
483
+ name?: string;
484
+ }
485
+ }
486
+ }
487
+ /**
488
+ * A message representing the result of a tool invocation in an OpenAI-compatible
489
+ * chat completion request.
490
+ */
491
+ interface OpenAIToolMessageParam {
492
+ /**
493
+ * The response content from the tool
494
+ */
495
+ content: string | Array<OpenAIToolMessageParam.OpenAIChatCompletionContentPartTextParam | OpenAIToolMessageParam.OpenAIChatCompletionContentPartImageParam>;
496
+ /**
497
+ * Must be "tool" to identify this as a tool response
498
+ */
499
+ role: 'tool';
500
+ /**
501
+ * Unique identifier for the tool call this response is for
502
+ */
503
+ tool_call_id: string;
504
+ }
505
+ namespace OpenAIToolMessageParam {
506
+ interface OpenAIChatCompletionContentPartTextParam {
507
+ text: string;
508
+ type: 'text';
509
+ }
510
+ interface OpenAIChatCompletionContentPartImageParam {
511
+ image_url: OpenAIChatCompletionContentPartImageParam.ImageURL;
512
+ type: 'image_url';
513
+ }
514
+ namespace OpenAIChatCompletionContentPartImageParam {
515
+ interface ImageURL {
516
+ url: string;
517
+ detail?: string;
518
+ }
519
+ }
520
+ }
521
+ /**
522
+ * A message from the developer in an OpenAI-compatible chat completion request.
523
+ */
524
+ interface OpenAIDeveloperMessageParam {
525
+ /**
526
+ * The content of the developer message
527
+ */
528
+ content: string | Array<OpenAIDeveloperMessageParam.OpenAIChatCompletionContentPartTextParam | OpenAIDeveloperMessageParam.OpenAIChatCompletionContentPartImageParam>;
529
+ /**
530
+ * Must be "developer" to identify this as a developer message
531
+ */
532
+ role: 'developer';
533
+ /**
534
+ * (Optional) The name of the developer message participant.
535
+ */
536
+ name?: string;
537
+ }
538
+ namespace OpenAIDeveloperMessageParam {
539
+ interface OpenAIChatCompletionContentPartTextParam {
540
+ text: string;
541
+ type: 'text';
542
+ }
543
+ interface OpenAIChatCompletionContentPartImageParam {
544
+ image_url: OpenAIChatCompletionContentPartImageParam.ImageURL;
545
+ type: 'image_url';
546
+ }
547
+ namespace OpenAIChatCompletionContentPartImageParam {
548
+ interface ImageURL {
549
+ url: string;
550
+ detail?: string;
551
+ }
552
+ }
553
+ }
554
+ /**
555
+ * (Optional) The log probabilities for the tokens in the message
556
+ */
557
+ interface Logprobs {
558
+ /**
559
+ * (Optional) The log probabilities for the tokens in the message
560
+ */
561
+ content?: Array<Logprobs.Content>;
562
+ /**
563
+ * (Optional) The log probabilities for the tokens in the message
564
+ */
565
+ refusal?: Array<Logprobs.Refusal>;
566
+ }
567
+ namespace Logprobs {
568
+ /**
569
+ * The log probability for a token from an OpenAI-compatible chat completion
570
+ * response.
571
+ */
572
+ interface Content {
573
+ token: string;
574
+ logprob: number;
575
+ top_logprobs: Array<Content.TopLogprob>;
576
+ bytes?: Array<number>;
577
+ }
578
+ namespace Content {
579
+ /**
580
+ * The top log probability for a token from an OpenAI-compatible chat completion
581
+ * response.
582
+ */
583
+ interface TopLogprob {
584
+ token: string;
585
+ logprob: number;
586
+ bytes?: Array<number>;
587
+ }
588
+ }
589
+ /**
590
+ * The log probability for a token from an OpenAI-compatible chat completion
591
+ * response.
592
+ */
593
+ interface Refusal {
594
+ token: string;
595
+ logprob: number;
596
+ top_logprobs: Array<Refusal.TopLogprob>;
597
+ bytes?: Array<number>;
598
+ }
599
+ namespace Refusal {
600
+ /**
601
+ * The top log probability for a token from an OpenAI-compatible chat completion
602
+ * response.
603
+ */
604
+ interface TopLogprob {
605
+ token: string;
606
+ logprob: number;
607
+ bytes?: Array<number>;
608
+ }
609
+ }
610
+ }
611
+ }
612
+ /**
613
+ * A message from the user in an OpenAI-compatible chat completion request.
614
+ */
615
+ interface OpenAIUserMessageParam {
616
+ /**
617
+ * The content of the message, which can include text and other media
618
+ */
619
+ content: string | Array<OpenAIUserMessageParam.OpenAIChatCompletionContentPartTextParam | OpenAIUserMessageParam.OpenAIChatCompletionContentPartImageParam>;
620
+ /**
621
+ * Must be "user" to identify this as a user message
622
+ */
623
+ role: 'user';
624
+ /**
625
+ * (Optional) The name of the user message participant.
626
+ */
627
+ name?: string;
628
+ }
629
+ namespace OpenAIUserMessageParam {
630
+ interface OpenAIChatCompletionContentPartTextParam {
631
+ text: string;
632
+ type: 'text';
633
+ }
634
+ interface OpenAIChatCompletionContentPartImageParam {
635
+ image_url: OpenAIChatCompletionContentPartImageParam.ImageURL;
636
+ type: 'image_url';
637
+ }
638
+ namespace OpenAIChatCompletionContentPartImageParam {
639
+ interface ImageURL {
640
+ url: string;
641
+ detail?: string;
642
+ }
643
+ }
644
+ }
645
+ /**
646
+ * A system message providing instructions or context to the model.
23
647
  */
24
- interface OpenAIChatCompletion {
648
+ interface OpenAISystemMessageParam {
649
+ /**
650
+ * The content of the "system prompt". If multiple system messages are provided,
651
+ * they are concatenated. The underlying Llama Stack code may also add other system
652
+ * messages (for example, for formatting tool definitions).
653
+ */
654
+ content: string | Array<OpenAISystemMessageParam.OpenAIChatCompletionContentPartTextParam | OpenAISystemMessageParam.OpenAIChatCompletionContentPartImageParam>;
655
+ /**
656
+ * Must be "system" to identify this as a system message
657
+ */
658
+ role: 'system';
659
+ /**
660
+ * (Optional) The name of the system message participant.
661
+ */
662
+ name?: string;
663
+ }
664
+ namespace OpenAISystemMessageParam {
665
+ interface OpenAIChatCompletionContentPartTextParam {
666
+ text: string;
667
+ type: 'text';
668
+ }
669
+ interface OpenAIChatCompletionContentPartImageParam {
670
+ image_url: OpenAIChatCompletionContentPartImageParam.ImageURL;
671
+ type: 'image_url';
672
+ }
673
+ namespace OpenAIChatCompletionContentPartImageParam {
674
+ interface ImageURL {
675
+ url: string;
676
+ detail?: string;
677
+ }
678
+ }
679
+ }
680
+ /**
681
+ * A message containing the model's (assistant) response in an OpenAI-compatible
682
+ * chat completion request.
683
+ */
684
+ interface OpenAIAssistantMessageParam {
685
+ /**
686
+ * Must be "assistant" to identify this as the model's response
687
+ */
688
+ role: 'assistant';
689
+ /**
690
+ * The content of the model's response
691
+ */
692
+ content?: string | Array<OpenAIAssistantMessageParam.OpenAIChatCompletionContentPartTextParam | OpenAIAssistantMessageParam.OpenAIChatCompletionContentPartImageParam>;
693
+ /**
694
+ * (Optional) The name of the assistant message participant.
695
+ */
696
+ name?: string;
697
+ /**
698
+ * List of tool calls. Each tool call is an OpenAIChatCompletionToolCall object.
699
+ */
700
+ tool_calls?: Array<OpenAIAssistantMessageParam.ToolCall>;
701
+ }
702
+ namespace OpenAIAssistantMessageParam {
703
+ interface OpenAIChatCompletionContentPartTextParam {
704
+ text: string;
705
+ type: 'text';
706
+ }
707
+ interface OpenAIChatCompletionContentPartImageParam {
708
+ image_url: OpenAIChatCompletionContentPartImageParam.ImageURL;
709
+ type: 'image_url';
710
+ }
711
+ namespace OpenAIChatCompletionContentPartImageParam {
712
+ interface ImageURL {
713
+ url: string;
714
+ detail?: string;
715
+ }
716
+ }
717
+ interface ToolCall {
718
+ type: 'function';
719
+ id?: string;
720
+ function?: ToolCall.Function;
721
+ index?: number;
722
+ }
723
+ namespace ToolCall {
724
+ interface Function {
725
+ arguments?: string;
726
+ name?: string;
727
+ }
728
+ }
729
+ }
730
+ /**
731
+ * A message representing the result of a tool invocation in an OpenAI-compatible
732
+ * chat completion request.
733
+ */
734
+ interface OpenAIToolMessageParam {
735
+ /**
736
+ * The response content from the tool
737
+ */
738
+ content: string | Array<OpenAIToolMessageParam.OpenAIChatCompletionContentPartTextParam | OpenAIToolMessageParam.OpenAIChatCompletionContentPartImageParam>;
739
+ /**
740
+ * Must be "tool" to identify this as a tool response
741
+ */
742
+ role: 'tool';
743
+ /**
744
+ * Unique identifier for the tool call this response is for
745
+ */
746
+ tool_call_id: string;
747
+ }
748
+ namespace OpenAIToolMessageParam {
749
+ interface OpenAIChatCompletionContentPartTextParam {
750
+ text: string;
751
+ type: 'text';
752
+ }
753
+ interface OpenAIChatCompletionContentPartImageParam {
754
+ image_url: OpenAIChatCompletionContentPartImageParam.ImageURL;
755
+ type: 'image_url';
756
+ }
757
+ namespace OpenAIChatCompletionContentPartImageParam {
758
+ interface ImageURL {
759
+ url: string;
760
+ detail?: string;
761
+ }
762
+ }
763
+ }
764
+ /**
765
+ * A message from the developer in an OpenAI-compatible chat completion request.
766
+ */
767
+ interface OpenAIDeveloperMessageParam {
768
+ /**
769
+ * The content of the developer message
770
+ */
771
+ content: string | Array<OpenAIDeveloperMessageParam.OpenAIChatCompletionContentPartTextParam | OpenAIDeveloperMessageParam.OpenAIChatCompletionContentPartImageParam>;
772
+ /**
773
+ * Must be "developer" to identify this as a developer message
774
+ */
775
+ role: 'developer';
776
+ /**
777
+ * (Optional) The name of the developer message participant.
778
+ */
779
+ name?: string;
780
+ }
781
+ namespace OpenAIDeveloperMessageParam {
782
+ interface OpenAIChatCompletionContentPartTextParam {
783
+ text: string;
784
+ type: 'text';
785
+ }
786
+ interface OpenAIChatCompletionContentPartImageParam {
787
+ image_url: OpenAIChatCompletionContentPartImageParam.ImageURL;
788
+ type: 'image_url';
789
+ }
790
+ namespace OpenAIChatCompletionContentPartImageParam {
791
+ interface ImageURL {
792
+ url: string;
793
+ detail?: string;
794
+ }
795
+ }
796
+ }
797
+ }
798
+ export interface CompletionListResponse {
799
+ data: Array<CompletionListResponse.Data>;
800
+ first_id: string;
801
+ has_more: boolean;
802
+ last_id: string;
803
+ object: 'list';
804
+ }
805
+ export declare namespace CompletionListResponse {
806
+ interface Data {
25
807
  /**
26
808
  * The ID of the chat completion
27
809
  */
@@ -29,11 +811,12 @@ export declare namespace CompletionCreateResponse {
29
811
  /**
30
812
  * List of choices
31
813
  */
32
- choices: Array<OpenAIChatCompletion.Choice>;
814
+ choices: Array<Data.Choice>;
33
815
  /**
34
816
  * The Unix timestamp in seconds when the chat completion was created
35
817
  */
36
818
  created: number;
819
+ input_messages: Array<Data.OpenAIUserMessageParam | Data.OpenAISystemMessageParam | Data.OpenAIAssistantMessageParam | Data.OpenAIToolMessageParam | Data.OpenAIDeveloperMessageParam>;
37
820
  /**
38
821
  * The model that was used to generate the chat completion
39
822
  */
@@ -43,7 +826,7 @@ export declare namespace CompletionCreateResponse {
43
826
  */
44
827
  object: 'chat.completion';
45
828
  }
46
- namespace OpenAIChatCompletion {
829
+ namespace Data {
47
830
  /**
48
831
  * A choice from an OpenAI-compatible chat completion response.
49
832
  */
@@ -309,12 +1092,197 @@ export declare namespace CompletionCreateResponse {
309
1092
  }
310
1093
  }
311
1094
  }
1095
+ /**
1096
+ * A message from the user in an OpenAI-compatible chat completion request.
1097
+ */
1098
+ interface OpenAIUserMessageParam {
1099
+ /**
1100
+ * The content of the message, which can include text and other media
1101
+ */
1102
+ content: string | Array<OpenAIUserMessageParam.OpenAIChatCompletionContentPartTextParam | OpenAIUserMessageParam.OpenAIChatCompletionContentPartImageParam>;
1103
+ /**
1104
+ * Must be "user" to identify this as a user message
1105
+ */
1106
+ role: 'user';
1107
+ /**
1108
+ * (Optional) The name of the user message participant.
1109
+ */
1110
+ name?: string;
1111
+ }
1112
+ namespace OpenAIUserMessageParam {
1113
+ interface OpenAIChatCompletionContentPartTextParam {
1114
+ text: string;
1115
+ type: 'text';
1116
+ }
1117
+ interface OpenAIChatCompletionContentPartImageParam {
1118
+ image_url: OpenAIChatCompletionContentPartImageParam.ImageURL;
1119
+ type: 'image_url';
1120
+ }
1121
+ namespace OpenAIChatCompletionContentPartImageParam {
1122
+ interface ImageURL {
1123
+ url: string;
1124
+ detail?: string;
1125
+ }
1126
+ }
1127
+ }
1128
+ /**
1129
+ * A system message providing instructions or context to the model.
1130
+ */
1131
+ interface OpenAISystemMessageParam {
1132
+ /**
1133
+ * The content of the "system prompt". If multiple system messages are provided,
1134
+ * they are concatenated. The underlying Llama Stack code may also add other system
1135
+ * messages (for example, for formatting tool definitions).
1136
+ */
1137
+ content: string | Array<OpenAISystemMessageParam.OpenAIChatCompletionContentPartTextParam | OpenAISystemMessageParam.OpenAIChatCompletionContentPartImageParam>;
1138
+ /**
1139
+ * Must be "system" to identify this as a system message
1140
+ */
1141
+ role: 'system';
1142
+ /**
1143
+ * (Optional) The name of the system message participant.
1144
+ */
1145
+ name?: string;
1146
+ }
1147
+ namespace OpenAISystemMessageParam {
1148
+ interface OpenAIChatCompletionContentPartTextParam {
1149
+ text: string;
1150
+ type: 'text';
1151
+ }
1152
+ interface OpenAIChatCompletionContentPartImageParam {
1153
+ image_url: OpenAIChatCompletionContentPartImageParam.ImageURL;
1154
+ type: 'image_url';
1155
+ }
1156
+ namespace OpenAIChatCompletionContentPartImageParam {
1157
+ interface ImageURL {
1158
+ url: string;
1159
+ detail?: string;
1160
+ }
1161
+ }
1162
+ }
1163
+ /**
1164
+ * A message containing the model's (assistant) response in an OpenAI-compatible
1165
+ * chat completion request.
1166
+ */
1167
+ interface OpenAIAssistantMessageParam {
1168
+ /**
1169
+ * Must be "assistant" to identify this as the model's response
1170
+ */
1171
+ role: 'assistant';
1172
+ /**
1173
+ * The content of the model's response
1174
+ */
1175
+ content?: string | Array<OpenAIAssistantMessageParam.OpenAIChatCompletionContentPartTextParam | OpenAIAssistantMessageParam.OpenAIChatCompletionContentPartImageParam>;
1176
+ /**
1177
+ * (Optional) The name of the assistant message participant.
1178
+ */
1179
+ name?: string;
1180
+ /**
1181
+ * List of tool calls. Each tool call is an OpenAIChatCompletionToolCall object.
1182
+ */
1183
+ tool_calls?: Array<OpenAIAssistantMessageParam.ToolCall>;
1184
+ }
1185
+ namespace OpenAIAssistantMessageParam {
1186
+ interface OpenAIChatCompletionContentPartTextParam {
1187
+ text: string;
1188
+ type: 'text';
1189
+ }
1190
+ interface OpenAIChatCompletionContentPartImageParam {
1191
+ image_url: OpenAIChatCompletionContentPartImageParam.ImageURL;
1192
+ type: 'image_url';
1193
+ }
1194
+ namespace OpenAIChatCompletionContentPartImageParam {
1195
+ interface ImageURL {
1196
+ url: string;
1197
+ detail?: string;
1198
+ }
1199
+ }
1200
+ interface ToolCall {
1201
+ type: 'function';
1202
+ id?: string;
1203
+ function?: ToolCall.Function;
1204
+ index?: number;
1205
+ }
1206
+ namespace ToolCall {
1207
+ interface Function {
1208
+ arguments?: string;
1209
+ name?: string;
1210
+ }
1211
+ }
1212
+ }
1213
+ /**
1214
+ * A message representing the result of a tool invocation in an OpenAI-compatible
1215
+ * chat completion request.
1216
+ */
1217
+ interface OpenAIToolMessageParam {
1218
+ /**
1219
+ * The response content from the tool
1220
+ */
1221
+ content: string | Array<OpenAIToolMessageParam.OpenAIChatCompletionContentPartTextParam | OpenAIToolMessageParam.OpenAIChatCompletionContentPartImageParam>;
1222
+ /**
1223
+ * Must be "tool" to identify this as a tool response
1224
+ */
1225
+ role: 'tool';
1226
+ /**
1227
+ * Unique identifier for the tool call this response is for
1228
+ */
1229
+ tool_call_id: string;
1230
+ }
1231
+ namespace OpenAIToolMessageParam {
1232
+ interface OpenAIChatCompletionContentPartTextParam {
1233
+ text: string;
1234
+ type: 'text';
1235
+ }
1236
+ interface OpenAIChatCompletionContentPartImageParam {
1237
+ image_url: OpenAIChatCompletionContentPartImageParam.ImageURL;
1238
+ type: 'image_url';
1239
+ }
1240
+ namespace OpenAIChatCompletionContentPartImageParam {
1241
+ interface ImageURL {
1242
+ url: string;
1243
+ detail?: string;
1244
+ }
1245
+ }
1246
+ }
1247
+ /**
1248
+ * A message from the developer in an OpenAI-compatible chat completion request.
1249
+ */
1250
+ interface OpenAIDeveloperMessageParam {
1251
+ /**
1252
+ * The content of the developer message
1253
+ */
1254
+ content: string | Array<OpenAIDeveloperMessageParam.OpenAIChatCompletionContentPartTextParam | OpenAIDeveloperMessageParam.OpenAIChatCompletionContentPartImageParam>;
1255
+ /**
1256
+ * Must be "developer" to identify this as a developer message
1257
+ */
1258
+ role: 'developer';
1259
+ /**
1260
+ * (Optional) The name of the developer message participant.
1261
+ */
1262
+ name?: string;
1263
+ }
1264
+ namespace OpenAIDeveloperMessageParam {
1265
+ interface OpenAIChatCompletionContentPartTextParam {
1266
+ text: string;
1267
+ type: 'text';
1268
+ }
1269
+ interface OpenAIChatCompletionContentPartImageParam {
1270
+ image_url: OpenAIChatCompletionContentPartImageParam.ImageURL;
1271
+ type: 'image_url';
1272
+ }
1273
+ namespace OpenAIChatCompletionContentPartImageParam {
1274
+ interface ImageURL {
1275
+ url: string;
1276
+ detail?: string;
1277
+ }
1278
+ }
1279
+ }
312
1280
  }
313
1281
  }
314
1282
  export type CompletionCreateParams = CompletionCreateParamsNonStreaming | CompletionCreateParamsStreaming;
315
1283
  export interface CompletionCreateParamsBase {
316
1284
  /**
317
- * List of messages in the conversation
1285
+ * List of messages in the conversation.
318
1286
  */
319
1287
  messages: Array<CompletionCreateParams.OpenAIUserMessageParam | CompletionCreateParams.OpenAISystemMessageParam | CompletionCreateParams.OpenAIAssistantMessageParam | CompletionCreateParams.OpenAIToolMessageParam | CompletionCreateParams.OpenAIDeveloperMessageParam>;
320
1288
  /**
@@ -323,87 +1291,87 @@ export interface CompletionCreateParamsBase {
323
1291
  */
324
1292
  model: string;
325
1293
  /**
326
- * (Optional) The penalty for repeated tokens
1294
+ * (Optional) The penalty for repeated tokens.
327
1295
  */
328
1296
  frequency_penalty?: number;
329
1297
  /**
330
- * (Optional) The function call to use
1298
+ * (Optional) The function call to use.
331
1299
  */
332
1300
  function_call?: string | Record<string, boolean | number | string | Array<unknown> | unknown | null>;
333
1301
  /**
334
- * (Optional) List of functions to use
1302
+ * (Optional) List of functions to use.
335
1303
  */
336
1304
  functions?: Array<Record<string, boolean | number | string | Array<unknown> | unknown | null>>;
337
1305
  /**
338
- * (Optional) The logit bias to use
1306
+ * (Optional) The logit bias to use.
339
1307
  */
340
1308
  logit_bias?: Record<string, number>;
341
1309
  /**
342
- * (Optional) The log probabilities to use
1310
+ * (Optional) The log probabilities to use.
343
1311
  */
344
1312
  logprobs?: boolean;
345
1313
  /**
346
- * (Optional) The maximum number of tokens to generate
1314
+ * (Optional) The maximum number of tokens to generate.
347
1315
  */
348
1316
  max_completion_tokens?: number;
349
1317
  /**
350
- * (Optional) The maximum number of tokens to generate
1318
+ * (Optional) The maximum number of tokens to generate.
351
1319
  */
352
1320
  max_tokens?: number;
353
1321
  /**
354
- * (Optional) The number of completions to generate
1322
+ * (Optional) The number of completions to generate.
355
1323
  */
356
1324
  n?: number;
357
1325
  /**
358
- * (Optional) Whether to parallelize tool calls
1326
+ * (Optional) Whether to parallelize tool calls.
359
1327
  */
360
1328
  parallel_tool_calls?: boolean;
361
1329
  /**
362
- * (Optional) The penalty for repeated tokens
1330
+ * (Optional) The penalty for repeated tokens.
363
1331
  */
364
1332
  presence_penalty?: number;
365
1333
  /**
366
- * (Optional) The response format to use
1334
+ * (Optional) The response format to use.
367
1335
  */
368
1336
  response_format?: CompletionCreateParams.OpenAIResponseFormatText | CompletionCreateParams.OpenAIResponseFormatJsonSchema | CompletionCreateParams.OpenAIResponseFormatJsonObject;
369
1337
  /**
370
- * (Optional) The seed to use
1338
+ * (Optional) The seed to use.
371
1339
  */
372
1340
  seed?: number;
373
1341
  /**
374
- * (Optional) The stop tokens to use
1342
+ * (Optional) The stop tokens to use.
375
1343
  */
376
1344
  stop?: string | Array<string>;
377
1345
  /**
378
- * (Optional) Whether to stream the response
1346
+ * (Optional) Whether to stream the response.
379
1347
  */
380
1348
  stream?: boolean;
381
1349
  /**
382
- * (Optional) The stream options to use
1350
+ * (Optional) The stream options to use.
383
1351
  */
384
1352
  stream_options?: Record<string, boolean | number | string | Array<unknown> | unknown | null>;
385
1353
  /**
386
- * (Optional) The temperature to use
1354
+ * (Optional) The temperature to use.
387
1355
  */
388
1356
  temperature?: number;
389
1357
  /**
390
- * (Optional) The tool choice to use
1358
+ * (Optional) The tool choice to use.
391
1359
  */
392
1360
  tool_choice?: string | Record<string, boolean | number | string | Array<unknown> | unknown | null>;
393
1361
  /**
394
- * (Optional) The tools to use
1362
+ * (Optional) The tools to use.
395
1363
  */
396
1364
  tools?: Array<Record<string, boolean | number | string | Array<unknown> | unknown | null>>;
397
1365
  /**
398
- * (Optional) The top log probabilities to use
1366
+ * (Optional) The top log probabilities to use.
399
1367
  */
400
1368
  top_logprobs?: number;
401
1369
  /**
402
- * (Optional) The top p to use
1370
+ * (Optional) The top p to use.
403
1371
  */
404
1372
  top_p?: number;
405
1373
  /**
406
- * (Optional) The user to use
1374
+ * (Optional) The user to use.
407
1375
  */
408
1376
  user?: string;
409
1377
  }
@@ -616,17 +1584,35 @@ export declare namespace CompletionCreateParams {
616
1584
  }
617
1585
  export interface CompletionCreateParamsNonStreaming extends CompletionCreateParamsBase {
618
1586
  /**
619
- * (Optional) Whether to stream the response
1587
+ * (Optional) Whether to stream the response.
620
1588
  */
621
1589
  stream?: false;
622
1590
  }
623
1591
  export interface CompletionCreateParamsStreaming extends CompletionCreateParamsBase {
624
1592
  /**
625
- * (Optional) Whether to stream the response
1593
+ * (Optional) Whether to stream the response.
626
1594
  */
627
1595
  stream: true;
628
1596
  }
1597
+ export interface CompletionListParams {
1598
+ /**
1599
+ * The ID of the last chat completion to return.
1600
+ */
1601
+ after?: string;
1602
+ /**
1603
+ * The maximum number of chat completions to return.
1604
+ */
1605
+ limit?: number;
1606
+ /**
1607
+ * The model to filter by.
1608
+ */
1609
+ model?: string;
1610
+ /**
1611
+ * The order to sort the chat completions by: "asc" or "desc". Defaults to "desc".
1612
+ */
1613
+ order?: 'asc' | 'desc';
1614
+ }
629
1615
  export declare namespace Completions {
630
- export { type CompletionCreateResponse as CompletionCreateResponse, type CompletionCreateParams as CompletionCreateParams, type CompletionCreateParamsNonStreaming as CompletionCreateParamsNonStreaming, type CompletionCreateParamsStreaming as CompletionCreateParamsStreaming, };
1616
+ export { type CompletionCreateResponse as CompletionCreateResponse, type CompletionRetrieveResponse as CompletionRetrieveResponse, type CompletionListResponse as CompletionListResponse, type CompletionCreateParams as CompletionCreateParams, type CompletionCreateParamsNonStreaming as CompletionCreateParamsNonStreaming, type CompletionCreateParamsStreaming as CompletionCreateParamsStreaming, type CompletionListParams as CompletionListParams, };
631
1617
  }
632
1618
  //# sourceMappingURL=completions.d.ts.map