@@ -23,8 +23,8 @@ import kotlin.jvm.optionals.getOrNull
2323 */
2424class ComputerTool
2525private constructor (
26- private val displayHeight: JsonField <Double >,
27- private val displayWidth: JsonField <Double >,
26+ private val displayHeight: JsonField <Long >,
27+ private val displayWidth: JsonField <Long >,
2828 private val environment: JsonField <Environment >,
2929 private val type: JsonValue ,
3030 private val additionalProperties: MutableMap <String , JsonValue >,
@@ -34,10 +34,10 @@ private constructor(
3434 private constructor (
3535 @JsonProperty(" display_height" )
3636 @ExcludeMissing
37- displayHeight: JsonField <Double > = JsonMissing .of(),
37+ displayHeight: JsonField <Long > = JsonMissing .of(),
3838 @JsonProperty(" display_width" )
3939 @ExcludeMissing
40- displayWidth: JsonField <Double > = JsonMissing .of(),
40+ displayWidth: JsonField <Long > = JsonMissing .of(),
4141 @JsonProperty(" environment" )
4242 @ExcludeMissing
4343 environment: JsonField <Environment > = JsonMissing .of(),
@@ -50,15 +50,15 @@ private constructor(
5050 * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is
5151 * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
5252 */
53- fun displayHeight (): Double = displayHeight.getRequired(" display_height" )
53+ fun displayHeight (): Long = displayHeight.getRequired(" display_height" )
5454
5555 /* *
5656 * The width of the computer display.
5757 *
5858 * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is
5959 * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
6060 */
61- fun displayWidth (): Double = displayWidth.getRequired(" display_width" )
61+ fun displayWidth (): Long = displayWidth.getRequired(" display_width" )
6262
6363 /* *
6464 * The type of computer environment to control.
@@ -88,7 +88,7 @@ private constructor(
8888 */
8989 @JsonProperty(" display_height" )
9090 @ExcludeMissing
91- fun _displayHeight (): JsonField <Double > = displayHeight
91+ fun _displayHeight (): JsonField <Long > = displayHeight
9292
9393 /* *
9494 * Returns the raw JSON value of [displayWidth].
@@ -97,7 +97,7 @@ private constructor(
9797 */
9898 @JsonProperty(" display_width" )
9999 @ExcludeMissing
100- fun _displayWidth (): JsonField <Double > = displayWidth
100+ fun _displayWidth (): JsonField <Long > = displayWidth
101101
102102 /* *
103103 * Returns the raw JSON value of [environment].
@@ -138,8 +138,8 @@ private constructor(
138138 /* * A builder for [ComputerTool]. */
139139 class Builder internal constructor() {
140140
141- private var displayHeight: JsonField <Double >? = null
142- private var displayWidth: JsonField <Double >? = null
141+ private var displayHeight: JsonField <Long >? = null
142+ private var displayWidth: JsonField <Long >? = null
143143 private var environment: JsonField <Environment >? = null
144144 private var type: JsonValue = JsonValue .from(" computer_use_preview" )
145145 private var additionalProperties: MutableMap <String , JsonValue > = mutableMapOf ()
@@ -154,32 +154,30 @@ private constructor(
154154 }
155155
156156 /* * The height of the computer display. */
157- fun displayHeight (displayHeight : Double ) = displayHeight(JsonField .of(displayHeight))
157+ fun displayHeight (displayHeight : Long ) = displayHeight(JsonField .of(displayHeight))
158158
159159 /* *
160160 * Sets [Builder.displayHeight] to an arbitrary JSON value.
161161 *
162- * You should usually call [Builder.displayHeight] with a well-typed [Double ] value instead.
162+ * You should usually call [Builder.displayHeight] with a well-typed [Long ] value instead.
163163 * This method is primarily for setting the field to an undocumented or not yet supported
164164 * value.
165165 */
166- fun displayHeight (displayHeight : JsonField <Double >) = apply {
166+ fun displayHeight (displayHeight : JsonField <Long >) = apply {
167167 this .displayHeight = displayHeight
168168 }
169169
170170 /* * The width of the computer display. */
171- fun displayWidth (displayWidth : Double ) = displayWidth(JsonField .of(displayWidth))
171+ fun displayWidth (displayWidth : Long ) = displayWidth(JsonField .of(displayWidth))
172172
173173 /* *
174174 * Sets [Builder.displayWidth] to an arbitrary JSON value.
175175 *
176- * You should usually call [Builder.displayWidth] with a well-typed [Double ] value instead.
176+ * You should usually call [Builder.displayWidth] with a well-typed [Long ] value instead.
177177 * This method is primarily for setting the field to an undocumented or not yet supported
178178 * value.
179179 */
180- fun displayWidth (displayWidth : JsonField <Double >) = apply {
181- this .displayWidth = displayWidth
182- }
180+ fun displayWidth (displayWidth : JsonField <Long >) = apply { this .displayWidth = displayWidth }
183181
184182 /* * The type of computer environment to control. */
185183 fun environment (environment : Environment ) = environment(JsonField .of(environment))
@@ -306,9 +304,11 @@ private constructor(
306304
307305 companion object {
308306
307+ @JvmField val WINDOWS = of(" windows" )
308+
309309 @JvmField val MAC = of(" mac" )
310310
311- @JvmField val WINDOWS = of(" windows " )
311+ @JvmField val LINUX = of(" linux " )
312312
313313 @JvmField val UBUNTU = of(" ubuntu" )
314314
@@ -319,8 +319,9 @@ private constructor(
319319
320320 /* * An enum containing [Environment]'s known values. */
321321 enum class Known {
322- MAC ,
323322 WINDOWS ,
323+ MAC ,
324+ LINUX ,
324325 UBUNTU ,
325326 BROWSER ,
326327 }
@@ -335,8 +336,9 @@ private constructor(
335336 * - It was constructed with an arbitrary value using the [of] method.
336337 */
337338 enum class Value {
338- MAC ,
339339 WINDOWS ,
340+ MAC ,
341+ LINUX ,
340342 UBUNTU ,
341343 BROWSER ,
342344 /* *
@@ -354,8 +356,9 @@ private constructor(
354356 */
355357 fun value (): Value =
356358 when (this ) {
357- MAC -> Value .MAC
358359 WINDOWS -> Value .WINDOWS
360+ MAC -> Value .MAC
361+ LINUX -> Value .LINUX
359362 UBUNTU -> Value .UBUNTU
360363 BROWSER -> Value .BROWSER
361364 else -> Value ._UNKNOWN
@@ -372,8 +375,9 @@ private constructor(
372375 */
373376 fun known (): Known =
374377 when (this ) {
375- MAC -> Known .MAC
376378 WINDOWS -> Known .WINDOWS
379+ MAC -> Known .MAC
380+ LINUX -> Known .LINUX
377381 UBUNTU -> Known .UBUNTU
378382 BROWSER -> Known .BROWSER
379383 else -> throw OpenAIInvalidDataException (" Unknown Environment: $value " )
0 commit comments