Class BetaToolUseBlock
-
- All Implemented Interfaces:
public final class BetaToolUseBlock
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classBetaToolUseBlock.BuilderA builder for BetaToolUseBlock.
public final classBetaToolUseBlock.CallerTool invocation directly from the model.
-
Method Summary
Modifier and Type Method Description final BetaToolUseBlockParamtoParam()final Stringid()final JsonValue_input()final <T extends Any> Tinput(Class<T> parametersType)Gets the input parameters to the tool use invocation, converting the values from the model in JSON format to an instance of a class that holds those values. final Stringname()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 Optional<BetaToolUseBlock.Caller>caller()Tool invocation directly from the model. final JsonField<String>_id()Returns the raw JSON value of id. final JsonField<String>_name()Returns the raw JSON value of name. final JsonField<BetaToolUseBlock.Caller>_caller()Returns the raw JSON value of caller. final Map<String, JsonValue>_additionalProperties()final BetaToolUseBlock.BuildertoBuilder()final BetaToolUseBlockvalidate()final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static BetaToolUseBlock.Builderbuilder()Returns a mutable builder for constructing an instance of BetaToolUseBlock. -
-
Method Detail
-
toParam
final BetaToolUseBlockParam toParam()
-
input
final <T extends Any> T input(Class<T> parametersType)
Gets the input parameters to the tool use invocation, converting the values from the model in JSON format to an instance of a class that holds those values. The class must previously have been used to define the JSON schema for the tool use definition, so that the JSON corresponds to the structure of the given class.
-
_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).
-
caller
final Optional<BetaToolUseBlock.Caller> caller()
Tool invocation directly from the model.
-
_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.
-
_name
final JsonField<String> _name()
Returns the raw JSON value of name.
Unlike name, this method doesn't throw if the JSON field has an unexpected type.
-
_caller
final JsonField<BetaToolUseBlock.Caller> _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 BetaToolUseBlock.Builder toBuilder()
-
validate
final BetaToolUseBlock validate()
-
builder
final static BetaToolUseBlock.Builder builder()
Returns a mutable builder for constructing an instance of BetaToolUseBlock.
The following fields are required:
.id() .input() .name()
-
-
-
-