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
- Inheritance
-
- Object
- ProtoMessage
- Tool
Constructors
-
Tool({List<
FunctionDeclaration> functionDeclarations = const [], GoogleSearchRetrieval? googleSearchRetrieval, CodeExecution? codeExecution, Tool_GoogleSearch? googleSearch, Tool_ComputerUse? computerUse, UrlContext? urlContext}) - 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
-
functionDeclarations
→ List<
FunctionDeclaration> -
Optional. A list of
FunctionDeclarationsavailable to the model that can be used for function calling.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.Durationorgoogle.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 -
override
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- fullyQualifiedName → const String