Class CustomTool.Builder
-
- All Implemented Interfaces:
public final class CustomTool.BuilderA builder for CustomTool.
-
-
Method Summary
Modifier and Type Method Description final CustomTool.Buildername(String name)The name of the custom tool, used to identify it in tool calls. final CustomTool.Buildername(JsonField<String> name)Sets Builder.name to an arbitrary JSON value. final CustomTool.Buildertype(JsonValue type)Sets the field to an arbitrary JSON value. final CustomTool.BuilderallowedCallers(List<CustomTool.AllowedCaller> allowedCallers)The tool invocation context(s). final CustomTool.BuilderallowedCallers(Optional<List<CustomTool.AllowedCaller>> allowedCallers)Alias for calling Builder.allowedCallers with allowedCallers.orElse(null).final CustomTool.BuilderallowedCallers(JsonField<List<CustomTool.AllowedCaller>> allowedCallers)Sets Builder.allowedCallers to an arbitrary JSON value. final CustomTool.BuilderaddAllowedCaller(CustomTool.AllowedCaller allowedCaller)Adds a single AllowedCaller to allowedCallers. final CustomTool.BuilderdeferLoading(Boolean deferLoading)Whether this tool should be deferred and discovered via tool search. final CustomTool.BuilderdeferLoading(JsonField<Boolean> deferLoading)Sets Builder.deferLoading to an arbitrary JSON value. final CustomTool.Builderdescription(String description)Optional description of the custom tool, used to provide more context. final CustomTool.Builderdescription(JsonField<String> description)Sets Builder.description to an arbitrary JSON value. final CustomTool.Builderformat(CustomToolInputFormat format)The input format for the custom tool. final CustomTool.Builderformat(JsonField<CustomToolInputFormat> format)Sets Builder.format to an arbitrary JSON value. final CustomTool.Builderformat(CustomToolInputFormat.Grammar grammar)Alias for calling format with CustomToolInputFormat.ofGrammar(grammar).final CustomTool.BuilderformatText()Alias for calling format with CustomToolInputFormat.ofText().final CustomTool.BuilderadditionalProperties(Map<String, JsonValue> additionalProperties)final CustomTool.BuilderputAdditionalProperty(String key, JsonValue value)final CustomTool.BuilderputAllAdditionalProperties(Map<String, JsonValue> additionalProperties)final CustomTool.BuilderremoveAdditionalProperty(String key)final CustomTool.BuilderremoveAllAdditionalProperties(Set<String> keys)final CustomToolbuild()Returns an immutable instance of CustomTool. -
-
Method Detail
-
name
final CustomTool.Builder name(String name)
The name of the custom tool, used to identify it in tool calls.
-
name
final CustomTool.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.
-
type
final CustomTool.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("custom")This method is primarily for setting the field to an undocumented or not yet supported value.
-
allowedCallers
final CustomTool.Builder allowedCallers(List<CustomTool.AllowedCaller> allowedCallers)
The tool invocation context(s).
-
allowedCallers
final CustomTool.Builder allowedCallers(Optional<List<CustomTool.AllowedCaller>> allowedCallers)
Alias for calling Builder.allowedCallers with
allowedCallers.orElse(null).
-
allowedCallers
final CustomTool.Builder allowedCallers(JsonField<List<CustomTool.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 CustomTool.Builder addAllowedCaller(CustomTool.AllowedCaller allowedCaller)
Adds a single AllowedCaller to allowedCallers.
-
deferLoading
final CustomTool.Builder deferLoading(Boolean deferLoading)
Whether this tool should be deferred and discovered via tool search.
-
deferLoading
final CustomTool.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 CustomTool.Builder description(String description)
Optional description of the custom tool, used to provide more context.
-
description
final CustomTool.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.
-
format
final CustomTool.Builder format(CustomToolInputFormat format)
The input format for the custom tool. Default is unconstrained text.
-
format
final CustomTool.Builder format(JsonField<CustomToolInputFormat> format)
Sets Builder.format to an arbitrary JSON value.
You should usually call Builder.format with a well-typed CustomToolInputFormat value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
format
final CustomTool.Builder format(CustomToolInputFormat.Grammar grammar)
Alias for calling format with
CustomToolInputFormat.ofGrammar(grammar).
-
formatText
final CustomTool.Builder formatText()
Alias for calling format with
CustomToolInputFormat.ofText().
-
additionalProperties
final CustomTool.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
putAdditionalProperty
final CustomTool.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final CustomTool.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final CustomTool.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final CustomTool.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final CustomTool build()
Returns an immutable instance of CustomTool.
Further updates to this Builder will not mutate the returned instance.
The following fields are required:
.name()
-
-
-
-