@@ -23,8 +23,8 @@ import kotlin.jvm.optionals.getOrNull
23
23
*/
24
24
class ComputerTool
25
25
private 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 >,
28
28
private val environment: JsonField <Environment >,
29
29
private val type: JsonValue ,
30
30
private val additionalProperties: MutableMap <String , JsonValue >,
@@ -34,10 +34,10 @@ private constructor(
34
34
private constructor (
35
35
@JsonProperty(" display_height" )
36
36
@ExcludeMissing
37
- displayHeight: JsonField <Double > = JsonMissing .of(),
37
+ displayHeight: JsonField <Long > = JsonMissing .of(),
38
38
@JsonProperty(" display_width" )
39
39
@ExcludeMissing
40
- displayWidth: JsonField <Double > = JsonMissing .of(),
40
+ displayWidth: JsonField <Long > = JsonMissing .of(),
41
41
@JsonProperty(" environment" )
42
42
@ExcludeMissing
43
43
environment: JsonField <Environment > = JsonMissing .of(),
@@ -50,15 +50,15 @@ private constructor(
50
50
* @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is
51
51
* unexpectedly missing or null (e.g. if the server responded with an unexpected value).
52
52
*/
53
- fun displayHeight (): Double = displayHeight.getRequired(" display_height" )
53
+ fun displayHeight (): Long = displayHeight.getRequired(" display_height" )
54
54
55
55
/* *
56
56
* The width of the computer display.
57
57
*
58
58
* @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is
59
59
* unexpectedly missing or null (e.g. if the server responded with an unexpected value).
60
60
*/
61
- fun displayWidth (): Double = displayWidth.getRequired(" display_width" )
61
+ fun displayWidth (): Long = displayWidth.getRequired(" display_width" )
62
62
63
63
/* *
64
64
* The type of computer environment to control.
@@ -88,7 +88,7 @@ private constructor(
88
88
*/
89
89
@JsonProperty(" display_height" )
90
90
@ExcludeMissing
91
- fun _displayHeight (): JsonField <Double > = displayHeight
91
+ fun _displayHeight (): JsonField <Long > = displayHeight
92
92
93
93
/* *
94
94
* Returns the raw JSON value of [displayWidth].
@@ -97,7 +97,7 @@ private constructor(
97
97
*/
98
98
@JsonProperty(" display_width" )
99
99
@ExcludeMissing
100
- fun _displayWidth (): JsonField <Double > = displayWidth
100
+ fun _displayWidth (): JsonField <Long > = displayWidth
101
101
102
102
/* *
103
103
* Returns the raw JSON value of [environment].
@@ -138,8 +138,8 @@ private constructor(
138
138
/* * A builder for [ComputerTool]. */
139
139
class Builder internal constructor() {
140
140
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
143
143
private var environment: JsonField <Environment >? = null
144
144
private var type: JsonValue = JsonValue .from(" computer_use_preview" )
145
145
private var additionalProperties: MutableMap <String , JsonValue > = mutableMapOf ()
@@ -154,32 +154,30 @@ private constructor(
154
154
}
155
155
156
156
/* * The height of the computer display. */
157
- fun displayHeight (displayHeight : Double ) = displayHeight(JsonField .of(displayHeight))
157
+ fun displayHeight (displayHeight : Long ) = displayHeight(JsonField .of(displayHeight))
158
158
159
159
/* *
160
160
* Sets [Builder.displayHeight] to an arbitrary JSON value.
161
161
*
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.
163
163
* This method is primarily for setting the field to an undocumented or not yet supported
164
164
* value.
165
165
*/
166
- fun displayHeight (displayHeight : JsonField <Double >) = apply {
166
+ fun displayHeight (displayHeight : JsonField <Long >) = apply {
167
167
this .displayHeight = displayHeight
168
168
}
169
169
170
170
/* * The width of the computer display. */
171
- fun displayWidth (displayWidth : Double ) = displayWidth(JsonField .of(displayWidth))
171
+ fun displayWidth (displayWidth : Long ) = displayWidth(JsonField .of(displayWidth))
172
172
173
173
/* *
174
174
* Sets [Builder.displayWidth] to an arbitrary JSON value.
175
175
*
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.
177
177
* This method is primarily for setting the field to an undocumented or not yet supported
178
178
* value.
179
179
*/
180
- fun displayWidth (displayWidth : JsonField <Double >) = apply {
181
- this .displayWidth = displayWidth
182
- }
180
+ fun displayWidth (displayWidth : JsonField <Long >) = apply { this .displayWidth = displayWidth }
183
181
184
182
/* * The type of computer environment to control. */
185
183
fun environment (environment : Environment ) = environment(JsonField .of(environment))
@@ -306,9 +304,11 @@ private constructor(
306
304
307
305
companion object {
308
306
307
+ @JvmField val WINDOWS = of(" windows" )
308
+
309
309
@JvmField val MAC = of(" mac" )
310
310
311
- @JvmField val WINDOWS = of(" windows " )
311
+ @JvmField val LINUX = of(" linux " )
312
312
313
313
@JvmField val UBUNTU = of(" ubuntu" )
314
314
@@ -319,8 +319,9 @@ private constructor(
319
319
320
320
/* * An enum containing [Environment]'s known values. */
321
321
enum class Known {
322
- MAC ,
323
322
WINDOWS ,
323
+ MAC ,
324
+ LINUX ,
324
325
UBUNTU ,
325
326
BROWSER ,
326
327
}
@@ -335,8 +336,9 @@ private constructor(
335
336
* - It was constructed with an arbitrary value using the [of] method.
336
337
*/
337
338
enum class Value {
338
- MAC ,
339
339
WINDOWS ,
340
+ MAC ,
341
+ LINUX ,
340
342
UBUNTU ,
341
343
BROWSER ,
342
344
/* *
@@ -354,8 +356,9 @@ private constructor(
354
356
*/
355
357
fun value (): Value =
356
358
when (this ) {
357
- MAC -> Value .MAC
358
359
WINDOWS -> Value .WINDOWS
360
+ MAC -> Value .MAC
361
+ LINUX -> Value .LINUX
359
362
UBUNTU -> Value .UBUNTU
360
363
BROWSER -> Value .BROWSER
361
364
else -> Value ._UNKNOWN
@@ -372,8 +375,9 @@ private constructor(
372
375
*/
373
376
fun known (): Known =
374
377
when (this ) {
375
- MAC -> Known .MAC
376
378
WINDOWS -> Known .WINDOWS
379
+ MAC -> Known .MAC
380
+ LINUX -> Known .LINUX
377
381
UBUNTU -> Known .UBUNTU
378
382
BROWSER -> Known .BROWSER
379
383
else -> throw OpenAIInvalidDataException (" Unknown Environment: $value " )
0 commit comments