Skip to content

Latest commit

 

History

History
90 lines (59 loc) · 2.16 KB

File metadata and controls

90 lines (59 loc) · 2.16 KB

google.generativeai.protos.Tool

View source on GitHub

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.

Attributes

function_declarations

MutableSequence[google.ai.generativelanguage.FunctionDeclaration]

Optional. A list of FunctionDeclarations available to the model that can be used for function calling.

The model or system does not execute the function. Instead the defined function may be returned as a [FunctionCall][google.ai.generativelanguage.v1beta.Part.function_call] with arguments to the client side for execution. The model may decide to call a subset of these functions by populating [FunctionCall][google.ai.generativelanguage.v1beta.Part.function_call] in the response. The next conversation turn may contain a [FunctionResponse][google.ai.generativelanguage.v1beta.Part.function_response] with the [Content.role][google.ai.generativelanguage.v1beta.Content.role] "function" generation context for the next model turn.

google_search_retrieval

google.ai.generativelanguage.GoogleSearchRetrieval

Optional. Retrieval tool that is powered by Google search.

code_execution

google.ai.generativelanguage.CodeExecution

Optional. Enables the model to execute code as part of generation.