Tool class final
Tool details that the model may use to generate a 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.
Properties
-
autoFunctionDeclarations
→ List<
AutoFunctionDeclaration> -
Returns a list of all AutoFunctionDeclaration objects
found within the
_functionDeclarationslist.no setter - hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, Object> - Convert to json object.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
codeExecution(
{CodeExecution codeExecution = const CodeExecution()}) → Tool - Returns a Tool instance that enables the model to use Code Execution.
-
functionDeclarations(
List< FunctionDeclaration> functionDeclarations) → Tool - Returns a Tool instance with list of FunctionDeclaration.
-
googleMaps(
{GoogleMaps googleMaps = const GoogleMaps()}) → Tool - Creates a tool that allows the model to use Grounding with Google Maps.
-
googleSearch(
{GoogleSearch googleSearch = const GoogleSearch()}) → Tool - Creates a tool that allows the model to use Grounding with Google Search.
-
urlContext(
{UrlContext urlContext = const UrlContext()}) → Tool - Creates a tool that allows you to provide additional context to the models in the form of public web URLs.