diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index dd88ece2..bf0d0361 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "3.4.1"
+ ".": "3.5.0"
}
\ No newline at end of file
diff --git a/.stats.yml b/.stats.yml
index c41be6ee..36a3c7f5 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 118
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-51afd6abbcb18c3086f62993f9379c18443b9e516cbc0548ddfb932e835657f8.yml
-openapi_spec_hash: dae6afeaefa15cb8700c7a870531e06f
-config_hash: b854932c0ea24b400bdd64e4376936bd
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-7807ec6037efcee1af7decbfd3974a42b761fb6c6a71b4050fe43484d7fcbac4.yml
+openapi_spec_hash: da6851e3891ad2659a50ed6a736fd32a
+config_hash: 74d955cdc2377213f5268ea309090f6c
diff --git a/CHANGELOG.md b/CHANGELOG.md
index d177a9b9..fb6b8945 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,13 @@
# Changelog
+## 3.5.0 (2025-09-08)
+
+Full Changelog: [v3.4.1...v3.5.0](https://github.com/openai/openai-java/compare/v3.4.1...v3.5.0)
+
+### Features
+
+* **api:** ship the RealtimeGA API shape ([4eb0dfa](https://github.com/openai/openai-java/commit/4eb0dfa45278656462c69ea20573745d630b9559))
+
## 3.4.1 (2025-09-03)
Full Changelog: [v3.4.0...v3.4.1](https://github.com/openai/openai-java/compare/v3.4.0...v3.4.1)
diff --git a/README.md b/README.md
index 963b5437..19769775 100644
--- a/README.md
+++ b/README.md
@@ -2,8 +2,8 @@
-[](https://central.sonatype.com/artifact/com.openai/openai-java/3.4.1)
-[](https://javadoc.io/doc/com.openai/openai-java/3.4.1)
+[](https://central.sonatype.com/artifact/com.openai/openai-java/3.5.0)
+[](https://javadoc.io/doc/com.openai/openai-java/3.5.0)
@@ -11,7 +11,7 @@ The OpenAI Java SDK provides convenient access to the [OpenAI REST API](https://
-The REST API documentation can be found on [platform.openai.com](https://platform.openai.com/docs). Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.openai/openai-java/3.4.1).
+The REST API documentation can be found on [platform.openai.com](https://platform.openai.com/docs). Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.openai/openai-java/3.5.0).
@@ -24,7 +24,7 @@ The REST API documentation can be found on [platform.openai.com](https://platfor
### Gradle
```kotlin
-implementation("com.openai:openai-java:3.4.1")
+implementation("com.openai:openai-java:3.5.0")
```
### Maven
@@ -33,7 +33,7 @@ implementation("com.openai:openai-java:3.4.1")
com.openaiopenai-java
- 3.4.1
+ 3.5.0
```
@@ -1342,7 +1342,7 @@ If you're using Spring Boot, then you can use the SDK's [Spring Boot starter](ht
#### Gradle
```kotlin
-implementation("com.openai:openai-java-spring-boot-starter:3.4.1")
+implementation("com.openai:openai-java-spring-boot-starter:3.5.0")
```
#### Maven
@@ -1351,7 +1351,7 @@ implementation("com.openai:openai-java-spring-boot-starter:3.4.1")
com.openaiopenai-java-spring-boot-starter
- 3.4.1
+ 3.5.0
```
diff --git a/build.gradle.kts b/build.gradle.kts
index 81a21303..a176d01a 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -8,7 +8,7 @@ repositories {
allprojects {
group = "com.openai"
- version = "3.4.1" // x-release-please-version
+ version = "3.5.0" // x-release-please-version
}
subprojects {
diff --git a/openai-java-core/src/main/kotlin/com/openai/models/realtime/AudioTranscription.kt b/openai-java-core/src/main/kotlin/com/openai/models/realtime/AudioTranscription.kt
new file mode 100644
index 00000000..5955af1c
--- /dev/null
+++ b/openai-java-core/src/main/kotlin/com/openai/models/realtime/AudioTranscription.kt
@@ -0,0 +1,388 @@
+// File generated from our OpenAPI spec by Stainless.
+
+package com.openai.models.realtime
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter
+import com.fasterxml.jackson.annotation.JsonAnySetter
+import com.fasterxml.jackson.annotation.JsonCreator
+import com.fasterxml.jackson.annotation.JsonProperty
+import com.openai.core.Enum
+import com.openai.core.ExcludeMissing
+import com.openai.core.JsonField
+import com.openai.core.JsonMissing
+import com.openai.core.JsonValue
+import com.openai.errors.OpenAIInvalidDataException
+import java.util.Collections
+import java.util.Objects
+import java.util.Optional
+import kotlin.jvm.optionals.getOrNull
+
+class AudioTranscription
+private constructor(
+ private val language: JsonField,
+ private val model: JsonField,
+ private val prompt: JsonField,
+ private val additionalProperties: MutableMap,
+) {
+
+ @JsonCreator
+ private constructor(
+ @JsonProperty("language") @ExcludeMissing language: JsonField = JsonMissing.of(),
+ @JsonProperty("model") @ExcludeMissing model: JsonField = JsonMissing.of(),
+ @JsonProperty("prompt") @ExcludeMissing prompt: JsonField = JsonMissing.of(),
+ ) : this(language, model, prompt, mutableMapOf())
+
+ /**
+ * The language of the input audio. Supplying the input language in
+ * [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`) format will
+ * improve accuracy and latency.
+ *
+ * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun language(): Optional = language.getOptional("language")
+
+ /**
+ * The model to use for transcription. Current options are `whisper-1`,
+ * `gpt-4o-transcribe-latest`, `gpt-4o-mini-transcribe`, and `gpt-4o-transcribe`.
+ *
+ * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun model(): Optional = model.getOptional("model")
+
+ /**
+ * An optional text to guide the model's style or continue a previous audio segment. For
+ * `whisper-1`, the
+ * [prompt is a list of keywords](https://platform.openai.com/docs/guides/speech-to-text#prompting).
+ * For `gpt-4o-transcribe` models, the prompt is a free text string, for example "expect words
+ * related to technology".
+ *
+ * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun prompt(): Optional = prompt.getOptional("prompt")
+
+ /**
+ * Returns the raw JSON value of [language].
+ *
+ * Unlike [language], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("language") @ExcludeMissing fun _language(): JsonField = language
+
+ /**
+ * Returns the raw JSON value of [model].
+ *
+ * Unlike [model], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("model") @ExcludeMissing fun _model(): JsonField = model
+
+ /**
+ * Returns the raw JSON value of [prompt].
+ *
+ * Unlike [prompt], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("prompt") @ExcludeMissing fun _prompt(): JsonField = prompt
+
+ @JsonAnySetter
+ private fun putAdditionalProperty(key: String, value: JsonValue) {
+ additionalProperties.put(key, value)
+ }
+
+ @JsonAnyGetter
+ @ExcludeMissing
+ fun _additionalProperties(): Map =
+ Collections.unmodifiableMap(additionalProperties)
+
+ fun toBuilder() = Builder().from(this)
+
+ companion object {
+
+ /** Returns a mutable builder for constructing an instance of [AudioTranscription]. */
+ @JvmStatic fun builder() = Builder()
+ }
+
+ /** A builder for [AudioTranscription]. */
+ class Builder internal constructor() {
+
+ private var language: JsonField = JsonMissing.of()
+ private var model: JsonField = JsonMissing.of()
+ private var prompt: JsonField = JsonMissing.of()
+ private var additionalProperties: MutableMap = mutableMapOf()
+
+ @JvmSynthetic
+ internal fun from(audioTranscription: AudioTranscription) = apply {
+ language = audioTranscription.language
+ model = audioTranscription.model
+ prompt = audioTranscription.prompt
+ additionalProperties = audioTranscription.additionalProperties.toMutableMap()
+ }
+
+ /**
+ * The language of the input audio. Supplying the input language in
+ * [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`) format
+ * will improve accuracy and latency.
+ */
+ fun language(language: String) = language(JsonField.of(language))
+
+ /**
+ * Sets [Builder.language] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.language] with a well-typed [String] value instead. This
+ * method is primarily for setting the field to an undocumented or not yet supported value.
+ */
+ fun language(language: JsonField) = apply { this.language = language }
+
+ /**
+ * The model to use for transcription. Current options are `whisper-1`,
+ * `gpt-4o-transcribe-latest`, `gpt-4o-mini-transcribe`, and `gpt-4o-transcribe`.
+ */
+ fun model(model: Model) = model(JsonField.of(model))
+
+ /**
+ * Sets [Builder.model] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.model] with a well-typed [Model] value instead. This
+ * method is primarily for setting the field to an undocumented or not yet supported value.
+ */
+ fun model(model: JsonField) = apply { this.model = model }
+
+ /**
+ * An optional text to guide the model's style or continue a previous audio segment. For
+ * `whisper-1`, the
+ * [prompt is a list of keywords](https://platform.openai.com/docs/guides/speech-to-text#prompting).
+ * For `gpt-4o-transcribe` models, the prompt is a free text string, for example "expect
+ * words related to technology".
+ */
+ fun prompt(prompt: String) = prompt(JsonField.of(prompt))
+
+ /**
+ * Sets [Builder.prompt] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.prompt] with a well-typed [String] value instead. This
+ * method is primarily for setting the field to an undocumented or not yet supported value.
+ */
+ fun prompt(prompt: JsonField) = apply { this.prompt = prompt }
+
+ fun additionalProperties(additionalProperties: Map) = apply {
+ this.additionalProperties.clear()
+ putAllAdditionalProperties(additionalProperties)
+ }
+
+ fun putAdditionalProperty(key: String, value: JsonValue) = apply {
+ additionalProperties.put(key, value)
+ }
+
+ fun putAllAdditionalProperties(additionalProperties: Map) = apply {
+ this.additionalProperties.putAll(additionalProperties)
+ }
+
+ fun removeAdditionalProperty(key: String) = apply { additionalProperties.remove(key) }
+
+ fun removeAllAdditionalProperties(keys: Set) = apply {
+ keys.forEach(::removeAdditionalProperty)
+ }
+
+ /**
+ * Returns an immutable instance of [AudioTranscription].
+ *
+ * Further updates to this [Builder] will not mutate the returned instance.
+ */
+ fun build(): AudioTranscription =
+ AudioTranscription(language, model, prompt, additionalProperties.toMutableMap())
+ }
+
+ private var validated: Boolean = false
+
+ fun validate(): AudioTranscription = apply {
+ if (validated) {
+ return@apply
+ }
+
+ language()
+ model().ifPresent { it.validate() }
+ prompt()
+ validated = true
+ }
+
+ fun isValid(): Boolean =
+ try {
+ validate()
+ true
+ } catch (e: OpenAIInvalidDataException) {
+ false
+ }
+
+ /**
+ * Returns a score indicating how many valid values are contained in this object recursively.
+ *
+ * Used for best match union deserialization.
+ */
+ @JvmSynthetic
+ internal fun validity(): Int =
+ (if (language.asKnown().isPresent) 1 else 0) +
+ (model.asKnown().getOrNull()?.validity() ?: 0) +
+ (if (prompt.asKnown().isPresent) 1 else 0)
+
+ /**
+ * The model to use for transcription. Current options are `whisper-1`,
+ * `gpt-4o-transcribe-latest`, `gpt-4o-mini-transcribe`, and `gpt-4o-transcribe`.
+ */
+ class Model @JsonCreator private constructor(private val value: JsonField) : Enum {
+
+ /**
+ * Returns this class instance's raw value.
+ *
+ * This is usually only useful if this instance was deserialized from data that doesn't
+ * match any known member, and you want to know that value. For example, if the SDK is on an
+ * older version than the API, then the API may respond with new members that the SDK is
+ * unaware of.
+ */
+ @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value
+
+ companion object {
+
+ @JvmField val WHISPER_1 = of("whisper-1")
+
+ @JvmField val GPT_4O_TRANSCRIBE_LATEST = of("gpt-4o-transcribe-latest")
+
+ @JvmField val GPT_4O_MINI_TRANSCRIBE = of("gpt-4o-mini-transcribe")
+
+ @JvmField val GPT_4O_TRANSCRIBE = of("gpt-4o-transcribe")
+
+ @JvmStatic fun of(value: String) = Model(JsonField.of(value))
+ }
+
+ /** An enum containing [Model]'s known values. */
+ enum class Known {
+ WHISPER_1,
+ GPT_4O_TRANSCRIBE_LATEST,
+ GPT_4O_MINI_TRANSCRIBE,
+ GPT_4O_TRANSCRIBE,
+ }
+
+ /**
+ * An enum containing [Model]'s known values, as well as an [_UNKNOWN] member.
+ *
+ * An instance of [Model] can contain an unknown value in a couple of cases:
+ * - It was deserialized from data that doesn't match any known member. For example, if the
+ * SDK is on an older version than the API, then the API may respond with new members that
+ * the SDK is unaware of.
+ * - It was constructed with an arbitrary value using the [of] method.
+ */
+ enum class Value {
+ WHISPER_1,
+ GPT_4O_TRANSCRIBE_LATEST,
+ GPT_4O_MINI_TRANSCRIBE,
+ GPT_4O_TRANSCRIBE,
+ /** An enum member indicating that [Model] was instantiated with an unknown value. */
+ _UNKNOWN,
+ }
+
+ /**
+ * Returns an enum member corresponding to this class instance's value, or [Value._UNKNOWN]
+ * if the class was instantiated with an unknown value.
+ *
+ * Use the [known] method instead if you're certain the value is always known or if you want
+ * to throw for the unknown case.
+ */
+ fun value(): Value =
+ when (this) {
+ WHISPER_1 -> Value.WHISPER_1
+ GPT_4O_TRANSCRIBE_LATEST -> Value.GPT_4O_TRANSCRIBE_LATEST
+ GPT_4O_MINI_TRANSCRIBE -> Value.GPT_4O_MINI_TRANSCRIBE
+ GPT_4O_TRANSCRIBE -> Value.GPT_4O_TRANSCRIBE
+ else -> Value._UNKNOWN
+ }
+
+ /**
+ * Returns an enum member corresponding to this class instance's value.
+ *
+ * Use the [value] method instead if you're uncertain the value is always known and don't
+ * want to throw for the unknown case.
+ *
+ * @throws OpenAIInvalidDataException if this class instance's value is a not a known
+ * member.
+ */
+ fun known(): Known =
+ when (this) {
+ WHISPER_1 -> Known.WHISPER_1
+ GPT_4O_TRANSCRIBE_LATEST -> Known.GPT_4O_TRANSCRIBE_LATEST
+ GPT_4O_MINI_TRANSCRIBE -> Known.GPT_4O_MINI_TRANSCRIBE
+ GPT_4O_TRANSCRIBE -> Known.GPT_4O_TRANSCRIBE
+ else -> throw OpenAIInvalidDataException("Unknown Model: $value")
+ }
+
+ /**
+ * Returns this class instance's primitive wire representation.
+ *
+ * This differs from the [toString] method because that method is primarily for debugging
+ * and generally doesn't throw.
+ *
+ * @throws OpenAIInvalidDataException if this class instance's value does not have the
+ * expected primitive type.
+ */
+ fun asString(): String =
+ _value().asString().orElseThrow { OpenAIInvalidDataException("Value is not a String") }
+
+ private var validated: Boolean = false
+
+ fun validate(): Model = apply {
+ if (validated) {
+ return@apply
+ }
+
+ known()
+ validated = true
+ }
+
+ fun isValid(): Boolean =
+ try {
+ validate()
+ true
+ } catch (e: OpenAIInvalidDataException) {
+ false
+ }
+
+ /**
+ * Returns a score indicating how many valid values are contained in this object
+ * recursively.
+ *
+ * Used for best match union deserialization.
+ */
+ @JvmSynthetic internal fun validity(): Int = if (value() == Value._UNKNOWN) 0 else 1
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return other is Model && value == other.value
+ }
+
+ override fun hashCode() = value.hashCode()
+
+ override fun toString() = value.toString()
+ }
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return other is AudioTranscription &&
+ language == other.language &&
+ model == other.model &&
+ prompt == other.prompt &&
+ additionalProperties == other.additionalProperties
+ }
+
+ private val hashCode: Int by lazy {
+ Objects.hash(language, model, prompt, additionalProperties)
+ }
+
+ override fun hashCode(): Int = hashCode
+
+ override fun toString() =
+ "AudioTranscription{language=$language, model=$model, prompt=$prompt, additionalProperties=$additionalProperties}"
+}
diff --git a/openai-java-core/src/main/kotlin/com/openai/models/realtime/ConversationItem.kt b/openai-java-core/src/main/kotlin/com/openai/models/realtime/ConversationItem.kt
index 7763fd5b..cc06d932 100644
--- a/openai-java-core/src/main/kotlin/com/openai/models/realtime/ConversationItem.kt
+++ b/openai-java-core/src/main/kotlin/com/openai/models/realtime/ConversationItem.kt
@@ -39,7 +39,13 @@ private constructor(
private val _json: JsonValue? = null,
) {
- /** A system message item in a Realtime conversation. */
+ /**
+ * A system message in a Realtime conversation can be used to provide additional context or
+ * instructions to the model. This is similar but distinct from the instruction prompt provided
+ * at the start of a conversation, as system messages can be added at any point in the
+ * conversation. For major changes to the conversation's behavior, use instructions, but for
+ * smaller updates (e.g. "the user is now asking about a different topic"), use system messages.
+ */
fun realtimeConversationItemSystemMessage(): Optional =
Optional.ofNullable(realtimeConversationItemSystemMessage)
@@ -95,7 +101,13 @@ private constructor(
fun isMcpApprovalRequest(): Boolean = mcpApprovalRequest != null
- /** A system message item in a Realtime conversation. */
+ /**
+ * A system message in a Realtime conversation can be used to provide additional context or
+ * instructions to the model. This is similar but distinct from the instruction prompt provided
+ * at the start of a conversation, as system messages can be added at any point in the
+ * conversation. For major changes to the conversation's behavior, use instructions, but for
+ * smaller updates (e.g. "the user is now asking about a different topic"), use system messages.
+ */
fun asRealtimeConversationItemSystemMessage(): RealtimeConversationItemSystemMessage =
realtimeConversationItemSystemMessage.getOrThrow("realtimeConversationItemSystemMessage")
@@ -325,7 +337,14 @@ private constructor(
companion object {
- /** A system message item in a Realtime conversation. */
+ /**
+ * A system message in a Realtime conversation can be used to provide additional context or
+ * instructions to the model. This is similar but distinct from the instruction prompt
+ * provided at the start of a conversation, as system messages can be added at any point in
+ * the conversation. For major changes to the conversation's behavior, use instructions, but
+ * for smaller updates (e.g. "the user is now asking about a different topic"), use system
+ * messages.
+ */
@JvmStatic
fun ofRealtimeConversationItemSystemMessage(
realtimeConversationItemSystemMessage: RealtimeConversationItemSystemMessage
@@ -389,7 +408,14 @@ private constructor(
*/
interface Visitor {
- /** A system message item in a Realtime conversation. */
+ /**
+ * A system message in a Realtime conversation can be used to provide additional context or
+ * instructions to the model. This is similar but distinct from the instruction prompt
+ * provided at the start of a conversation, as system messages can be added at any point in
+ * the conversation. For major changes to the conversation's behavior, use instructions, but
+ * for smaller updates (e.g. "the user is now asking about a different topic"), use system
+ * messages.
+ */
fun visitRealtimeConversationItemSystemMessage(
realtimeConversationItemSystemMessage: RealtimeConversationItemSystemMessage
): T
diff --git a/openai-java-core/src/main/kotlin/com/openai/models/realtime/ConversationItemAdded.kt b/openai-java-core/src/main/kotlin/com/openai/models/realtime/ConversationItemAdded.kt
index 934ffca4..128b5499 100644
--- a/openai-java-core/src/main/kotlin/com/openai/models/realtime/ConversationItemAdded.kt
+++ b/openai-java-core/src/main/kotlin/com/openai/models/realtime/ConversationItemAdded.kt
@@ -17,7 +17,20 @@ import java.util.Objects
import java.util.Optional
import kotlin.jvm.optionals.getOrNull
-/** Returned when a conversation item is added. */
+/**
+ * Sent by the server when an Item is added to the default Conversation. This can happen in several
+ * cases:
+ * - When the client sends a `conversation.item.create` event.
+ * - When the input audio buffer is committed. In this case the item will be a user message
+ * containing the audio from the buffer.
+ * - When the model is generating a Response. In this case the `conversation.item.added` event will
+ * be sent when the model starts generating a specific Item, and thus it will not yet have any
+ * content (and `status` will be `in_progress`).
+ *
+ * The event will include the full content of the Item (except when model is generating a Response)
+ * except for audio data, which can be retrieved separately with a `conversation.item.retrieve`
+ * event if necessary.
+ */
class ConversationItemAdded
private constructor(
private val eventId: JsonField,
diff --git a/openai-java-core/src/main/kotlin/com/openai/models/realtime/ConversationItemDone.kt b/openai-java-core/src/main/kotlin/com/openai/models/realtime/ConversationItemDone.kt
index 33722214..7c26e1da 100644
--- a/openai-java-core/src/main/kotlin/com/openai/models/realtime/ConversationItemDone.kt
+++ b/openai-java-core/src/main/kotlin/com/openai/models/realtime/ConversationItemDone.kt
@@ -17,7 +17,12 @@ import java.util.Objects
import java.util.Optional
import kotlin.jvm.optionals.getOrNull
-/** Returned when a conversation item is finalized. */
+/**
+ * Returned when a conversation item is finalized.
+ *
+ * The event will include the full content of the Item except for audio data, which can be retrieved
+ * separately with a `conversation.item.retrieve` event if needed.
+ */
class ConversationItemDone
private constructor(
private val eventId: JsonField,
diff --git a/openai-java-core/src/main/kotlin/com/openai/models/realtime/ConversationItemInputAudioTranscriptionCompletedEvent.kt b/openai-java-core/src/main/kotlin/com/openai/models/realtime/ConversationItemInputAudioTranscriptionCompletedEvent.kt
index 5375b6f2..38fb62fb 100644
--- a/openai-java-core/src/main/kotlin/com/openai/models/realtime/ConversationItemInputAudioTranscriptionCompletedEvent.kt
+++ b/openai-java-core/src/main/kotlin/com/openai/models/realtime/ConversationItemInputAudioTranscriptionCompletedEvent.kt
@@ -32,9 +32,9 @@ import kotlin.jvm.optionals.getOrNull
/**
* This event is the output of audio transcription for user audio written to the user audio buffer.
- * Transcription begins when the input audio buffer is committed by the client or server (in
- * `server_vad` mode). Transcription runs asynchronously with Response creation, so this event may
- * come before or after the Response events.
+ * Transcription begins when the input audio buffer is committed by the client or server (when VAD
+ * is enabled). Transcription runs asynchronously with Response creation, so this event may come
+ * before or after the Response events.
*
* Realtime API models accept audio natively, and thus input transcription is a separate process run
* on a separate ASR (Automatic Speech Recognition) model. The transcript may diverge somewhat from
@@ -86,7 +86,7 @@ private constructor(
fun eventId(): String = eventId.getRequired("event_id")
/**
- * The ID of the user message item containing the audio.
+ * The ID of the item containing the audio that is being transcribed.
*
* @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is
* unexpectedly missing or null (e.g. if the server responded with an unexpected value).
@@ -115,7 +115,8 @@ private constructor(
@JsonProperty("type") @ExcludeMissing fun _type(): JsonValue = type
/**
- * Usage statistics for the transcription.
+ * Usage statistics for the transcription, this is billed according to the ASR model's pricing
+ * rather than the realtime model's pricing.
*
* @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is
* unexpectedly missing or null (e.g. if the server responded with an unexpected value).
@@ -262,7 +263,7 @@ private constructor(
*/
fun eventId(eventId: JsonField) = apply { this.eventId = eventId }
- /** The ID of the user message item containing the audio. */
+ /** The ID of the item containing the audio that is being transcribed. */
fun itemId(itemId: String) = itemId(JsonField.of(itemId))
/**
@@ -299,7 +300,10 @@ private constructor(
*/
fun type(type: JsonValue) = apply { this.type = type }
- /** Usage statistics for the transcription. */
+ /**
+ * Usage statistics for the transcription, this is billed according to the ASR model's
+ * pricing rather than the realtime model's pricing.
+ */
fun usage(usage: Usage) = usage(JsonField.of(usage))
/**
@@ -448,7 +452,10 @@ private constructor(
(usage.asKnown().getOrNull()?.validity() ?: 0) +
(logprobs.asKnown().getOrNull()?.sumOf { it.validity().toInt() } ?: 0)
- /** Usage statistics for the transcription. */
+ /**
+ * Usage statistics for the transcription, this is billed according to the ASR model's pricing
+ * rather than the realtime model's pricing.
+ */
@JsonDeserialize(using = Usage.Deserializer::class)
@JsonSerialize(using = Usage.Serializer::class)
class Usage
diff --git a/openai-java-core/src/main/kotlin/com/openai/models/realtime/ConversationItemInputAudioTranscriptionDeltaEvent.kt b/openai-java-core/src/main/kotlin/com/openai/models/realtime/ConversationItemInputAudioTranscriptionDeltaEvent.kt
index 68db339f..1e3379ac 100644
--- a/openai-java-core/src/main/kotlin/com/openai/models/realtime/ConversationItemInputAudioTranscriptionDeltaEvent.kt
+++ b/openai-java-core/src/main/kotlin/com/openai/models/realtime/ConversationItemInputAudioTranscriptionDeltaEvent.kt
@@ -19,7 +19,10 @@ import java.util.Objects
import java.util.Optional
import kotlin.jvm.optionals.getOrNull
-/** Returned when the text value of an input audio transcription content part is updated. */
+/**
+ * Returned when the text value of an input audio transcription content part is updated with
+ * incremental transcription results.
+ */
class ConversationItemInputAudioTranscriptionDeltaEvent
private constructor(
private val eventId: JsonField,
@@ -54,7 +57,7 @@ private constructor(
fun eventId(): String = eventId.getRequired("event_id")
/**
- * The ID of the item.
+ * The ID of the item containing the audio that is being transcribed.
*
* @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is
* unexpectedly missing or null (e.g. if the server responded with an unexpected value).
@@ -91,7 +94,11 @@ private constructor(
fun delta(): Optional = delta.getOptional("delta")
/**
- * The log probabilities of the transcription.
+ * The log probabilities of the transcription. These can be enabled by configurating the session
+ * with `"include": ["item.input_audio_transcription.logprobs"]`. Each entry in the array
+ * corresponds a log probability of which token would be selected for this chunk of
+ * transcription. This can help to identify if it was possible there were multiple valid options
+ * for a given chunk of transcription.
*
* @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
@@ -206,7 +213,7 @@ private constructor(
*/
fun eventId(eventId: JsonField) = apply { this.eventId = eventId }
- /** The ID of the item. */
+ /** The ID of the item containing the audio that is being transcribed. */
fun itemId(itemId: String) = itemId(JsonField.of(itemId))
/**
@@ -254,7 +261,13 @@ private constructor(
*/
fun delta(delta: JsonField) = apply { this.delta = delta }
- /** The log probabilities of the transcription. */
+ /**
+ * The log probabilities of the transcription. These can be enabled by configurating the
+ * session with `"include": ["item.input_audio_transcription.logprobs"]`. Each entry in the
+ * array corresponds a log probability of which token would be selected for this chunk of
+ * transcription. This can help to identify if it was possible there were multiple valid
+ * options for a given chunk of transcription.
+ */
fun logprobs(logprobs: List?) = logprobs(JsonField.ofNullable(logprobs))
/** Alias for calling [Builder.logprobs] with `logprobs.orElse(null)`. */
diff --git a/openai-java-core/src/main/kotlin/com/openai/models/realtime/ConversationItemTruncateEvent.kt b/openai-java-core/src/main/kotlin/com/openai/models/realtime/ConversationItemTruncateEvent.kt
index 2efb7e05..1c23121e 100644
--- a/openai-java-core/src/main/kotlin/com/openai/models/realtime/ConversationItemTruncateEvent.kt
+++ b/openai-java-core/src/main/kotlin/com/openai/models/realtime/ConversationItemTruncateEvent.kt
@@ -60,7 +60,7 @@ private constructor(
fun audioEndMs(): Long = audioEndMs.getRequired("audio_end_ms")
/**
- * The index of the content part to truncate. Set this to 0.
+ * The index of the content part to truncate. Set this to `0`.
*
* @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is
* unexpectedly missing or null (e.g. if the server responded with an unexpected value).
@@ -189,7 +189,7 @@ private constructor(
*/
fun audioEndMs(audioEndMs: JsonField) = apply { this.audioEndMs = audioEndMs }
- /** The index of the content part to truncate. Set this to 0. */
+ /** The index of the content part to truncate. Set this to `0`. */
fun contentIndex(contentIndex: Long) = contentIndex(JsonField.of(contentIndex))
/**
diff --git a/openai-java-core/src/main/kotlin/com/openai/models/realtime/InputAudioBufferAppendEvent.kt b/openai-java-core/src/main/kotlin/com/openai/models/realtime/InputAudioBufferAppendEvent.kt
index dfd1ef84..3a6d49d8 100644
--- a/openai-java-core/src/main/kotlin/com/openai/models/realtime/InputAudioBufferAppendEvent.kt
+++ b/openai-java-core/src/main/kotlin/com/openai/models/realtime/InputAudioBufferAppendEvent.kt
@@ -18,13 +18,17 @@ import java.util.Optional
/**
* Send this event to append audio bytes to the input audio buffer. The audio buffer is temporary
- * storage you can write to and later commit. In Server VAD mode, the audio buffer is used to detect
- * speech and the server will decide when to commit. When Server VAD is disabled, you must commit
- * the audio buffer manually.
+ * storage you can write to and later commit. A "commit" will create a new user message item in the
+ * conversation history from the buffer content and clear the buffer. Input audio transcription (if
+ * enabled) will be generated when the buffer is committed.
+ *
+ * If VAD is enabled the audio buffer is used to detect speech and the server will decide when to
+ * commit. When Server VAD is disabled, you must commit the audio buffer manually. Input audio noise
+ * reduction operates on writes to the audio buffer.
*
* The client may choose how much audio to place in each event up to a maximum of 15 MiB, for
* example streaming smaller chunks from the client may allow the VAD to be more responsive. Unlike
- * made other client events, the server will not send a confirmation response to this event.
+ * most other client events, the server will not send a confirmation response to this event.
*/
class InputAudioBufferAppendEvent
private constructor(
diff --git a/openai-java-core/src/main/kotlin/com/openai/models/realtime/Models.kt b/openai-java-core/src/main/kotlin/com/openai/models/realtime/Models.kt
new file mode 100644
index 00000000..fe1f7695
--- /dev/null
+++ b/openai-java-core/src/main/kotlin/com/openai/models/realtime/Models.kt
@@ -0,0 +1,365 @@
+// File generated from our OpenAPI spec by Stainless.
+
+package com.openai.models.realtime
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter
+import com.fasterxml.jackson.annotation.JsonAnySetter
+import com.fasterxml.jackson.annotation.JsonCreator
+import com.fasterxml.jackson.annotation.JsonProperty
+import com.openai.core.Enum
+import com.openai.core.ExcludeMissing
+import com.openai.core.JsonField
+import com.openai.core.JsonMissing
+import com.openai.core.JsonValue
+import com.openai.errors.OpenAIInvalidDataException
+import java.util.Collections
+import java.util.Objects
+import java.util.Optional
+import kotlin.jvm.optionals.getOrNull
+
+class Models
+private constructor(
+ private val description: JsonField,
+ private val name: JsonField,
+ private val parameters: JsonValue,
+ private val type: JsonField,
+ private val additionalProperties: MutableMap,
+) {
+
+ @JsonCreator
+ private constructor(
+ @JsonProperty("description")
+ @ExcludeMissing
+ description: JsonField = JsonMissing.of(),
+ @JsonProperty("name") @ExcludeMissing name: JsonField = JsonMissing.of(),
+ @JsonProperty("parameters") @ExcludeMissing parameters: JsonValue = JsonMissing.of(),
+ @JsonProperty("type") @ExcludeMissing type: JsonField = JsonMissing.of(),
+ ) : this(description, name, parameters, type, mutableMapOf())
+
+ /**
+ * The description of the function, including guidance on when and how to call it, and guidance
+ * about what to tell the user when calling (if anything).
+ *
+ * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun description(): Optional = description.getOptional("description")
+
+ /**
+ * The name of the function.
+ *
+ * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun name(): Optional = name.getOptional("name")
+
+ /** Parameters of the function in JSON Schema. */
+ @JsonProperty("parameters") @ExcludeMissing fun _parameters(): JsonValue = parameters
+
+ /**
+ * The type of the tool, i.e. `function`.
+ *
+ * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun type(): Optional = type.getOptional("type")
+
+ /**
+ * Returns the raw JSON value of [description].
+ *
+ * Unlike [description], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("description") @ExcludeMissing fun _description(): JsonField = description
+
+ /**
+ * Returns the raw JSON value of [name].
+ *
+ * Unlike [name], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("name") @ExcludeMissing fun _name(): JsonField = name
+
+ /**
+ * Returns the raw JSON value of [type].
+ *
+ * Unlike [type], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("type") @ExcludeMissing fun _type(): JsonField = type
+
+ @JsonAnySetter
+ private fun putAdditionalProperty(key: String, value: JsonValue) {
+ additionalProperties.put(key, value)
+ }
+
+ @JsonAnyGetter
+ @ExcludeMissing
+ fun _additionalProperties(): Map =
+ Collections.unmodifiableMap(additionalProperties)
+
+ fun toBuilder() = Builder().from(this)
+
+ companion object {
+
+ /** Returns a mutable builder for constructing an instance of [Models]. */
+ @JvmStatic fun builder() = Builder()
+ }
+
+ /** A builder for [Models]. */
+ class Builder internal constructor() {
+
+ private var description: JsonField = JsonMissing.of()
+ private var name: JsonField = JsonMissing.of()
+ private var parameters: JsonValue = JsonMissing.of()
+ private var type: JsonField = JsonMissing.of()
+ private var additionalProperties: MutableMap = mutableMapOf()
+
+ @JvmSynthetic
+ internal fun from(models: Models) = apply {
+ description = models.description
+ name = models.name
+ parameters = models.parameters
+ type = models.type
+ additionalProperties = models.additionalProperties.toMutableMap()
+ }
+
+ /**
+ * The description of the function, including guidance on when and how to call it, and
+ * guidance about what to tell the user when calling (if anything).
+ */
+ fun description(description: String) = description(JsonField.of(description))
+
+ /**
+ * Sets [Builder.description] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.description] with a well-typed [String] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet supported
+ * value.
+ */
+ fun description(description: JsonField) = apply { this.description = description }
+
+ /** The name of the function. */
+ fun name(name: String) = name(JsonField.of(name))
+
+ /**
+ * Sets [Builder.name] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.name] with a well-typed [String] value instead. This
+ * method is primarily for setting the field to an undocumented or not yet supported value.
+ */
+ fun name(name: JsonField) = apply { this.name = name }
+
+ /** Parameters of the function in JSON Schema. */
+ fun parameters(parameters: JsonValue) = apply { this.parameters = parameters }
+
+ /** The type of the tool, i.e. `function`. */
+ fun type(type: Type) = type(JsonField.of(type))
+
+ /**
+ * Sets [Builder.type] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.type] with a well-typed [Type] value instead. This
+ * method is primarily for setting the field to an undocumented or not yet supported value.
+ */
+ fun type(type: JsonField) = apply { this.type = type }
+
+ fun additionalProperties(additionalProperties: Map) = apply {
+ this.additionalProperties.clear()
+ putAllAdditionalProperties(additionalProperties)
+ }
+
+ fun putAdditionalProperty(key: String, value: JsonValue) = apply {
+ additionalProperties.put(key, value)
+ }
+
+ fun putAllAdditionalProperties(additionalProperties: Map) = apply {
+ this.additionalProperties.putAll(additionalProperties)
+ }
+
+ fun removeAdditionalProperty(key: String) = apply { additionalProperties.remove(key) }
+
+ fun removeAllAdditionalProperties(keys: Set) = apply {
+ keys.forEach(::removeAdditionalProperty)
+ }
+
+ /**
+ * Returns an immutable instance of [Models].
+ *
+ * Further updates to this [Builder] will not mutate the returned instance.
+ */
+ fun build(): Models =
+ Models(description, name, parameters, type, additionalProperties.toMutableMap())
+ }
+
+ private var validated: Boolean = false
+
+ fun validate(): Models = apply {
+ if (validated) {
+ return@apply
+ }
+
+ description()
+ name()
+ type().ifPresent { it.validate() }
+ validated = true
+ }
+
+ fun isValid(): Boolean =
+ try {
+ validate()
+ true
+ } catch (e: OpenAIInvalidDataException) {
+ false
+ }
+
+ /**
+ * Returns a score indicating how many valid values are contained in this object recursively.
+ *
+ * Used for best match union deserialization.
+ */
+ @JvmSynthetic
+ internal fun validity(): Int =
+ (if (description.asKnown().isPresent) 1 else 0) +
+ (if (name.asKnown().isPresent) 1 else 0) +
+ (type.asKnown().getOrNull()?.validity() ?: 0)
+
+ /** The type of the tool, i.e. `function`. */
+ class Type @JsonCreator private constructor(private val value: JsonField) : Enum {
+
+ /**
+ * Returns this class instance's raw value.
+ *
+ * This is usually only useful if this instance was deserialized from data that doesn't
+ * match any known member, and you want to know that value. For example, if the SDK is on an
+ * older version than the API, then the API may respond with new members that the SDK is
+ * unaware of.
+ */
+ @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value
+
+ companion object {
+
+ @JvmField val FUNCTION = of("function")
+
+ @JvmStatic fun of(value: String) = Type(JsonField.of(value))
+ }
+
+ /** An enum containing [Type]'s known values. */
+ enum class Known {
+ FUNCTION
+ }
+
+ /**
+ * An enum containing [Type]'s known values, as well as an [_UNKNOWN] member.
+ *
+ * An instance of [Type] can contain an unknown value in a couple of cases:
+ * - It was deserialized from data that doesn't match any known member. For example, if the
+ * SDK is on an older version than the API, then the API may respond with new members that
+ * the SDK is unaware of.
+ * - It was constructed with an arbitrary value using the [of] method.
+ */
+ enum class Value {
+ FUNCTION,
+ /** An enum member indicating that [Type] was instantiated with an unknown value. */
+ _UNKNOWN,
+ }
+
+ /**
+ * Returns an enum member corresponding to this class instance's value, or [Value._UNKNOWN]
+ * if the class was instantiated with an unknown value.
+ *
+ * Use the [known] method instead if you're certain the value is always known or if you want
+ * to throw for the unknown case.
+ */
+ fun value(): Value =
+ when (this) {
+ FUNCTION -> Value.FUNCTION
+ else -> Value._UNKNOWN
+ }
+
+ /**
+ * Returns an enum member corresponding to this class instance's value.
+ *
+ * Use the [value] method instead if you're uncertain the value is always known and don't
+ * want to throw for the unknown case.
+ *
+ * @throws OpenAIInvalidDataException if this class instance's value is a not a known
+ * member.
+ */
+ fun known(): Known =
+ when (this) {
+ FUNCTION -> Known.FUNCTION
+ else -> throw OpenAIInvalidDataException("Unknown Type: $value")
+ }
+
+ /**
+ * Returns this class instance's primitive wire representation.
+ *
+ * This differs from the [toString] method because that method is primarily for debugging
+ * and generally doesn't throw.
+ *
+ * @throws OpenAIInvalidDataException if this class instance's value does not have the
+ * expected primitive type.
+ */
+ fun asString(): String =
+ _value().asString().orElseThrow { OpenAIInvalidDataException("Value is not a String") }
+
+ private var validated: Boolean = false
+
+ fun validate(): Type = apply {
+ if (validated) {
+ return@apply
+ }
+
+ known()
+ validated = true
+ }
+
+ fun isValid(): Boolean =
+ try {
+ validate()
+ true
+ } catch (e: OpenAIInvalidDataException) {
+ false
+ }
+
+ /**
+ * Returns a score indicating how many valid values are contained in this object
+ * recursively.
+ *
+ * Used for best match union deserialization.
+ */
+ @JvmSynthetic internal fun validity(): Int = if (value() == Value._UNKNOWN) 0 else 1
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return other is Type && value == other.value
+ }
+
+ override fun hashCode() = value.hashCode()
+
+ override fun toString() = value.toString()
+ }
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return other is Models &&
+ description == other.description &&
+ name == other.name &&
+ parameters == other.parameters &&
+ type == other.type &&
+ additionalProperties == other.additionalProperties
+ }
+
+ private val hashCode: Int by lazy {
+ Objects.hash(description, name, parameters, type, additionalProperties)
+ }
+
+ override fun hashCode(): Int = hashCode
+
+ override fun toString() =
+ "Models{description=$description, name=$name, parameters=$parameters, type=$type, additionalProperties=$additionalProperties}"
+}
diff --git a/openai-java-core/src/main/kotlin/com/openai/models/realtime/NoiseReductionType.kt b/openai-java-core/src/main/kotlin/com/openai/models/realtime/NoiseReductionType.kt
new file mode 100644
index 00000000..7b9326ba
--- /dev/null
+++ b/openai-java-core/src/main/kotlin/com/openai/models/realtime/NoiseReductionType.kt
@@ -0,0 +1,138 @@
+// File generated from our OpenAPI spec by Stainless.
+
+package com.openai.models.realtime
+
+import com.fasterxml.jackson.annotation.JsonCreator
+import com.openai.core.Enum
+import com.openai.core.JsonField
+import com.openai.errors.OpenAIInvalidDataException
+
+/**
+ * Type of noise reduction. `near_field` is for close-talking microphones such as headphones,
+ * `far_field` is for far-field microphones such as laptop or conference room microphones.
+ */
+class NoiseReductionType @JsonCreator private constructor(private val value: JsonField) :
+ Enum {
+
+ /**
+ * Returns this class instance's raw value.
+ *
+ * This is usually only useful if this instance was deserialized from data that doesn't match
+ * any known member, and you want to know that value. For example, if the SDK is on an older
+ * version than the API, then the API may respond with new members that the SDK is unaware of.
+ */
+ @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value
+
+ companion object {
+
+ @JvmField val NEAR_FIELD = of("near_field")
+
+ @JvmField val FAR_FIELD = of("far_field")
+
+ @JvmStatic fun of(value: String) = NoiseReductionType(JsonField.of(value))
+ }
+
+ /** An enum containing [NoiseReductionType]'s known values. */
+ enum class Known {
+ NEAR_FIELD,
+ FAR_FIELD,
+ }
+
+ /**
+ * An enum containing [NoiseReductionType]'s known values, as well as an [_UNKNOWN] member.
+ *
+ * An instance of [NoiseReductionType] can contain an unknown value in a couple of cases:
+ * - It was deserialized from data that doesn't match any known member. For example, if the SDK
+ * is on an older version than the API, then the API may respond with new members that the SDK
+ * is unaware of.
+ * - It was constructed with an arbitrary value using the [of] method.
+ */
+ enum class Value {
+ NEAR_FIELD,
+ FAR_FIELD,
+ /**
+ * An enum member indicating that [NoiseReductionType] was instantiated with an unknown
+ * value.
+ */
+ _UNKNOWN,
+ }
+
+ /**
+ * Returns an enum member corresponding to this class instance's value, or [Value._UNKNOWN] if
+ * the class was instantiated with an unknown value.
+ *
+ * Use the [known] method instead if you're certain the value is always known or if you want to
+ * throw for the unknown case.
+ */
+ fun value(): Value =
+ when (this) {
+ NEAR_FIELD -> Value.NEAR_FIELD
+ FAR_FIELD -> Value.FAR_FIELD
+ else -> Value._UNKNOWN
+ }
+
+ /**
+ * Returns an enum member corresponding to this class instance's value.
+ *
+ * Use the [value] method instead if you're uncertain the value is always known and don't want
+ * to throw for the unknown case.
+ *
+ * @throws OpenAIInvalidDataException if this class instance's value is a not a known member.
+ */
+ fun known(): Known =
+ when (this) {
+ NEAR_FIELD -> Known.NEAR_FIELD
+ FAR_FIELD -> Known.FAR_FIELD
+ else -> throw OpenAIInvalidDataException("Unknown NoiseReductionType: $value")
+ }
+
+ /**
+ * Returns this class instance's primitive wire representation.
+ *
+ * This differs from the [toString] method because that method is primarily for debugging and
+ * generally doesn't throw.
+ *
+ * @throws OpenAIInvalidDataException if this class instance's value does not have the expected
+ * primitive type.
+ */
+ fun asString(): String =
+ _value().asString().orElseThrow { OpenAIInvalidDataException("Value is not a String") }
+
+ private var validated: Boolean = false
+
+ fun validate(): NoiseReductionType = apply {
+ if (validated) {
+ return@apply
+ }
+
+ known()
+ validated = true
+ }
+
+ fun isValid(): Boolean =
+ try {
+ validate()
+ true
+ } catch (e: OpenAIInvalidDataException) {
+ false
+ }
+
+ /**
+ * Returns a score indicating how many valid values are contained in this object recursively.
+ *
+ * Used for best match union deserialization.
+ */
+ @JvmSynthetic internal fun validity(): Int = if (value() == Value._UNKNOWN) 0 else 1
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return other is NoiseReductionType && value == other.value
+ }
+
+ override fun hashCode() = value.hashCode()
+
+ override fun toString() = value.toString()
+}
diff --git a/openai-java-core/src/main/kotlin/com/openai/models/realtime/RealtimeAudioConfig.kt b/openai-java-core/src/main/kotlin/com/openai/models/realtime/RealtimeAudioConfig.kt
index 05494d46..42084721 100644
--- a/openai-java-core/src/main/kotlin/com/openai/models/realtime/RealtimeAudioConfig.kt
+++ b/openai-java-core/src/main/kotlin/com/openai/models/realtime/RealtimeAudioConfig.kt
@@ -6,7 +6,6 @@ import com.fasterxml.jackson.annotation.JsonAnyGetter
import com.fasterxml.jackson.annotation.JsonAnySetter
import com.fasterxml.jackson.annotation.JsonCreator
import com.fasterxml.jackson.annotation.JsonProperty
-import com.openai.core.Enum
import com.openai.core.ExcludeMissing
import com.openai.core.JsonField
import com.openai.core.JsonMissing
@@ -20,42 +19,48 @@ import kotlin.jvm.optionals.getOrNull
/** Configuration for input and output audio. */
class RealtimeAudioConfig
private constructor(
- private val input: JsonField,
- private val output: JsonField