Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "2.3.2"
".": "2.4.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 86
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-2bcc845d8635bf93ddcf9ee723af4d7928248412a417bee5fc10d863a1e13867.yml
openapi_spec_hash: 865230cb3abeb01bd85de05891af23c4
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-0205acb1015d29b2312a48526734c0399f93026d4fe2dff5c7768f566e333fd2.yml
openapi_spec_hash: 1772cc9056c2f6dfb2a4e9cb77ee6343
config_hash: ed1e6b3c5f93d12b80d31167f55c557c
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## 2.4.0 (2025-06-03)

Full Changelog: [v2.3.2...v2.4.0](https://github.com/openai/openai-java/compare/v2.3.2...v2.4.0)

### Features

* **api:** add new realtime and audio models, realtime session options ([898d2ad](https://github.com/openai/openai-java/commit/898d2ad33f780e060dff902b755f3456ae0c12ed))


### Chores

* **internal:** minor formatting change ([f68c491](https://github.com/openai/openai-java/commit/f68c491cb41e22a25d498b18919e8e7a657d753a))

## 2.3.2 (2025-06-02)

Full Changelog: [v2.3.1...v2.3.2](https://github.com/openai/openai-java/compare/v2.3.1...v2.3.2)
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@

<!-- x-release-please-start-version -->

[![Maven Central](https://img.shields.io/maven-central/v/com.openai/openai-java)](https://central.sonatype.com/artifact/com.openai/openai-java/2.3.2)
[![javadoc](https://javadoc.io/badge2/com.openai/openai-java/2.3.2/javadoc.svg)](https://javadoc.io/doc/com.openai/openai-java/2.3.2)
[![Maven Central](https://img.shields.io/maven-central/v/com.openai/openai-java)](https://central.sonatype.com/artifact/com.openai/openai-java/2.4.0)
[![javadoc](https://javadoc.io/badge2/com.openai/openai-java/2.4.0/javadoc.svg)](https://javadoc.io/doc/com.openai/openai-java/2.4.0)

<!-- x-release-please-end -->

The OpenAI Java SDK provides convenient access to the [OpenAI REST API](https://platform.openai.com/docs) from applications written in Java.

<!-- x-release-please-start-version -->

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/2.3.2).
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/2.4.0).

<!-- x-release-please-end -->

Expand All @@ -22,7 +22,7 @@ The REST API documentation can be found on [platform.openai.com](https://platfor
### Gradle

```kotlin
implementation("com.openai:openai-java:2.3.2")
implementation("com.openai:openai-java:2.4.0")
```

### Maven
Expand All @@ -31,7 +31,7 @@ implementation("com.openai:openai-java:2.3.2")
<dependency>
<groupId>com.openai</groupId>
<artifactId>openai-java</artifactId>
<version>2.3.2</version>
<version>2.4.0</version>
</dependency>
```

Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ repositories {

allprojects {
group = "com.openai"
version = "2.3.2" // x-release-please-version
version = "2.4.0" // x-release-please-version
}

subprojects {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ internal fun sseHandler(jsonMapper: JsonMapper): Handler<StreamResponse<SseMessa
if (done) {
continue
}

val message = state.decode(line) ?: continue

if (message.data.startsWith("[DONE]")) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ class ChatModel @JsonCreator private constructor(private val value: JsonField<St

@JvmField val GPT_4O_AUDIO_PREVIEW_2024_12_17 = of("gpt-4o-audio-preview-2024-12-17")

@JvmField val GPT_4O_AUDIO_PREVIEW_2025_06_03 = of("gpt-4o-audio-preview-2025-06-03")

@JvmField val GPT_4O_MINI_AUDIO_PREVIEW = of("gpt-4o-mini-audio-preview")

@JvmField
Expand Down Expand Up @@ -160,6 +162,7 @@ class ChatModel @JsonCreator private constructor(private val value: JsonField<St
GPT_4O_AUDIO_PREVIEW,
GPT_4O_AUDIO_PREVIEW_2024_10_01,
GPT_4O_AUDIO_PREVIEW_2024_12_17,
GPT_4O_AUDIO_PREVIEW_2025_06_03,
GPT_4O_MINI_AUDIO_PREVIEW,
GPT_4O_MINI_AUDIO_PREVIEW_2024_12_17,
GPT_4O_SEARCH_PREVIEW,
Expand Down Expand Up @@ -226,6 +229,7 @@ class ChatModel @JsonCreator private constructor(private val value: JsonField<St
GPT_4O_AUDIO_PREVIEW,
GPT_4O_AUDIO_PREVIEW_2024_10_01,
GPT_4O_AUDIO_PREVIEW_2024_12_17,
GPT_4O_AUDIO_PREVIEW_2025_06_03,
GPT_4O_MINI_AUDIO_PREVIEW,
GPT_4O_MINI_AUDIO_PREVIEW_2024_12_17,
GPT_4O_SEARCH_PREVIEW,
Expand Down Expand Up @@ -293,6 +297,7 @@ class ChatModel @JsonCreator private constructor(private val value: JsonField<St
GPT_4O_AUDIO_PREVIEW -> Value.GPT_4O_AUDIO_PREVIEW
GPT_4O_AUDIO_PREVIEW_2024_10_01 -> Value.GPT_4O_AUDIO_PREVIEW_2024_10_01
GPT_4O_AUDIO_PREVIEW_2024_12_17 -> Value.GPT_4O_AUDIO_PREVIEW_2024_12_17
GPT_4O_AUDIO_PREVIEW_2025_06_03 -> Value.GPT_4O_AUDIO_PREVIEW_2025_06_03
GPT_4O_MINI_AUDIO_PREVIEW -> Value.GPT_4O_MINI_AUDIO_PREVIEW
GPT_4O_MINI_AUDIO_PREVIEW_2024_12_17 -> Value.GPT_4O_MINI_AUDIO_PREVIEW_2024_12_17
GPT_4O_SEARCH_PREVIEW -> Value.GPT_4O_SEARCH_PREVIEW
Expand Down Expand Up @@ -360,6 +365,7 @@ class ChatModel @JsonCreator private constructor(private val value: JsonField<St
GPT_4O_AUDIO_PREVIEW -> Known.GPT_4O_AUDIO_PREVIEW
GPT_4O_AUDIO_PREVIEW_2024_10_01 -> Known.GPT_4O_AUDIO_PREVIEW_2024_10_01
GPT_4O_AUDIO_PREVIEW_2024_12_17 -> Known.GPT_4O_AUDIO_PREVIEW_2024_12_17
GPT_4O_AUDIO_PREVIEW_2025_06_03 -> Known.GPT_4O_AUDIO_PREVIEW_2025_06_03
GPT_4O_MINI_AUDIO_PREVIEW -> Known.GPT_4O_MINI_AUDIO_PREVIEW
GPT_4O_MINI_AUDIO_PREVIEW_2024_12_17 -> Known.GPT_4O_MINI_AUDIO_PREVIEW_2024_12_17
GPT_4O_SEARCH_PREVIEW -> Known.GPT_4O_SEARCH_PREVIEW
Expand Down