diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index c6a6955c..75138953 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "3.5.2"
+ ".": "3.5.3"
}
\ No newline at end of file
diff --git a/.stats.yml b/.stats.yml
index e3897189..905a02c4 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 118
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-94b1e3cb0bdc616ff0c2f267c33dadd95f133b1f64e647aab6c64afb292b2793.yml
-openapi_spec_hash: 2395319ac9befd59b6536ae7f9564a05
-config_hash: 930dac3aa861344867e4ac84f037b5df
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-d30ff992a48873c1466c49f3c01f2ec8933faebff23424748f8d056065b1bcef.yml
+openapi_spec_hash: e933ec43b46f45c348adb78840e5808d
+config_hash: bf45940f0a7805b4ec2017eecdd36893
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 964ceae4..20dbaf70 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,18 @@
# Changelog
+## 3.5.3 (2025-09-15)
+
+Full Changelog: [v3.5.2...v3.5.3](https://github.com/openai/openai-java/compare/v3.5.2...v3.5.3)
+
+### Bug Fixes
+
+* **client:** incorrect `getPackageVersion` impl ([51a0e59](https://github.com/openai/openai-java/commit/51a0e594bc1a2b42f5e5fde308f8608eb65796df))
+
+
+### Chores
+
+* **api:** docs and spec refactoring ([02720cf](https://github.com/openai/openai-java/commit/02720cf00517f874eb76b5f3b31c040361da8720))
+
## 3.5.2 (2025-09-12)
Full Changelog: [v3.5.1...v3.5.2](https://github.com/openai/openai-java/compare/v3.5.1...v3.5.2)
diff --git a/README.md b/README.md
index c356ae81..a8e59322 100644
--- a/README.md
+++ b/README.md
@@ -2,8 +2,8 @@
-[](https://central.sonatype.com/artifact/com.openai/openai-java/3.5.2)
-[](https://javadoc.io/doc/com.openai/openai-java/3.5.2)
+[](https://central.sonatype.com/artifact/com.openai/openai-java/3.5.3)
+[](https://javadoc.io/doc/com.openai/openai-java/3.5.3)
@@ -11,7 +11,7 @@ The OpenAI Java SDK provides convenient access to the [OpenAI REST API](https://
-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.5.2).
+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.5.3).
@@ -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.5.2")
+implementation("com.openai:openai-java:3.5.3")
```
### Maven
@@ -33,7 +33,7 @@ implementation("com.openai:openai-java:3.5.2")
com.openai
openai-java
- 3.5.2
+ 3.5.3
```
@@ -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.5.2")
+implementation("com.openai:openai-java-spring-boot-starter:3.5.3")
```
#### Maven
@@ -1351,7 +1351,7 @@ implementation("com.openai:openai-java-spring-boot-starter:3.5.2")
com.openai
openai-java-spring-boot-starter
- 3.5.2
+ 3.5.3
```
diff --git a/build.gradle.kts b/build.gradle.kts
index f1e418a7..46de19e3 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -8,7 +8,7 @@ repositories {
allprojects {
group = "com.openai"
- version = "3.5.2" // x-release-please-version
+ version = "3.5.3" // x-release-please-version
}
subprojects {
diff --git a/openai-java-core/src/main/kotlin/com/openai/core/Properties.kt b/openai-java-core/src/main/kotlin/com/openai/core/Properties.kt
index 760afc94..677d5fd6 100644
--- a/openai-java-core/src/main/kotlin/com/openai/core/Properties.kt
+++ b/openai-java-core/src/main/kotlin/com/openai/core/Properties.kt
@@ -2,7 +2,7 @@
package com.openai.core
-import java.util.Properties
+import com.openai.client.OpenAIClient
fun getOsArch(): String {
val osArch = System.getProperty("os.arch")
@@ -16,7 +16,7 @@ fun getOsArch(): String {
"x86_64" -> "x64"
"arm" -> "arm"
"aarch64" -> "arm64"
- else -> "other:${osArch}"
+ else -> "other:$osArch"
}
}
@@ -30,13 +30,13 @@ fun getOsName(): String {
osName.startsWith("Linux") -> "Linux"
osName.startsWith("Mac OS") -> "MacOS"
osName.startsWith("Windows") -> "Windows"
- else -> "Other:${osName}"
+ else -> "Other:$osName"
}
}
fun getOsVersion(): String = System.getProperty("os.version", "unknown")
fun getPackageVersion(): String =
- Properties::class.java.`package`.implementationVersion ?: "unknown"
+ OpenAIClient::class.java.`package`.implementationVersion ?: "unknown"
fun getJavaVersion(): String = System.getProperty("java.version", "unknown")
diff --git a/openai-java-core/src/main/kotlin/com/openai/models/beta/assistants/AssistantCreateParams.kt b/openai-java-core/src/main/kotlin/com/openai/models/beta/assistants/AssistantCreateParams.kt
index 9ace31c9..053e9430 100644
--- a/openai-java-core/src/main/kotlin/com/openai/models/beta/assistants/AssistantCreateParams.kt
+++ b/openai-java-core/src/main/kotlin/com/openai/models/beta/assistants/AssistantCreateParams.kt
@@ -2371,21 +2371,19 @@ private constructor(
* Alias for calling [chunkingStrategy] with
* `ChunkingStrategy.ofStatic(static_)`.
*/
- fun chunkingStrategy(static_: ChunkingStrategy.StaticObject) =
+ fun chunkingStrategy(static_: ChunkingStrategy.Static) =
chunkingStrategy(ChunkingStrategy.ofStatic(static_))
/**
* Alias for calling [chunkingStrategy] with the following:
* ```java
- * ChunkingStrategy.StaticObject.builder()
+ * ChunkingStrategy.Static.builder()
* .static_(static_)
* .build()
* ```
*/
- fun staticChunkingStrategy(static_: ChunkingStrategy.StaticObject.Static) =
- chunkingStrategy(
- ChunkingStrategy.StaticObject.builder().static_(static_).build()
- )
+ fun staticChunkingStrategy(static_: ChunkingStrategy.Static.InnerStatic) =
+ chunkingStrategy(ChunkingStrategy.Static.builder().static_(static_).build())
/**
* A list of [file](https://platform.openai.com/docs/api-reference/files) IDs to
@@ -2517,7 +2515,7 @@ private constructor(
class ChunkingStrategy
private constructor(
private val auto: JsonValue? = null,
- private val static_: StaticObject? = null,
+ private val static_: Static? = null,
private val _json: JsonValue? = null,
) {
@@ -2527,7 +2525,7 @@ private constructor(
*/
fun auto(): Optional = Optional.ofNullable(auto)
- fun static_(): Optional = Optional.ofNullable(static_)
+ fun static_(): Optional = Optional.ofNullable(static_)
fun isAuto(): Boolean = auto != null
@@ -2539,7 +2537,7 @@ private constructor(
*/
fun asAuto(): JsonValue = auto.getOrThrow("auto")
- fun asStatic(): StaticObject = static_.getOrThrow("static_")
+ fun asStatic(): Static = static_.getOrThrow("static_")
fun _json(): Optional = Optional.ofNullable(_json)
@@ -2569,7 +2567,7 @@ private constructor(
}
}
- override fun visitStatic(static_: StaticObject) {
+ override fun visitStatic(static_: Static) {
static_.validate()
}
}
@@ -2600,7 +2598,7 @@ private constructor(
if (it == JsonValue.from(mapOf("type" to "auto"))) 1 else 0
}
- override fun visitStatic(static_: StaticObject) = static_.validity()
+ override fun visitStatic(static_: Static) = static_.validity()
override fun unknown(json: JsonValue?) = 0
}
@@ -2637,7 +2635,7 @@ private constructor(
ChunkingStrategy(auto = JsonValue.from(mapOf("type" to "auto")))
@JvmStatic
- fun ofStatic(static_: StaticObject) = ChunkingStrategy(static_ = static_)
+ fun ofStatic(static_: Static) = ChunkingStrategy(static_ = static_)
}
/**
@@ -2652,7 +2650,7 @@ private constructor(
*/
fun visitAuto(auto: JsonValue): T
- fun visitStatic(static_: StaticObject): T
+ fun visitStatic(static_: Static): T
/**
* Maps an unknown variant of [ChunkingStrategy] to a value of type [T].
@@ -2684,9 +2682,9 @@ private constructor(
?.takeIf { it.isValid() } ?: ChunkingStrategy(_json = json)
}
"static" -> {
- return tryDeserialize(node, jacksonTypeRef())
- ?.let { ChunkingStrategy(static_ = it, _json = json) }
- ?: ChunkingStrategy(_json = json)
+ return tryDeserialize(node, jacksonTypeRef())?.let {
+ ChunkingStrategy(static_ = it, _json = json)
+ } ?: ChunkingStrategy(_json = json)
}
}
@@ -2711,9 +2709,9 @@ private constructor(
}
}
- class StaticObject
+ class Static
private constructor(
- private val static_: JsonField,
+ private val static_: JsonField,
private val type: JsonValue,
private val additionalProperties: MutableMap,
) {
@@ -2722,7 +2720,7 @@ private constructor(
private constructor(
@JsonProperty("static")
@ExcludeMissing
- static_: JsonField = JsonMissing.of(),
+ static_: JsonField = JsonMissing.of(),
@JsonProperty("type") @ExcludeMissing type: JsonValue = JsonMissing.of(),
) : this(static_, type, mutableMapOf())
@@ -2731,7 +2729,7 @@ private constructor(
* type or is unexpectedly missing or null (e.g. if the server responded
* with an unexpected value).
*/
- fun static_(): Static = static_.getRequired("static")
+ fun static_(): InnerStatic = static_.getRequired("static")
/**
* Always `static`.
@@ -2754,7 +2752,7 @@ private constructor(
*/
@JsonProperty("static")
@ExcludeMissing
- fun _static_(): JsonField = static_
+ fun _static_(): JsonField = static_
@JsonAnySetter
private fun putAdditionalProperty(key: String, value: JsonValue) {
@@ -2771,8 +2769,7 @@ private constructor(
companion object {
/**
- * Returns a mutable builder for constructing an instance of
- * [StaticObject].
+ * Returns a mutable builder for constructing an instance of [Static].
*
* The following fields are required:
* ```java
@@ -2782,32 +2779,31 @@ private constructor(
@JvmStatic fun builder() = Builder()
}
- /** A builder for [StaticObject]. */
+ /** A builder for [Static]. */
class Builder internal constructor() {
- private var static_: JsonField? = null
+ private var static_: JsonField? = null
private var type: JsonValue = JsonValue.from("static")
private var additionalProperties: MutableMap =
mutableMapOf()
@JvmSynthetic
- internal fun from(staticObject: StaticObject) = apply {
- static_ = staticObject.static_
- type = staticObject.type
- additionalProperties =
- staticObject.additionalProperties.toMutableMap()
+ internal fun from(static_: Static) = apply {
+ this.static_ = static_.static_
+ type = static_.type
+ additionalProperties = static_.additionalProperties.toMutableMap()
}
- fun static_(static_: Static) = static_(JsonField.of(static_))
+ fun static_(static_: InnerStatic) = static_(JsonField.of(static_))
/**
* Sets [Builder.static_] to an arbitrary JSON value.
*
- * You should usually call [Builder.static_] with a well-typed [Static]
- * value instead. This method is primarily for setting the field to an
- * undocumented or not yet supported value.
+ * You should usually call [Builder.static_] with a well-typed
+ * [InnerStatic] value instead. This method is primarily for setting the
+ * field to an undocumented or not yet supported value.
*/
- fun static_(static_: JsonField) = apply {
+ fun static_(static_: JsonField) = apply {
this.static_ = static_
}
@@ -2848,7 +2844,7 @@ private constructor(
}
/**
- * Returns an immutable instance of [StaticObject].
+ * Returns an immutable instance of [Static].
*
* Further updates to this [Builder] will not mutate the returned
* instance.
@@ -2860,8 +2856,8 @@ private constructor(
*
* @throws IllegalStateException if any required field is unset.
*/
- fun build(): StaticObject =
- StaticObject(
+ fun build(): Static =
+ Static(
checkRequired("static_", static_),
type,
additionalProperties.toMutableMap(),
@@ -2870,7 +2866,7 @@ private constructor(
private var validated: Boolean = false
- fun validate(): StaticObject = apply {
+ fun validate(): Static = apply {
if (validated) {
return@apply
}
@@ -2905,7 +2901,7 @@ private constructor(
(static_.asKnown().getOrNull()?.validity() ?: 0) +
type.let { if (it == JsonValue.from("static")) 1 else 0 }
- class Static
+ class InnerStatic
private constructor(
private val chunkOverlapTokens: JsonField,
private val maxChunkSizeTokens: JsonField,
@@ -2983,7 +2979,7 @@ private constructor(
/**
* Returns a mutable builder for constructing an instance of
- * [Static].
+ * [InnerStatic].
*
* The following fields are required:
* ```java
@@ -2994,7 +2990,7 @@ private constructor(
@JvmStatic fun builder() = Builder()
}
- /** A builder for [Static]. */
+ /** A builder for [InnerStatic]. */
class Builder internal constructor() {
private var chunkOverlapTokens: JsonField? = null
@@ -3003,11 +2999,11 @@ private constructor(
mutableMapOf()
@JvmSynthetic
- internal fun from(static_: Static) = apply {
- chunkOverlapTokens = static_.chunkOverlapTokens
- maxChunkSizeTokens = static_.maxChunkSizeTokens
+ internal fun from(innerStatic: InnerStatic) = apply {
+ chunkOverlapTokens = innerStatic.chunkOverlapTokens
+ maxChunkSizeTokens = innerStatic.maxChunkSizeTokens
additionalProperties =
- static_.additionalProperties.toMutableMap()
+ innerStatic.additionalProperties.toMutableMap()
}
/**
@@ -3076,7 +3072,7 @@ private constructor(
}
/**
- * Returns an immutable instance of [Static].
+ * Returns an immutable instance of [InnerStatic].
*
* Further updates to this [Builder] will not mutate the returned
* instance.
@@ -3089,8 +3085,8 @@ private constructor(
*
* @throws IllegalStateException if any required field is unset.
*/
- fun build(): Static =
- Static(
+ fun build(): InnerStatic =
+ InnerStatic(
checkRequired("chunkOverlapTokens", chunkOverlapTokens),
checkRequired("maxChunkSizeTokens", maxChunkSizeTokens),
additionalProperties.toMutableMap(),
@@ -3099,7 +3095,7 @@ private constructor(
private var validated: Boolean = false
- fun validate(): Static = apply {
+ fun validate(): InnerStatic = apply {
if (validated) {
return@apply
}
@@ -3133,7 +3129,7 @@ private constructor(
return true
}
- return other is Static &&
+ return other is InnerStatic &&
chunkOverlapTokens == other.chunkOverlapTokens &&
maxChunkSizeTokens == other.maxChunkSizeTokens &&
additionalProperties == other.additionalProperties
@@ -3150,7 +3146,7 @@ private constructor(
override fun hashCode(): Int = hashCode
override fun toString() =
- "Static{chunkOverlapTokens=$chunkOverlapTokens, maxChunkSizeTokens=$maxChunkSizeTokens, additionalProperties=$additionalProperties}"
+ "InnerStatic{chunkOverlapTokens=$chunkOverlapTokens, maxChunkSizeTokens=$maxChunkSizeTokens, additionalProperties=$additionalProperties}"
}
override fun equals(other: Any?): Boolean {
@@ -3158,7 +3154,7 @@ private constructor(
return true
}
- return other is StaticObject &&
+ return other is Static &&
static_ == other.static_ &&
type == other.type &&
additionalProperties == other.additionalProperties
@@ -3171,7 +3167,7 @@ private constructor(
override fun hashCode(): Int = hashCode
override fun toString() =
- "StaticObject{static_=$static_, type=$type, additionalProperties=$additionalProperties}"
+ "Static{static_=$static_, type=$type, additionalProperties=$additionalProperties}"
}
}
diff --git a/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/ThreadCreateAndRunParams.kt b/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/ThreadCreateAndRunParams.kt
index fd02a4df..1fd82820 100644
--- a/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/ThreadCreateAndRunParams.kt
+++ b/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/ThreadCreateAndRunParams.kt
@@ -4449,20 +4449,20 @@ private constructor(
* Alias for calling [chunkingStrategy] with
* `ChunkingStrategy.ofStatic(static_)`.
*/
- fun chunkingStrategy(static_: ChunkingStrategy.StaticObject) =
+ fun chunkingStrategy(static_: ChunkingStrategy.Static) =
chunkingStrategy(ChunkingStrategy.ofStatic(static_))
/**
* Alias for calling [chunkingStrategy] with the following:
* ```java
- * ChunkingStrategy.StaticObject.builder()
+ * ChunkingStrategy.Static.builder()
* .static_(static_)
* .build()
* ```
*/
- fun staticChunkingStrategy(static_: ChunkingStrategy.StaticObject.Static) =
+ fun staticChunkingStrategy(static_: ChunkingStrategy.Static.InnerStatic) =
chunkingStrategy(
- ChunkingStrategy.StaticObject.builder().static_(static_).build()
+ ChunkingStrategy.Static.builder().static_(static_).build()
)
/**
@@ -4598,7 +4598,7 @@ private constructor(
class ChunkingStrategy
private constructor(
private val auto: JsonValue? = null,
- private val static_: StaticObject? = null,
+ private val static_: Static? = null,
private val _json: JsonValue? = null,
) {
@@ -4608,7 +4608,7 @@ private constructor(
*/
fun auto(): Optional = Optional.ofNullable(auto)
- fun static_(): Optional = Optional.ofNullable(static_)
+ fun static_(): Optional = Optional.ofNullable(static_)
fun isAuto(): Boolean = auto != null
@@ -4620,7 +4620,7 @@ private constructor(
*/
fun asAuto(): JsonValue = auto.getOrThrow("auto")
- fun asStatic(): StaticObject = static_.getOrThrow("static_")
+ fun asStatic(): Static = static_.getOrThrow("static_")
fun _json(): Optional = Optional.ofNullable(_json)
@@ -4650,7 +4650,7 @@ private constructor(
}
}
- override fun visitStatic(static_: StaticObject) {
+ override fun visitStatic(static_: Static) {
static_.validate()
}
}
@@ -4682,8 +4682,7 @@ private constructor(
else 0
}
- override fun visitStatic(static_: StaticObject) =
- static_.validity()
+ override fun visitStatic(static_: Static) = static_.validity()
override fun unknown(json: JsonValue?) = 0
}
@@ -4720,8 +4719,7 @@ private constructor(
ChunkingStrategy(auto = JsonValue.from(mapOf("type" to "auto")))
@JvmStatic
- fun ofStatic(static_: StaticObject) =
- ChunkingStrategy(static_ = static_)
+ fun ofStatic(static_: Static) = ChunkingStrategy(static_ = static_)
}
/**
@@ -4736,7 +4734,7 @@ private constructor(
*/
fun visitAuto(auto: JsonValue): T
- fun visitStatic(static_: StaticObject): T
+ fun visitStatic(static_: Static): T
/**
* Maps an unknown variant of [ChunkingStrategy] to a value of type [T].
@@ -4774,9 +4772,9 @@ private constructor(
?: ChunkingStrategy(_json = json)
}
"static" -> {
- return tryDeserialize(node, jacksonTypeRef())
- ?.let { ChunkingStrategy(static_ = it, _json = json) }
- ?: ChunkingStrategy(_json = json)
+ return tryDeserialize(node, jacksonTypeRef())?.let {
+ ChunkingStrategy(static_ = it, _json = json)
+ } ?: ChunkingStrategy(_json = json)
}
}
@@ -4801,9 +4799,9 @@ private constructor(
}
}
- class StaticObject
+ class Static
private constructor(
- private val static_: JsonField,
+ private val static_: JsonField,
private val type: JsonValue,
private val additionalProperties: MutableMap,
) {
@@ -4812,7 +4810,7 @@ private constructor(
private constructor(
@JsonProperty("static")
@ExcludeMissing
- static_: JsonField = JsonMissing.of(),
+ static_: JsonField = JsonMissing.of(),
@JsonProperty("type")
@ExcludeMissing
type: JsonValue = JsonMissing.of(),
@@ -4823,7 +4821,7 @@ private constructor(
* unexpected type or is unexpectedly missing or null (e.g. if the
* server responded with an unexpected value).
*/
- fun static_(): Static = static_.getRequired("static")
+ fun static_(): InnerStatic = static_.getRequired("static")
/**
* Always `static`.
@@ -4846,7 +4844,7 @@ private constructor(
*/
@JsonProperty("static")
@ExcludeMissing
- fun _static_(): JsonField = static_
+ fun _static_(): JsonField = static_
@JsonAnySetter
private fun putAdditionalProperty(key: String, value: JsonValue) {
@@ -4864,7 +4862,7 @@ private constructor(
/**
* Returns a mutable builder for constructing an instance of
- * [StaticObject].
+ * [Static].
*
* The following fields are required:
* ```java
@@ -4874,32 +4872,32 @@ private constructor(
@JvmStatic fun builder() = Builder()
}
- /** A builder for [StaticObject]. */
+ /** A builder for [Static]. */
class Builder internal constructor() {
- private var static_: JsonField? = null
+ private var static_: JsonField? = null
private var type: JsonValue = JsonValue.from("static")
private var additionalProperties: MutableMap =
mutableMapOf()
@JvmSynthetic
- internal fun from(staticObject: StaticObject) = apply {
- static_ = staticObject.static_
- type = staticObject.type
+ internal fun from(static_: Static) = apply {
+ this.static_ = static_.static_
+ type = static_.type
additionalProperties =
- staticObject.additionalProperties.toMutableMap()
+ static_.additionalProperties.toMutableMap()
}
- fun static_(static_: Static) = static_(JsonField.of(static_))
+ fun static_(static_: InnerStatic) = static_(JsonField.of(static_))
/**
* Sets [Builder.static_] to an arbitrary JSON value.
*
* You should usually call [Builder.static_] with a well-typed
- * [Static] value instead. This method is primarily for setting the
- * field to an undocumented or not yet supported value.
+ * [InnerStatic] value instead. This method is primarily for setting
+ * the field to an undocumented or not yet supported value.
*/
- fun static_(static_: JsonField) = apply {
+ fun static_(static_: JsonField) = apply {
this.static_ = static_
}
@@ -4941,7 +4939,7 @@ private constructor(
}
/**
- * Returns an immutable instance of [StaticObject].
+ * Returns an immutable instance of [Static].
*
* Further updates to this [Builder] will not mutate the returned
* instance.
@@ -4953,8 +4951,8 @@ private constructor(
*
* @throws IllegalStateException if any required field is unset.
*/
- fun build(): StaticObject =
- StaticObject(
+ fun build(): Static =
+ Static(
checkRequired("static_", static_),
type,
additionalProperties.toMutableMap(),
@@ -4963,7 +4961,7 @@ private constructor(
private var validated: Boolean = false
- fun validate(): StaticObject = apply {
+ fun validate(): Static = apply {
if (validated) {
return@apply
}
@@ -4998,7 +4996,7 @@ private constructor(
(static_.asKnown().getOrNull()?.validity() ?: 0) +
type.let { if (it == JsonValue.from("static")) 1 else 0 }
- class Static
+ class InnerStatic
private constructor(
private val chunkOverlapTokens: JsonField,
private val maxChunkSizeTokens: JsonField,
@@ -5077,7 +5075,7 @@ private constructor(
/**
* Returns a mutable builder for constructing an instance of
- * [Static].
+ * [InnerStatic].
*
* The following fields are required:
* ```java
@@ -5088,7 +5086,7 @@ private constructor(
@JvmStatic fun builder() = Builder()
}
- /** A builder for [Static]. */
+ /** A builder for [InnerStatic]. */
class Builder internal constructor() {
private var chunkOverlapTokens: JsonField? = null
@@ -5098,11 +5096,11 @@ private constructor(
mutableMapOf()
@JvmSynthetic
- internal fun from(static_: Static) = apply {
- chunkOverlapTokens = static_.chunkOverlapTokens
- maxChunkSizeTokens = static_.maxChunkSizeTokens
+ internal fun from(innerStatic: InnerStatic) = apply {
+ chunkOverlapTokens = innerStatic.chunkOverlapTokens
+ maxChunkSizeTokens = innerStatic.maxChunkSizeTokens
additionalProperties =
- static_.additionalProperties.toMutableMap()
+ innerStatic.additionalProperties.toMutableMap()
}
/**
@@ -5176,7 +5174,7 @@ private constructor(
}
/**
- * Returns an immutable instance of [Static].
+ * Returns an immutable instance of [InnerStatic].
*
* Further updates to this [Builder] will not mutate the
* returned instance.
@@ -5189,8 +5187,8 @@ private constructor(
*
* @throws IllegalStateException if any required field is unset.
*/
- fun build(): Static =
- Static(
+ fun build(): InnerStatic =
+ InnerStatic(
checkRequired("chunkOverlapTokens", chunkOverlapTokens),
checkRequired("maxChunkSizeTokens", maxChunkSizeTokens),
additionalProperties.toMutableMap(),
@@ -5199,7 +5197,7 @@ private constructor(
private var validated: Boolean = false
- fun validate(): Static = apply {
+ fun validate(): InnerStatic = apply {
if (validated) {
return@apply
}
@@ -5233,7 +5231,7 @@ private constructor(
return true
}
- return other is Static &&
+ return other is InnerStatic &&
chunkOverlapTokens == other.chunkOverlapTokens &&
maxChunkSizeTokens == other.maxChunkSizeTokens &&
additionalProperties == other.additionalProperties
@@ -5250,7 +5248,7 @@ private constructor(
override fun hashCode(): Int = hashCode
override fun toString() =
- "Static{chunkOverlapTokens=$chunkOverlapTokens, maxChunkSizeTokens=$maxChunkSizeTokens, additionalProperties=$additionalProperties}"
+ "InnerStatic{chunkOverlapTokens=$chunkOverlapTokens, maxChunkSizeTokens=$maxChunkSizeTokens, additionalProperties=$additionalProperties}"
}
override fun equals(other: Any?): Boolean {
@@ -5258,7 +5256,7 @@ private constructor(
return true
}
- return other is StaticObject &&
+ return other is Static &&
static_ == other.static_ &&
type == other.type &&
additionalProperties == other.additionalProperties
@@ -5271,7 +5269,7 @@ private constructor(
override fun hashCode(): Int = hashCode
override fun toString() =
- "StaticObject{static_=$static_, type=$type, additionalProperties=$additionalProperties}"
+ "Static{static_=$static_, type=$type, additionalProperties=$additionalProperties}"
}
}
diff --git a/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/ThreadCreateParams.kt b/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/ThreadCreateParams.kt
index 48f223f3..c5647d10 100644
--- a/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/ThreadCreateParams.kt
+++ b/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/ThreadCreateParams.kt
@@ -2626,21 +2626,19 @@ private constructor(
* Alias for calling [chunkingStrategy] with
* `ChunkingStrategy.ofStatic(static_)`.
*/
- fun chunkingStrategy(static_: ChunkingStrategy.StaticObject) =
+ fun chunkingStrategy(static_: ChunkingStrategy.Static) =
chunkingStrategy(ChunkingStrategy.ofStatic(static_))
/**
* Alias for calling [chunkingStrategy] with the following:
* ```java
- * ChunkingStrategy.StaticObject.builder()
+ * ChunkingStrategy.Static.builder()
* .static_(static_)
* .build()
* ```
*/
- fun staticChunkingStrategy(static_: ChunkingStrategy.StaticObject.Static) =
- chunkingStrategy(
- ChunkingStrategy.StaticObject.builder().static_(static_).build()
- )
+ fun staticChunkingStrategy(static_: ChunkingStrategy.Static.InnerStatic) =
+ chunkingStrategy(ChunkingStrategy.Static.builder().static_(static_).build())
/**
* A list of [file](https://platform.openai.com/docs/api-reference/files) IDs to
@@ -2772,7 +2770,7 @@ private constructor(
class ChunkingStrategy
private constructor(
private val auto: JsonValue? = null,
- private val static_: StaticObject? = null,
+ private val static_: Static? = null,
private val _json: JsonValue? = null,
) {
@@ -2782,7 +2780,7 @@ private constructor(
*/
fun auto(): Optional = Optional.ofNullable(auto)
- fun static_(): Optional = Optional.ofNullable(static_)
+ fun static_(): Optional = Optional.ofNullable(static_)
fun isAuto(): Boolean = auto != null
@@ -2794,7 +2792,7 @@ private constructor(
*/
fun asAuto(): JsonValue = auto.getOrThrow("auto")
- fun asStatic(): StaticObject = static_.getOrThrow("static_")
+ fun asStatic(): Static = static_.getOrThrow("static_")
fun _json(): Optional = Optional.ofNullable(_json)
@@ -2824,7 +2822,7 @@ private constructor(
}
}
- override fun visitStatic(static_: StaticObject) {
+ override fun visitStatic(static_: Static) {
static_.validate()
}
}
@@ -2855,7 +2853,7 @@ private constructor(
if (it == JsonValue.from(mapOf("type" to "auto"))) 1 else 0
}
- override fun visitStatic(static_: StaticObject) = static_.validity()
+ override fun visitStatic(static_: Static) = static_.validity()
override fun unknown(json: JsonValue?) = 0
}
@@ -2892,7 +2890,7 @@ private constructor(
ChunkingStrategy(auto = JsonValue.from(mapOf("type" to "auto")))
@JvmStatic
- fun ofStatic(static_: StaticObject) = ChunkingStrategy(static_ = static_)
+ fun ofStatic(static_: Static) = ChunkingStrategy(static_ = static_)
}
/**
@@ -2907,7 +2905,7 @@ private constructor(
*/
fun visitAuto(auto: JsonValue): T
- fun visitStatic(static_: StaticObject): T
+ fun visitStatic(static_: Static): T
/**
* Maps an unknown variant of [ChunkingStrategy] to a value of type [T].
@@ -2939,9 +2937,9 @@ private constructor(
?.takeIf { it.isValid() } ?: ChunkingStrategy(_json = json)
}
"static" -> {
- return tryDeserialize(node, jacksonTypeRef())
- ?.let { ChunkingStrategy(static_ = it, _json = json) }
- ?: ChunkingStrategy(_json = json)
+ return tryDeserialize(node, jacksonTypeRef())?.let {
+ ChunkingStrategy(static_ = it, _json = json)
+ } ?: ChunkingStrategy(_json = json)
}
}
@@ -2966,9 +2964,9 @@ private constructor(
}
}
- class StaticObject
+ class Static
private constructor(
- private val static_: JsonField,
+ private val static_: JsonField,
private val type: JsonValue,
private val additionalProperties: MutableMap,
) {
@@ -2977,7 +2975,7 @@ private constructor(
private constructor(
@JsonProperty("static")
@ExcludeMissing
- static_: JsonField = JsonMissing.of(),
+ static_: JsonField = JsonMissing.of(),
@JsonProperty("type") @ExcludeMissing type: JsonValue = JsonMissing.of(),
) : this(static_, type, mutableMapOf())
@@ -2986,7 +2984,7 @@ private constructor(
* type or is unexpectedly missing or null (e.g. if the server responded
* with an unexpected value).
*/
- fun static_(): Static = static_.getRequired("static")
+ fun static_(): InnerStatic = static_.getRequired("static")
/**
* Always `static`.
@@ -3009,7 +3007,7 @@ private constructor(
*/
@JsonProperty("static")
@ExcludeMissing
- fun _static_(): JsonField = static_
+ fun _static_(): JsonField = static_
@JsonAnySetter
private fun putAdditionalProperty(key: String, value: JsonValue) {
@@ -3026,8 +3024,7 @@ private constructor(
companion object {
/**
- * Returns a mutable builder for constructing an instance of
- * [StaticObject].
+ * Returns a mutable builder for constructing an instance of [Static].
*
* The following fields are required:
* ```java
@@ -3037,32 +3034,31 @@ private constructor(
@JvmStatic fun builder() = Builder()
}
- /** A builder for [StaticObject]. */
+ /** A builder for [Static]. */
class Builder internal constructor() {
- private var static_: JsonField? = null
+ private var static_: JsonField? = null
private var type: JsonValue = JsonValue.from("static")
private var additionalProperties: MutableMap =
mutableMapOf()
@JvmSynthetic
- internal fun from(staticObject: StaticObject) = apply {
- static_ = staticObject.static_
- type = staticObject.type
- additionalProperties =
- staticObject.additionalProperties.toMutableMap()
+ internal fun from(static_: Static) = apply {
+ this.static_ = static_.static_
+ type = static_.type
+ additionalProperties = static_.additionalProperties.toMutableMap()
}
- fun static_(static_: Static) = static_(JsonField.of(static_))
+ fun static_(static_: InnerStatic) = static_(JsonField.of(static_))
/**
* Sets [Builder.static_] to an arbitrary JSON value.
*
- * You should usually call [Builder.static_] with a well-typed [Static]
- * value instead. This method is primarily for setting the field to an
- * undocumented or not yet supported value.
+ * You should usually call [Builder.static_] with a well-typed
+ * [InnerStatic] value instead. This method is primarily for setting the
+ * field to an undocumented or not yet supported value.
*/
- fun static_(static_: JsonField) = apply {
+ fun static_(static_: JsonField) = apply {
this.static_ = static_
}
@@ -3103,7 +3099,7 @@ private constructor(
}
/**
- * Returns an immutable instance of [StaticObject].
+ * Returns an immutable instance of [Static].
*
* Further updates to this [Builder] will not mutate the returned
* instance.
@@ -3115,8 +3111,8 @@ private constructor(
*
* @throws IllegalStateException if any required field is unset.
*/
- fun build(): StaticObject =
- StaticObject(
+ fun build(): Static =
+ Static(
checkRequired("static_", static_),
type,
additionalProperties.toMutableMap(),
@@ -3125,7 +3121,7 @@ private constructor(
private var validated: Boolean = false
- fun validate(): StaticObject = apply {
+ fun validate(): Static = apply {
if (validated) {
return@apply
}
@@ -3160,7 +3156,7 @@ private constructor(
(static_.asKnown().getOrNull()?.validity() ?: 0) +
type.let { if (it == JsonValue.from("static")) 1 else 0 }
- class Static
+ class InnerStatic
private constructor(
private val chunkOverlapTokens: JsonField,
private val maxChunkSizeTokens: JsonField,
@@ -3238,7 +3234,7 @@ private constructor(
/**
* Returns a mutable builder for constructing an instance of
- * [Static].
+ * [InnerStatic].
*
* The following fields are required:
* ```java
@@ -3249,7 +3245,7 @@ private constructor(
@JvmStatic fun builder() = Builder()
}
- /** A builder for [Static]. */
+ /** A builder for [InnerStatic]. */
class Builder internal constructor() {
private var chunkOverlapTokens: JsonField? = null
@@ -3258,11 +3254,11 @@ private constructor(
mutableMapOf()
@JvmSynthetic
- internal fun from(static_: Static) = apply {
- chunkOverlapTokens = static_.chunkOverlapTokens
- maxChunkSizeTokens = static_.maxChunkSizeTokens
+ internal fun from(innerStatic: InnerStatic) = apply {
+ chunkOverlapTokens = innerStatic.chunkOverlapTokens
+ maxChunkSizeTokens = innerStatic.maxChunkSizeTokens
additionalProperties =
- static_.additionalProperties.toMutableMap()
+ innerStatic.additionalProperties.toMutableMap()
}
/**
@@ -3331,7 +3327,7 @@ private constructor(
}
/**
- * Returns an immutable instance of [Static].
+ * Returns an immutable instance of [InnerStatic].
*
* Further updates to this [Builder] will not mutate the returned
* instance.
@@ -3344,8 +3340,8 @@ private constructor(
*
* @throws IllegalStateException if any required field is unset.
*/
- fun build(): Static =
- Static(
+ fun build(): InnerStatic =
+ InnerStatic(
checkRequired("chunkOverlapTokens", chunkOverlapTokens),
checkRequired("maxChunkSizeTokens", maxChunkSizeTokens),
additionalProperties.toMutableMap(),
@@ -3354,7 +3350,7 @@ private constructor(
private var validated: Boolean = false
- fun validate(): Static = apply {
+ fun validate(): InnerStatic = apply {
if (validated) {
return@apply
}
@@ -3388,7 +3384,7 @@ private constructor(
return true
}
- return other is Static &&
+ return other is InnerStatic &&
chunkOverlapTokens == other.chunkOverlapTokens &&
maxChunkSizeTokens == other.maxChunkSizeTokens &&
additionalProperties == other.additionalProperties
@@ -3405,7 +3401,7 @@ private constructor(
override fun hashCode(): Int = hashCode
override fun toString() =
- "Static{chunkOverlapTokens=$chunkOverlapTokens, maxChunkSizeTokens=$maxChunkSizeTokens, additionalProperties=$additionalProperties}"
+ "InnerStatic{chunkOverlapTokens=$chunkOverlapTokens, maxChunkSizeTokens=$maxChunkSizeTokens, additionalProperties=$additionalProperties}"
}
override fun equals(other: Any?): Boolean {
@@ -3413,7 +3409,7 @@ private constructor(
return true
}
- return other is StaticObject &&
+ return other is Static &&
static_ == other.static_ &&
type == other.type &&
additionalProperties == other.additionalProperties
@@ -3426,7 +3422,7 @@ private constructor(
override fun hashCode(): Int = hashCode
override fun toString() =
- "StaticObject{static_=$static_, type=$type, additionalProperties=$additionalProperties}"
+ "Static{static_=$static_, type=$type, additionalProperties=$additionalProperties}"
}
}
diff --git a/openai-java-core/src/main/kotlin/com/openai/models/chat/completions/ChatCompletionListParams.kt b/openai-java-core/src/main/kotlin/com/openai/models/chat/completions/ChatCompletionListParams.kt
index 302f3fa3..0d426829 100644
--- a/openai-java-core/src/main/kotlin/com/openai/models/chat/completions/ChatCompletionListParams.kt
+++ b/openai-java-core/src/main/kotlin/com/openai/models/chat/completions/ChatCompletionListParams.kt
@@ -35,9 +35,12 @@ private constructor(
fun limit(): Optional = Optional.ofNullable(limit)
/**
- * A list of metadata keys to filter the Chat Completions by. Example:
+ * Set of 16 key-value pairs that can be attached to an object. This can be useful for storing
+ * additional information about the object in a structured format, and querying for objects via
+ * API or the dashboard.
*
- * `metadata[key1]=value1&metadata[key2]=value2`
+ * Keys are strings with a maximum length of 64 characters. Values are strings with a maximum
+ * length of 512 characters.
*/
fun metadata(): Optional = Optional.ofNullable(metadata)
@@ -108,9 +111,12 @@ private constructor(
fun limit(limit: Optional) = limit(limit.getOrNull())
/**
- * A list of metadata keys to filter the Chat Completions by. Example:
+ * Set of 16 key-value pairs that can be attached to an object. This can be useful for
+ * storing additional information about the object in a structured format, and querying for
+ * objects via API or the dashboard.
*
- * `metadata[key1]=value1&metadata[key2]=value2`
+ * Keys are strings with a maximum length of 64 characters. Values are strings with a
+ * maximum length of 512 characters.
*/
fun metadata(metadata: Metadata?) = apply { this.metadata = metadata }
diff --git a/openai-java-core/src/main/kotlin/com/openai/models/conversations/ConversationCreateParams.kt b/openai-java-core/src/main/kotlin/com/openai/models/conversations/ConversationCreateParams.kt
index 7efbc906..d837bbf6 100644
--- a/openai-java-core/src/main/kotlin/com/openai/models/conversations/ConversationCreateParams.kt
+++ b/openai-java-core/src/main/kotlin/com/openai/models/conversations/ConversationCreateParams.kt
@@ -49,8 +49,12 @@ private constructor(
fun items(): Optional> = body.items()
/**
- * Set of 16 key-value pairs that can be attached to an object. Useful for storing additional
- * information about the object in a structured format.
+ * Set of 16 key-value pairs that can be attached to an object. This can be useful for storing
+ * additional information about the object in a structured format, and querying for objects via
+ * API or the dashboard.
+ *
+ * Keys are strings with a maximum length of 64 characters. Values are strings with a maximum
+ * length of 512 characters.
*
* @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
@@ -277,8 +281,12 @@ private constructor(
fun addItemReferenceItem(id: String) = apply { body.addItemReferenceItem(id) }
/**
- * Set of 16 key-value pairs that can be attached to an object. Useful for storing
- * additional information about the object in a structured format.
+ * Set of 16 key-value pairs that can be attached to an object. This can be useful for
+ * storing additional information about the object in a structured format, and querying for
+ * objects via API or the dashboard.
+ *
+ * Keys are strings with a maximum length of 64 characters. Values are strings with a
+ * maximum length of 512 characters.
*/
fun metadata(metadata: Metadata?) = apply { body.metadata(metadata) }
@@ -458,8 +466,12 @@ private constructor(
fun items(): Optional> = items.getOptional("items")
/**
- * Set of 16 key-value pairs that can be attached to an object. Useful for storing
- * additional information about the object in a structured format.
+ * Set of 16 key-value pairs that can be attached to an object. This can be useful for
+ * storing additional information about the object in a structured format, and querying for
+ * objects via API or the dashboard.
+ *
+ * Keys are strings with a maximum length of 64 characters. Values are strings with a
+ * maximum length of 512 characters.
*
* @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
@@ -697,8 +709,12 @@ private constructor(
)
/**
- * Set of 16 key-value pairs that can be attached to an object. Useful for storing
- * additional information about the object in a structured format.
+ * Set of 16 key-value pairs that can be attached to an object. This can be useful for
+ * storing additional information about the object in a structured format, and querying
+ * for objects via API or the dashboard.
+ *
+ * Keys are strings with a maximum length of 64 characters. Values are strings with a
+ * maximum length of 512 characters.
*/
fun metadata(metadata: Metadata?) = metadata(JsonField.ofNullable(metadata))
diff --git a/openai-java-core/src/main/kotlin/com/openai/models/evals/runs/RunCancelResponse.kt b/openai-java-core/src/main/kotlin/com/openai/models/evals/runs/RunCancelResponse.kt
index 541cfa9a..2e81c316 100644
--- a/openai-java-core/src/main/kotlin/com/openai/models/evals/runs/RunCancelResponse.kt
+++ b/openai-java-core/src/main/kotlin/com/openai/models/evals/runs/RunCancelResponse.kt
@@ -2725,8 +2725,11 @@ private constructor(
fun model(): Optional = model.getOptional("model")
/**
- * Optional reasoning effort parameter. This is a query parameter used to select
- * responses.
+ * Constrains effort on reasoning for
+ * [reasoning models](https://platform.openai.com/docs/guides/reasoning).
+ * Currently supported values are `minimal`, `low`, `medium`, and `high`.
+ * Reducing reasoning effort can result in faster responses and fewer tokens
+ * used on reasoning in a response.
*
* @throws OpenAIInvalidDataException if the JSON field has an unexpected type
* (e.g. if the server responded with an unexpected value).
@@ -3037,8 +3040,11 @@ private constructor(
fun model(model: JsonField) = apply { this.model = model }
/**
- * Optional reasoning effort parameter. This is a query parameter used to
- * select responses.
+ * Constrains effort on reasoning for
+ * [reasoning models](https://platform.openai.com/docs/guides/reasoning).
+ * Currently supported values are `minimal`, `low`, `medium`, and `high`.
+ * Reducing reasoning effort can result in faster responses and fewer tokens
+ * used on reasoning in a response.
*/
fun reasoningEffort(reasoningEffort: ReasoningEffort?) =
reasoningEffort(JsonField.ofNullable(reasoningEffort))
diff --git a/openai-java-core/src/main/kotlin/com/openai/models/evals/runs/RunCreateParams.kt b/openai-java-core/src/main/kotlin/com/openai/models/evals/runs/RunCreateParams.kt
index 1fc99787..64009b76 100644
--- a/openai-java-core/src/main/kotlin/com/openai/models/evals/runs/RunCreateParams.kt
+++ b/openai-java-core/src/main/kotlin/com/openai/models/evals/runs/RunCreateParams.kt
@@ -2487,8 +2487,11 @@ private constructor(
fun model(): Optional = model.getOptional("model")
/**
- * Optional reasoning effort parameter. This is a query parameter used to select
- * responses.
+ * Constrains effort on reasoning for
+ * [reasoning models](https://platform.openai.com/docs/guides/reasoning).
+ * Currently supported values are `minimal`, `low`, `medium`, and `high`.
+ * Reducing reasoning effort can result in faster responses and fewer tokens
+ * used on reasoning in a response.
*
* @throws OpenAIInvalidDataException if the JSON field has an unexpected type
* (e.g. if the server responded with an unexpected value).
@@ -2797,8 +2800,11 @@ private constructor(
fun model(model: JsonField) = apply { this.model = model }
/**
- * Optional reasoning effort parameter. This is a query parameter used to
- * select responses.
+ * Constrains effort on reasoning for
+ * [reasoning models](https://platform.openai.com/docs/guides/reasoning).
+ * Currently supported values are `minimal`, `low`, `medium`, and `high`.
+ * Reducing reasoning effort can result in faster responses and fewer tokens
+ * used on reasoning in a response.
*/
fun reasoningEffort(reasoningEffort: ReasoningEffort?) =
reasoningEffort(JsonField.ofNullable(reasoningEffort))
diff --git a/openai-java-core/src/main/kotlin/com/openai/models/evals/runs/RunCreateResponse.kt b/openai-java-core/src/main/kotlin/com/openai/models/evals/runs/RunCreateResponse.kt
index a3a64a02..a58cbf9a 100644
--- a/openai-java-core/src/main/kotlin/com/openai/models/evals/runs/RunCreateResponse.kt
+++ b/openai-java-core/src/main/kotlin/com/openai/models/evals/runs/RunCreateResponse.kt
@@ -2725,8 +2725,11 @@ private constructor(
fun model(): Optional = model.getOptional("model")
/**
- * Optional reasoning effort parameter. This is a query parameter used to select
- * responses.
+ * Constrains effort on reasoning for
+ * [reasoning models](https://platform.openai.com/docs/guides/reasoning).
+ * Currently supported values are `minimal`, `low`, `medium`, and `high`.
+ * Reducing reasoning effort can result in faster responses and fewer tokens
+ * used on reasoning in a response.
*
* @throws OpenAIInvalidDataException if the JSON field has an unexpected type
* (e.g. if the server responded with an unexpected value).
@@ -3037,8 +3040,11 @@ private constructor(
fun model(model: JsonField) = apply { this.model = model }
/**
- * Optional reasoning effort parameter. This is a query parameter used to
- * select responses.
+ * Constrains effort on reasoning for
+ * [reasoning models](https://platform.openai.com/docs/guides/reasoning).
+ * Currently supported values are `minimal`, `low`, `medium`, and `high`.
+ * Reducing reasoning effort can result in faster responses and fewer tokens
+ * used on reasoning in a response.
*/
fun reasoningEffort(reasoningEffort: ReasoningEffort?) =
reasoningEffort(JsonField.ofNullable(reasoningEffort))
diff --git a/openai-java-core/src/main/kotlin/com/openai/models/evals/runs/RunListResponse.kt b/openai-java-core/src/main/kotlin/com/openai/models/evals/runs/RunListResponse.kt
index 061de359..d9c4dbb5 100644
--- a/openai-java-core/src/main/kotlin/com/openai/models/evals/runs/RunListResponse.kt
+++ b/openai-java-core/src/main/kotlin/com/openai/models/evals/runs/RunListResponse.kt
@@ -2725,8 +2725,11 @@ private constructor(
fun model(): Optional = model.getOptional("model")
/**
- * Optional reasoning effort parameter. This is a query parameter used to select
- * responses.
+ * Constrains effort on reasoning for
+ * [reasoning models](https://platform.openai.com/docs/guides/reasoning).
+ * Currently supported values are `minimal`, `low`, `medium`, and `high`.
+ * Reducing reasoning effort can result in faster responses and fewer tokens
+ * used on reasoning in a response.
*
* @throws OpenAIInvalidDataException if the JSON field has an unexpected type
* (e.g. if the server responded with an unexpected value).
@@ -3037,8 +3040,11 @@ private constructor(
fun model(model: JsonField) = apply { this.model = model }
/**
- * Optional reasoning effort parameter. This is a query parameter used to
- * select responses.
+ * Constrains effort on reasoning for
+ * [reasoning models](https://platform.openai.com/docs/guides/reasoning).
+ * Currently supported values are `minimal`, `low`, `medium`, and `high`.
+ * Reducing reasoning effort can result in faster responses and fewer tokens
+ * used on reasoning in a response.
*/
fun reasoningEffort(reasoningEffort: ReasoningEffort?) =
reasoningEffort(JsonField.ofNullable(reasoningEffort))
diff --git a/openai-java-core/src/main/kotlin/com/openai/models/evals/runs/RunRetrieveResponse.kt b/openai-java-core/src/main/kotlin/com/openai/models/evals/runs/RunRetrieveResponse.kt
index 839c3545..41c7aa8d 100644
--- a/openai-java-core/src/main/kotlin/com/openai/models/evals/runs/RunRetrieveResponse.kt
+++ b/openai-java-core/src/main/kotlin/com/openai/models/evals/runs/RunRetrieveResponse.kt
@@ -2725,8 +2725,11 @@ private constructor(
fun model(): Optional = model.getOptional("model")
/**
- * Optional reasoning effort parameter. This is a query parameter used to select
- * responses.
+ * Constrains effort on reasoning for
+ * [reasoning models](https://platform.openai.com/docs/guides/reasoning).
+ * Currently supported values are `minimal`, `low`, `medium`, and `high`.
+ * Reducing reasoning effort can result in faster responses and fewer tokens
+ * used on reasoning in a response.
*
* @throws OpenAIInvalidDataException if the JSON field has an unexpected type
* (e.g. if the server responded with an unexpected value).
@@ -3037,8 +3040,11 @@ private constructor(
fun model(model: JsonField) = apply { this.model = model }
/**
- * Optional reasoning effort parameter. This is a query parameter used to
- * select responses.
+ * Constrains effort on reasoning for
+ * [reasoning models](https://platform.openai.com/docs/guides/reasoning).
+ * Currently supported values are `minimal`, `low`, `medium`, and `high`.
+ * Reducing reasoning effort can result in faster responses and fewer tokens
+ * used on reasoning in a response.
*/
fun reasoningEffort(reasoningEffort: ReasoningEffort?) =
reasoningEffort(JsonField.ofNullable(reasoningEffort))
diff --git a/openai-java-core/src/main/kotlin/com/openai/models/finetuning/jobs/FineTuningJob.kt b/openai-java-core/src/main/kotlin/com/openai/models/finetuning/jobs/FineTuningJob.kt
index 77322f0e..227e58f0 100644
--- a/openai-java-core/src/main/kotlin/com/openai/models/finetuning/jobs/FineTuningJob.kt
+++ b/openai-java-core/src/main/kotlin/com/openai/models/finetuning/jobs/FineTuningJob.kt
@@ -1411,8 +1411,8 @@ private constructor(
/** Alias for calling [batchSize] with `BatchSize.ofAuto()`. */
fun batchSizeAuto() = batchSize(BatchSize.ofAuto())
- /** Alias for calling [batchSize] with `BatchSize.ofManual(manual)`. */
- fun batchSize(manual: Long) = batchSize(BatchSize.ofManual(manual))
+ /** Alias for calling [batchSize] with `BatchSize.ofInteger(integer)`. */
+ fun batchSize(integer: Long) = batchSize(BatchSize.ofInteger(integer))
/**
* Scaling factor for the learning rate. A smaller learning rate may be useful to avoid
@@ -1542,28 +1542,28 @@ private constructor(
class BatchSize
private constructor(
private val auto: JsonValue? = null,
- private val manual: Long? = null,
+ private val integer: Long? = null,
private val _json: JsonValue? = null,
) {
fun auto(): Optional = Optional.ofNullable(auto)
- fun manual(): Optional = Optional.ofNullable(manual)
+ fun integer(): Optional = Optional.ofNullable(integer)
fun isAuto(): Boolean = auto != null
- fun isManual(): Boolean = manual != null
+ fun isInteger(): Boolean = integer != null
fun asAuto(): JsonValue = auto.getOrThrow("auto")
- fun asManual(): Long = manual.getOrThrow("manual")
+ fun asInteger(): Long = integer.getOrThrow("integer")
fun _json(): Optional = Optional.ofNullable(_json)
fun accept(visitor: Visitor): T =
when {
auto != null -> visitor.visitAuto(auto)
- manual != null -> visitor.visitManual(manual)
+ integer != null -> visitor.visitInteger(integer)
else -> visitor.unknown(_json)
}
@@ -1586,7 +1586,7 @@ private constructor(
}
}
- override fun visitManual(manual: Long) {}
+ override fun visitInteger(integer: Long) {}
}
)
validated = true
@@ -1613,7 +1613,7 @@ private constructor(
override fun visitAuto(auto: JsonValue) =
auto.let { if (it == JsonValue.from("auto")) 1 else 0 }
- override fun visitManual(manual: Long) = 1
+ override fun visitInteger(integer: Long) = 1
override fun unknown(json: JsonValue?) = 0
}
@@ -1624,15 +1624,15 @@ private constructor(
return true
}
- return other is BatchSize && auto == other.auto && manual == other.manual
+ return other is BatchSize && auto == other.auto && integer == other.integer
}
- override fun hashCode(): Int = Objects.hash(auto, manual)
+ override fun hashCode(): Int = Objects.hash(auto, integer)
override fun toString(): String =
when {
auto != null -> "BatchSize{auto=$auto}"
- manual != null -> "BatchSize{manual=$manual}"
+ integer != null -> "BatchSize{integer=$integer}"
_json != null -> "BatchSize{_unknown=$_json}"
else -> throw IllegalStateException("Invalid BatchSize")
}
@@ -1641,7 +1641,7 @@ private constructor(
@JvmStatic fun ofAuto() = BatchSize(auto = JsonValue.from("auto"))
- @JvmStatic fun ofManual(manual: Long) = BatchSize(manual = manual)
+ @JvmStatic fun ofInteger(integer: Long) = BatchSize(integer = integer)
}
/**
@@ -1652,7 +1652,7 @@ private constructor(
fun visitAuto(auto: JsonValue): T
- fun visitManual(manual: Long): T
+ fun visitInteger(integer: Long): T
/**
* Maps an unknown variant of [BatchSize] to a value of type [T].
@@ -1680,7 +1680,7 @@ private constructor(
?.let { BatchSize(auto = it, _json = json) }
?.takeIf { it.isValid() },
tryDeserialize(node, jacksonTypeRef())?.let {
- BatchSize(manual = it, _json = json)
+ BatchSize(integer = it, _json = json)
},
)
.filterNotNull()
@@ -1708,7 +1708,7 @@ private constructor(
) {
when {
value.auto != null -> generator.writeObject(value.auto)
- value.manual != null -> generator.writeObject(value.manual)
+ value.integer != null -> generator.writeObject(value.integer)
value._json != null -> generator.writeObject(value._json)
else -> throw IllegalStateException("Invalid BatchSize")
}