@@ -87,126 +87,149 @@ private constructor(
87
87
* created.
88
88
*/
89
89
fun threadCreated (): Optional <ThreadCreated > = Optional .ofNullable(threadCreated)
90
+
90
91
/* *
91
92
* Occurs when a new [run](https://platform.openai.com/docs/api-reference/runs/object) is
92
93
* created.
93
94
*/
94
95
fun threadRunCreated (): Optional <ThreadRunCreated > = Optional .ofNullable(threadRunCreated)
96
+
95
97
/* *
96
98
* Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to a
97
99
* `queued` status.
98
100
*/
99
101
fun threadRunQueued (): Optional <ThreadRunQueued > = Optional .ofNullable(threadRunQueued)
102
+
100
103
/* *
101
104
* Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to an
102
105
* `in_progress` status.
103
106
*/
104
107
fun threadRunInProgress (): Optional <ThreadRunInProgress > =
105
108
Optional .ofNullable(threadRunInProgress)
109
+
106
110
/* *
107
111
* Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to a
108
112
* `requires_action` status.
109
113
*/
110
114
fun threadRunRequiresAction (): Optional <ThreadRunRequiresAction > =
111
115
Optional .ofNullable(threadRunRequiresAction)
116
+
112
117
/* *
113
118
* Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) is completed.
114
119
*/
115
120
fun threadRunCompleted (): Optional <ThreadRunCompleted > = Optional .ofNullable(threadRunCompleted)
121
+
116
122
/* *
117
123
* Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) ends with
118
124
* status `incomplete`.
119
125
*/
120
126
fun threadRunIncomplete (): Optional <ThreadRunIncomplete > =
121
127
Optional .ofNullable(threadRunIncomplete)
128
+
122
129
/* * Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) fails. */
123
130
fun threadRunFailed (): Optional <ThreadRunFailed > = Optional .ofNullable(threadRunFailed)
131
+
124
132
/* *
125
133
* Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to a
126
134
* `cancelling` status.
127
135
*/
128
136
fun threadRunCancelling (): Optional <ThreadRunCancelling > =
129
137
Optional .ofNullable(threadRunCancelling)
138
+
130
139
/* *
131
140
* Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) is cancelled.
132
141
*/
133
142
fun threadRunCancelled (): Optional <ThreadRunCancelled > = Optional .ofNullable(threadRunCancelled)
143
+
134
144
/* * Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) expires. */
135
145
fun threadRunExpired (): Optional <ThreadRunExpired > = Optional .ofNullable(threadRunExpired)
146
+
136
147
/* *
137
148
* Occurs when a
138
149
* [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) is created.
139
150
*/
140
151
fun threadRunStepCreated (): Optional <ThreadRunStepCreated > =
141
152
Optional .ofNullable(threadRunStepCreated)
153
+
142
154
/* *
143
155
* Occurs when a
144
156
* [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) moves to an
145
157
* `in_progress` state.
146
158
*/
147
159
fun threadRunStepInProgress (): Optional <ThreadRunStepInProgress > =
148
160
Optional .ofNullable(threadRunStepInProgress)
161
+
149
162
/* *
150
163
* Occurs when parts of a
151
164
* [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) are being
152
165
* streamed.
153
166
*/
154
167
fun threadRunStepDelta (): Optional <ThreadRunStepDelta > = Optional .ofNullable(threadRunStepDelta)
168
+
155
169
/* *
156
170
* Occurs when a
157
171
* [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) is
158
172
* completed.
159
173
*/
160
174
fun threadRunStepCompleted (): Optional <ThreadRunStepCompleted > =
161
175
Optional .ofNullable(threadRunStepCompleted)
176
+
162
177
/* *
163
178
* Occurs when a
164
179
* [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) fails.
165
180
*/
166
181
fun threadRunStepFailed (): Optional <ThreadRunStepFailed > =
167
182
Optional .ofNullable(threadRunStepFailed)
183
+
168
184
/* *
169
185
* Occurs when a
170
186
* [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) is
171
187
* cancelled.
172
188
*/
173
189
fun threadRunStepCancelled (): Optional <ThreadRunStepCancelled > =
174
190
Optional .ofNullable(threadRunStepCancelled)
191
+
175
192
/* *
176
193
* Occurs when a
177
194
* [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) expires.
178
195
*/
179
196
fun threadRunStepExpired (): Optional <ThreadRunStepExpired > =
180
197
Optional .ofNullable(threadRunStepExpired)
198
+
181
199
/* *
182
200
* Occurs when a [message](https://platform.openai.com/docs/api-reference/messages/object) is
183
201
* created.
184
202
*/
185
203
fun threadMessageCreated (): Optional <ThreadMessageCreated > =
186
204
Optional .ofNullable(threadMessageCreated)
205
+
187
206
/* *
188
207
* Occurs when a [message](https://platform.openai.com/docs/api-reference/messages/object) moves
189
208
* to an `in_progress` state.
190
209
*/
191
210
fun threadMessageInProgress (): Optional <ThreadMessageInProgress > =
192
211
Optional .ofNullable(threadMessageInProgress)
212
+
193
213
/* *
194
214
* Occurs when parts of a
195
215
* [Message](https://platform.openai.com/docs/api-reference/messages/object) are being streamed.
196
216
*/
197
217
fun threadMessageDelta (): Optional <ThreadMessageDelta > = Optional .ofNullable(threadMessageDelta)
218
+
198
219
/* *
199
220
* Occurs when a [message](https://platform.openai.com/docs/api-reference/messages/object) is
200
221
* completed.
201
222
*/
202
223
fun threadMessageCompleted (): Optional <ThreadMessageCompleted > =
203
224
Optional .ofNullable(threadMessageCompleted)
225
+
204
226
/* *
205
227
* Occurs when a [message](https://platform.openai.com/docs/api-reference/messages/object) ends
206
228
* before it is completed.
207
229
*/
208
230
fun threadMessageIncomplete (): Optional <ThreadMessageIncomplete > =
209
231
Optional .ofNullable(threadMessageIncomplete)
232
+
210
233
/* *
211
234
* Occurs when an [error](https://platform.openai.com/docs/guides/error-codes#api-errors)
212
235
* occurs. This can happen due to an internal server error or a timeout.
@@ -266,130 +289,153 @@ private constructor(
266
289
* created.
267
290
*/
268
291
fun asThreadCreated (): ThreadCreated = threadCreated.getOrThrow(" threadCreated" )
292
+
269
293
/* *
270
294
* Occurs when a new [run](https://platform.openai.com/docs/api-reference/runs/object) is
271
295
* created.
272
296
*/
273
297
fun asThreadRunCreated (): ThreadRunCreated = threadRunCreated.getOrThrow(" threadRunCreated" )
298
+
274
299
/* *
275
300
* Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to a
276
301
* `queued` status.
277
302
*/
278
303
fun asThreadRunQueued (): ThreadRunQueued = threadRunQueued.getOrThrow(" threadRunQueued" )
304
+
279
305
/* *
280
306
* Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to an
281
307
* `in_progress` status.
282
308
*/
283
309
fun asThreadRunInProgress (): ThreadRunInProgress =
284
310
threadRunInProgress.getOrThrow(" threadRunInProgress" )
311
+
285
312
/* *
286
313
* Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to a
287
314
* `requires_action` status.
288
315
*/
289
316
fun asThreadRunRequiresAction (): ThreadRunRequiresAction =
290
317
threadRunRequiresAction.getOrThrow(" threadRunRequiresAction" )
318
+
291
319
/* *
292
320
* Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) is completed.
293
321
*/
294
322
fun asThreadRunCompleted (): ThreadRunCompleted =
295
323
threadRunCompleted.getOrThrow(" threadRunCompleted" )
324
+
296
325
/* *
297
326
* Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) ends with
298
327
* status `incomplete`.
299
328
*/
300
329
fun asThreadRunIncomplete (): ThreadRunIncomplete =
301
330
threadRunIncomplete.getOrThrow(" threadRunIncomplete" )
331
+
302
332
/* * Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) fails. */
303
333
fun asThreadRunFailed (): ThreadRunFailed = threadRunFailed.getOrThrow(" threadRunFailed" )
334
+
304
335
/* *
305
336
* Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to a
306
337
* `cancelling` status.
307
338
*/
308
339
fun asThreadRunCancelling (): ThreadRunCancelling =
309
340
threadRunCancelling.getOrThrow(" threadRunCancelling" )
341
+
310
342
/* *
311
343
* Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) is cancelled.
312
344
*/
313
345
fun asThreadRunCancelled (): ThreadRunCancelled =
314
346
threadRunCancelled.getOrThrow(" threadRunCancelled" )
347
+
315
348
/* * Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) expires. */
316
349
fun asThreadRunExpired (): ThreadRunExpired = threadRunExpired.getOrThrow(" threadRunExpired" )
350
+
317
351
/* *
318
352
* Occurs when a
319
353
* [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) is created.
320
354
*/
321
355
fun asThreadRunStepCreated (): ThreadRunStepCreated =
322
356
threadRunStepCreated.getOrThrow(" threadRunStepCreated" )
357
+
323
358
/* *
324
359
* Occurs when a
325
360
* [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) moves to an
326
361
* `in_progress` state.
327
362
*/
328
363
fun asThreadRunStepInProgress (): ThreadRunStepInProgress =
329
364
threadRunStepInProgress.getOrThrow(" threadRunStepInProgress" )
365
+
330
366
/* *
331
367
* Occurs when parts of a
332
368
* [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) are being
333
369
* streamed.
334
370
*/
335
371
fun asThreadRunStepDelta (): ThreadRunStepDelta =
336
372
threadRunStepDelta.getOrThrow(" threadRunStepDelta" )
373
+
337
374
/* *
338
375
* Occurs when a
339
376
* [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) is
340
377
* completed.
341
378
*/
342
379
fun asThreadRunStepCompleted (): ThreadRunStepCompleted =
343
380
threadRunStepCompleted.getOrThrow(" threadRunStepCompleted" )
381
+
344
382
/* *
345
383
* Occurs when a
346
384
* [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) fails.
347
385
*/
348
386
fun asThreadRunStepFailed (): ThreadRunStepFailed =
349
387
threadRunStepFailed.getOrThrow(" threadRunStepFailed" )
388
+
350
389
/* *
351
390
* Occurs when a
352
391
* [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) is
353
392
* cancelled.
354
393
*/
355
394
fun asThreadRunStepCancelled (): ThreadRunStepCancelled =
356
395
threadRunStepCancelled.getOrThrow(" threadRunStepCancelled" )
396
+
357
397
/* *
358
398
* Occurs when a
359
399
* [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) expires.
360
400
*/
361
401
fun asThreadRunStepExpired (): ThreadRunStepExpired =
362
402
threadRunStepExpired.getOrThrow(" threadRunStepExpired" )
403
+
363
404
/* *
364
405
* Occurs when a [message](https://platform.openai.com/docs/api-reference/messages/object) is
365
406
* created.
366
407
*/
367
408
fun asThreadMessageCreated (): ThreadMessageCreated =
368
409
threadMessageCreated.getOrThrow(" threadMessageCreated" )
410
+
369
411
/* *
370
412
* Occurs when a [message](https://platform.openai.com/docs/api-reference/messages/object) moves
371
413
* to an `in_progress` state.
372
414
*/
373
415
fun asThreadMessageInProgress (): ThreadMessageInProgress =
374
416
threadMessageInProgress.getOrThrow(" threadMessageInProgress" )
417
+
375
418
/* *
376
419
* Occurs when parts of a
377
420
* [Message](https://platform.openai.com/docs/api-reference/messages/object) are being streamed.
378
421
*/
379
422
fun asThreadMessageDelta (): ThreadMessageDelta =
380
423
threadMessageDelta.getOrThrow(" threadMessageDelta" )
424
+
381
425
/* *
382
426
* Occurs when a [message](https://platform.openai.com/docs/api-reference/messages/object) is
383
427
* completed.
384
428
*/
385
429
fun asThreadMessageCompleted (): ThreadMessageCompleted =
386
430
threadMessageCompleted.getOrThrow(" threadMessageCompleted" )
431
+
387
432
/* *
388
433
* Occurs when a [message](https://platform.openai.com/docs/api-reference/messages/object) ends
389
434
* before it is completed.
390
435
*/
391
436
fun asThreadMessageIncomplete (): ThreadMessageIncomplete =
392
437
threadMessageIncomplete.getOrThrow(" threadMessageIncomplete" )
438
+
393
439
/* *
394
440
* Occurs when an [error](https://platform.openai.com/docs/guides/error-codes#api-errors)
395
441
* occurs. This can happen due to an internal server error or a timeout.
0 commit comments