@@ -87,126 +87,149 @@ private constructor(
8787 * created.
8888 */
8989 fun threadCreated (): Optional <ThreadCreated > = Optional .ofNullable(threadCreated)
90+
9091 /* *
9192 * Occurs when a new [run](https://platform.openai.com/docs/api-reference/runs/object) is
9293 * created.
9394 */
9495 fun threadRunCreated (): Optional <ThreadRunCreated > = Optional .ofNullable(threadRunCreated)
96+
9597 /* *
9698 * Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to a
9799 * `queued` status.
98100 */
99101 fun threadRunQueued (): Optional <ThreadRunQueued > = Optional .ofNullable(threadRunQueued)
102+
100103 /* *
101104 * Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to an
102105 * `in_progress` status.
103106 */
104107 fun threadRunInProgress (): Optional <ThreadRunInProgress > =
105108 Optional .ofNullable(threadRunInProgress)
109+
106110 /* *
107111 * Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to a
108112 * `requires_action` status.
109113 */
110114 fun threadRunRequiresAction (): Optional <ThreadRunRequiresAction > =
111115 Optional .ofNullable(threadRunRequiresAction)
116+
112117 /* *
113118 * Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) is completed.
114119 */
115120 fun threadRunCompleted (): Optional <ThreadRunCompleted > = Optional .ofNullable(threadRunCompleted)
121+
116122 /* *
117123 * Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) ends with
118124 * status `incomplete`.
119125 */
120126 fun threadRunIncomplete (): Optional <ThreadRunIncomplete > =
121127 Optional .ofNullable(threadRunIncomplete)
128+
122129 /* * Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) fails. */
123130 fun threadRunFailed (): Optional <ThreadRunFailed > = Optional .ofNullable(threadRunFailed)
131+
124132 /* *
125133 * Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to a
126134 * `cancelling` status.
127135 */
128136 fun threadRunCancelling (): Optional <ThreadRunCancelling > =
129137 Optional .ofNullable(threadRunCancelling)
138+
130139 /* *
131140 * Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) is cancelled.
132141 */
133142 fun threadRunCancelled (): Optional <ThreadRunCancelled > = Optional .ofNullable(threadRunCancelled)
143+
134144 /* * Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) expires. */
135145 fun threadRunExpired (): Optional <ThreadRunExpired > = Optional .ofNullable(threadRunExpired)
146+
136147 /* *
137148 * Occurs when a
138149 * [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) is created.
139150 */
140151 fun threadRunStepCreated (): Optional <ThreadRunStepCreated > =
141152 Optional .ofNullable(threadRunStepCreated)
153+
142154 /* *
143155 * Occurs when a
144156 * [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) moves to an
145157 * `in_progress` state.
146158 */
147159 fun threadRunStepInProgress (): Optional <ThreadRunStepInProgress > =
148160 Optional .ofNullable(threadRunStepInProgress)
161+
149162 /* *
150163 * Occurs when parts of a
151164 * [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) are being
152165 * streamed.
153166 */
154167 fun threadRunStepDelta (): Optional <ThreadRunStepDelta > = Optional .ofNullable(threadRunStepDelta)
168+
155169 /* *
156170 * Occurs when a
157171 * [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) is
158172 * completed.
159173 */
160174 fun threadRunStepCompleted (): Optional <ThreadRunStepCompleted > =
161175 Optional .ofNullable(threadRunStepCompleted)
176+
162177 /* *
163178 * Occurs when a
164179 * [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) fails.
165180 */
166181 fun threadRunStepFailed (): Optional <ThreadRunStepFailed > =
167182 Optional .ofNullable(threadRunStepFailed)
183+
168184 /* *
169185 * Occurs when a
170186 * [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) is
171187 * cancelled.
172188 */
173189 fun threadRunStepCancelled (): Optional <ThreadRunStepCancelled > =
174190 Optional .ofNullable(threadRunStepCancelled)
191+
175192 /* *
176193 * Occurs when a
177194 * [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) expires.
178195 */
179196 fun threadRunStepExpired (): Optional <ThreadRunStepExpired > =
180197 Optional .ofNullable(threadRunStepExpired)
198+
181199 /* *
182200 * Occurs when a [message](https://platform.openai.com/docs/api-reference/messages/object) is
183201 * created.
184202 */
185203 fun threadMessageCreated (): Optional <ThreadMessageCreated > =
186204 Optional .ofNullable(threadMessageCreated)
205+
187206 /* *
188207 * Occurs when a [message](https://platform.openai.com/docs/api-reference/messages/object) moves
189208 * to an `in_progress` state.
190209 */
191210 fun threadMessageInProgress (): Optional <ThreadMessageInProgress > =
192211 Optional .ofNullable(threadMessageInProgress)
212+
193213 /* *
194214 * Occurs when parts of a
195215 * [Message](https://platform.openai.com/docs/api-reference/messages/object) are being streamed.
196216 */
197217 fun threadMessageDelta (): Optional <ThreadMessageDelta > = Optional .ofNullable(threadMessageDelta)
218+
198219 /* *
199220 * Occurs when a [message](https://platform.openai.com/docs/api-reference/messages/object) is
200221 * completed.
201222 */
202223 fun threadMessageCompleted (): Optional <ThreadMessageCompleted > =
203224 Optional .ofNullable(threadMessageCompleted)
225+
204226 /* *
205227 * Occurs when a [message](https://platform.openai.com/docs/api-reference/messages/object) ends
206228 * before it is completed.
207229 */
208230 fun threadMessageIncomplete (): Optional <ThreadMessageIncomplete > =
209231 Optional .ofNullable(threadMessageIncomplete)
232+
210233 /* *
211234 * Occurs when an [error](https://platform.openai.com/docs/guides/error-codes#api-errors)
212235 * occurs. This can happen due to an internal server error or a timeout.
@@ -266,130 +289,153 @@ private constructor(
266289 * created.
267290 */
268291 fun asThreadCreated (): ThreadCreated = threadCreated.getOrThrow(" threadCreated" )
292+
269293 /* *
270294 * Occurs when a new [run](https://platform.openai.com/docs/api-reference/runs/object) is
271295 * created.
272296 */
273297 fun asThreadRunCreated (): ThreadRunCreated = threadRunCreated.getOrThrow(" threadRunCreated" )
298+
274299 /* *
275300 * Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to a
276301 * `queued` status.
277302 */
278303 fun asThreadRunQueued (): ThreadRunQueued = threadRunQueued.getOrThrow(" threadRunQueued" )
304+
279305 /* *
280306 * Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to an
281307 * `in_progress` status.
282308 */
283309 fun asThreadRunInProgress (): ThreadRunInProgress =
284310 threadRunInProgress.getOrThrow(" threadRunInProgress" )
311+
285312 /* *
286313 * Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to a
287314 * `requires_action` status.
288315 */
289316 fun asThreadRunRequiresAction (): ThreadRunRequiresAction =
290317 threadRunRequiresAction.getOrThrow(" threadRunRequiresAction" )
318+
291319 /* *
292320 * Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) is completed.
293321 */
294322 fun asThreadRunCompleted (): ThreadRunCompleted =
295323 threadRunCompleted.getOrThrow(" threadRunCompleted" )
324+
296325 /* *
297326 * Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) ends with
298327 * status `incomplete`.
299328 */
300329 fun asThreadRunIncomplete (): ThreadRunIncomplete =
301330 threadRunIncomplete.getOrThrow(" threadRunIncomplete" )
331+
302332 /* * Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) fails. */
303333 fun asThreadRunFailed (): ThreadRunFailed = threadRunFailed.getOrThrow(" threadRunFailed" )
334+
304335 /* *
305336 * Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to a
306337 * `cancelling` status.
307338 */
308339 fun asThreadRunCancelling (): ThreadRunCancelling =
309340 threadRunCancelling.getOrThrow(" threadRunCancelling" )
341+
310342 /* *
311343 * Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) is cancelled.
312344 */
313345 fun asThreadRunCancelled (): ThreadRunCancelled =
314346 threadRunCancelled.getOrThrow(" threadRunCancelled" )
347+
315348 /* * Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) expires. */
316349 fun asThreadRunExpired (): ThreadRunExpired = threadRunExpired.getOrThrow(" threadRunExpired" )
350+
317351 /* *
318352 * Occurs when a
319353 * [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) is created.
320354 */
321355 fun asThreadRunStepCreated (): ThreadRunStepCreated =
322356 threadRunStepCreated.getOrThrow(" threadRunStepCreated" )
357+
323358 /* *
324359 * Occurs when a
325360 * [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) moves to an
326361 * `in_progress` state.
327362 */
328363 fun asThreadRunStepInProgress (): ThreadRunStepInProgress =
329364 threadRunStepInProgress.getOrThrow(" threadRunStepInProgress" )
365+
330366 /* *
331367 * Occurs when parts of a
332368 * [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) are being
333369 * streamed.
334370 */
335371 fun asThreadRunStepDelta (): ThreadRunStepDelta =
336372 threadRunStepDelta.getOrThrow(" threadRunStepDelta" )
373+
337374 /* *
338375 * Occurs when a
339376 * [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) is
340377 * completed.
341378 */
342379 fun asThreadRunStepCompleted (): ThreadRunStepCompleted =
343380 threadRunStepCompleted.getOrThrow(" threadRunStepCompleted" )
381+
344382 /* *
345383 * Occurs when a
346384 * [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) fails.
347385 */
348386 fun asThreadRunStepFailed (): ThreadRunStepFailed =
349387 threadRunStepFailed.getOrThrow(" threadRunStepFailed" )
388+
350389 /* *
351390 * Occurs when a
352391 * [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) is
353392 * cancelled.
354393 */
355394 fun asThreadRunStepCancelled (): ThreadRunStepCancelled =
356395 threadRunStepCancelled.getOrThrow(" threadRunStepCancelled" )
396+
357397 /* *
358398 * Occurs when a
359399 * [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) expires.
360400 */
361401 fun asThreadRunStepExpired (): ThreadRunStepExpired =
362402 threadRunStepExpired.getOrThrow(" threadRunStepExpired" )
403+
363404 /* *
364405 * Occurs when a [message](https://platform.openai.com/docs/api-reference/messages/object) is
365406 * created.
366407 */
367408 fun asThreadMessageCreated (): ThreadMessageCreated =
368409 threadMessageCreated.getOrThrow(" threadMessageCreated" )
410+
369411 /* *
370412 * Occurs when a [message](https://platform.openai.com/docs/api-reference/messages/object) moves
371413 * to an `in_progress` state.
372414 */
373415 fun asThreadMessageInProgress (): ThreadMessageInProgress =
374416 threadMessageInProgress.getOrThrow(" threadMessageInProgress" )
417+
375418 /* *
376419 * Occurs when parts of a
377420 * [Message](https://platform.openai.com/docs/api-reference/messages/object) are being streamed.
378421 */
379422 fun asThreadMessageDelta (): ThreadMessageDelta =
380423 threadMessageDelta.getOrThrow(" threadMessageDelta" )
424+
381425 /* *
382426 * Occurs when a [message](https://platform.openai.com/docs/api-reference/messages/object) is
383427 * completed.
384428 */
385429 fun asThreadMessageCompleted (): ThreadMessageCompleted =
386430 threadMessageCompleted.getOrThrow(" threadMessageCompleted" )
431+
387432 /* *
388433 * Occurs when a [message](https://platform.openai.com/docs/api-reference/messages/object) ends
389434 * before it is completed.
390435 */
391436 fun asThreadMessageIncomplete (): ThreadMessageIncomplete =
392437 threadMessageIncomplete.getOrThrow(" threadMessageIncomplete" )
438+
393439 /* *
394440 * Occurs when an [error](https://platform.openai.com/docs/guides/error-codes#api-errors)
395441 * occurs. This can happen due to an internal server error or a timeout.
0 commit comments