Class FunctionTool.Builder
-
- All Implemented Interfaces:
public final class FunctionTool.Builder
A builder for FunctionTool.
-
-
Method Summary
-
-
Method Detail
-
name
final FunctionTool.Builder name(String name)
The name of the function to call.
-
name
final FunctionTool.Builder name(JsonField<String> name)
Sets Builder.name to an arbitrary JSON value.
You should usually call Builder.name with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
parameters
final FunctionTool.Builder parameters(FunctionTool.Parameters parameters)
A JSON schema object describing the parameters of the function.
-
parameters
final FunctionTool.Builder parameters(Optional<FunctionTool.Parameters> parameters)
Alias for calling Builder.parameters with
parameters.orElse(null)
.
-
parameters
final FunctionTool.Builder parameters(JsonField<FunctionTool.Parameters> parameters)
Sets Builder.parameters to an arbitrary JSON value.
You should usually call Builder.parameters with a well-typed Parameters value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
strict
final FunctionTool.Builder strict(Boolean strict)
Whether to enforce strict parameter validation. Default
true
.
-
strict
final FunctionTool.Builder strict(Boolean strict)
Alias for Builder.strict.
This unboxed primitive overload exists for backwards compatibility.
-
strict
final FunctionTool.Builder strict(Optional<Boolean> strict)
Alias for calling Builder.strict with
strict.orElse(null)
.
-
strict
final FunctionTool.Builder strict(JsonField<Boolean> strict)
Sets Builder.strict to an arbitrary JSON value.
You should usually call Builder.strict with a well-typed Boolean value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
type
final FunctionTool.Builder type(JsonValue type)
Sets the field to an arbitrary JSON value.
It is usually unnecessary to call this method because the field defaults to the following:
JsonValue.from("function")
This method is primarily for setting the field to an undocumented or not yet supported value.
-
description
final FunctionTool.Builder description(String description)
A description of the function. Used by the model to determine whether or not to call the function.
-
description
final FunctionTool.Builder description(Optional<String> description)
Alias for calling Builder.description with
description.orElse(null)
.
-
description
final FunctionTool.Builder description(JsonField<String> description)
Sets Builder.description to an arbitrary JSON value.
You should usually call Builder.description with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
additionalProperties
final FunctionTool.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
putAdditionalProperty
final FunctionTool.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final FunctionTool.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final FunctionTool.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final FunctionTool.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final FunctionTool build()
Returns an immutable instance of FunctionTool.
Further updates to this Builder will not mutate the returned instance.
The following fields are required:
.name() .parameters() .strict()
-
-
-
-