Class ResponseItem.AdditionalTools.Builder
-
- All Implemented Interfaces:
public final class ResponseItem.AdditionalTools.BuilderA builder for AdditionalTools.
-
-
Method Summary
Modifier and Type Method Description final ResponseItem.AdditionalTools.Builderid(String id)The unique ID of the additional tools item. final ResponseItem.AdditionalTools.Builderid(JsonField<String> id)Sets Builder.id to an arbitrary JSON value. final ResponseItem.AdditionalTools.Builderrole(ResponseItem.AdditionalTools.Role role)The role that provided the additional tools. final ResponseItem.AdditionalTools.Builderrole(JsonField<ResponseItem.AdditionalTools.Role> role)Sets Builder.role to an arbitrary JSON value. final ResponseItem.AdditionalTools.Buildertools(List<Tool> tools)The additional tool definitions made available at this item. final ResponseItem.AdditionalTools.Buildertools(JsonField<List<Tool>> tools)Sets Builder.tools to an arbitrary JSON value. final ResponseItem.AdditionalTools.BuilderaddTool(Tool tool)Adds a single Tool to tools. final ResponseItem.AdditionalTools.BuilderaddTool(FunctionTool function)Alias for calling addTool with Tool.ofFunction(function).final ResponseItem.AdditionalTools.BuilderaddTool(FileSearchTool fileSearch)Alias for calling addTool with Tool.ofFileSearch(fileSearch).final ResponseItem.AdditionalTools.BuilderaddTool(ComputerTool computer)Alias for calling addTool with Tool.ofComputer(computer).final ResponseItem.AdditionalTools.BuilderaddTool(ComputerUsePreviewTool computerUsePreview)Alias for calling addTool with Tool.ofComputerUsePreview(computerUsePreview).final ResponseItem.AdditionalTools.BuilderaddTool(WebSearchTool webSearch)Alias for calling addTool with Tool.ofWebSearch(webSearch).final ResponseItem.AdditionalTools.BuilderaddTool(Tool.Mcp mcp)Alias for calling addTool with Tool.ofMcp(mcp).final ResponseItem.AdditionalTools.BuilderaddTool(Tool.CodeInterpreter codeInterpreter)Alias for calling addTool with Tool.ofCodeInterpreter(codeInterpreter).final ResponseItem.AdditionalTools.BuilderaddTool(Tool.ImageGeneration imageGeneration)Alias for calling addTool with Tool.ofImageGeneration(imageGeneration).final ResponseItem.AdditionalTools.BuilderaddTool(FunctionShellTool shell)Alias for calling addTool with Tool.ofShell(shell).final ResponseItem.AdditionalTools.BuilderaddTool(CustomTool custom)Alias for calling addTool with Tool.ofCustom(custom).final ResponseItem.AdditionalTools.BuilderaddTool(NamespaceTool namespace)Alias for calling addTool with Tool.ofNamespace(namespace).final ResponseItem.AdditionalTools.BuilderaddTool(ToolSearchTool search)Alias for calling addTool with Tool.ofSearch(search).final ResponseItem.AdditionalTools.BuilderaddTool(WebSearchPreviewTool webSearchPreview)Alias for calling addTool with Tool.ofWebSearchPreview(webSearchPreview).final ResponseItem.AdditionalTools.BuilderaddTool(ApplyPatchTool applyPatch)Alias for calling addTool with Tool.ofApplyPatch(applyPatch).final ResponseItem.AdditionalTools.BuilderaddFileSearchTool(List<String> vectorStoreIds)Alias for calling addTool with the following: FileSearchTool.builder() .vectorStoreIds(vectorStoreIds) .build()final ResponseItem.AdditionalTools.BuilderaddMcpTool(String serverLabel)Alias for calling addTool with the following: Tool.Mcp.builder() .serverLabel(serverLabel) .build()final ResponseItem.AdditionalTools.BuilderaddCodeInterpreterTool(Tool.CodeInterpreter.Container container)Alias for calling addTool with the following: Tool.CodeInterpreter.builder() .container(container) .build()final ResponseItem.AdditionalTools.BuilderaddCodeInterpreterTool(String string)Alias for calling addCodeInterpreterTool with Tool.CodeInterpreter.Container.ofString(string).final ResponseItem.AdditionalTools.BuilderaddCodeInterpreterTool(Tool.CodeInterpreter.Container.CodeInterpreterToolAuto codeInterpreterToolAuto)Alias for calling addCodeInterpreterTool with Tool.CodeInterpreter.Container.ofCodeInterpreterToolAuto(codeInterpreterToolAuto).final ResponseItem.AdditionalTools.BuilderaddToolLocalShell()Alias for calling addTool with Tool.ofLocalShell().final ResponseItem.AdditionalTools.BuilderaddCustomTool(String name)Alias for calling addTool with the following: CustomTool.builder() .name(name) .build()final ResponseItem.AdditionalTools.Buildertype(JsonValue type)Sets the field to an arbitrary JSON value. final ResponseItem.AdditionalTools.BuilderadditionalProperties(Map<String, JsonValue> additionalProperties)final ResponseItem.AdditionalTools.BuilderputAdditionalProperty(String key, JsonValue value)final ResponseItem.AdditionalTools.BuilderputAllAdditionalProperties(Map<String, JsonValue> additionalProperties)final ResponseItem.AdditionalTools.BuilderremoveAdditionalProperty(String key)final ResponseItem.AdditionalTools.BuilderremoveAllAdditionalProperties(Set<String> keys)final ResponseItem.AdditionalToolsbuild()Returns an immutable instance of AdditionalTools. -
-
Method Detail
-
id
final ResponseItem.AdditionalTools.Builder id(String id)
The unique ID of the additional tools item.
-
id
final ResponseItem.AdditionalTools.Builder id(JsonField<String> id)
Sets Builder.id to an arbitrary JSON value.
You should usually call Builder.id with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
role
final ResponseItem.AdditionalTools.Builder role(ResponseItem.AdditionalTools.Role role)
The role that provided the additional tools.
-
role
final ResponseItem.AdditionalTools.Builder role(JsonField<ResponseItem.AdditionalTools.Role> role)
Sets Builder.role to an arbitrary JSON value.
You should usually call Builder.role with a well-typed Role value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
tools
final ResponseItem.AdditionalTools.Builder tools(List<Tool> tools)
The additional tool definitions made available at this item.
-
tools
final ResponseItem.AdditionalTools.Builder tools(JsonField<List<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 ResponseItem.AdditionalTools.Builder addTool(Tool tool)
-
addTool
final ResponseItem.AdditionalTools.Builder addTool(FunctionTool function)
Alias for calling addTool with
Tool.ofFunction(function).
-
addTool
final ResponseItem.AdditionalTools.Builder addTool(FileSearchTool fileSearch)
Alias for calling addTool with
Tool.ofFileSearch(fileSearch).
-
addTool
final ResponseItem.AdditionalTools.Builder addTool(ComputerTool computer)
Alias for calling addTool with
Tool.ofComputer(computer).
-
addTool
final ResponseItem.AdditionalTools.Builder addTool(ComputerUsePreviewTool computerUsePreview)
Alias for calling addTool with
Tool.ofComputerUsePreview(computerUsePreview).
-
addTool
final ResponseItem.AdditionalTools.Builder addTool(WebSearchTool webSearch)
Alias for calling addTool with
Tool.ofWebSearch(webSearch).
-
addTool
final ResponseItem.AdditionalTools.Builder addTool(Tool.Mcp mcp)
Alias for calling addTool with
Tool.ofMcp(mcp).
-
addTool
final ResponseItem.AdditionalTools.Builder addTool(Tool.CodeInterpreter codeInterpreter)
Alias for calling addTool with
Tool.ofCodeInterpreter(codeInterpreter).
-
addTool
final ResponseItem.AdditionalTools.Builder addTool(Tool.ImageGeneration imageGeneration)
Alias for calling addTool with
Tool.ofImageGeneration(imageGeneration).
-
addTool
final ResponseItem.AdditionalTools.Builder addTool(FunctionShellTool shell)
Alias for calling addTool with
Tool.ofShell(shell).
-
addTool
final ResponseItem.AdditionalTools.Builder addTool(CustomTool custom)
Alias for calling addTool with
Tool.ofCustom(custom).
-
addTool
final ResponseItem.AdditionalTools.Builder addTool(NamespaceTool namespace)
Alias for calling addTool with
Tool.ofNamespace(namespace).
-
addTool
final ResponseItem.AdditionalTools.Builder addTool(ToolSearchTool search)
Alias for calling addTool with
Tool.ofSearch(search).
-
addTool
final ResponseItem.AdditionalTools.Builder addTool(WebSearchPreviewTool webSearchPreview)
Alias for calling addTool with
Tool.ofWebSearchPreview(webSearchPreview).
-
addTool
final ResponseItem.AdditionalTools.Builder addTool(ApplyPatchTool applyPatch)
Alias for calling addTool with
Tool.ofApplyPatch(applyPatch).
-
addFileSearchTool
final ResponseItem.AdditionalTools.Builder addFileSearchTool(List<String> vectorStoreIds)
Alias for calling addTool with the following:
FileSearchTool.builder() .vectorStoreIds(vectorStoreIds) .build()
-
addMcpTool
final ResponseItem.AdditionalTools.Builder addMcpTool(String serverLabel)
Alias for calling addTool with the following:
Tool.Mcp.builder() .serverLabel(serverLabel) .build()
-
addCodeInterpreterTool
final ResponseItem.AdditionalTools.Builder addCodeInterpreterTool(Tool.CodeInterpreter.Container container)
Alias for calling addTool with the following:
Tool.CodeInterpreter.builder() .container(container) .build()
-
addCodeInterpreterTool
final ResponseItem.AdditionalTools.Builder addCodeInterpreterTool(String string)
Alias for calling addCodeInterpreterTool with
Tool.CodeInterpreter.Container.ofString(string).
-
addCodeInterpreterTool
final ResponseItem.AdditionalTools.Builder addCodeInterpreterTool(Tool.CodeInterpreter.Container.CodeInterpreterToolAuto codeInterpreterToolAuto)
Alias for calling addCodeInterpreterTool with
Tool.CodeInterpreter.Container.ofCodeInterpreterToolAuto(codeInterpreterToolAuto).
-
addToolLocalShell
final ResponseItem.AdditionalTools.Builder addToolLocalShell()
Alias for calling addTool with
Tool.ofLocalShell().
-
addCustomTool
final ResponseItem.AdditionalTools.Builder addCustomTool(String name)
Alias for calling addTool with the following:
CustomTool.builder() .name(name) .build()
-
type
final ResponseItem.AdditionalTools.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("additional_tools")This method is primarily for setting the field to an undocumented or not yet supported value.
-
additionalProperties
final ResponseItem.AdditionalTools.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
putAdditionalProperty
final ResponseItem.AdditionalTools.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final ResponseItem.AdditionalTools.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final ResponseItem.AdditionalTools.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final ResponseItem.AdditionalTools.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final ResponseItem.AdditionalTools build()
Returns an immutable instance of AdditionalTools.
Further updates to this Builder will not mutate the returned instance.
The following fields are required:
.id() .role() .tools()
-
-
-
-