Skip to content

Commit cd72fba

Browse files
feat(api): add keys field to Click/DoubleClick/Drag/Move/Scroll computer actions
1 parent 4f43fe3 commit cd72fba

6 files changed

Lines changed: 80 additions & 5 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: 152
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

src/openai/types/responses/computer_action.py

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

3-
from typing import List, Union
3+
from typing import List, Union, Optional
44
from typing_extensions import Literal, Annotated, TypeAlias
55

66
from ..._utils import PropertyInfo
@@ -39,10 +39,16 @@ class Click(BaseModel):
3939
y: int
4040
"""The y-coordinate where the click occurred."""
4141

42+
keys: Optional[List[str]] = None
43+
"""The keys being held while clicking."""
44+
4245

4346
class DoubleClick(BaseModel):
4447
"""A double click action."""
4548

49+
keys: Optional[List[str]] = None
50+
"""The keys being held while double-clicking."""
51+
4652
type: Literal["double_click"]
4753
"""Specifies the event type.
4854
@@ -88,6 +94,9 @@ class Drag(BaseModel):
8894
For a drag action, this property is always set to `drag`.
8995
"""
9096

97+
keys: Optional[List[str]] = None
98+
"""The keys being held while dragging the mouse."""
99+
91100

92101
class Keypress(BaseModel):
93102
"""A collection of keypresses the model would like to perform."""
@@ -120,6 +129,9 @@ class Move(BaseModel):
120129
y: int
121130
"""The y-coordinate to move to."""
122131

132+
keys: Optional[List[str]] = None
133+
"""The keys being held while moving the mouse."""
134+
123135

124136
class Screenshot(BaseModel):
125137
"""A screenshot action."""
@@ -152,6 +164,9 @@ class Scroll(BaseModel):
152164
y: int
153165
"""The y-coordinate where the scroll occurred."""
154166

167+
keys: Optional[List[str]] = None
168+
"""The keys being held while scrolling."""
169+
155170

156171
class Type(BaseModel):
157172
"""An action to type in text."""

src/openai/types/responses/computer_action_list_param.py

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from __future__ import annotations
44

5-
from typing import List, Union, Iterable
5+
from typing import List, Union, Iterable, Optional
66
from typing_extensions import Literal, Required, TypeAlias, TypedDict
77

88
from ..._types import SequenceNotStr
@@ -41,10 +41,16 @@ class Click(TypedDict, total=False):
4141
y: Required[int]
4242
"""The y-coordinate where the click occurred."""
4343

44+
keys: Optional[SequenceNotStr[str]]
45+
"""The keys being held while clicking."""
46+
4447

4548
class DoubleClick(TypedDict, total=False):
4649
"""A double click action."""
4750

51+
keys: Required[Optional[SequenceNotStr[str]]]
52+
"""The keys being held while double-clicking."""
53+
4854
type: Required[Literal["double_click"]]
4955
"""Specifies the event type.
5056
@@ -90,6 +96,9 @@ class Drag(TypedDict, total=False):
9096
For a drag action, this property is always set to `drag`.
9197
"""
9298

99+
keys: Optional[SequenceNotStr[str]]
100+
"""The keys being held while dragging the mouse."""
101+
93102

94103
class Keypress(TypedDict, total=False):
95104
"""A collection of keypresses the model would like to perform."""
@@ -122,6 +131,9 @@ class Move(TypedDict, total=False):
122131
y: Required[int]
123132
"""The y-coordinate to move to."""
124133

134+
keys: Optional[SequenceNotStr[str]]
135+
"""The keys being held while moving the mouse."""
136+
125137

126138
class Screenshot(TypedDict, total=False):
127139
"""A screenshot action."""
@@ -154,6 +166,9 @@ class Scroll(TypedDict, total=False):
154166
y: Required[int]
155167
"""The y-coordinate where the scroll occurred."""
156168

169+
keys: Optional[SequenceNotStr[str]]
170+
"""The keys being held while scrolling."""
171+
157172

158173
class Type(TypedDict, total=False):
159174
"""An action to type in text."""

src/openai/types/responses/computer_action_param.py

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from __future__ import annotations
44

5-
from typing import Union, Iterable
5+
from typing import Union, Iterable, Optional
66
from typing_extensions import Literal, Required, TypeAlias, TypedDict
77

88
from ..._types import SequenceNotStr
@@ -40,10 +40,16 @@ class Click(TypedDict, total=False):
4040
y: Required[int]
4141
"""The y-coordinate where the click occurred."""
4242

43+
keys: Optional[SequenceNotStr[str]]
44+
"""The keys being held while clicking."""
45+
4346

4447
class DoubleClick(TypedDict, total=False):
4548
"""A double click action."""
4649

50+
keys: Required[Optional[SequenceNotStr[str]]]
51+
"""The keys being held while double-clicking."""
52+
4753
type: Required[Literal["double_click"]]
4854
"""Specifies the event type.
4955
@@ -89,6 +95,9 @@ class Drag(TypedDict, total=False):
8995
For a drag action, this property is always set to `drag`.
9096
"""
9197

98+
keys: Optional[SequenceNotStr[str]]
99+
"""The keys being held while dragging the mouse."""
100+
92101

93102
class Keypress(TypedDict, total=False):
94103
"""A collection of keypresses the model would like to perform."""
@@ -121,6 +130,9 @@ class Move(TypedDict, total=False):
121130
y: Required[int]
122131
"""The y-coordinate to move to."""
123132

133+
keys: Optional[SequenceNotStr[str]]
134+
"""The keys being held while moving the mouse."""
135+
124136

125137
class Screenshot(TypedDict, total=False):
126138
"""A screenshot action."""
@@ -153,6 +165,9 @@ class Scroll(TypedDict, total=False):
153165
y: Required[int]
154166
"""The y-coordinate where the scroll occurred."""
155167

168+
keys: Optional[SequenceNotStr[str]]
169+
"""The keys being held while scrolling."""
170+
156171

157172
class Type(TypedDict, total=False):
158173
"""An action to type in text."""

src/openai/types/responses/response_computer_tool_call.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,16 @@ class ActionClick(BaseModel):
5555
y: int
5656
"""The y-coordinate where the click occurred."""
5757

58+
keys: Optional[List[str]] = None
59+
"""The keys being held while clicking."""
60+
5861

5962
class ActionDoubleClick(BaseModel):
6063
"""A double click action."""
6164

65+
keys: Optional[List[str]] = None
66+
"""The keys being held while double-clicking."""
67+
6268
type: Literal["double_click"]
6369
"""Specifies the event type.
6470
@@ -104,6 +110,9 @@ class ActionDrag(BaseModel):
104110
For a drag action, this property is always set to `drag`.
105111
"""
106112

113+
keys: Optional[List[str]] = None
114+
"""The keys being held while dragging the mouse."""
115+
107116

108117
class ActionKeypress(BaseModel):
109118
"""A collection of keypresses the model would like to perform."""
@@ -136,6 +145,9 @@ class ActionMove(BaseModel):
136145
y: int
137146
"""The y-coordinate to move to."""
138147

148+
keys: Optional[List[str]] = None
149+
"""The keys being held while moving the mouse."""
150+
139151

140152
class ActionScreenshot(BaseModel):
141153
"""A screenshot action."""
@@ -168,6 +180,9 @@ class ActionScroll(BaseModel):
168180
y: int
169181
"""The y-coordinate where the scroll occurred."""
170182

183+
keys: Optional[List[str]] = None
184+
"""The keys being held while scrolling."""
185+
171186

172187
class ActionType(BaseModel):
173188
"""An action to type in text."""

src/openai/types/responses/response_computer_tool_call_param.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,16 @@ class ActionClick(TypedDict, total=False):
5656
y: Required[int]
5757
"""The y-coordinate where the click occurred."""
5858

59+
keys: Optional[SequenceNotStr[str]]
60+
"""The keys being held while clicking."""
61+
5962

6063
class ActionDoubleClick(TypedDict, total=False):
6164
"""A double click action."""
6265

66+
keys: Required[Optional[SequenceNotStr[str]]]
67+
"""The keys being held while double-clicking."""
68+
6369
type: Required[Literal["double_click"]]
6470
"""Specifies the event type.
6571
@@ -105,6 +111,9 @@ class ActionDrag(TypedDict, total=False):
105111
For a drag action, this property is always set to `drag`.
106112
"""
107113

114+
keys: Optional[SequenceNotStr[str]]
115+
"""The keys being held while dragging the mouse."""
116+
108117

109118
class ActionKeypress(TypedDict, total=False):
110119
"""A collection of keypresses the model would like to perform."""
@@ -137,6 +146,9 @@ class ActionMove(TypedDict, total=False):
137146
y: Required[int]
138147
"""The y-coordinate to move to."""
139148

149+
keys: Optional[SequenceNotStr[str]]
150+
"""The keys being held while moving the mouse."""
151+
140152

141153
class ActionScreenshot(TypedDict, total=False):
142154
"""A screenshot action."""
@@ -169,6 +181,9 @@ class ActionScroll(TypedDict, total=False):
169181
y: Required[int]
170182
"""The y-coordinate where the scroll occurred."""
171183

184+
keys: Optional[SequenceNotStr[str]]
185+
"""The keys being held while scrolling."""
186+
172187

173188
class ActionType(TypedDict, total=False):
174189
"""An action to type in text."""

0 commit comments

Comments
 (0)