From a0cc1d81ca67e8618f51df4359b2877d27cba572 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 30 Jan 2026 19:42:52 +0000 Subject: [PATCH 1/7] feat(api): image generation actions for responses; ResponseFunctionCallArgumentsDoneEvent.name --- .stats.yml | 6 +- .../ResponseFunctionCallArgumentsDoneEvent.kt | 51 ++++- .../responses/ResponseFunctionWebSearch.kt | 49 ++--- .../com/openai/models/responses/Tool.kt | 181 +++++++++++++++++- .../realtime/RealtimeServerEventTest.kt | 2 + ...ponseFunctionCallArgumentsDoneEventTest.kt | 3 + .../com/openai/models/responses/ToolTest.kt | 2 + 7 files changed, 252 insertions(+), 42 deletions(-) diff --git a/.stats.yml b/.stats.yml index 74eed78e..8698cc85 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 136 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-7a6ba5212fa9680f9489f4e73c298e1e8f78106b83a465e76290d45fc2fccb70.yml -openapi_spec_hash: 3d3379b7dbf6af484944bc678ec9bf4c -config_hash: a08002d1759a1d0bde3429dccc58d1ef +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-b956f0004bb930006f4b8d24734b20e89c7420ca6635dd358b9f0299c8ac8d62.yml +openapi_spec_hash: 91b1b7bf3c1a6b6c9c7507d4cac8fe2a +config_hash: 9501b3367f98ede2729f1bfffb3a803a diff --git a/openai-java-core/src/main/kotlin/com/openai/models/realtime/ResponseFunctionCallArgumentsDoneEvent.kt b/openai-java-core/src/main/kotlin/com/openai/models/realtime/ResponseFunctionCallArgumentsDoneEvent.kt index 57f77a0d..7948fe5b 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/realtime/ResponseFunctionCallArgumentsDoneEvent.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/realtime/ResponseFunctionCallArgumentsDoneEvent.kt @@ -26,6 +26,7 @@ private constructor( private val callId: JsonField, private val eventId: JsonField, private val itemId: JsonField, + private val name: JsonField, private val outputIndex: JsonField, private val responseId: JsonField, private val type: JsonValue, @@ -38,6 +39,7 @@ private constructor( @JsonProperty("call_id") @ExcludeMissing callId: JsonField = JsonMissing.of(), @JsonProperty("event_id") @ExcludeMissing eventId: JsonField = JsonMissing.of(), @JsonProperty("item_id") @ExcludeMissing itemId: JsonField = JsonMissing.of(), + @JsonProperty("name") @ExcludeMissing name: JsonField = JsonMissing.of(), @JsonProperty("output_index") @ExcludeMissing outputIndex: JsonField = JsonMissing.of(), @@ -45,7 +47,17 @@ private constructor( @ExcludeMissing responseId: JsonField = JsonMissing.of(), @JsonProperty("type") @ExcludeMissing type: JsonValue = JsonMissing.of(), - ) : this(arguments, callId, eventId, itemId, outputIndex, responseId, type, mutableMapOf()) + ) : this( + arguments, + callId, + eventId, + itemId, + name, + outputIndex, + responseId, + type, + mutableMapOf(), + ) /** * The final arguments as a JSON string. @@ -79,6 +91,14 @@ private constructor( */ fun itemId(): String = itemId.getRequired("item_id") + /** + * The name of the function that was called. + * + * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is + * unexpectedly missing or null (e.g. if the server responded with an unexpected value). + */ + fun name(): String = name.getRequired("name") + /** * The index of the output item in the response. * @@ -136,6 +156,13 @@ private constructor( */ @JsonProperty("item_id") @ExcludeMissing fun _itemId(): JsonField = itemId + /** + * Returns the raw JSON value of [name]. + * + * Unlike [name], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("name") @ExcludeMissing fun _name(): JsonField = name + /** * Returns the raw JSON value of [outputIndex]. * @@ -174,6 +201,7 @@ private constructor( * .callId() * .eventId() * .itemId() + * .name() * .outputIndex() * .responseId() * ``` @@ -188,6 +216,7 @@ private constructor( private var callId: JsonField? = null private var eventId: JsonField? = null private var itemId: JsonField? = null + private var name: JsonField? = null private var outputIndex: JsonField? = null private var responseId: JsonField? = null private var type: JsonValue = JsonValue.from("response.function_call_arguments.done") @@ -201,6 +230,7 @@ private constructor( callId = responseFunctionCallArgumentsDoneEvent.callId eventId = responseFunctionCallArgumentsDoneEvent.eventId itemId = responseFunctionCallArgumentsDoneEvent.itemId + name = responseFunctionCallArgumentsDoneEvent.name outputIndex = responseFunctionCallArgumentsDoneEvent.outputIndex responseId = responseFunctionCallArgumentsDoneEvent.responseId type = responseFunctionCallArgumentsDoneEvent.type @@ -253,6 +283,17 @@ private constructor( */ fun itemId(itemId: JsonField) = apply { this.itemId = itemId } + /** The name of the function that was called. */ + fun name(name: String) = name(JsonField.of(name)) + + /** + * Sets [Builder.name] to an arbitrary JSON value. + * + * You should usually call [Builder.name] with a well-typed [String] value instead. This + * method is primarily for setting the field to an undocumented or not yet supported value. + */ + fun name(name: JsonField) = apply { this.name = name } + /** The index of the output item in the response. */ fun outputIndex(outputIndex: Long) = outputIndex(JsonField.of(outputIndex)) @@ -321,6 +362,7 @@ private constructor( * .callId() * .eventId() * .itemId() + * .name() * .outputIndex() * .responseId() * ``` @@ -333,6 +375,7 @@ private constructor( checkRequired("callId", callId), checkRequired("eventId", eventId), checkRequired("itemId", itemId), + checkRequired("name", name), checkRequired("outputIndex", outputIndex), checkRequired("responseId", responseId), type, @@ -351,6 +394,7 @@ private constructor( callId() eventId() itemId() + name() outputIndex() responseId() _type().let { @@ -380,6 +424,7 @@ private constructor( (if (callId.asKnown().isPresent) 1 else 0) + (if (eventId.asKnown().isPresent) 1 else 0) + (if (itemId.asKnown().isPresent) 1 else 0) + + (if (name.asKnown().isPresent) 1 else 0) + (if (outputIndex.asKnown().isPresent) 1 else 0) + (if (responseId.asKnown().isPresent) 1 else 0) + type.let { if (it == JsonValue.from("response.function_call_arguments.done")) 1 else 0 } @@ -394,6 +439,7 @@ private constructor( callId == other.callId && eventId == other.eventId && itemId == other.itemId && + name == other.name && outputIndex == other.outputIndex && responseId == other.responseId && type == other.type && @@ -406,6 +452,7 @@ private constructor( callId, eventId, itemId, + name, outputIndex, responseId, type, @@ -416,5 +463,5 @@ private constructor( override fun hashCode(): Int = hashCode override fun toString() = - "ResponseFunctionCallArgumentsDoneEvent{arguments=$arguments, callId=$callId, eventId=$eventId, itemId=$itemId, outputIndex=$outputIndex, responseId=$responseId, type=$type, additionalProperties=$additionalProperties}" + "ResponseFunctionCallArgumentsDoneEvent{arguments=$arguments, callId=$callId, eventId=$eventId, itemId=$itemId, name=$name, outputIndex=$outputIndex, responseId=$responseId, type=$type, additionalProperties=$additionalProperties}" } diff --git a/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseFunctionWebSearch.kt b/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseFunctionWebSearch.kt index f0590b84..18b88983 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseFunctionWebSearch.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseFunctionWebSearch.kt @@ -63,7 +63,7 @@ private constructor( /** * An object describing the specific action taken in this web search call. Includes details on - * how the model used the web (search, open_page, find). + * how the model used the web (search, open_page, find_in_page). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). @@ -170,7 +170,7 @@ private constructor( /** * An object describing the specific action taken in this web search call. Includes details - * on how the model used the web (search, open_page, find). + * on how the model used the web (search, open_page, find_in_page). */ fun action(action: Action) = action(JsonField.of(action)) @@ -198,16 +198,6 @@ private constructor( /** Alias for calling [action] with `Action.ofOpenPage(openPage)`. */ fun action(openPage: Action.OpenPage) = action(Action.ofOpenPage(openPage)) - /** - * Alias for calling [action] with the following: - * ```java - * Action.OpenPage.builder() - * .url(url) - * .build() - * ``` - */ - fun openPageAction(url: String) = action(Action.OpenPage.builder().url(url).build()) - /** Alias for calling [action] with `Action.ofFind(find)`. */ fun action(find: Action.Find) = action(Action.ofFind(find)) @@ -319,7 +309,7 @@ private constructor( /** * An object describing the specific action taken in this web search call. Includes details on - * how the model used the web (search, open_page, find). + * how the model used the web (search, open_page, find_in_page). */ @JsonDeserialize(using = Action.Deserializer::class) @JsonSerialize(using = Action.Serializer::class) @@ -1069,11 +1059,10 @@ private constructor( /** * The URL opened by the model. * - * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is - * unexpectedly missing or null (e.g. if the server responded with an unexpected - * value). + * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if + * the server responded with an unexpected value). */ - fun url(): String = url.getRequired("url") + fun url(): Optional = url.getOptional("url") /** * Returns the raw JSON value of [url]. @@ -1096,14 +1085,7 @@ private constructor( companion object { - /** - * Returns a mutable builder for constructing an instance of [OpenPage]. - * - * The following fields are required: - * ```java - * .url() - * ``` - */ + /** Returns a mutable builder for constructing an instance of [OpenPage]. */ @JvmStatic fun builder() = Builder() } @@ -1111,7 +1093,7 @@ private constructor( class Builder internal constructor() { private var type: JsonValue = JsonValue.from("open_page") - private var url: JsonField? = null + private var url: JsonField = JsonMissing.of() private var additionalProperties: MutableMap = mutableMapOf() @JvmSynthetic @@ -1136,7 +1118,10 @@ private constructor( fun type(type: JsonValue) = apply { this.type = type } /** The URL opened by the model. */ - fun url(url: String) = url(JsonField.of(url)) + fun url(url: String?) = url(JsonField.ofNullable(url)) + + /** Alias for calling [Builder.url] with `url.orElse(null)`. */ + fun url(url: Optional) = url(url.getOrNull()) /** * Sets [Builder.url] to an arbitrary JSON value. @@ -1173,16 +1158,8 @@ private constructor( * Returns an immutable instance of [OpenPage]. * * Further updates to this [Builder] will not mutate the returned instance. - * - * The following fields are required: - * ```java - * .url() - * ``` - * - * @throws IllegalStateException if any required field is unset. */ - fun build(): OpenPage = - OpenPage(type, checkRequired("url", url), additionalProperties.toMutableMap()) + fun build(): OpenPage = OpenPage(type, url, additionalProperties.toMutableMap()) } private var validated: Boolean = false diff --git a/openai-java-core/src/main/kotlin/com/openai/models/responses/Tool.kt b/openai-java-core/src/main/kotlin/com/openai/models/responses/Tool.kt index be931fab..abe85bb0 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/responses/Tool.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/responses/Tool.kt @@ -3799,6 +3799,7 @@ private constructor( @JsonCreator(mode = JsonCreator.Mode.DISABLED) private constructor( private val type: JsonValue, + private val action: JsonField, private val background: JsonField, private val inputFidelity: JsonField, private val inputImageMask: JsonField, @@ -3815,6 +3816,7 @@ private constructor( @JsonCreator private constructor( @JsonProperty("type") @ExcludeMissing type: JsonValue = JsonMissing.of(), + @JsonProperty("action") @ExcludeMissing action: JsonField = JsonMissing.of(), @JsonProperty("background") @ExcludeMissing background: JsonField = JsonMissing.of(), @@ -3841,6 +3843,7 @@ private constructor( @JsonProperty("size") @ExcludeMissing size: JsonField = JsonMissing.of(), ) : this( type, + action, background, inputFidelity, inputImageMask, @@ -3867,6 +3870,14 @@ private constructor( */ @JsonProperty("type") @ExcludeMissing fun _type(): JsonValue = type + /** + * Whether to generate a new image or edit an existing image. Default: `auto`. + * + * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the + * server responded with an unexpected value). + */ + fun action(): Optional = action.getOptional("action") + /** * Background type for the generated image. One of `transparent`, `opaque`, or `auto`. * Default: `auto`. @@ -3956,6 +3967,13 @@ private constructor( */ fun size(): Optional = size.getOptional("size") + /** + * Returns the raw JSON value of [action]. + * + * Unlike [action], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("action") @ExcludeMissing fun _action(): JsonField = action + /** * Returns the raw JSON value of [background]. * @@ -4067,6 +4085,7 @@ private constructor( class Builder internal constructor() { private var type: JsonValue = JsonValue.from("image_generation") + private var action: JsonField = JsonMissing.of() private var background: JsonField = JsonMissing.of() private var inputFidelity: JsonField = JsonMissing.of() private var inputImageMask: JsonField = JsonMissing.of() @@ -4082,6 +4101,7 @@ private constructor( @JvmSynthetic internal fun from(imageGeneration: ImageGeneration) = apply { type = imageGeneration.type + action = imageGeneration.action background = imageGeneration.background inputFidelity = imageGeneration.inputFidelity inputImageMask = imageGeneration.inputImageMask @@ -4109,6 +4129,18 @@ private constructor( */ fun type(type: JsonValue) = apply { this.type = type } + /** Whether to generate a new image or edit an existing image. Default: `auto`. */ + fun action(action: Action) = action(JsonField.of(action)) + + /** + * Sets [Builder.action] to an arbitrary JSON value. + * + * You should usually call [Builder.action] with a well-typed [Action] value instead. + * This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun action(action: JsonField) = apply { this.action = action } + /** * Background type for the generated image. One of `transparent`, `opaque`, or `auto`. * Default: `auto`. @@ -4308,6 +4340,7 @@ private constructor( fun build(): ImageGeneration = ImageGeneration( type, + action, background, inputFidelity, inputImageMask, @@ -4334,6 +4367,7 @@ private constructor( throw OpenAIInvalidDataException("'type' is invalid, received $it") } } + action().ifPresent { it.validate() } background().ifPresent { it.validate() } inputFidelity().ifPresent { it.validate() } inputImageMask().ifPresent { it.validate() } @@ -4364,6 +4398,7 @@ private constructor( @JvmSynthetic internal fun validity(): Int = type.let { if (it == JsonValue.from("image_generation")) 1 else 0 } + + (action.asKnown().getOrNull()?.validity() ?: 0) + (background.asKnown().getOrNull()?.validity() ?: 0) + (inputFidelity.asKnown().getOrNull()?.validity() ?: 0) + (inputImageMask.asKnown().getOrNull()?.validity() ?: 0) + @@ -4375,6 +4410,142 @@ private constructor( (quality.asKnown().getOrNull()?.validity() ?: 0) + (size.asKnown().getOrNull()?.validity() ?: 0) + /** Whether to generate a new image or edit an existing image. Default: `auto`. */ + class Action @JsonCreator private constructor(private val value: JsonField) : Enum { + + /** + * Returns this class instance's raw value. + * + * This is usually only useful if this instance was deserialized from data that doesn't + * match any known member, and you want to know that value. For example, if the SDK is + * on an older version than the API, then the API may respond with new members that the + * SDK is unaware of. + */ + @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value + + companion object { + + @JvmField val GENERATE = of("generate") + + @JvmField val EDIT = of("edit") + + @JvmField val AUTO = of("auto") + + @JvmStatic fun of(value: String) = Action(JsonField.of(value)) + } + + /** An enum containing [Action]'s known values. */ + enum class Known { + GENERATE, + EDIT, + AUTO, + } + + /** + * An enum containing [Action]'s known values, as well as an [_UNKNOWN] member. + * + * An instance of [Action] can contain an unknown value in a couple of cases: + * - It was deserialized from data that doesn't match any known member. For example, if + * the SDK is on an older version than the API, then the API may respond with new + * members that the SDK is unaware of. + * - It was constructed with an arbitrary value using the [of] method. + */ + enum class Value { + GENERATE, + EDIT, + AUTO, + /** + * An enum member indicating that [Action] was instantiated with an unknown value. + */ + _UNKNOWN, + } + + /** + * Returns an enum member corresponding to this class instance's value, or + * [Value._UNKNOWN] if the class was instantiated with an unknown value. + * + * Use the [known] method instead if you're certain the value is always known or if you + * want to throw for the unknown case. + */ + fun value(): Value = + when (this) { + GENERATE -> Value.GENERATE + EDIT -> Value.EDIT + AUTO -> Value.AUTO + else -> Value._UNKNOWN + } + + /** + * Returns an enum member corresponding to this class instance's value. + * + * Use the [value] method instead if you're uncertain the value is always known and + * don't want to throw for the unknown case. + * + * @throws OpenAIInvalidDataException if this class instance's value is a not a known + * member. + */ + fun known(): Known = + when (this) { + GENERATE -> Known.GENERATE + EDIT -> Known.EDIT + AUTO -> Known.AUTO + else -> throw OpenAIInvalidDataException("Unknown Action: $value") + } + + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws OpenAIInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + OpenAIInvalidDataException("Value is not a String") + } + + private var validated: Boolean = false + + fun validate(): Action = apply { + if (validated) { + return@apply + } + + known() + validated = true + } + + fun isValid(): Boolean = + try { + validate() + true + } catch (e: OpenAIInvalidDataException) { + false + } + + /** + * Returns a score indicating how many valid values are contained in this object + * recursively. + * + * Used for best match union deserialization. + */ + @JvmSynthetic internal fun validity(): Int = if (value() == Value._UNKNOWN) 0 else 1 + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is Action && value == other.value + } + + override fun hashCode() = value.hashCode() + + override fun toString() = value.toString() + } + /** * Background type for the generated image. One of `transparent`, `opaque`, or `auto`. * Default: `auto`. @@ -4863,6 +5034,8 @@ private constructor( @JvmField val GPT_IMAGE_1_MINI = of("gpt-image-1-mini") + @JvmField val GPT_IMAGE_1_5 = of("gpt-image-1.5") + @JvmStatic fun of(value: String) = Model(JsonField.of(value)) } @@ -4870,6 +5043,7 @@ private constructor( enum class Known { GPT_IMAGE_1, GPT_IMAGE_1_MINI, + GPT_IMAGE_1_5, } /** @@ -4884,6 +5058,7 @@ private constructor( enum class Value { GPT_IMAGE_1, GPT_IMAGE_1_MINI, + GPT_IMAGE_1_5, /** * An enum member indicating that [Model] was instantiated with an unknown value. */ @@ -4901,6 +5076,7 @@ private constructor( when (this) { GPT_IMAGE_1 -> Value.GPT_IMAGE_1 GPT_IMAGE_1_MINI -> Value.GPT_IMAGE_1_MINI + GPT_IMAGE_1_5 -> Value.GPT_IMAGE_1_5 else -> Value._UNKNOWN } @@ -4917,6 +5093,7 @@ private constructor( when (this) { GPT_IMAGE_1 -> Known.GPT_IMAGE_1 GPT_IMAGE_1_MINI -> Known.GPT_IMAGE_1_MINI + GPT_IMAGE_1_5 -> Known.GPT_IMAGE_1_5 else -> throw OpenAIInvalidDataException("Unknown Model: $value") } @@ -5543,6 +5720,7 @@ private constructor( return other is ImageGeneration && type == other.type && + action == other.action && background == other.background && inputFidelity == other.inputFidelity && inputImageMask == other.inputImageMask && @@ -5559,6 +5737,7 @@ private constructor( private val hashCode: Int by lazy { Objects.hash( type, + action, background, inputFidelity, inputImageMask, @@ -5576,6 +5755,6 @@ private constructor( override fun hashCode(): Int = hashCode override fun toString() = - "ImageGeneration{type=$type, background=$background, inputFidelity=$inputFidelity, inputImageMask=$inputImageMask, model=$model, moderation=$moderation, outputCompression=$outputCompression, outputFormat=$outputFormat, partialImages=$partialImages, quality=$quality, size=$size, additionalProperties=$additionalProperties}" + "ImageGeneration{type=$type, action=$action, background=$background, inputFidelity=$inputFidelity, inputImageMask=$inputImageMask, model=$model, moderation=$moderation, outputCompression=$outputCompression, outputFormat=$outputFormat, partialImages=$partialImages, quality=$quality, size=$size, additionalProperties=$additionalProperties}" } } diff --git a/openai-java-core/src/test/kotlin/com/openai/models/realtime/RealtimeServerEventTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/realtime/RealtimeServerEventTest.kt index 8971f216..5f326dd0 100644 --- a/openai-java-core/src/test/kotlin/com/openai/models/realtime/RealtimeServerEventTest.kt +++ b/openai-java-core/src/test/kotlin/com/openai/models/realtime/RealtimeServerEventTest.kt @@ -2548,6 +2548,7 @@ internal class RealtimeServerEventTest { .callId("call_id") .eventId("event_id") .itemId("item_id") + .name("name") .outputIndex(0L) .responseId("response_id") .build() @@ -2616,6 +2617,7 @@ internal class RealtimeServerEventTest { .callId("call_id") .eventId("event_id") .itemId("item_id") + .name("name") .outputIndex(0L) .responseId("response_id") .build() diff --git a/openai-java-core/src/test/kotlin/com/openai/models/realtime/ResponseFunctionCallArgumentsDoneEventTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/realtime/ResponseFunctionCallArgumentsDoneEventTest.kt index ef187a69..46bc8a9b 100644 --- a/openai-java-core/src/test/kotlin/com/openai/models/realtime/ResponseFunctionCallArgumentsDoneEventTest.kt +++ b/openai-java-core/src/test/kotlin/com/openai/models/realtime/ResponseFunctionCallArgumentsDoneEventTest.kt @@ -17,6 +17,7 @@ internal class ResponseFunctionCallArgumentsDoneEventTest { .callId("call_id") .eventId("event_id") .itemId("item_id") + .name("name") .outputIndex(0L) .responseId("response_id") .build() @@ -25,6 +26,7 @@ internal class ResponseFunctionCallArgumentsDoneEventTest { assertThat(responseFunctionCallArgumentsDoneEvent.callId()).isEqualTo("call_id") assertThat(responseFunctionCallArgumentsDoneEvent.eventId()).isEqualTo("event_id") assertThat(responseFunctionCallArgumentsDoneEvent.itemId()).isEqualTo("item_id") + assertThat(responseFunctionCallArgumentsDoneEvent.name()).isEqualTo("name") assertThat(responseFunctionCallArgumentsDoneEvent.outputIndex()).isEqualTo(0L) assertThat(responseFunctionCallArgumentsDoneEvent.responseId()).isEqualTo("response_id") } @@ -38,6 +40,7 @@ internal class ResponseFunctionCallArgumentsDoneEventTest { .callId("call_id") .eventId("event_id") .itemId("item_id") + .name("name") .outputIndex(0L) .responseId("response_id") .build() diff --git a/openai-java-core/src/test/kotlin/com/openai/models/responses/ToolTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/responses/ToolTest.kt index abe6207e..b7ab999b 100644 --- a/openai-java-core/src/test/kotlin/com/openai/models/responses/ToolTest.kt +++ b/openai-java-core/src/test/kotlin/com/openai/models/responses/ToolTest.kt @@ -378,6 +378,7 @@ internal class ToolTest { fun ofImageGeneration() { val imageGeneration = Tool.ImageGeneration.builder() + .action(Tool.ImageGeneration.Action.GENERATE) .background(Tool.ImageGeneration.Background.TRANSPARENT) .inputFidelity(Tool.ImageGeneration.InputFidelity.HIGH) .inputImageMask( @@ -417,6 +418,7 @@ internal class ToolTest { val tool = Tool.ofImageGeneration( Tool.ImageGeneration.builder() + .action(Tool.ImageGeneration.Action.GENERATE) .background(Tool.ImageGeneration.Background.TRANSPARENT) .inputFidelity(Tool.ImageGeneration.InputFidelity.HIGH) .inputImageMask( From ce2c0edb51c10779f3c7bb68aef8666057d4e400 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 2 Feb 2026 21:48:12 +0000 Subject: [PATCH 2/7] chore(internal): allow passing args to `./scripts/test` --- scripts/build | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/build b/scripts/build index 32d2e4ea..16a2b00d 100755 --- a/scripts/build +++ b/scripts/build @@ -5,5 +5,4 @@ set -e cd "$(dirname "$0")/.." echo "==> Building classes" - -./gradlew build testClasses -x test \ No newline at end of file +./gradlew build testClasses "$@" -x test From 2cde783b5d33d7498548074ad45ee04d4d9d7c05 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 2 Feb 2026 21:36:15 +0000 Subject: [PATCH 3/7] fix(client): update type for `find_in_page` action --- .stats.yml | 4 +- .../responses/ResponseFunctionWebSearch.kt | 86 +++++++++---------- 2 files changed, 45 insertions(+), 45 deletions(-) diff --git a/.stats.yml b/.stats.yml index 8698cc85..766c6aef 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 136 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-b956f0004bb930006f4b8d24734b20e89c7420ca6635dd358b9f0299c8ac8d62.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-64c3a646eb5dcad2b7ff7bd976c0e312b886676a542f6ffcd9a6c8503ae24c58.yml openapi_spec_hash: 91b1b7bf3c1a6b6c9c7507d4cac8fe2a -config_hash: 9501b3367f98ede2729f1bfffb3a803a +config_hash: f8e6baff429cf000b8e4ba1da08dff47 diff --git a/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseFunctionWebSearch.kt b/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseFunctionWebSearch.kt index 18b88983..725915aa 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseFunctionWebSearch.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseFunctionWebSearch.kt @@ -198,8 +198,8 @@ private constructor( /** Alias for calling [action] with `Action.ofOpenPage(openPage)`. */ fun action(openPage: Action.OpenPage) = action(Action.ofOpenPage(openPage)) - /** Alias for calling [action] with `Action.ofFind(find)`. */ - fun action(find: Action.Find) = action(Action.ofFind(find)) + /** Alias for calling [action] with `Action.ofFindInPage(findInPage)`. */ + fun action(findInPage: Action.FindInPage) = action(Action.ofFindInPage(findInPage)) /** The status of the web search tool call. */ fun status(status: Status) = status(JsonField.of(status)) @@ -317,7 +317,7 @@ private constructor( private constructor( private val search: Search? = null, private val openPage: OpenPage? = null, - private val find: Find? = null, + private val findInPage: FindInPage? = null, private val _json: JsonValue? = null, ) { @@ -327,14 +327,14 @@ private constructor( /** Action type "open_page" - Opens a specific URL from search results. */ fun openPage(): Optional = Optional.ofNullable(openPage) - /** Action type "find": Searches for a pattern within a loaded page. */ - fun find(): Optional = Optional.ofNullable(find) + /** Action type "find_in_page": Searches for a pattern within a loaded page. */ + fun findInPage(): Optional = Optional.ofNullable(findInPage) fun isSearch(): Boolean = search != null fun isOpenPage(): Boolean = openPage != null - fun isFind(): Boolean = find != null + fun isFindInPage(): Boolean = findInPage != null /** Action type "search" - Performs a web search query. */ fun asSearch(): Search = search.getOrThrow("search") @@ -342,8 +342,8 @@ private constructor( /** Action type "open_page" - Opens a specific URL from search results. */ fun asOpenPage(): OpenPage = openPage.getOrThrow("openPage") - /** Action type "find": Searches for a pattern within a loaded page. */ - fun asFind(): Find = find.getOrThrow("find") + /** Action type "find_in_page": Searches for a pattern within a loaded page. */ + fun asFindInPage(): FindInPage = findInPage.getOrThrow("findInPage") fun _json(): Optional = Optional.ofNullable(_json) @@ -351,7 +351,7 @@ private constructor( when { search != null -> visitor.visitSearch(search) openPage != null -> visitor.visitOpenPage(openPage) - find != null -> visitor.visitFind(find) + findInPage != null -> visitor.visitFindInPage(findInPage) else -> visitor.unknown(_json) } @@ -372,8 +372,8 @@ private constructor( openPage.validate() } - override fun visitFind(find: Find) { - find.validate() + override fun visitFindInPage(findInPage: FindInPage) { + findInPage.validate() } } ) @@ -402,7 +402,7 @@ private constructor( override fun visitOpenPage(openPage: OpenPage) = openPage.validity() - override fun visitFind(find: Find) = find.validity() + override fun visitFindInPage(findInPage: FindInPage) = findInPage.validity() override fun unknown(json: JsonValue?) = 0 } @@ -416,16 +416,16 @@ private constructor( return other is Action && search == other.search && openPage == other.openPage && - find == other.find + findInPage == other.findInPage } - override fun hashCode(): Int = Objects.hash(search, openPage, find) + override fun hashCode(): Int = Objects.hash(search, openPage, findInPage) override fun toString(): String = when { search != null -> "Action{search=$search}" openPage != null -> "Action{openPage=$openPage}" - find != null -> "Action{find=$find}" + findInPage != null -> "Action{findInPage=$findInPage}" _json != null -> "Action{_unknown=$_json}" else -> throw IllegalStateException("Invalid Action") } @@ -438,8 +438,8 @@ private constructor( /** Action type "open_page" - Opens a specific URL from search results. */ @JvmStatic fun ofOpenPage(openPage: OpenPage) = Action(openPage = openPage) - /** Action type "find": Searches for a pattern within a loaded page. */ - @JvmStatic fun ofFind(find: Find) = Action(find = find) + /** Action type "find_in_page": Searches for a pattern within a loaded page. */ + @JvmStatic fun ofFindInPage(findInPage: FindInPage) = Action(findInPage = findInPage) } /** An interface that defines how to map each variant of [Action] to a value of type [T]. */ @@ -451,8 +451,8 @@ private constructor( /** Action type "open_page" - Opens a specific URL from search results. */ fun visitOpenPage(openPage: OpenPage): T - /** Action type "find": Searches for a pattern within a loaded page. */ - fun visitFind(find: Find): T + /** Action type "find_in_page": Searches for a pattern within a loaded page. */ + fun visitFindInPage(findInPage: FindInPage): T /** * Maps an unknown variant of [Action] to a value of type [T]. @@ -486,9 +486,9 @@ private constructor( Action(openPage = it, _json = json) } ?: Action(_json = json) } - "find" -> { - return tryDeserialize(node, jacksonTypeRef())?.let { - Action(find = it, _json = json) + "find_in_page" -> { + return tryDeserialize(node, jacksonTypeRef())?.let { + Action(findInPage = it, _json = json) } ?: Action(_json = json) } } @@ -507,7 +507,7 @@ private constructor( when { value.search != null -> generator.writeObject(value.search) value.openPage != null -> generator.writeObject(value.openPage) - value.find != null -> generator.writeObject(value.find) + value.findInPage != null -> generator.writeObject(value.findInPage) value._json != null -> generator.writeObject(value._json) else -> throw IllegalStateException("Invalid Action") } @@ -1216,8 +1216,8 @@ private constructor( "OpenPage{type=$type, url=$url, additionalProperties=$additionalProperties}" } - /** Action type "find": Searches for a pattern within a loaded page. */ - class Find + /** Action type "find_in_page": Searches for a pattern within a loaded page. */ + class FindInPage @JsonCreator(mode = JsonCreator.Mode.DISABLED) private constructor( private val pattern: JsonField, @@ -1249,7 +1249,7 @@ private constructor( * * Expected to always return the following: * ```java - * JsonValue.from("find") + * JsonValue.from("find_in_page") * ``` * * However, this method can be useful for debugging and logging (e.g. if the server @@ -1295,7 +1295,7 @@ private constructor( companion object { /** - * Returns a mutable builder for constructing an instance of [Find]. + * Returns a mutable builder for constructing an instance of [FindInPage]. * * The following fields are required: * ```java @@ -1306,20 +1306,20 @@ private constructor( @JvmStatic fun builder() = Builder() } - /** A builder for [Find]. */ + /** A builder for [FindInPage]. */ class Builder internal constructor() { private var pattern: JsonField? = null - private var type: JsonValue = JsonValue.from("find") + private var type: JsonValue = JsonValue.from("find_in_page") private var url: JsonField? = null private var additionalProperties: MutableMap = mutableMapOf() @JvmSynthetic - internal fun from(find: Find) = apply { - pattern = find.pattern - type = find.type - url = find.url - additionalProperties = find.additionalProperties.toMutableMap() + internal fun from(findInPage: FindInPage) = apply { + pattern = findInPage.pattern + type = findInPage.type + url = findInPage.url + additionalProperties = findInPage.additionalProperties.toMutableMap() } /** The pattern or text to search for within the page. */ @@ -1340,7 +1340,7 @@ private constructor( * It is usually unnecessary to call this method because the field defaults to the * following: * ```java - * JsonValue.from("find") + * JsonValue.from("find_in_page") * ``` * * This method is primarily for setting the field to an undocumented or not yet @@ -1383,7 +1383,7 @@ private constructor( } /** - * Returns an immutable instance of [Find]. + * Returns an immutable instance of [FindInPage]. * * Further updates to this [Builder] will not mutate the returned instance. * @@ -1395,8 +1395,8 @@ private constructor( * * @throws IllegalStateException if any required field is unset. */ - fun build(): Find = - Find( + fun build(): FindInPage = + FindInPage( checkRequired("pattern", pattern), type, checkRequired("url", url), @@ -1406,14 +1406,14 @@ private constructor( private var validated: Boolean = false - fun validate(): Find = apply { + fun validate(): FindInPage = apply { if (validated) { return@apply } pattern() _type().let { - if (it != JsonValue.from("find")) { + if (it != JsonValue.from("find_in_page")) { throw OpenAIInvalidDataException("'type' is invalid, received $it") } } @@ -1438,7 +1438,7 @@ private constructor( @JvmSynthetic internal fun validity(): Int = (if (pattern.asKnown().isPresent) 1 else 0) + - type.let { if (it == JsonValue.from("find")) 1 else 0 } + + type.let { if (it == JsonValue.from("find_in_page")) 1 else 0 } + (if (url.asKnown().isPresent) 1 else 0) override fun equals(other: Any?): Boolean { @@ -1446,7 +1446,7 @@ private constructor( return true } - return other is Find && + return other is FindInPage && pattern == other.pattern && type == other.type && url == other.url && @@ -1460,7 +1460,7 @@ private constructor( override fun hashCode(): Int = hashCode override fun toString() = - "Find{pattern=$pattern, type=$type, url=$url, additionalProperties=$additionalProperties}" + "FindInPage{pattern=$pattern, type=$type, url=$url, additionalProperties=$additionalProperties}" } } From f03f42499c804907edc3807b87320cff4121b3c6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 3 Feb 2026 04:21:29 +0000 Subject: [PATCH 4/7] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 766c6aef..77f12316 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 136 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-64c3a646eb5dcad2b7ff7bd976c0e312b886676a542f6ffcd9a6c8503ae24c58.yml openapi_spec_hash: 91b1b7bf3c1a6b6c9c7507d4cac8fe2a -config_hash: f8e6baff429cf000b8e4ba1da08dff47 +config_hash: 3e6ddffe104c0689cd9ef9a7a7863225 From 950f103bb8a7ce4e906e0e03ed7b4c70bdb551af Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 3 Feb 2026 15:30:02 +0000 Subject: [PATCH 5/7] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 77f12316..766c6aef 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 136 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-64c3a646eb5dcad2b7ff7bd976c0e312b886676a542f6ffcd9a6c8503ae24c58.yml openapi_spec_hash: 91b1b7bf3c1a6b6c9c7507d4cac8fe2a -config_hash: 3e6ddffe104c0689cd9ef9a7a7863225 +config_hash: f8e6baff429cf000b8e4ba1da08dff47 From 7b2ebe54b58b97fbc9ad1bba5cb54cb346606483 Mon Sep 17 00:00:00 2001 From: David Meadows Date: Tue, 3 Feb 2026 10:43:12 -0500 Subject: [PATCH 6/7] fix(client): undo change to web search Find action --- .../responses/ResponseFunctionWebSearch.kt | 44 +++++++++---------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseFunctionWebSearch.kt b/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseFunctionWebSearch.kt index 725915aa..e5f8a66d 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseFunctionWebSearch.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseFunctionWebSearch.kt @@ -198,8 +198,8 @@ private constructor( /** Alias for calling [action] with `Action.ofOpenPage(openPage)`. */ fun action(openPage: Action.OpenPage) = action(Action.ofOpenPage(openPage)) - /** Alias for calling [action] with `Action.ofFindInPage(findInPage)`. */ - fun action(findInPage: Action.FindInPage) = action(Action.ofFindInPage(findInPage)) + /** Alias for calling [action] with `Action.ofFind(findInPage)`. */ + fun action(findInPage: Action.Find) = action(Action.ofFind(findInPage)) /** The status of the web search tool call. */ fun status(status: Status) = status(JsonField.of(status)) @@ -317,7 +317,7 @@ private constructor( private constructor( private val search: Search? = null, private val openPage: OpenPage? = null, - private val findInPage: FindInPage? = null, + private val findInPage: Find? = null, private val _json: JsonValue? = null, ) { @@ -328,13 +328,13 @@ private constructor( fun openPage(): Optional = Optional.ofNullable(openPage) /** Action type "find_in_page": Searches for a pattern within a loaded page. */ - fun findInPage(): Optional = Optional.ofNullable(findInPage) + fun findInPage(): Optional = Optional.ofNullable(findInPage) fun isSearch(): Boolean = search != null fun isOpenPage(): Boolean = openPage != null - fun isFindInPage(): Boolean = findInPage != null + fun isFind(): Boolean = findInPage != null /** Action type "search" - Performs a web search query. */ fun asSearch(): Search = search.getOrThrow("search") @@ -343,7 +343,7 @@ private constructor( fun asOpenPage(): OpenPage = openPage.getOrThrow("openPage") /** Action type "find_in_page": Searches for a pattern within a loaded page. */ - fun asFindInPage(): FindInPage = findInPage.getOrThrow("findInPage") + fun asFind(): Find = findInPage.getOrThrow("findInPage") fun _json(): Optional = Optional.ofNullable(_json) @@ -351,7 +351,7 @@ private constructor( when { search != null -> visitor.visitSearch(search) openPage != null -> visitor.visitOpenPage(openPage) - findInPage != null -> visitor.visitFindInPage(findInPage) + findInPage != null -> visitor.visitFind(findInPage) else -> visitor.unknown(_json) } @@ -372,7 +372,7 @@ private constructor( openPage.validate() } - override fun visitFindInPage(findInPage: FindInPage) { + override fun visitFind(findInPage: Find) { findInPage.validate() } } @@ -402,7 +402,7 @@ private constructor( override fun visitOpenPage(openPage: OpenPage) = openPage.validity() - override fun visitFindInPage(findInPage: FindInPage) = findInPage.validity() + override fun visitFind(findInPage: Find) = findInPage.validity() override fun unknown(json: JsonValue?) = 0 } @@ -439,7 +439,7 @@ private constructor( @JvmStatic fun ofOpenPage(openPage: OpenPage) = Action(openPage = openPage) /** Action type "find_in_page": Searches for a pattern within a loaded page. */ - @JvmStatic fun ofFindInPage(findInPage: FindInPage) = Action(findInPage = findInPage) + @JvmStatic fun ofFind(findInPage: Find) = Action(findInPage = findInPage) } /** An interface that defines how to map each variant of [Action] to a value of type [T]. */ @@ -452,7 +452,7 @@ private constructor( fun visitOpenPage(openPage: OpenPage): T /** Action type "find_in_page": Searches for a pattern within a loaded page. */ - fun visitFindInPage(findInPage: FindInPage): T + fun visitFind(findInPage: Find): T /** * Maps an unknown variant of [Action] to a value of type [T]. @@ -487,7 +487,7 @@ private constructor( } ?: Action(_json = json) } "find_in_page" -> { - return tryDeserialize(node, jacksonTypeRef())?.let { + return tryDeserialize(node, jacksonTypeRef())?.let { Action(findInPage = it, _json = json) } ?: Action(_json = json) } @@ -1217,7 +1217,7 @@ private constructor( } /** Action type "find_in_page": Searches for a pattern within a loaded page. */ - class FindInPage + class Find @JsonCreator(mode = JsonCreator.Mode.DISABLED) private constructor( private val pattern: JsonField, @@ -1295,7 +1295,7 @@ private constructor( companion object { /** - * Returns a mutable builder for constructing an instance of [FindInPage]. + * Returns a mutable builder for constructing an instance of [Find]. * * The following fields are required: * ```java @@ -1306,7 +1306,7 @@ private constructor( @JvmStatic fun builder() = Builder() } - /** A builder for [FindInPage]. */ + /** A builder for [Find]. */ class Builder internal constructor() { private var pattern: JsonField? = null @@ -1315,7 +1315,7 @@ private constructor( private var additionalProperties: MutableMap = mutableMapOf() @JvmSynthetic - internal fun from(findInPage: FindInPage) = apply { + internal fun from(findInPage: Find) = apply { pattern = findInPage.pattern type = findInPage.type url = findInPage.url @@ -1383,7 +1383,7 @@ private constructor( } /** - * Returns an immutable instance of [FindInPage]. + * Returns an immutable instance of [Find]. * * Further updates to this [Builder] will not mutate the returned instance. * @@ -1395,8 +1395,8 @@ private constructor( * * @throws IllegalStateException if any required field is unset. */ - fun build(): FindInPage = - FindInPage( + fun build(): Find = + Find( checkRequired("pattern", pattern), type, checkRequired("url", url), @@ -1406,7 +1406,7 @@ private constructor( private var validated: Boolean = false - fun validate(): FindInPage = apply { + fun validate(): Find = apply { if (validated) { return@apply } @@ -1446,7 +1446,7 @@ private constructor( return true } - return other is FindInPage && + return other is Find && pattern == other.pattern && type == other.type && url == other.url && @@ -1460,7 +1460,7 @@ private constructor( override fun hashCode(): Int = hashCode override fun toString() = - "FindInPage{pattern=$pattern, type=$type, url=$url, additionalProperties=$additionalProperties}" + "Find{pattern=$pattern, type=$type, url=$url, additionalProperties=$additionalProperties}" } } From 40e66d5255a084a0f53580ef85ea139abcae778f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 4 Feb 2026 05:22:01 +0000 Subject: [PATCH 7/7] release: 4.18.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 19 +++++++++++++++++++ README.md | 14 +++++++------- build.gradle.kts | 2 +- 4 files changed, 28 insertions(+), 9 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 9e5024f2..052d78b7 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "4.17.0" + ".": "4.18.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 5f6ac49b..68a88259 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,24 @@ # Changelog +## 4.18.0 (2026-02-04) + +Full Changelog: [v4.17.0...v4.18.0](https://github.com/openai/openai-java/compare/v4.17.0...v4.18.0) + +### Features + +* **api:** image generation actions for responses; ResponseFunctionCallArgumentsDoneEvent.name ([a0cc1d8](https://github.com/openai/openai-java/commit/a0cc1d81ca67e8618f51df4359b2877d27cba572)) + + +### Bug Fixes + +* **client:** undo change to web search Find action ([7b2ebe5](https://github.com/openai/openai-java/commit/7b2ebe54b58b97fbc9ad1bba5cb54cb346606483)) +* **client:** update type for `find_in_page` action ([2cde783](https://github.com/openai/openai-java/commit/2cde783b5d33d7498548074ad45ee04d4d9d7c05)) + + +### Chores + +* **internal:** allow passing args to `./scripts/test` ([ce2c0ed](https://github.com/openai/openai-java/commit/ce2c0edb51c10779f3c7bb68aef8666057d4e400)) + ## 4.17.0 (2026-01-30) Full Changelog: [v4.16.1...v4.17.0](https://github.com/openai/openai-java/compare/v4.16.1...v4.17.0) diff --git a/README.md b/README.md index 68a7d13a..be008a1e 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,8 @@ -[![Maven Central](https://img.shields.io/maven-central/v/com.openai/openai-java)](https://central.sonatype.com/artifact/com.openai/openai-java/4.17.0) -[![javadoc](https://javadoc.io/badge2/com.openai/openai-java/4.17.0/javadoc.svg)](https://javadoc.io/doc/com.openai/openai-java/4.17.0) +[![Maven Central](https://img.shields.io/maven-central/v/com.openai/openai-java)](https://central.sonatype.com/artifact/com.openai/openai-java/4.18.0) +[![javadoc](https://javadoc.io/badge2/com.openai/openai-java/4.18.0/javadoc.svg)](https://javadoc.io/doc/com.openai/openai-java/4.18.0) @@ -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/4.17.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/4.18.0). @@ -24,7 +24,7 @@ The REST API documentation can be found on [platform.openai.com](https://platfor ### Gradle ```kotlin -implementation("com.openai:openai-java:4.17.0") +implementation("com.openai:openai-java:4.18.0") ``` ### Maven @@ -33,7 +33,7 @@ implementation("com.openai:openai-java:4.17.0") com.openai openai-java - 4.17.0 + 4.18.0 ``` @@ -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:4.17.0") +implementation("com.openai:openai-java-spring-boot-starter:4.18.0") ``` #### Maven @@ -1351,7 +1351,7 @@ implementation("com.openai:openai-java-spring-boot-starter:4.17.0") com.openai openai-java-spring-boot-starter - 4.17.0 + 4.18.0 ``` diff --git a/build.gradle.kts b/build.gradle.kts index e9669d37..bbfa8a07 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -8,7 +8,7 @@ repositories { allprojects { group = "com.openai" - version = "4.17.0" // x-release-please-version + version = "4.18.0" // x-release-please-version } subprojects {