Class BetaBrowserJavascriptExecToolUseBlock
-
- All Implemented Interfaces:
public final class BetaBrowserJavascriptExecToolUseBlock
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classBetaBrowserJavascriptExecToolUseBlock.BuilderA builder for BetaBrowserJavascriptExecToolUseBlock.
-
Method Summary
Modifier and Type Method Description final Stringid()final BetaBrowserJavascriptExecInputinput()Execute JavaScript in the page context and return the value of the last expression. final Optional<BetaToolUseCaller>caller()Which party invoked the tool call: the model directly, or a server tool on its behalf. final JsonValue_name()Expected to always return the following:
However, this method can be useful for debugging and logging (e.g.JsonValue.from("javascript_exec")final JsonValue_toolsetName()Expected to always return the following:
However, this method can be useful for debugging and logging (e.g.JsonValue.from("browser")final JsonValue_type()Expected to always return the following:
However, this method can be useful for debugging and logging (e.g.JsonValue.from("tool_use")final JsonField<String>_id()Returns the raw JSON value of id. final JsonField<BetaBrowserJavascriptExecInput>_input()Returns the raw JSON value of input. final JsonField<BetaToolUseCaller>_caller()Returns the raw JSON value of caller. final Map<String, JsonValue>_additionalProperties()final BetaBrowserJavascriptExecToolUseBlock.BuildertoBuilder()final BetaBrowserJavascriptExecToolUseBlockvalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static BetaBrowserJavascriptExecToolUseBlock.Builderbuilder()Returns a mutable builder for constructing an instance of BetaBrowserJavascriptExecToolUseBlock. -
-
Method Detail
-
input
final BetaBrowserJavascriptExecInput input()
Execute JavaScript in the page context and return the value of the last expression. The code runs with access to the DOM,
window, and page variables. Write the expression you want evaluated — do NOT usereturn.
-
caller
final Optional<BetaToolUseCaller> caller()
Which party invoked the tool call: the model directly, or a server tool on its behalf.
-
_name
final JsonValue _name()
Expected to always return the following:
JsonValue.from("javascript_exec")However, this method can be useful for debugging and logging (e.g. if the server responded with an unexpected value).
-
_toolsetName
final JsonValue _toolsetName()
Expected to always return the following:
JsonValue.from("browser")However, this method can be useful for debugging and logging (e.g. if the server responded with an unexpected value).
-
_type
final JsonValue _type()
Expected to always return the following:
JsonValue.from("tool_use")However, this method can be useful for debugging and logging (e.g. if the server responded with an unexpected value).
-
_id
final JsonField<String> _id()
Returns the raw JSON value of id.
Unlike id, this method doesn't throw if the JSON field has an unexpected type.
-
_input
final JsonField<BetaBrowserJavascriptExecInput> _input()
Returns the raw JSON value of input.
Unlike input, this method doesn't throw if the JSON field has an unexpected type.
-
_caller
final JsonField<BetaToolUseCaller> _caller()
Returns the raw JSON value of caller.
Unlike caller, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final BetaBrowserJavascriptExecToolUseBlock.Builder toBuilder()
-
validate
final BetaBrowserJavascriptExecToolUseBlock 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.
-
builder
final static BetaBrowserJavascriptExecToolUseBlock.Builder builder()
Returns a mutable builder for constructing an instance of BetaBrowserJavascriptExecToolUseBlock.
The following fields are required:
.id() .input()
-
-
-
-