@@ -64,15 +64,15 @@ private constructor(
64
64
fun text (): Optional <String > = text.getOptional(" text" )
65
65
66
66
/* *
67
- * The transcript of the audio, used for `input_audio` content type .
67
+ * The transcript of the audio, used for `input_audio` and `audio` content types .
68
68
*
69
69
* @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the
70
70
* server responded with an unexpected value).
71
71
*/
72
72
fun transcript (): Optional <String > = transcript.getOptional(" transcript" )
73
73
74
74
/* *
75
- * The content type (`input_text`, `input_audio`, `item_reference`, `text`).
75
+ * The content type (`input_text`, `input_audio`, `item_reference`, `text`, `audio` ).
76
76
*
77
77
* @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the
78
78
* server responded with an unexpected value).
@@ -188,7 +188,7 @@ private constructor(
188
188
*/
189
189
fun text (text : JsonField <String >) = apply { this .text = text }
190
190
191
- /* * The transcript of the audio, used for `input_audio` content type . */
191
+ /* * The transcript of the audio, used for `input_audio` and `audio` content types . */
192
192
fun transcript (transcript : String ) = transcript(JsonField .of(transcript))
193
193
194
194
/* *
@@ -200,7 +200,7 @@ private constructor(
200
200
*/
201
201
fun transcript (transcript : JsonField <String >) = apply { this .transcript = transcript }
202
202
203
- /* * The content type (`input_text`, `input_audio`, `item_reference`, `text`). */
203
+ /* * The content type (`input_text`, `input_audio`, `item_reference`, `text`, `audio` ). */
204
204
fun type (type : Type ) = type(JsonField .of(type))
205
205
206
206
/* *
@@ -282,7 +282,7 @@ private constructor(
282
282
(if (transcript.asKnown().isPresent) 1 else 0 ) +
283
283
(type.asKnown().getOrNull()?.validity() ? : 0 )
284
284
285
- /* * The content type (`input_text`, `input_audio`, `item_reference`, `text`). */
285
+ /* * The content type (`input_text`, `input_audio`, `item_reference`, `text`, `audio` ). */
286
286
class Type @JsonCreator private constructor(private val value : JsonField <String >) : Enum {
287
287
288
288
/* *
@@ -305,6 +305,8 @@ private constructor(
305
305
306
306
@JvmField val TEXT = of(" text" )
307
307
308
+ @JvmField val AUDIO = of(" audio" )
309
+
308
310
@JvmStatic fun of (value : String ) = Type (JsonField .of(value))
309
311
}
310
312
@@ -314,6 +316,7 @@ private constructor(
314
316
INPUT_AUDIO ,
315
317
ITEM_REFERENCE ,
316
318
TEXT ,
319
+ AUDIO ,
317
320
}
318
321
319
322
/* *
@@ -330,6 +333,7 @@ private constructor(
330
333
INPUT_AUDIO ,
331
334
ITEM_REFERENCE ,
332
335
TEXT ,
336
+ AUDIO ,
333
337
/* * An enum member indicating that [Type] was instantiated with an unknown value. */
334
338
_UNKNOWN ,
335
339
}
@@ -347,6 +351,7 @@ private constructor(
347
351
INPUT_AUDIO -> Value .INPUT_AUDIO
348
352
ITEM_REFERENCE -> Value .ITEM_REFERENCE
349
353
TEXT -> Value .TEXT
354
+ AUDIO -> Value .AUDIO
350
355
else -> Value ._UNKNOWN
351
356
}
352
357
@@ -365,6 +370,7 @@ private constructor(
365
370
INPUT_AUDIO -> Known .INPUT_AUDIO
366
371
ITEM_REFERENCE -> Known .ITEM_REFERENCE
367
372
TEXT -> Known .TEXT
373
+ AUDIO -> Known .AUDIO
368
374
else -> throw OpenAIInvalidDataException (" Unknown Type: $value " )
369
375
}
370
376
0 commit comments