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
The table of contents is too big for display.
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 @@
{
".": "3.7.0"
".": "3.7.1"
}
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## 3.7.1 (2025-09-26)

Full Changelog: [v3.7.0...v3.7.1](https://github.com/openai/openai-java/compare/v3.7.0...v3.7.1)

### Bug Fixes

* **client:** deserialization of empty objects ([9a1f927](https://github.com/openai/openai-java/commit/9a1f927f3f966ada762ba4764ba9fe448dd8edc7))


### Chores

* **internal:** change some comment formatting ([3ae2e58](https://github.com/openai/openai-java/commit/3ae2e58c926ea789e986a12d4644a06c01fe3f84))

## 3.7.0 (2025-09-23)

Full Changelog: [v3.6.1...v3.7.0](https://github.com/openai/openai-java/compare/v3.6.1...v3.7.0)
Expand Down
14 changes: 7 additions & 7 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/3.7.0)
[![javadoc](https://javadoc.io/badge2/com.openai/openai-java/3.7.0/javadoc.svg)](https://javadoc.io/doc/com.openai/openai-java/3.7.0)
[![Maven Central](https://img.shields.io/maven-central/v/com.openai/openai-java)](https://central.sonatype.com/artifact/com.openai/openai-java/3.7.1)
[![javadoc](https://javadoc.io/badge2/com.openai/openai-java/3.7.1/javadoc.svg)](https://javadoc.io/doc/com.openai/openai-java/3.7.1)

<!-- 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/3.7.0).
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/3.7.1).

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

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

```kotlin
implementation("com.openai:openai-java:3.7.0")
implementation("com.openai:openai-java:3.7.1")
```

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

Expand Down Expand Up @@ -1342,7 +1342,7 @@ If you're using Spring Boot, then you can use the SDK's [Spring Boot starter](ht
#### Gradle

```kotlin
implementation("com.openai:openai-java-spring-boot-starter:3.7.0")
implementation("com.openai:openai-java-spring-boot-starter:3.7.1")
```

#### Maven
Expand All @@ -1351,7 +1351,7 @@ implementation("com.openai:openai-java-spring-boot-starter:3.7.0")
<dependency>
<groupId>com.openai</groupId>
<artifactId>openai-java-spring-boot-starter</artifactId>
<version>3.7.0</version>
<version>3.7.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 = "3.7.0" // x-release-please-version
version = "3.7.1" // x-release-please-version
}

subprojects {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import kotlin.jvm.optionals.getOrNull
* operation.
*/
class ComparisonFilter
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
private val key: JsonField<String>,
private val type: JsonField<Type>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import kotlin.jvm.optionals.getOrNull

/** Combine multiple filters using `and` or `or`. */
class CompoundFilter
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
private val filters: JsonField<List<Filter>>,
private val type: JsonField<Type>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ private constructor(

/** A grammar defined by the user. */
class Grammar
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
private val definition: JsonField<String>,
private val syntax: JsonField<Syntax>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import java.util.Optional
import kotlin.jvm.optionals.getOrNull

class ErrorObject
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
private val code: JsonField<String>,
private val message: JsonField<String>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import java.util.Optional
import kotlin.jvm.optionals.getOrNull

class FunctionDefinition
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
private val name: JsonField<String>,
private val description: JsonField<String>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import kotlin.jvm.optionals.getOrNull
* Configuration options for [reasoning models](https://platform.openai.com/docs/guides/reasoning).
*/
class Reasoning
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
private val effort: JsonField<ReasoningEffort>,
private val generateSummary: JsonField<GenerateSummary>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import java.util.Objects
* system or user message instructing it to do so.
*/
class ResponseFormatJsonObject
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
private val type: JsonValue,
private val additionalProperties: MutableMap<String, JsonValue>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import kotlin.jvm.optionals.getOrNull
* [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs).
*/
class ResponseFormatJsonSchema
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
private val jsonSchema: JsonField<JsonSchema>,
private val type: JsonValue,
Expand Down Expand Up @@ -207,6 +208,7 @@ private constructor(

/** Structured Outputs configuration options, including a JSON Schema. */
class JsonSchema
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
private val name: JsonField<String>,
private val description: JsonField<String>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import java.util.Objects

/** Default response format. Used to generate text responses. */
class ResponseFormatText
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
private val type: JsonValue,
private val additionalProperties: MutableMap<String, JsonValue>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import java.util.Objects
* [custom grammars guide](https://platform.openai.com/docs/guides/custom-grammars).
*/
class ResponseFormatTextGrammar
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
private val grammar: JsonField<String>,
private val type: JsonValue,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import java.util.Objects
* details.
*/
class ResponseFormatTextPython
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
private val type: JsonValue,
private val additionalProperties: MutableMap<String, JsonValue>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,7 @@ private constructor(
override fun _queryParams(): QueryParams = additionalQueryParams

class Body
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
private val input: JsonField<String>,
private val model: JsonField<SpeechModel>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import kotlin.jvm.optionals.getOrNull

/** Represents a transcription response returned by model, based on the provided input. */
class Transcription
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
private val text: JsonField<String>,
private val logprobs: JsonField<List<Logprob>>,
Expand Down Expand Up @@ -277,6 +278,7 @@ private constructor(
(usage.asKnown().getOrNull()?.validity() ?: 0)

class Logprob
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
private val token: JsonField<String>,
private val bytes: JsonField<List<Double>>,
Expand Down Expand Up @@ -684,6 +686,7 @@ private constructor(

/** Usage statistics for models billed by token usage. */
class Tokens
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
private val inputTokens: JsonField<Long>,
private val outputTokens: JsonField<Long>,
Expand Down Expand Up @@ -1014,6 +1017,7 @@ private constructor(

/** Details about the input tokens billed for this request. */
class InputTokenDetails
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
private val audioTokens: JsonField<Long>,
private val textTokens: JsonField<Long>,
Expand Down Expand Up @@ -1249,6 +1253,7 @@ private constructor(

/** Usage statistics for models billed by audio input duration. */
class Duration
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
private val seconds: JsonField<Double>,
private val type: JsonValue,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import java.util.Objects
import kotlin.jvm.optionals.getOrNull

class TranscriptionSegment
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
private val id: JsonField<Long>,
private val avgLogprob: JsonField<Float>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import kotlin.jvm.optionals.getOrNull
* with the `Stream` parameter set to `true`.
*/
class TranscriptionTextDeltaEvent
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
private val delta: JsonField<String>,
private val type: JsonValue,
Expand Down Expand Up @@ -260,6 +261,7 @@ private constructor(
(logprobs.asKnown().getOrNull()?.sumOf { it.validity().toInt() } ?: 0)

class Logprob
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
private val token: JsonField<String>,
private val bytes: JsonField<List<Long>>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import kotlin.jvm.optionals.getOrNull
* with the `Stream` parameter set to `true`.
*/
class TranscriptionTextDoneEvent
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
private val text: JsonField<String>,
private val type: JsonValue,
Expand Down Expand Up @@ -293,6 +294,7 @@ private constructor(
(usage.asKnown().getOrNull()?.validity() ?: 0)

class Logprob
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
private val token: JsonField<String>,
private val bytes: JsonField<List<Long>>,
Expand Down Expand Up @@ -526,6 +528,7 @@ private constructor(

/** Usage statistics for models billed by token usage. */
class Usage
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
private val inputTokens: JsonField<Long>,
private val outputTokens: JsonField<Long>,
Expand Down Expand Up @@ -837,6 +840,7 @@ private constructor(

/** Details about the input tokens billed for this request. */
class InputTokenDetails
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
private val audioTokens: JsonField<Long>,
private val textTokens: JsonField<Long>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import kotlin.jvm.optionals.getOrNull
* Represents a verbose json transcription response returned by model, based on the provided input.
*/
class TranscriptionVerbose
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
private val duration: JsonField<Double>,
private val language: JsonField<String>,
Expand Down Expand Up @@ -367,6 +368,7 @@ private constructor(

/** Usage statistics for models billed by audio input duration. */
class Usage
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
private val seconds: JsonField<Double>,
private val type: JsonValue,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import java.util.Collections
import java.util.Objects

class TranscriptionWord
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
private val end: JsonField<Float>,
private val start: JsonField<Float>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import java.util.Collections
import java.util.Objects

class Translation
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
private val text: JsonField<String>,
private val additionalProperties: MutableMap<String, JsonValue>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import java.util.Optional
import kotlin.jvm.optionals.getOrNull

class TranslationVerbose
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
private val duration: JsonField<Double>,
private val language: JsonField<String>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import java.util.Optional
import kotlin.jvm.optionals.getOrNull

class Batch
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
private val id: JsonField<String>,
private val completionWindow: JsonField<String>,
Expand Down Expand Up @@ -1052,6 +1053,7 @@ private constructor(
}

class Errors
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
private val data: JsonField<List<BatchError>>,
private val object_: JsonField<String>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,7 @@ private constructor(
override fun _queryParams(): QueryParams = additionalQueryParams

class Body
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
private val completionWindow: JsonField<CompletionWindow>,
private val endpoint: JsonField<Endpoint>,
Expand Down Expand Up @@ -1192,6 +1193,7 @@ private constructor(

/** The expiration policy for the output and/or error file that are generated for a batch. */
class OutputExpiresAfter
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
private val anchor: JsonValue,
private val seconds: JsonField<Long>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import java.util.Optional
import kotlin.jvm.optionals.getOrNull

class BatchError
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
private val code: JsonField<String>,
private val line: JsonField<Long>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import java.util.Optional
import kotlin.jvm.optionals.getOrNull

class BatchListPageResponse
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
private val data: JsonField<List<Batch>>,
private val hasMore: JsonField<Boolean>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import java.util.Objects

/** The request counts for different statuses within the batch. */
class BatchRequestCounts
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
private val completed: JsonField<Long>,
private val failed: JsonField<Long>,
Expand Down
Loading