Class BetaComputerAction
-
- All Implemented Interfaces:
public final class BetaComputerActionA click action.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceBetaComputerAction.VisitorAn interface that defines how to map each variant of BetaComputerAction to a value of type T.
public final classBetaComputerAction.ClickA click action.
public final classBetaComputerAction.DoubleClickA double click action.
public final classBetaComputerAction.DragA drag action.
public final classBetaComputerAction.KeypressA collection of keypresses the model would like to perform.
public final classBetaComputerAction.MoveA mouse move action.
public final classBetaComputerAction.ScrollA scroll action.
public final classBetaComputerAction.TypeAn action to type in text.
-
Method Summary
Modifier and Type Method Description final Optional<BetaComputerAction.Click>click()A click action. final Optional<BetaComputerAction.DoubleClick>doubleClick()A double click action. final Optional<BetaComputerAction.Drag>drag()A drag action. final Optional<BetaComputerAction.Keypress>keypress()A collection of keypresses the model would like to perform. final Optional<BetaComputerAction.Move>move()A mouse move action. final Optional<JsonValue>screenshot()A screenshot action. final Optional<BetaComputerAction.Scroll>scroll()A scroll action. final Optional<BetaComputerAction.Type>type()An action to type in text. final Optional<JsonValue>wait()A wait action. final BooleanisClick()final BooleanisDoubleClick()final BooleanisDrag()final BooleanisKeypress()final BooleanisMove()final BooleanisScreenshot()final BooleanisScroll()final BooleanisType()final BooleanisWait()final BetaComputerAction.ClickasClick()A click action. final BetaComputerAction.DoubleClickasDoubleClick()A double click action. final BetaComputerAction.DragasDrag()A drag action. final BetaComputerAction.KeypressasKeypress()A collection of keypresses the model would like to perform. final BetaComputerAction.MoveasMove()A mouse move action. final JsonValueasScreenshot()A screenshot action. final BetaComputerAction.ScrollasScroll()A scroll action. final BetaComputerAction.TypeasType()An action to type in text. final JsonValueasWait()A wait action. final Optional<JsonValue>_json()final <T extends Any> Taccept(BetaComputerAction.Visitor<T> visitor)Maps this instance's current variant to a value of type T using the given visitor. final BetaComputerActionvalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static BetaComputerActionofClick(BetaComputerAction.Click click)A click action. final static BetaComputerActionofDoubleClick(BetaComputerAction.DoubleClick doubleClick)A double click action. final static BetaComputerActionofDrag(BetaComputerAction.Drag drag)A drag action. final static BetaComputerActionofKeypress(BetaComputerAction.Keypress keypress)A collection of keypresses the model would like to perform. final static BetaComputerActionofMove(BetaComputerAction.Move move)A mouse move action. final static BetaComputerActionofScreenshot()A screenshot action. final static BetaComputerActionofScroll(BetaComputerAction.Scroll scroll)A scroll action. final static BetaComputerActionofType(BetaComputerAction.Type type)An action to type in text. final static BetaComputerActionofWait()A wait action. -
-
Method Detail
-
click
final Optional<BetaComputerAction.Click> click()
A click action.
-
doubleClick
final Optional<BetaComputerAction.DoubleClick> doubleClick()
A double click action.
-
drag
final Optional<BetaComputerAction.Drag> drag()
A drag action.
-
keypress
final Optional<BetaComputerAction.Keypress> keypress()
A collection of keypresses the model would like to perform.
-
move
final Optional<BetaComputerAction.Move> move()
A mouse move action.
-
screenshot
final Optional<JsonValue> screenshot()
A screenshot action.
-
scroll
final Optional<BetaComputerAction.Scroll> scroll()
A scroll action.
-
type
final Optional<BetaComputerAction.Type> type()
An action to type in text.
-
isDoubleClick
final Boolean isDoubleClick()
-
isKeypress
final Boolean isKeypress()
-
isScreenshot
final Boolean isScreenshot()
-
asClick
final BetaComputerAction.Click asClick()
A click action.
-
asDoubleClick
final BetaComputerAction.DoubleClick asDoubleClick()
A double click action.
-
asDrag
final BetaComputerAction.Drag asDrag()
A drag action.
-
asKeypress
final BetaComputerAction.Keypress asKeypress()
A collection of keypresses the model would like to perform.
-
asMove
final BetaComputerAction.Move asMove()
A mouse move action.
-
asScreenshot
final JsonValue asScreenshot()
A screenshot action.
-
asScroll
final BetaComputerAction.Scroll asScroll()
A scroll action.
-
asType
final BetaComputerAction.Type asType()
An action to type in text.
-
accept
final <T extends Any> T accept(BetaComputerAction.Visitor<T> visitor)
Maps this instance's current variant to a value of type T using the given visitor.
Note that this method is not forwards compatible with new variants from the API, unless visitor overrides Visitor.unknown. To handle variants not known to this version of the SDK gracefully, consider overriding Visitor.unknown:
import com.openai.core.JsonValue; import java.util.Optional; Optional<String> result = betaComputerAction.accept(new BetaComputerAction.Visitor<Optional<String>>() { @Override public Optional<String> visitClick(Click click) { return Optional.of(click.toString()); } // ... @Override public Optional<String> unknown(JsonValue json) { // Or inspect the `json`. return Optional.empty(); } });
-
validate
final BetaComputerAction validate()
Validates that the types of all values in this object match their expected types recursively.
This method is not forwards compatible with new types from the API for existing fields.
-
ofClick
final static BetaComputerAction ofClick(BetaComputerAction.Click click)
A click action.
-
ofDoubleClick
final static BetaComputerAction ofDoubleClick(BetaComputerAction.DoubleClick doubleClick)
A double click action.
-
ofDrag
final static BetaComputerAction ofDrag(BetaComputerAction.Drag drag)
A drag action.
-
ofKeypress
final static BetaComputerAction ofKeypress(BetaComputerAction.Keypress keypress)
A collection of keypresses the model would like to perform.
-
ofMove
final static BetaComputerAction ofMove(BetaComputerAction.Move move)
A mouse move action.
-
ofScreenshot
final static BetaComputerAction ofScreenshot()
A screenshot action.
-
ofScroll
final static BetaComputerAction ofScroll(BetaComputerAction.Scroll scroll)
A scroll action.
-
ofType
final static BetaComputerAction ofType(BetaComputerAction.Type type)
An action to type in text.
-
ofWait
final static BetaComputerAction ofWait()
A wait action.
-
-
-
-