Skip to content

Commit 817fc11

Browse files
stainless-app[bot]meorphisTomerAberbach
authored
release: 0.35.1 (#329)
* chore(internal): remove CI condition (#310) * chore(internal): update release workflows * docs: deduplicate and refine comments (#313) * chore(internal): make test classes internal (#317) * chore(internal): add generated comment (#318) * docs: add `build` method comments (#321) * chore(internal): refactor query param serialization impl and tests (#322) * chore(internal): rename `getPathParam` (#323) chore(internal): reorder some params methodsc chore(internal): delete duplicate tests chore(internal): refactor some test assertions * chore(internal): reformat some tests (#324) chore(internal): generate more tests * feat(client): don't require params for some service methods (#325) * chore(internal): add some tests for union classes (#326) * chore(internal): codegen related update (#327) * fix(api): correct some Responses types (#328) * chore(internal): add back release workflow * docs: show function calling conversation (#227) * fix(client): support kotlin 1.8 runtime (#330) * chore(internal): refactor enum query param serialization (#331) * fix(types): improve responses type names (#332) * docs: responses conversation example * release: 0.35.1 --------- Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com> Co-authored-by: meorphis <[email protected]> Co-authored-by: Tomer Aberbach <[email protected]>
1 parent fb225e5 commit 817fc11

File tree

60 files changed

+3751
-2810
lines changed

Some content is hidden

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

60 files changed

+3751
-2810
lines changed

.github/workflows/create-releases.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Create releases
2+
on:
3+
schedule:
4+
- cron: '0 5 * * *' # every day at 5am UTC
5+
push:
6+
branches:
7+
- main
8+
9+
jobs:
10+
release:
11+
name: release
12+
if: github.ref == 'refs/heads/main' && github.repository == 'openai/openai-java'
13+
runs-on: ubuntu-latest
14+
environment: publish
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- uses: stainless-api/trigger-release-please@v1
20+
id: release
21+
with:
22+
repo: ${{ github.event.repository.full_name }}
23+
stainless-api-key: ${{ secrets.STAINLESS_API_KEY }}
24+
25+
- name: Set up Java
26+
if: ${{ steps.release.outputs.releases_created }}
27+
uses: actions/setup-java@v3
28+
with:
29+
distribution: temurin
30+
java-version: |
31+
8
32+
17
33+
cache: gradle
34+
35+
- name: Set up Gradle
36+
if: ${{ steps.release.outputs.releases_created }}
37+
uses: gradle/gradle-build-action@v2
38+
39+
- name: Publish to Sonatype
40+
if: ${{ steps.release.outputs.releases_created }}
41+
run: |-
42+
export -- GPG_SIGNING_KEY_ID
43+
printenv -- GPG_SIGNING_KEY | gpg --batch --passphrase-fd 3 --import 3<<< "$GPG_SIGNING_PASSWORD"
44+
GPG_SIGNING_KEY_ID="$(gpg --with-colons --list-keys | awk -F : -- '/^pub:/ { getline; print "0x" substr($10, length($10) - 7) }')"
45+
./gradlew publishAndReleaseToMavenCentral --stacktrace -PmavenCentralUsername="$SONATYPE_USERNAME" -PmavenCentralPassword="$SONATYPE_PASSWORD"
46+
env:
47+
SONATYPE_USERNAME: ${{ secrets.OPENAI_SONATYPE_USERNAME || secrets.SONATYPE_USERNAME }}
48+
SONATYPE_PASSWORD: ${{ secrets.OPENAI_SONATYPE_PASSWORD || secrets.SONATYPE_PASSWORD }}
49+
GPG_SIGNING_KEY: ${{ secrets.OPENAI_SONATYPE_GPG_SIGNING_KEY || secrets.GPG_SIGNING_KEY }}
50+
GPG_SIGNING_PASSWORD: ${{ secrets.OPENAI_SONATYPE_GPG_SIGNING_PASSWORD || secrets.GPG_SIGNING_PASSWORD }}

.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.35.0"
2+
".": "0.35.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: 78
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-c8579861bc21d4d2155a5b9e8e7d54faee8083730673c4d32cbbe573d7fb4116.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-f3bce04386c4fcfd5037e0477fbaa39010003fd1558eb5185fe4a71dd6a05fdd.yml

CHANGELOG.md

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

3+
## 0.35.1 (2025-03-18)
4+
5+
Full Changelog: [v0.35.0...v0.35.1](https://github.com/openai/openai-java/compare/v0.35.0...v0.35.1)
6+
7+
### Bug Fixes
8+
9+
* **api:** correct some Responses types ([#328](https://github.com/openai/openai-java/issues/328)) ([efc79c0](https://github.com/openai/openai-java/commit/efc79c002003f3beaf74c2c3d13aada6235481e2))
10+
* **client:** support kotlin 1.8 runtime ([#330](https://github.com/openai/openai-java/issues/330)) ([5179a4e](https://github.com/openai/openai-java/commit/5179a4e4ea67797477cfdb9141e6d39eab9abd6a))
11+
* **types:** improve responses type names ([#332](https://github.com/openai/openai-java/issues/332)) ([517c500](https://github.com/openai/openai-java/commit/517c500d74e7d8c0f340b2607a574d8096390877))
12+
13+
14+
### Chores
15+
16+
* **internal:** add back release workflow ([7893465](https://github.com/openai/openai-java/commit/7893465dbd929e290a2e46dfc877c3ef8a889056))
17+
* **internal:** codegen related update ([#327](https://github.com/openai/openai-java/issues/327)) ([7030355](https://github.com/openai/openai-java/commit/7030355dc8e511647e7a6221143ca94426ac24bf))
18+
* **internal:** refactor enum query param serialization ([#331](https://github.com/openai/openai-java/issues/331)) ([c5ef44d](https://github.com/openai/openai-java/commit/c5ef44dbf1c894f63bf213db391d09f5a800f825))
19+
20+
21+
### Documentation
22+
23+
* responses conversation example ([fde5110](https://github.com/openai/openai-java/commit/fde5110a014a73e6e5e98fdb49e82506f04c4463))
24+
* show function calling conversation ([#227](https://github.com/openai/openai-java/issues/227)) ([ff7905a](https://github.com/openai/openai-java/commit/ff7905a22b217b370452e7a978b9153ae7487ebd))
25+
326
## 0.35.0 (2025-03-18)
427

528
Full Changelog: [v0.34.1...v0.35.0](https://github.com/openai/openai-java/compare/v0.34.1...v0.35.0)

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@
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.35.0)
13-
[![javadoc](https://javadoc.io/badge2/com.openai/openai-java/0.35.0/javadoc.svg)](https://javadoc.io/doc/com.openai/openai-java/0.35.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.35.1)
13+
[![javadoc](https://javadoc.io/badge2/com.openai/openai-java/0.35.1/javadoc.svg)](https://javadoc.io/doc/com.openai/openai-java/0.35.1)
1414

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

1717
The OpenAI Java SDK provides convenient access to the OpenAI REST API from applications written in Java.
1818

19-
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.34.1).
19+
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.35.0).
2020

2121
## Installation
2222

@@ -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.35.0")
28+
implementation("com.openai:openai-java:0.35.1")
2929
```
3030

3131
### Maven
@@ -34,7 +34,7 @@ implementation("com.openai:openai-java:0.35.0")
3434
<dependency>
3535
<groupId>com.openai</groupId>
3636
<artifactId>openai-java</artifactId>
37-
<version>0.35.0</version>
37+
<version>0.35.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.35.0" // x-release-please-version
11+
version = "0.35.1" // x-release-please-version
1212
}
1313

1414
subprojects {

buildSrc/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
plugins {
22
`kotlin-dsl`
3-
kotlin("jvm") version "2.1.10"
3+
kotlin("jvm") version "1.9.20"
44
id("com.vanniktech.maven.publish") version "0.28.0"
55
}
66

@@ -11,6 +11,6 @@ repositories {
1111

1212
dependencies {
1313
implementation("com.diffplug.spotless:spotless-plugin-gradle:7.0.2")
14-
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:2.1.10")
14+
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.20")
1515
implementation("com.vanniktech:gradle-maven-publish-plugin:0.28.0")
1616
}

buildSrc/src/main/kotlin/openai.java.gradle.kts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ java {
2323
toolchain {
2424
languageVersion.set(JavaLanguageVersion.of(17))
2525
}
26+
27+
sourceCompatibility = JavaVersion.VERSION_1_8
28+
targetCompatibility = JavaVersion.VERSION_1_8
2629
}
2730

2831
tasks.withType<JavaCompile>().configureEach {

buildSrc/src/main/kotlin/openai.kotlin.gradle.kts

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import com.diffplug.gradle.spotless.SpotlessExtension
22
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
3-
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
3+
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion
44

55
plugins {
66
id("openai.java")
@@ -11,25 +11,26 @@ kotlin {
1111
jvmToolchain {
1212
languageVersion.set(JavaLanguageVersion.of(17))
1313
}
14-
}
15-
16-
configure<SpotlessExtension> {
17-
kotlin {
18-
ktfmt().kotlinlangStyle()
19-
toggleOffOn()
20-
}
21-
}
2214

23-
tasks.withType<KotlinCompile>().configureEach {
2415
compilerOptions {
25-
allWarningsAsErrors = true
2616
freeCompilerArgs = listOf(
2717
"-Xjvm-default=all",
2818
"-Xjdk-release=1.8",
2919
// Suppress deprecation warnings because we may still reference and test deprecated members.
30-
"-Xsuppress-warning=DEPRECATION"
20+
// TODO: Replace with `-Xsuppress-warning=DEPRECATION` once we use Kotlin compiler 2.1.0+.
21+
"-nowarn",
3122
)
3223
jvmTarget.set(JvmTarget.JVM_1_8)
24+
languageVersion.set(KotlinVersion.KOTLIN_1_8)
25+
apiVersion.set(KotlinVersion.KOTLIN_1_8)
26+
coreLibrariesVersion = "1.8.0"
27+
}
28+
}
29+
30+
configure<SpotlessExtension> {
31+
kotlin {
32+
ktfmt().kotlinlangStyle()
33+
toggleOffOn()
3334
}
3435
}
3536

openai-java-core/src/main/kotlin/com/openai/models/Reasoning.kt

Lines changed: 6 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import com.openai.core.JsonField
1212
import com.openai.core.JsonMissing
1313
import com.openai.core.JsonValue
1414
import com.openai.core.NoAutoDetect
15-
import com.openai.core.checkRequired
1615
import com.openai.core.immutableEmptyMap
1716
import com.openai.core.toImmutable
1817
import com.openai.errors.OpenAIInvalidDataException
@@ -52,7 +51,7 @@ private constructor(
5251
fun effort(): Optional<ReasoningEffort> = Optional.ofNullable(effort.getNullable("effort"))
5352

5453
/**
55-
* **o-series models only**
54+
* **computer_use_preview only**
5655
*
5756
* A summary of the reasoning performed by the model. This can be useful for debugging and
5857
* understanding the model's reasoning process. One of `concise` or `detailed`.
@@ -99,21 +98,14 @@ private constructor(
9998

10099
companion object {
101100

102-
/**
103-
* Returns a mutable builder for constructing an instance of [Reasoning].
104-
*
105-
* The following fields are required:
106-
* ```java
107-
* .effort()
108-
* ```
109-
*/
101+
/** Returns a mutable builder for constructing an instance of [Reasoning]. */
110102
@JvmStatic fun builder() = Builder()
111103
}
112104

113105
/** A builder for [Reasoning]. */
114106
class Builder internal constructor() {
115107

116-
private var effort: JsonField<ReasoningEffort>? = null
108+
private var effort: JsonField<ReasoningEffort> = JsonMissing.of()
117109
private var generateSummary: JsonField<GenerateSummary> = JsonMissing.of()
118110
private var additionalProperties: MutableMap<String, JsonValue> = mutableMapOf()
119111

@@ -147,7 +139,7 @@ private constructor(
147139
fun effort(effort: JsonField<ReasoningEffort>) = apply { this.effort = effort }
148140

149141
/**
150-
* **o-series models only**
142+
* **computer_use_preview only**
151143
*
152144
* A summary of the reasoning performed by the model. This can be useful for debugging and
153145
* understanding the model's reasoning process. One of `concise` or `detailed`.
@@ -193,24 +185,13 @@ private constructor(
193185
* Returns an immutable instance of [Reasoning].
194186
*
195187
* Further updates to this [Builder] will not mutate the returned instance.
196-
*
197-
* The following fields are required:
198-
* ```java
199-
* .effort()
200-
* ```
201-
*
202-
* @throws IllegalStateException if any required field is unset.
203188
*/
204189
fun build(): Reasoning =
205-
Reasoning(
206-
checkRequired("effort", effort),
207-
generateSummary,
208-
additionalProperties.toImmutable(),
209-
)
190+
Reasoning(effort, generateSummary, additionalProperties.toImmutable())
210191
}
211192

212193
/**
213-
* **o-series models only**
194+
* **computer_use_preview only**
214195
*
215196
* A summary of the reasoning performed by the model. This can be useful for debugging and
216197
* understanding the model's reasoning process. One of `concise` or `detailed`.

0 commit comments

Comments
 (0)