Class ChatCompletionAllowedTools.Builder
-
- All Implemented Interfaces:
public final class ChatCompletionAllowedTools.Builder
A builder for ChatCompletionAllowedTools.
-
-
Method Summary
-
-
Method Detail
-
mode
final ChatCompletionAllowedTools.Builder mode(ChatCompletionAllowedTools.Mode mode)
Constrains the tools available to the model to a pre-defined set.
auto
allows the model to pick from among the allowed tools and generate a message.required
requires the model to call one or more of the allowed tools.
-
mode
final ChatCompletionAllowedTools.Builder mode(JsonField<ChatCompletionAllowedTools.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 ChatCompletionAllowedTools.Builder tools(List<ChatCompletionAllowedTools.Tool> tools)
A list of tool definitions that the model should be allowed to call.
For the Chat Completions API, the list of tool definitions might look like:
[ { "type": "function", "function": { "name": "get_weather" } }, { "type": "function", "function": { "name": "get_time" } } ]
-
tools
final ChatCompletionAllowedTools.Builder tools(JsonField<List<ChatCompletionAllowedTools.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 ChatCompletionAllowedTools.Builder addTool(ChatCompletionAllowedTools.Tool tool)
-
additionalProperties
final ChatCompletionAllowedTools.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
putAdditionalProperty
final ChatCompletionAllowedTools.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final ChatCompletionAllowedTools.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final ChatCompletionAllowedTools.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final ChatCompletionAllowedTools.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final ChatCompletionAllowedTools build()
Returns an immutable instance of ChatCompletionAllowedTools.
Further updates to this Builder will not mutate the returned instance.
The following fields are required:
.mode() .tools()
-
-
-
-