Class BetaFunctionTool.Builder
-
- All Implemented Interfaces:
public final class BetaFunctionTool.BuilderA builder for BetaFunctionTool.
-
-
Method Summary
-
-
Method Detail
-
name
final BetaFunctionTool.Builder name(String name)
The name of the function to call.
-
name
final BetaFunctionTool.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 BetaFunctionTool.Builder parameters(BetaFunctionTool.Parameters parameters)
A JSON schema object describing the parameters of the function.
-
parameters
final BetaFunctionTool.Builder parameters(Optional<BetaFunctionTool.Parameters> parameters)
Alias for calling Builder.parameters with
parameters.orElse(null).
-
parameters
final BetaFunctionTool.Builder parameters(JsonField<BetaFunctionTool.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 BetaFunctionTool.Builder strict(Boolean strict)
Whether strict parameter validation is enforced for this function tool.
-
strict
final BetaFunctionTool.Builder strict(Boolean strict)
Alias for Builder.strict.
This unboxed primitive overload exists for backwards compatibility.
-
strict
final BetaFunctionTool.Builder strict(Optional<Boolean> strict)
Alias for calling Builder.strict with
strict.orElse(null).
-
strict
final BetaFunctionTool.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 BetaFunctionTool.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.
-
allowedCallers
final BetaFunctionTool.Builder allowedCallers(List<BetaFunctionTool.AllowedCaller> allowedCallers)
The tool invocation context(s).
-
allowedCallers
final BetaFunctionTool.Builder allowedCallers(Optional<List<BetaFunctionTool.AllowedCaller>> allowedCallers)
Alias for calling Builder.allowedCallers with
allowedCallers.orElse(null).
-
allowedCallers
final BetaFunctionTool.Builder allowedCallers(JsonField<List<BetaFunctionTool.AllowedCaller>> allowedCallers)
Sets Builder.allowedCallers to an arbitrary JSON value.
You should usually call Builder.allowedCallers with a well-typed
List<AllowedCaller>value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
addAllowedCaller
final BetaFunctionTool.Builder addAllowedCaller(BetaFunctionTool.AllowedCaller allowedCaller)
Adds a single AllowedCaller to allowedCallers.
-
deferLoading
final BetaFunctionTool.Builder deferLoading(Boolean deferLoading)
Whether this function is deferred and loaded via tool search.
-
deferLoading
final BetaFunctionTool.Builder deferLoading(JsonField<Boolean> deferLoading)
Sets Builder.deferLoading to an arbitrary JSON value.
You should usually call Builder.deferLoading with a well-typed Boolean value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
description
final BetaFunctionTool.Builder description(String description)
A description of the function. Used by the model to determine whether or not to call the function.
-
description
final BetaFunctionTool.Builder description(Optional<String> description)
Alias for calling Builder.description with
description.orElse(null).
-
description
final BetaFunctionTool.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.
-
outputSchema
final BetaFunctionTool.Builder outputSchema(BetaFunctionTool.OutputSchema outputSchema)
A JSON schema object describing the JSON value encoded in string outputs for this function.
-
outputSchema
final BetaFunctionTool.Builder outputSchema(Optional<BetaFunctionTool.OutputSchema> outputSchema)
Alias for calling Builder.outputSchema with
outputSchema.orElse(null).
-
outputSchema
final BetaFunctionTool.Builder outputSchema(JsonField<BetaFunctionTool.OutputSchema> outputSchema)
Sets Builder.outputSchema to an arbitrary JSON value.
You should usually call Builder.outputSchema with a well-typed OutputSchema value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
additionalProperties
final BetaFunctionTool.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
putAdditionalProperty
final BetaFunctionTool.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final BetaFunctionTool.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final BetaFunctionTool.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final BetaFunctionTool.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final BetaFunctionTool build()
Returns an immutable instance of BetaFunctionTool.
Further updates to this Builder will not mutate the returned instance.
The following fields are required:
.name() .parameters() .strict()
-
-
-
-