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 @@
{
".": "0.31.0"
".": "0.31.1"
}
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 72
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai-5d30684c3118d049682ea30cdb4dbef39b97d51667da484689193dc40162af32.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai-b524aed1c2c5c928aa4e2c546f5dbb364e7b4d5027daf05e42e210b05a97c3c6.yml
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
# Changelog

## 0.31.1 (2025-03-05)

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

### Bug Fixes

* **api:** add missing file rank enum + more metadata ([#276](https://github.com/openai/openai-java/issues/276)) ([e92512f](https://github.com/openai/openai-java/commit/e92512f551df43f994ec6a29cfb7ef918e203324))


### Chores

* **client:** expose `Optional`, not nullable, from `ClientOptions` ([#274](https://github.com/openai/openai-java/issues/274)) ([c029310](https://github.com/openai/openai-java/commit/c029310f6f31d5a78767585a9f4ece4ba076fe2e))


### Documentation

* add audio transcription example ([2c6a1aa](https://github.com/openai/openai-java/commit/2c6a1aa334dec5625a771ddd40452a7ffe32439b))
* embeddings example ([#263](https://github.com/openai/openai-java/issues/263)) ([e1b68de](https://github.com/openai/openai-java/commit/e1b68de090359c4272435b2236fd021d616331a2))
* note required fields in `builder` javadoc ([#272](https://github.com/openai/openai-java/issues/272)) ([603b5c9](https://github.com/openai/openai-java/commit/603b5c955ad383fa3ec358c91ce034cbbf7d1446))

## 0.31.0 (2025-03-04)

Full Changelog: [v0.30.0...v0.31.0](https://github.com/openai/openai-java/compare/v0.30.0...v0.31.0)
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

<!-- 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.31.0)
[![javadoc](https://javadoc.io/badge2/com.openai/openai-java/0.31.0/javadoc.svg)](https://javadoc.io/doc/com.openai/openai-java/0.31.0)
[![Maven Central](https://img.shields.io/maven-central/v/com.openai/openai-java)](https://central.sonatype.com/artifact/com.openai/openai-java/0.31.1)
[![javadoc](https://javadoc.io/badge2/com.openai/openai-java/0.31.1/javadoc.svg)](https://javadoc.io/doc/com.openai/openai-java/0.31.1)

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

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

```kotlin
implementation("com.openai:openai-java:0.31.0")
implementation("com.openai:openai-java:0.31.1")
```

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

subprojects {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class OpenAIOkHttpClient private constructor() {

companion object {

/** Returns a mutable builder for constructing an instance of [OpenAIOkHttpClient]. */
@JvmStatic fun builder() = Builder()

@JvmStatic fun fromEnv(): OpenAIClient = builder().fromEnv().build()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class OpenAIOkHttpClientAsync private constructor() {

companion object {

/** Returns a mutable builder for constructing an instance of [OpenAIOkHttpClientAsync]. */
@JvmStatic fun builder() = Builder()

@JvmStatic fun fromEnv(): OpenAIClientAsync = builder().fromEnv().build()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,29 @@ private constructor(
@get:JvmName("timeout") val timeout: Timeout,
@get:JvmName("maxRetries") val maxRetries: Int,
@get:JvmName("credential") val credential: Credential,
@get:JvmName("organization") val organization: String?,
@get:JvmName("project") val project: String?,
private val organization: String?,
private val project: String?,
) {

fun organization(): Optional<String> = Optional.ofNullable(organization)

fun project(): Optional<String> = Optional.ofNullable(project)

fun toBuilder() = Builder().from(this)

companion object {

const val PRODUCTION_URL = "https://api.openai.com/v1"

/**
* Returns a mutable builder for constructing an instance of [ClientOptions].
*
* The following fields are required:
* ```java
* .httpClient()
* .apiKey()
* ```
*/
@JvmStatic fun builder() = Builder()

@JvmStatic fun fromEnv(): ClientOptions = builder().fromEnv().build()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ private constructor(

@JvmStatic fun default() = builder().build()

/** Returns a mutable builder for constructing an instance of [Timeout]. */
@JvmStatic fun builder() = Builder()
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ private constructor(

companion object {

/** Returns a mutable builder for constructing an instance of [OpenAIError]. */
@JvmStatic fun builder() = Builder()
}

Expand Down
18 changes: 18 additions & 0 deletions openai-java-core/src/main/kotlin/com/openai/models/Assistant.kt
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,21 @@ private constructor(

companion object {

/**
* Returns a mutable builder for constructing an instance of [Assistant].
*
* The following fields are required:
* ```java
* .id()
* .createdAt()
* .description()
* .instructions()
* .metadata()
* .model()
* .name()
* .tools()
* ```
*/
@JvmStatic fun builder() = Builder()
}

Expand Down Expand Up @@ -791,6 +806,7 @@ private constructor(

companion object {

/** Returns a mutable builder for constructing an instance of [ToolResources]. */
@JvmStatic fun builder() = Builder()
}

Expand Down Expand Up @@ -891,6 +907,7 @@ private constructor(

companion object {

/** Returns a mutable builder for constructing an instance of [CodeInterpreter]. */
@JvmStatic fun builder() = Builder()
}

Expand Down Expand Up @@ -1030,6 +1047,7 @@ private constructor(

companion object {

/** Returns a mutable builder for constructing an instance of [FileSearch]. */
@JvmStatic fun builder() = Builder()
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,15 @@ private constructor(

companion object {

/**
* Returns a mutable builder for constructing an instance of [AssistantDeleted].
*
* The following fields are required:
* ```java
* .id()
* .deleted()
* ```
*/
@JvmStatic fun builder() = Builder()
}

Expand Down
Loading