Tool class final

Tool details that the model may use to generate response.

A Tool is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model.

Next ID: 12

Constructors

Tool({List<FunctionDeclaration> functionDeclarations = const [], GoogleSearchRetrieval? googleSearchRetrieval, CodeExecution? codeExecution, Tool_GoogleSearch? googleSearch, Tool_ComputerUse? computerUse, UrlContext? urlContext, FileSearch? fileSearch, GoogleMaps? googleMaps})
Tool.fromJson(Object? j)
factory

Properties

codeExecution → CodeExecution?
Optional. Enables the model to execute code as part of generation.
final
computerUse → Tool_ComputerUse?
Optional. Tool to support the model interacting directly with the computer. If enabled, it automatically populates computer-use specific Function Declarations.
final
fileSearch → FileSearch?
Optional. FileSearch tool type. Tool to retrieve knowledge from Semantic Retrieval corpora.
final
functionDeclarations → List<FunctionDeclaration>
Optional. A list of FunctionDeclarations available to the model that can be used for function calling.
final
googleMaps → GoogleMaps?
Optional. Tool that allows grounding the model's response with geospatial context related to the user's query.
final
googleSearch → Tool_GoogleSearch?
Optional. GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google.
final
googleSearchRetrieval → GoogleSearchRetrieval?
Optional. Retrieval tool that is powered by Google search.
final
hashCode → int
The hash code for this object.
no setterinherited
qualifiedName → String
The fully qualified name of this message, i.e., google.protobuf.Duration or google.rpc.ErrorInfo.
finalinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
urlContext → UrlContext?
Optional. Tool to support URL context retrieval.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Object
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Constants

fullyQualifiedName → const String