Class CustomTool.Builder
-
- All Implemented Interfaces:
public final class CustomTool.Builder
A builder for CustomTool.
-
-
Method Summary
Modifier and Type Method Description final CustomTool.Builder
name(String name)
The name of the custom tool, used to identify it in tool calls. final CustomTool.Builder
name(JsonField<String> name)
Sets Builder.name to an arbitrary JSON value. final CustomTool.Builder
type(JsonValue type)
Sets the field to an arbitrary JSON value. final CustomTool.Builder
description(String description)
Optional description of the custom tool, used to provide more context. final CustomTool.Builder
description(JsonField<String> description)
Sets Builder.description to an arbitrary JSON value. final CustomTool.Builder
format(CustomToolInputFormat format)
The input format for the custom tool. final CustomTool.Builder
format(JsonField<CustomToolInputFormat> format)
Sets Builder.format to an arbitrary JSON value. final CustomTool.Builder
format(CustomToolInputFormat.Grammar grammar)
Alias for calling format with CustomToolInputFormat.ofGrammar(grammar)
.final CustomTool.Builder
formatText()
Alias for calling format with CustomToolInputFormat.ofText()
.final CustomTool.Builder
additionalProperties(Map<String, JsonValue> additionalProperties)
final CustomTool.Builder
putAdditionalProperty(String key, JsonValue value)
final CustomTool.Builder
putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
final CustomTool.Builder
removeAdditionalProperty(String key)
final CustomTool.Builder
removeAllAdditionalProperties(Set<String> keys)
final CustomTool
build()
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.
-
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()
-
-
-
-