Class BetaNamespaceTool.Tool.Function
-
- All Implemented Interfaces:
public final class BetaNamespaceTool.Tool.Function
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classBetaNamespaceTool.Tool.Function.BuilderA builder for Function.
public final classBetaNamespaceTool.Tool.Function.AllowedCallerpublic final classBetaNamespaceTool.Tool.Function.OutputSchemaA JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs.
-
Method Summary
Modifier and Type Method Description 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("function")final Optional<List<BetaNamespaceTool.Tool.Function.AllowedCaller>>allowedCallers()The tool invocation context(s). final Optional<Boolean>deferLoading()Whether this function should be deferred and discovered via tool search. final Optional<String>description()final Optional<BetaNamespaceTool.Tool.Function.OutputSchema>outputSchema()A JSON Schema describing the JSON value encoded in string outputs for this function tool. final JsonValue_parameters()This arbitrary value can be deserialized into a custom type using the convertmethod:MyClass myObject = function.parameters().convert(MyClass.class);final Optional<Boolean>strict()Whether to enforce strict parameter validation. final JsonField<String>_name()Returns the raw JSON value of name. final JsonField<List<BetaNamespaceTool.Tool.Function.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<BetaNamespaceTool.Tool.Function.OutputSchema>_outputSchema()Returns the raw JSON value of outputSchema. final JsonField<Boolean>_strict()Returns the raw JSON value of strict. final Map<String, JsonValue>_additionalProperties()final BetaNamespaceTool.Tool.Function.BuildertoBuilder()final BetaNamespaceTool.Tool.Functionvalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static BetaNamespaceTool.Tool.Function.Builderbuilder()Returns a mutable builder for constructing an instance of Function. -
-
Method Detail
-
_type
final JsonValue _type()
Expected to always return the following:
JsonValue.from("function")However, this method can be useful for debugging and logging (e.g. if the server responded with an unexpected value).
-
allowedCallers
final Optional<List<BetaNamespaceTool.Tool.Function.AllowedCaller>> allowedCallers()
The tool invocation context(s).
-
deferLoading
final Optional<Boolean> deferLoading()
Whether this function should be deferred and discovered via tool search.
-
description
final Optional<String> description()
-
outputSchema
final Optional<BetaNamespaceTool.Tool.Function.OutputSchema> outputSchema()
A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs.
-
_parameters
final JsonValue _parameters()
This arbitrary value can be deserialized into a custom type using the
convertmethod:MyClass myObject = function.parameters().convert(MyClass.class);
-
strict
final Optional<Boolean> strict()
Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise.
-
_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<BetaNamespaceTool.Tool.Function.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.
-
_outputSchema
final JsonField<BetaNamespaceTool.Tool.Function.OutputSchema> _outputSchema()
Returns the raw JSON value of outputSchema.
Unlike outputSchema, this method doesn't throw if the JSON field has an unexpected type.
-
_strict
final JsonField<Boolean> _strict()
Returns the raw JSON value of strict.
Unlike strict, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final BetaNamespaceTool.Tool.Function.Builder toBuilder()
-
validate
final BetaNamespaceTool.Tool.Function 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 BetaNamespaceTool.Tool.Function.Builder builder()
Returns a mutable builder for constructing an instance of Function.
The following fields are required:
.name()
-
-
-
-