Skip to content

Commit c9a19c3

Browse files
stainless-app[bot]TomerAberbachykoh42
authored
release: 0.31.1 (#273)
* docs: note required fields in `builder` javadoc (#272) * chore(client): expose `Optional`, not nullable, from `ClientOptions` (#274) * fix(api): add missing file rank enum + more metadata (#276) * docs: add audio transcription example * docs: embeddings example (#263) * fix: change model to TEXT_EMBEDDING_3_SMALL due to unsupported dimensions TEXT_EMBEDDING_ADA_002 does not support the `dimensions` option, so the model has been changed to TEXT_EMBEDDING_3_SMALL to ensure proper functionality. * docs: add `EmbeddingsExample` * release: 0.31.1 --------- Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com> Co-authored-by: Tomer Aberbach <[email protected]> Co-authored-by: Ykoh <[email protected]>
1 parent cdf6cd1 commit c9a19c3

File tree

249 files changed

+3619
-33
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

249 files changed

+3619
-33
lines changed

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.31.0"
2+
".": "0.31.1"
33
}

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
configured_endpoints: 72
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai-5d30684c3118d049682ea30cdb4dbef39b97d51667da484689193dc40162af32.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai-b524aed1c2c5c928aa4e2c546f5dbb364e7b4d5027daf05e42e210b05a97c3c6.yml

CHANGELOG.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,25 @@
11
# Changelog
22

3+
## 0.31.1 (2025-03-05)
4+
5+
Full Changelog: [v0.31.0...v0.31.1](https://github.com/openai/openai-java/compare/v0.31.0...v0.31.1)
6+
7+
### Bug Fixes
8+
9+
* **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))
10+
11+
12+
### Chores
13+
14+
* **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))
15+
16+
17+
### Documentation
18+
19+
* add audio transcription example ([2c6a1aa](https://github.com/openai/openai-java/commit/2c6a1aa334dec5625a771ddd40452a7ffe32439b))
20+
* embeddings example ([#263](https://github.com/openai/openai-java/issues/263)) ([e1b68de](https://github.com/openai/openai-java/commit/e1b68de090359c4272435b2236fd021d616331a2))
21+
* note required fields in `builder` javadoc ([#272](https://github.com/openai/openai-java/issues/272)) ([603b5c9](https://github.com/openai/openai-java/commit/603b5c955ad383fa3ec358c91ce034cbbf7d1446))
22+
323
## 0.31.0 (2025-03-04)
424

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

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
1010
<!-- x-release-please-start-version -->
1111

12-
[![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)
13-
[![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)
12+
[![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)
13+
[![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)
1414

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

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

2727
```kotlin
28-
implementation("com.openai:openai-java:0.31.0")
28+
implementation("com.openai:openai-java:0.31.1")
2929
```
3030

3131
### Maven
@@ -34,7 +34,7 @@ implementation("com.openai:openai-java:0.31.0")
3434
<dependency>
3535
<groupId>com.openai</groupId>
3636
<artifactId>openai-java</artifactId>
37-
<version>0.31.0</version>
37+
<version>0.31.1</version>
3838
</dependency>
3939
```
4040

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ repositories {
88

99
allprojects {
1010
group = "com.openai"
11-
version = "0.31.0" // x-release-please-version
11+
version = "0.31.1" // x-release-please-version
1212
}
1313

1414
subprojects {

openai-java-client-okhttp/src/main/kotlin/com/openai/client/okhttp/OpenAIOkHttpClient.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ class OpenAIOkHttpClient private constructor() {
2121

2222
companion object {
2323

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

2627
@JvmStatic fun fromEnv(): OpenAIClient = builder().fromEnv().build()

openai-java-client-okhttp/src/main/kotlin/com/openai/client/okhttp/OpenAIOkHttpClientAsync.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ class OpenAIOkHttpClientAsync private constructor() {
2121

2222
companion object {
2323

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

2627
@JvmStatic fun fromEnv(): OpenAIClientAsync = builder().fromEnv().build()

openai-java-core/src/main/kotlin/com/openai/core/ClientOptions.kt

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,29 @@ private constructor(
3333
@get:JvmName("timeout") val timeout: Timeout,
3434
@get:JvmName("maxRetries") val maxRetries: Int,
3535
@get:JvmName("credential") val credential: Credential,
36-
@get:JvmName("organization") val organization: String?,
37-
@get:JvmName("project") val project: String?,
36+
private val organization: String?,
37+
private val project: String?,
3838
) {
3939

40+
fun organization(): Optional<String> = Optional.ofNullable(organization)
41+
42+
fun project(): Optional<String> = Optional.ofNullable(project)
43+
4044
fun toBuilder() = Builder().from(this)
4145

4246
companion object {
4347

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

50+
/**
51+
* Returns a mutable builder for constructing an instance of [ClientOptions].
52+
*
53+
* The following fields are required:
54+
* ```java
55+
* .httpClient()
56+
* .apiKey()
57+
* ```
58+
*/
4659
@JvmStatic fun builder() = Builder()
4760

4861
@JvmStatic fun fromEnv(): ClientOptions = builder().fromEnv().build()

openai-java-core/src/main/kotlin/com/openai/core/Timeout.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ private constructor(
6060

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

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

openai-java-core/src/main/kotlin/com/openai/errors/OpenAIError.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ private constructor(
2727

2828
companion object {
2929

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

0 commit comments

Comments
 (0)