Skip to content

Commit ddc98f3

Browse files
feat(api): add keys field to computer action types
1 parent 5e225e8 commit ddc98f3

7 files changed

Lines changed: 340 additions & 56 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 151
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-0fea07225431c8d0cf5fc1a70c9363a91d259f7a169f410717e162de1b24e489.yml
3-
openapi_spec_hash: 41b34c1678ec0e95daf62ca4cd52c8f8
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-13599f99dceef322e19171dcc63d90f638d225a445999442249e1ed7a4924c43.yml
3+
openapi_spec_hash: aac8cf8ec3c7dc6d14ecf5dbb289ee7c
44
config_hash: 96fbf82cf74a44ccd513f5acf0956ffd

lib/openai/models/responses/computer_action.rb

Lines changed: 45 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,13 @@ class Click < OpenAI::Internal::Type::BaseModel
6262
# @return [Integer]
6363
required :y_, Integer, api_name: :y
6464

65-
# @!method initialize(button:, x:, y_:, type: :click)
65+
# @!attribute keys
66+
# The keys being held while clicking.
67+
#
68+
# @return [Array<String>, nil]
69+
optional :keys, OpenAI::Internal::Type::ArrayOf[String], nil?: true
70+
71+
# @!method initialize(button:, x:, y_:, keys: nil, type: :click)
6672
# Some parameter documentations has been truncated, see
6773
# {OpenAI::Models::Responses::ComputerAction::Click} for more details.
6874
#
@@ -74,6 +80,8 @@ class Click < OpenAI::Internal::Type::BaseModel
7480
#
7581
# @param y_ [Integer] The y-coordinate where the click occurred.
7682
#
83+
# @param keys [Array<String>, nil] The keys being held while clicking.
84+
#
7785
# @param type [Symbol, :click] Specifies the event type. For a click action, this property is always `click`.
7886

7987
# Indicates which mouse button was pressed during the click. One of `left`,
@@ -95,6 +103,12 @@ module Button
95103
end
96104

97105
class DoubleClick < OpenAI::Internal::Type::BaseModel
106+
# @!attribute keys
107+
# The keys being held while double-clicking.
108+
#
109+
# @return [Array<String>, nil]
110+
required :keys, OpenAI::Internal::Type::ArrayOf[String], nil?: true
111+
98112
# @!attribute type
99113
# Specifies the event type. For a double click action, this property is always set
100114
# to `double_click`.
@@ -114,12 +128,14 @@ class DoubleClick < OpenAI::Internal::Type::BaseModel
114128
# @return [Integer]
115129
required :y_, Integer, api_name: :y
116130

117-
# @!method initialize(x:, y_:, type: :double_click)
131+
# @!method initialize(keys:, x:, y_:, type: :double_click)
118132
# Some parameter documentations has been truncated, see
119133
# {OpenAI::Models::Responses::ComputerAction::DoubleClick} for more details.
120134
#
121135
# A double click action.
122136
#
137+
# @param keys [Array<String>, nil] The keys being held while double-clicking.
138+
#
123139
# @param x [Integer] The x-coordinate where the double click occurred.
124140
#
125141
# @param y_ [Integer] The y-coordinate where the double click occurred.
@@ -149,14 +165,22 @@ class Drag < OpenAI::Internal::Type::BaseModel
149165
# @return [Symbol, :drag]
150166
required :type, const: :drag
151167

152-
# @!method initialize(path:, type: :drag)
168+
# @!attribute keys
169+
# The keys being held while dragging the mouse.
170+
#
171+
# @return [Array<String>, nil]
172+
optional :keys, OpenAI::Internal::Type::ArrayOf[String], nil?: true
173+
174+
# @!method initialize(path:, keys: nil, type: :drag)
153175
# Some parameter documentations has been truncated, see
154176
# {OpenAI::Models::Responses::ComputerAction::Drag} for more details.
155177
#
156178
# A drag action.
157179
#
158180
# @param path [Array<OpenAI::Models::Responses::ComputerAction::Drag::Path>] An array of coordinates representing the path of the drag action. Coordinates wi
159181
#
182+
# @param keys [Array<String>, nil] The keys being held while dragging the mouse.
183+
#
160184
# @param type [Symbol, :drag] Specifies the event type. For a drag action, this property is always set to `dra
161185

162186
class Path < OpenAI::Internal::Type::BaseModel
@@ -227,7 +251,13 @@ class Move < OpenAI::Internal::Type::BaseModel
227251
# @return [Integer]
228252
required :y_, Integer, api_name: :y
229253

230-
# @!method initialize(x:, y_:, type: :move)
254+
# @!attribute keys
255+
# The keys being held while moving the mouse.
256+
#
257+
# @return [Array<String>, nil]
258+
optional :keys, OpenAI::Internal::Type::ArrayOf[String], nil?: true
259+
260+
# @!method initialize(x:, y_:, keys: nil, type: :move)
231261
# Some parameter documentations has been truncated, see
232262
# {OpenAI::Models::Responses::ComputerAction::Move} for more details.
233263
#
@@ -237,6 +267,8 @@ class Move < OpenAI::Internal::Type::BaseModel
237267
#
238268
# @param y_ [Integer] The y-coordinate to move to.
239269
#
270+
# @param keys [Array<String>, nil] The keys being held while moving the mouse.
271+
#
240272
# @param type [Symbol, :move] Specifies the event type. For a move action, this property is always set to `mov
241273
end
242274

@@ -289,7 +321,13 @@ class Scroll < OpenAI::Internal::Type::BaseModel
289321
# @return [Integer]
290322
required :y_, Integer, api_name: :y
291323

292-
# @!method initialize(scroll_x:, scroll_y:, x:, y_:, type: :scroll)
324+
# @!attribute keys
325+
# The keys being held while scrolling.
326+
#
327+
# @return [Array<String>, nil]
328+
optional :keys, OpenAI::Internal::Type::ArrayOf[String], nil?: true
329+
330+
# @!method initialize(scroll_x:, scroll_y:, x:, y_:, keys: nil, type: :scroll)
293331
# Some parameter documentations has been truncated, see
294332
# {OpenAI::Models::Responses::ComputerAction::Scroll} for more details.
295333
#
@@ -303,6 +341,8 @@ class Scroll < OpenAI::Internal::Type::BaseModel
303341
#
304342
# @param y_ [Integer] The y-coordinate where the scroll occurred.
305343
#
344+
# @param keys [Array<String>, nil] The keys being held while scrolling.
345+
#
306346
# @param type [Symbol, :scroll] Specifies the event type. For a scroll action, this property is always set to `s
307347
end
308348

lib/openai/models/responses/response_computer_tool_call.rb

Lines changed: 45 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,13 @@ class Click < OpenAI::Internal::Type::BaseModel
188188
# @return [Integer]
189189
required :y_, Integer, api_name: :y
190190

191-
# @!method initialize(button:, x:, y_:, type: :click)
191+
# @!attribute keys
192+
# The keys being held while clicking.
193+
#
194+
# @return [Array<String>, nil]
195+
optional :keys, OpenAI::Internal::Type::ArrayOf[String], nil?: true
196+
197+
# @!method initialize(button:, x:, y_:, keys: nil, type: :click)
192198
# Some parameter documentations has been truncated, see
193199
# {OpenAI::Models::Responses::ResponseComputerToolCall::Action::Click} for more
194200
# details.
@@ -201,6 +207,8 @@ class Click < OpenAI::Internal::Type::BaseModel
201207
#
202208
# @param y_ [Integer] The y-coordinate where the click occurred.
203209
#
210+
# @param keys [Array<String>, nil] The keys being held while clicking.
211+
#
204212
# @param type [Symbol, :click] Specifies the event type. For a click action, this property is always `click`.
205213

206214
# Indicates which mouse button was pressed during the click. One of `left`,
@@ -222,6 +230,12 @@ module Button
222230
end
223231

224232
class DoubleClick < OpenAI::Internal::Type::BaseModel
233+
# @!attribute keys
234+
# The keys being held while double-clicking.
235+
#
236+
# @return [Array<String>, nil]
237+
required :keys, OpenAI::Internal::Type::ArrayOf[String], nil?: true
238+
225239
# @!attribute type
226240
# Specifies the event type. For a double click action, this property is always set
227241
# to `double_click`.
@@ -241,13 +255,15 @@ class DoubleClick < OpenAI::Internal::Type::BaseModel
241255
# @return [Integer]
242256
required :y_, Integer, api_name: :y
243257

244-
# @!method initialize(x:, y_:, type: :double_click)
258+
# @!method initialize(keys:, x:, y_:, type: :double_click)
245259
# Some parameter documentations has been truncated, see
246260
# {OpenAI::Models::Responses::ResponseComputerToolCall::Action::DoubleClick} for
247261
# more details.
248262
#
249263
# A double click action.
250264
#
265+
# @param keys [Array<String>, nil] The keys being held while double-clicking.
266+
#
251267
# @param x [Integer] The x-coordinate where the double click occurred.
252268
#
253269
# @param y_ [Integer] The y-coordinate where the double click occurred.
@@ -278,7 +294,13 @@ class Drag < OpenAI::Internal::Type::BaseModel
278294
# @return [Symbol, :drag]
279295
required :type, const: :drag
280296

281-
# @!method initialize(path:, type: :drag)
297+
# @!attribute keys
298+
# The keys being held while dragging the mouse.
299+
#
300+
# @return [Array<String>, nil]
301+
optional :keys, OpenAI::Internal::Type::ArrayOf[String], nil?: true
302+
303+
# @!method initialize(path:, keys: nil, type: :drag)
282304
# Some parameter documentations has been truncated, see
283305
# {OpenAI::Models::Responses::ResponseComputerToolCall::Action::Drag} for more
284306
# details.
@@ -287,6 +309,8 @@ class Drag < OpenAI::Internal::Type::BaseModel
287309
#
288310
# @param path [Array<OpenAI::Models::Responses::ResponseComputerToolCall::Action::Drag::Path>] An array of coordinates representing the path of the drag action. Coordinates wi
289311
#
312+
# @param keys [Array<String>, nil] The keys being held while dragging the mouse.
313+
#
290314
# @param type [Symbol, :drag] Specifies the event type. For a drag action, this property is always set to `dra
291315

292316
class Path < OpenAI::Internal::Type::BaseModel
@@ -358,7 +382,13 @@ class Move < OpenAI::Internal::Type::BaseModel
358382
# @return [Integer]
359383
required :y_, Integer, api_name: :y
360384

361-
# @!method initialize(x:, y_:, type: :move)
385+
# @!attribute keys
386+
# The keys being held while moving the mouse.
387+
#
388+
# @return [Array<String>, nil]
389+
optional :keys, OpenAI::Internal::Type::ArrayOf[String], nil?: true
390+
391+
# @!method initialize(x:, y_:, keys: nil, type: :move)
362392
# Some parameter documentations has been truncated, see
363393
# {OpenAI::Models::Responses::ResponseComputerToolCall::Action::Move} for more
364394
# details.
@@ -369,6 +399,8 @@ class Move < OpenAI::Internal::Type::BaseModel
369399
#
370400
# @param y_ [Integer] The y-coordinate to move to.
371401
#
402+
# @param keys [Array<String>, nil] The keys being held while moving the mouse.
403+
#
372404
# @param type [Symbol, :move] Specifies the event type. For a move action, this property is always set to `mov
373405
end
374406

@@ -422,7 +454,13 @@ class Scroll < OpenAI::Internal::Type::BaseModel
422454
# @return [Integer]
423455
required :y_, Integer, api_name: :y
424456

425-
# @!method initialize(scroll_x:, scroll_y:, x:, y_:, type: :scroll)
457+
# @!attribute keys
458+
# The keys being held while scrolling.
459+
#
460+
# @return [Array<String>, nil]
461+
optional :keys, OpenAI::Internal::Type::ArrayOf[String], nil?: true
462+
463+
# @!method initialize(scroll_x:, scroll_y:, x:, y_:, keys: nil, type: :scroll)
426464
# Some parameter documentations has been truncated, see
427465
# {OpenAI::Models::Responses::ResponseComputerToolCall::Action::Scroll} for more
428466
# details.
@@ -437,6 +475,8 @@ class Scroll < OpenAI::Internal::Type::BaseModel
437475
#
438476
# @param y_ [Integer] The y-coordinate where the scroll occurred.
439477
#
478+
# @param keys [Array<String>, nil] The keys being held while scrolling.
479+
#
440480
# @param type [Symbol, :scroll] Specifies the event type. For a scroll action, this property is always set to `s
441481
end
442482

0 commit comments

Comments
 (0)