Skip to content

release: 0.44.2 #402

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 4, 2025
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 @@
{
".": "0.44.1"
".": "0.44.2"
}
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 0.44.2 (2025-04-04)

Full Changelog: [v0.44.1...v0.44.2](https://github.com/openai/openai-java/compare/v0.44.1...v0.44.2)

### Bug Fixes

* **client:** support responses API for Azure ([#387](https://github.com/openai/openai-java/issues/387)) ([f7f09aa](https://github.com/openai/openai-java/commit/f7f09aa1a3dd77f5565083ece85f8056b53e2e54))

## 0.44.1 (2025-04-04)

Full Changelog: [v0.44.0...v0.44.1](https://github.com/openai/openai-java/compare/v0.44.0...v0.44.1)
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,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/0.44.1)
[![javadoc](https://javadoc.io/badge2/com.openai/openai-java/0.44.1/javadoc.svg)](https://javadoc.io/doc/com.openai/openai-java/0.44.1)
[![Maven Central](https://img.shields.io/maven-central/v/com.openai/openai-java)](https://central.sonatype.com/artifact/com.openai/openai-java/0.44.2)
[![javadoc](https://javadoc.io/badge2/com.openai/openai-java/0.44.2/javadoc.svg)](https://javadoc.io/doc/com.openai/openai-java/0.44.2)

<!-- 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 also available on [javadoc.io](https://javadoc.io/doc/com.openai/openai-java/0.44.1).
The REST API documentation can be found on [platform.openai.com](https://platform.openai.com/docs). Javadocs are also available on [javadoc.io](https://javadoc.io/doc/com.openai/openai-java/0.44.2).

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

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

```kotlin
implementation("com.openai:openai-java:0.44.1")
implementation("com.openai:openai-java:0.44.2")
```

### Maven
Expand All @@ -38,7 +38,7 @@ implementation("com.openai:openai-java:0.44.1")
<dependency>
<groupId>com.openai</groupId>
<artifactId>openai-java</artifactId>
<version>0.44.1</version>
<version>0.44.2</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 = "0.44.1" // x-release-please-version
version = "0.44.2" // x-release-please-version
}

subprojects {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class AzureOpenAIServiceVersion private constructor(@get:JvmName("value") val va
@JvmStatic
fun latestPreviewVersion(): AzureOpenAIServiceVersion {
// We can update the value every preview announcement.
return V2025_01_01_PREVIEW
return V2025_03_01_PREVIEW
}

@JvmStatic
Expand All @@ -41,6 +41,8 @@ class AzureOpenAIServiceVersion private constructor(@get:JvmName("value") val va
@JvmStatic val V2024_10_01_PREVIEW = fromString("2024-10-01-preview")
@JvmStatic val V2024_12_01_PREVIEW = fromString("2024-12-01-preview")
@JvmStatic val V2025_01_01_PREVIEW = fromString("2025-01-01-preview")
@JvmStatic val V2025_02_01_PREVIEW = fromString("2025-02-01-preview")
@JvmStatic val V2025_03_01_PREVIEW = fromString("2025-03-01-preview")
}

override fun equals(other: Any?): Boolean =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ internal fun HttpRequest.Builder.addPathSegmentsForAzure(
clientOptions: ClientOptions,
deploymentModel: String?,
): HttpRequest.Builder = apply {
if (isAzureEndpoint(clientOptions.baseUrl) && deploymentModel != null) {
addPathSegments("openai", "deployments", deploymentModel)
if (isAzureEndpoint(clientOptions.baseUrl)) {
addPathSegment("openai")
deploymentModel?.let { addPathSegments("deployments", it) }
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ private constructor(
@get:JvmName("timeout") val timeout: Timeout,
@get:JvmName("maxRetries") val maxRetries: Int,
@get:JvmName("credential") val credential: Credential,
@get:JvmName("azureServiceVersion") val azureServiceVersion: AzureOpenAIServiceVersion?,
private val organization: String?,
private val project: String?,
) {
Expand Down Expand Up @@ -102,6 +103,7 @@ private constructor(
timeout = clientOptions.timeout
maxRetries = clientOptions.maxRetries
credential = clientOptions.credential
azureServiceVersion = clientOptions.azureServiceVersion
organization = clientOptions.organization
project = clientOptions.project
}
Expand Down Expand Up @@ -350,6 +352,7 @@ private constructor(
timeout,
maxRetries,
credential,
azureServiceVersion,
organization,
project,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,7 @@ class ResponseServiceAsyncImpl internal constructor(private val clientOptions: C
.addPathSegments("responses")
.body(json(clientOptions.jsonMapper, params._body()))
.build()
.prepareAsync(
clientOptions,
params,
deploymentModel = params.model().toString(),
)
.prepareAsync(clientOptions, params, deploymentModel = null)
val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions))
return request
.thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) }
Expand Down Expand Up @@ -148,11 +144,7 @@ class ResponseServiceAsyncImpl internal constructor(private val clientOptions: C
)
)
.build()
.prepareAsync(
clientOptions,
params,
deploymentModel = params.model().toString(),
)
.prepareAsync(clientOptions, params, deploymentModel = null)
val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions))
return request
.thenComposeAsync { clientOptions.httpClient.executeAsync(it, requestOptions) }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class ResponseServiceImpl internal constructor(private val clientOptions: Client
.addPathSegments("responses")
.body(json(clientOptions.jsonMapper, params._body()))
.build()
.prepare(clientOptions, params, deploymentModel = params.model().toString())
.prepare(clientOptions, params, deploymentModel = null)
val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions))
val response = clientOptions.httpClient.execute(request, requestOptions)
return response.parseable {
Expand Down Expand Up @@ -128,7 +128,7 @@ class ResponseServiceImpl internal constructor(private val clientOptions: Client
)
)
.build()
.prepare(clientOptions, params, deploymentModel = params.model().toString())
.prepare(clientOptions, params, deploymentModel = null)
val requestOptions = requestOptions.applyDefaults(RequestOptions.from(clientOptions))
val response = clientOptions.httpClient.execute(request, requestOptions)
return response.parseable {
Expand Down
Loading