Class BetaToolChoiceAllowed.Builder
-
- All Implemented Interfaces:
public final class BetaToolChoiceAllowed.BuilderA builder for BetaToolChoiceAllowed.
-
-
Method Summary
-
-
Method Detail
-
mode
final BetaToolChoiceAllowed.Builder mode(BetaToolChoiceAllowed.Mode mode)
Constrains the tools available to the model to a pre-defined set.
autoallows the model to pick from among the allowed tools and generate a message.requiredrequires the model to call one or more of the allowed tools.
-
mode
final BetaToolChoiceAllowed.Builder mode(JsonField<BetaToolChoiceAllowed.Mode> mode)
Sets Builder.mode to an arbitrary JSON value.
You should usually call Builder.mode with a well-typed Mode value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
tools
final BetaToolChoiceAllowed.Builder tools(List<BetaToolChoiceAllowed.Tool> tools)
A list of tool definitions that the model should be allowed to call.
For the Responses API, the list of tool definitions might look like:
[ { "type": "function", "name": "get_weather" }, { "type": "mcp", "server_label": "deepwiki" }, { "type": "image_generation" } ]
-
tools
final BetaToolChoiceAllowed.Builder tools(JsonField<List<BetaToolChoiceAllowed.Tool>> tools)
Sets Builder.tools to an arbitrary JSON value.
You should usually call Builder.tools with a well-typed
List<Tool>value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
addTool
final BetaToolChoiceAllowed.Builder addTool(BetaToolChoiceAllowed.Tool tool)
-
type
final BetaToolChoiceAllowed.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("allowed_tools")This method is primarily for setting the field to an undocumented or not yet supported value.
-
additionalProperties
final BetaToolChoiceAllowed.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
putAdditionalProperty
final BetaToolChoiceAllowed.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final BetaToolChoiceAllowed.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final BetaToolChoiceAllowed.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final BetaToolChoiceAllowed.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final BetaToolChoiceAllowed build()
Returns an immutable instance of BetaToolChoiceAllowed.
Further updates to this Builder will not mutate the returned instance.
The following fields are required:
.mode() .tools()
-
-
-
-