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.
JSON representation |
---|
{
"functionDeclarations": [
{
object ( |
Fields | |
---|---|
functionDeclarations[] |
Optional. A list of The model or system does not execute the function. Instead the defined function may be returned as a [FunctionCall][content.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][content.part.function_call] in the response. The next conversation turn may contain a [FunctionResponse][content.part.function_response] with the [content.role] "function" generation context for the next model turn. |
FunctionDeclaration
Structured representation of a function declaration as defined by the OpenAPI 3.03 specification. Included in this declaration are the function name and parameters. This FunctionDeclaration is a representation of a block of code that can be used as a Tool
by the model and executed by the client.
JSON representation |
---|
{
"name": string,
"description": string,
"parameters": {
object ( |
Fields | |
---|---|
name |
Required. The name of the function. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 63. |
description |
Required. A brief description of the function. |
parameters |
Optional. Describes the parameters to this function. Reflects the Open API 3.03 Parameter Object string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter. |
Schema
The Schema
object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. Represents a select subset of an OpenAPI 3.0 schema object.
JSON representation |
---|
{ "type": enum ( |
Fields | |
---|---|
type |
Required. Data type. |
format |
Optional. The format of the data. This is used only for primitive datatypes. Supported formats: for NUMBER type: float, double for INTEGER type: int32, int64 |
description |
Optional. A brief description of the parameter. This could contain examples of use. Parameter description may be formatted as Markdown. |
nullable |
Optional. Indicates if the value may be null. |
enum[] |
Optional. Possible values of the element of Type.STRING with enum format. For example we can define an Enum Direction as : {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]} |
properties |
Optional. Properties of Type.OBJECT. An object containing a list of |
required[] |
Optional. Required properties of Type.OBJECT. |
items |
Optional. Schema of the elements of Type.ARRAY. |
Type
Type contains the list of OpenAPI data types as defined by https://spec.openapis.org/oas/v3.0.3#data-types
Enums | |
---|---|
TYPE_UNSPECIFIED |
Not specified, should not be used. |
STRING |
String type. |
NUMBER |
Number type. |
INTEGER |
Integer type. |
BOOLEAN |
Boolean type. |
ARRAY |
Array type. |
OBJECT |
Object type. |