Skip to content

Commit dd24c50

Browse files
chore(api): update realtime specs
1 parent b45436f commit dd24c50

File tree

6 files changed

+468
-37
lines changed

6 files changed

+468
-37
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 88
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-79dcb0ae501ac17004f50aecb112a798290ab3727fbe7c7d1b34299e38ed4f8e.yml
3-
openapi_spec_hash: c8d54bd1ae3d704f6b6f72ffd2f876d8
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-c7dacca97e28bceff218684bb429481a70aa47aadad983ed9178bfda75ff4cd2.yml
3+
openapi_spec_hash: 28eb1bb901ca10d2e37db4606d2bcfa7
44
config_hash: 167ad0ca036d0f023c78e6496b4311e8

openai-java-core/src/main/kotlin/com/openai/models/beta/realtime/ConversationItemContent.kt

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,15 @@ private constructor(
6464
fun text(): Optional<String> = text.getOptional("text")
6565

6666
/**
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.
6868
*
6969
* @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the
7070
* server responded with an unexpected value).
7171
*/
7272
fun transcript(): Optional<String> = transcript.getOptional("transcript")
7373

7474
/**
75-
* The content type (`input_text`, `input_audio`, `item_reference`, `text`).
75+
* The content type (`input_text`, `input_audio`, `item_reference`, `text`, `audio`).
7676
*
7777
* @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the
7878
* server responded with an unexpected value).
@@ -188,7 +188,7 @@ private constructor(
188188
*/
189189
fun text(text: JsonField<String>) = apply { this.text = text }
190190

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. */
192192
fun transcript(transcript: String) = transcript(JsonField.of(transcript))
193193

194194
/**
@@ -200,7 +200,7 @@ private constructor(
200200
*/
201201
fun transcript(transcript: JsonField<String>) = apply { this.transcript = transcript }
202202

203-
/** The content type (`input_text`, `input_audio`, `item_reference`, `text`). */
203+
/** The content type (`input_text`, `input_audio`, `item_reference`, `text`, `audio`). */
204204
fun type(type: Type) = type(JsonField.of(type))
205205

206206
/**
@@ -282,7 +282,7 @@ private constructor(
282282
(if (transcript.asKnown().isPresent) 1 else 0) +
283283
(type.asKnown().getOrNull()?.validity() ?: 0)
284284

285-
/** The content type (`input_text`, `input_audio`, `item_reference`, `text`). */
285+
/** The content type (`input_text`, `input_audio`, `item_reference`, `text`, `audio`). */
286286
class Type @JsonCreator private constructor(private val value: JsonField<String>) : Enum {
287287

288288
/**
@@ -305,6 +305,8 @@ private constructor(
305305

306306
@JvmField val TEXT = of("text")
307307

308+
@JvmField val AUDIO = of("audio")
309+
308310
@JvmStatic fun of(value: String) = Type(JsonField.of(value))
309311
}
310312

@@ -314,6 +316,7 @@ private constructor(
314316
INPUT_AUDIO,
315317
ITEM_REFERENCE,
316318
TEXT,
319+
AUDIO,
317320
}
318321

319322
/**
@@ -330,6 +333,7 @@ private constructor(
330333
INPUT_AUDIO,
331334
ITEM_REFERENCE,
332335
TEXT,
336+
AUDIO,
333337
/** An enum member indicating that [Type] was instantiated with an unknown value. */
334338
_UNKNOWN,
335339
}
@@ -347,6 +351,7 @@ private constructor(
347351
INPUT_AUDIO -> Value.INPUT_AUDIO
348352
ITEM_REFERENCE -> Value.ITEM_REFERENCE
349353
TEXT -> Value.TEXT
354+
AUDIO -> Value.AUDIO
350355
else -> Value._UNKNOWN
351356
}
352357

@@ -365,6 +370,7 @@ private constructor(
365370
INPUT_AUDIO -> Known.INPUT_AUDIO
366371
ITEM_REFERENCE -> Known.ITEM_REFERENCE
367372
TEXT -> Known.TEXT
373+
AUDIO -> Known.AUDIO
368374
else -> throw OpenAIInvalidDataException("Unknown Type: $value")
369375
}
370376

0 commit comments

Comments
 (0)