Class BetaCustomTool
-
- All Implemented Interfaces:
public final class BetaCustomToolA custom tool that processes input using a specified format. Learn more about custom tools
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classBetaCustomTool.BuilderA builder for BetaCustomTool.
public final classBetaCustomTool.AllowedCallerpublic final classBetaCustomTool.FormatThe input format for the custom tool. Default is unconstrained text.
-
Method Summary
Modifier and Type Method Description final Stringname()The name of the custom tool, used to identify it in tool calls. final JsonValue_type()The type of the custom tool. final Optional<List<BetaCustomTool.AllowedCaller>>allowedCallers()The tool invocation context(s). final Optional<Boolean>deferLoading()Whether this tool should be deferred and discovered via tool search. final Optional<String>description()Optional description of the custom tool, used to provide more context. final Optional<BetaCustomTool.Format>format()The input format for the custom tool. final JsonField<String>_name()Returns the raw JSON value of name. final JsonField<List<BetaCustomTool.AllowedCaller>>_allowedCallers()Returns the raw JSON value of allowedCallers. final JsonField<Boolean>_deferLoading()Returns the raw JSON value of deferLoading. final JsonField<String>_description()Returns the raw JSON value of description. final JsonField<BetaCustomTool.Format>_format()Returns the raw JSON value of format. final Map<String, JsonValue>_additionalProperties()final BetaCustomTool.BuildertoBuilder()final BetaCustomToolvalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static BetaCustomTool.Builderbuilder()Returns a mutable builder for constructing an instance of BetaCustomTool. -
-
Method Detail
-
_type
final JsonValue _type()
The type of the custom tool. Always
custom.Expected to always return the following:
JsonValue.from("custom")However, this method can be useful for debugging and logging (e.g. if the server responded with an unexpected value).
-
allowedCallers
final Optional<List<BetaCustomTool.AllowedCaller>> allowedCallers()
The tool invocation context(s).
-
deferLoading
final Optional<Boolean> deferLoading()
Whether this tool should be deferred and discovered via tool search.
-
description
final Optional<String> description()
Optional description of the custom tool, used to provide more context.
-
format
final Optional<BetaCustomTool.Format> format()
The input format for the custom tool. Default is unconstrained text.
-
_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.
-
_allowedCallers
final JsonField<List<BetaCustomTool.AllowedCaller>> _allowedCallers()
Returns the raw JSON value of allowedCallers.
Unlike allowedCallers, this method doesn't throw if the JSON field has an unexpected type.
-
_deferLoading
final JsonField<Boolean> _deferLoading()
Returns the raw JSON value of deferLoading.
Unlike deferLoading, 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.
-
_format
final JsonField<BetaCustomTool.Format> _format()
Returns the raw JSON value of format.
Unlike format, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final BetaCustomTool.Builder toBuilder()
-
validate
final BetaCustomTool 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 BetaCustomTool.Builder builder()
Returns a mutable builder for constructing an instance of BetaCustomTool.
The following fields are required:
.name()
-
-
-
-