Class Tool
-
- All Implemented Interfaces:
public final class ToolA tool that searches for relevant content from uploaded files. Learn more about the file search tool.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceTool.VisitorAn interface that defines how to map each variant of Tool to a value of type T.
-
Method Summary
Modifier and Type Method Description final Optional<FileSearchTool>fileSearch()A tool that searches for relevant content from uploaded files. final Optional<FunctionTool>function()Defines a function in your own code the model can choose to call. final Optional<ComputerTool>computerUsePreview()A tool that controls a virtual computer. final Optional<WebSearchTool>webSearch()This tool searches the web for relevant results to use in a response. final BooleanisFileSearch()final BooleanisFunction()final BooleanisComputerUsePreview()final BooleanisWebSearch()final FileSearchToolasFileSearch()A tool that searches for relevant content from uploaded files. final FunctionToolasFunction()Defines a function in your own code the model can choose to call. final ComputerToolasComputerUsePreview()A tool that controls a virtual computer. final WebSearchToolasWebSearch()This tool searches the web for relevant results to use in a response. final Optional<JsonValue>_json()final <T extends Any> Taccept(Tool.Visitor<T> visitor)final Toolvalidate()final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static ToolofFileSearch(FileSearchTool fileSearch)A tool that searches for relevant content from uploaded files. final static ToolofFunction(FunctionTool function)Defines a function in your own code the model can choose to call. final static ToolofComputerUsePreview(ComputerTool computerUsePreview)A tool that controls a virtual computer. final static ToolofWebSearch(WebSearchTool webSearch)This tool searches the web for relevant results to use in a response. -
-
Method Detail
-
fileSearch
final Optional<FileSearchTool> fileSearch()
A tool that searches for relevant content from uploaded files. Learn more about the file search tool.
-
function
final Optional<FunctionTool> function()
Defines a function in your own code the model can choose to call. Learn more about function calling.
-
computerUsePreview
final Optional<ComputerTool> computerUsePreview()
A tool that controls a virtual computer. Learn more about the computer tool.
-
webSearch
final Optional<WebSearchTool> webSearch()
This tool searches the web for relevant results to use in a response. Learn more about the web search tool.
-
isFileSearch
final Boolean isFileSearch()
-
isFunction
final Boolean isFunction()
-
isComputerUsePreview
final Boolean isComputerUsePreview()
-
isWebSearch
final Boolean isWebSearch()
-
asFileSearch
final FileSearchTool asFileSearch()
A tool that searches for relevant content from uploaded files. Learn more about the file search tool.
-
asFunction
final FunctionTool asFunction()
Defines a function in your own code the model can choose to call. Learn more about function calling.
-
asComputerUsePreview
final ComputerTool asComputerUsePreview()
A tool that controls a virtual computer. Learn more about the computer tool.
-
asWebSearch
final WebSearchTool asWebSearch()
This tool searches the web for relevant results to use in a response. Learn more about the web search tool.
-
accept
final <T extends Any> T accept(Tool.Visitor<T> visitor)
-
ofFileSearch
final static Tool ofFileSearch(FileSearchTool fileSearch)
A tool that searches for relevant content from uploaded files. Learn more about the file search tool.
-
ofFunction
final static Tool ofFunction(FunctionTool function)
Defines a function in your own code the model can choose to call. Learn more about function calling.
-
ofComputerUsePreview
final static Tool ofComputerUsePreview(ComputerTool computerUsePreview)
A tool that controls a virtual computer. Learn more about the computer tool.
-
ofWebSearch
final static Tool ofWebSearch(WebSearchTool webSearch)
This tool searches the web for relevant results to use in a response. Learn more about the web search tool.
-
-
-
-