Class BetaTool
-
- All Implemented Interfaces:
public final class BetaTool
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classBetaTool.BuilderA builder for BetaTool.
public final classBetaTool.InputSchemaJSON schema for this tool's input.
This defines the shape of the
inputthat your tool accepts and that the model will produce.public final classBetaTool.Type
-
Method Summary
Modifier and Type Method Description final BetaTool.InputSchemainputSchema()JSON schema for this tool's input. final Stringname()Name of the tool. final Optional<BetaCacheControlEphemeral>cacheControl()Create a cache control breakpoint at this content block. final Optional<String>description()Description of what this tool does. final Optional<BetaTool.Type>type()final JsonField<BetaTool.InputSchema>_inputSchema()Returns the raw JSON value of inputSchema. final JsonField<String>_name()Returns the raw JSON value of name. final JsonField<BetaCacheControlEphemeral>_cacheControl()Returns the raw JSON value of cacheControl. final JsonField<String>_description()Returns the raw JSON value of description. final JsonField<BetaTool.Type>_type()Returns the raw JSON value of type. final Map<String, JsonValue>_additionalProperties()final BetaTool.BuildertoBuilder()final BetaToolvalidate()final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static BetaTool.Builderbuilder()Returns a mutable builder for constructing an instance of BetaTool. -
-
Method Detail
-
inputSchema
final BetaTool.InputSchema inputSchema()
JSON schema for this tool's input.
This defines the shape of the
inputthat your tool accepts and that the model will produce.
-
name
final String name()
Name of the tool.
This is how the tool will be called by the model and in
tool_useblocks.
-
cacheControl
final Optional<BetaCacheControlEphemeral> cacheControl()
Create a cache control breakpoint at this content block.
-
description
final Optional<String> description()
Description of what this tool does.
Tool descriptions should be as detailed as possible. The more information that the model has about what the tool is and how to use it, the better it will perform. You can use natural language descriptions to reinforce important aspects of the tool input JSON schema.
-
type
final Optional<BetaTool.Type> type()
-
_inputSchema
final JsonField<BetaTool.InputSchema> _inputSchema()
Returns the raw JSON value of inputSchema.
Unlike inputSchema, 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.
-
_cacheControl
final JsonField<BetaCacheControlEphemeral> _cacheControl()
Returns the raw JSON value of cacheControl.
Unlike cacheControl, this method doesn't throw if the JSON field has an unexpected type.
-
_description
final JsonField<String> _description()
Returns the raw JSON value of description.
Unlike description, this method doesn't throw if the JSON field has an unexpected type.
-
_type
final JsonField<BetaTool.Type> _type()
Returns the raw JSON value of type.
Unlike type, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final BetaTool.Builder toBuilder()
-
builder
final static BetaTool.Builder builder()
Returns a mutable builder for constructing an instance of BetaTool.
The following fields are required:
.inputSchema() .name()
-
-
-
-