Package com.openai.models.responses
Class FunctionTool
-
- All Implemented Interfaces:
public final class FunctionToolDefines a function in your own code the model can choose to call. Learn more about function calling.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classFunctionTool.BuilderA builder for FunctionTool.
public final classFunctionTool.ParametersA JSON schema object describing the parameters of the function.
-
Method Summary
Modifier and Type Method Description final Stringname()The name of the function to call. final FunctionTool.Parametersparameters()A JSON schema object describing the parameters of the function. final Booleanstrict()Whether to enforce strict parameter validation. final JsonValue_type()The type of the function tool. final Optional<String>description()A description of the function. final JsonField<String>_name()The name of the function to call. final JsonField<FunctionTool.Parameters>_parameters()A JSON schema object describing the parameters of the function. final JsonField<Boolean>_strict()Whether to enforce strict parameter validation. final JsonField<String>_description()A description of the function. final Map<String, JsonValue>_additionalProperties()final FunctionToolvalidate()final FunctionTool.BuildertoBuilder()Booleanequals(Object other)IntegerhashCode()StringtoString()final static FunctionTool.Builderbuilder()Returns a mutable builder for constructing an instance of FunctionTool. -
-
Method Detail
-
parameters
final FunctionTool.Parameters parameters()
A JSON schema object describing the parameters of the function.
-
description
final Optional<String> description()
A description of the function. Used by the model to determine whether or not to call the function.
-
_parameters
final JsonField<FunctionTool.Parameters> _parameters()
A JSON schema object describing the parameters of the function.
-
_strict
final JsonField<Boolean> _strict()
Whether to enforce strict parameter validation. Default
true.
-
_description
final JsonField<String> _description()
A description of the function. Used by the model to determine whether or not to call the function.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
validate
final FunctionTool validate()
-
toBuilder
final FunctionTool.Builder toBuilder()
-
builder
final static FunctionTool.Builder builder()
Returns a mutable builder for constructing an instance of FunctionTool.
The following fields are required:
.name() .parameters() .strict()
-
-
-
-