publicfinalclass ToolextendsGeneratedMessageV3implementsToolOrBuilder
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. A Tool object should contain exactly
one type of Tool (e.g FunctionDeclaration, Retrieval or
GoogleSearchRetrieval).
Protobuf type google.cloud.vertexai.v1.Tool
Inherited Members
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT)
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT,int)
com.google.protobuf.GeneratedMessageV3.<T>emptyList(java.lang.Class<T>)
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)
Static Fields
publicstaticfinalintFUNCTION_DECLARATIONS_FIELD_NUMBER
| Field Value |
| Type |
Description |
int |
publicstaticfinalintGOOGLE_SEARCH_RETRIEVAL_FIELD_NUMBER
| Field Value |
| Type |
Description |
int |
publicstaticfinalintRETRIEVAL_FIELD_NUMBER
| Field Value |
| Type |
Description |
int |
Static Methods
publicstaticToolgetDefaultInstance()
| Returns |
| Type |
Description |
Tool |
publicstaticfinalDescriptors.DescriptorgetDescriptor()
publicstaticTool.BuildernewBuilder()
publicstaticTool.BuildernewBuilder(Toolprototype)
| Parameter |
| Name |
Description |
prototype |
Tool
|
publicstaticToolparseDelimitedFrom(InputStreaminput)
| Returns |
| Type |
Description |
Tool |
publicstaticToolparseDelimitedFrom(InputStreaminput,ExtensionRegistryLiteextensionRegistry)
| Returns |
| Type |
Description |
Tool |
publicstaticToolparseFrom(byte[]data)
| Parameter |
| Name |
Description |
data |
byte[]
|
| Returns |
| Type |
Description |
Tool |
publicstaticToolparseFrom(byte[]data,ExtensionRegistryLiteextensionRegistry)
| Returns |
| Type |
Description |
Tool |
publicstaticToolparseFrom(ByteStringdata)
| Returns |
| Type |
Description |
Tool |
publicstaticToolparseFrom(ByteStringdata,ExtensionRegistryLiteextensionRegistry)
| Returns |
| Type |
Description |
Tool |
publicstaticToolparseFrom(CodedInputStreaminput)
| Returns |
| Type |
Description |
Tool |
publicstaticToolparseFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)
| Returns |
| Type |
Description |
Tool |
publicstaticToolparseFrom(InputStreaminput)
| Returns |
| Type |
Description |
Tool |
publicstaticToolparseFrom(InputStreaminput,ExtensionRegistryLiteextensionRegistry)
| Returns |
| Type |
Description |
Tool |
publicstaticToolparseFrom(ByteBufferdata)
| Returns |
| Type |
Description |
Tool |
publicstaticToolparseFrom(ByteBufferdata,ExtensionRegistryLiteextensionRegistry)
| Returns |
| Type |
Description |
Tool |
publicstaticParser<Tool>parser()
Methods
publicbooleanequals(Objectobj)
| Parameter |
| Name |
Description |
obj |
Object
|
Overrides
publicToolgetDefaultInstanceForType()
| Returns |
| Type |
Description |
Tool |
publicFunctionDeclarationgetFunctionDeclarations(intindex)
Optional. Function tool type.
One or more function declarations to be passed to the model along with the
current user query. Model may decide to call a subset of these functions
by populating FunctionCall in the response.
User should provide a FunctionResponse
for each function call in the next turn. Based on the function responses,
Model will generate the final response back to the user.
Maximum 64 function declarations can be provided.
repeated .google.cloud.vertexai.v1.FunctionDeclaration function_declarations = 1 [(.google.api.field_behavior) = OPTIONAL];
| Parameter |
| Name |
Description |
index |
int
|
publicintgetFunctionDeclarationsCount()
Optional. Function tool type.
One or more function declarations to be passed to the model along with the
current user query. Model may decide to call a subset of these functions
by populating FunctionCall in the response.
User should provide a FunctionResponse
for each function call in the next turn. Based on the function responses,
Model will generate the final response back to the user.
Maximum 64 function declarations can be provided.
repeated .google.cloud.vertexai.v1.FunctionDeclaration function_declarations = 1 [(.google.api.field_behavior) = OPTIONAL];
| Returns |
| Type |
Description |
int |
publicList<FunctionDeclaration>getFunctionDeclarationsList()
Optional. Function tool type.
One or more function declarations to be passed to the model along with the
current user query. Model may decide to call a subset of these functions
by populating FunctionCall in the response.
User should provide a FunctionResponse
for each function call in the next turn. Based on the function responses,
Model will generate the final response back to the user.
Maximum 64 function declarations can be provided.
repeated .google.cloud.vertexai.v1.FunctionDeclaration function_declarations = 1 [(.google.api.field_behavior) = OPTIONAL];
publicFunctionDeclarationOrBuildergetFunctionDeclarationsOrBuilder(intindex)
Optional. Function tool type.
One or more function declarations to be passed to the model along with the
current user query. Model may decide to call a subset of these functions
by populating FunctionCall in the response.
User should provide a FunctionResponse
for each function call in the next turn. Based on the function responses,
Model will generate the final response back to the user.
Maximum 64 function declarations can be provided.
repeated .google.cloud.vertexai.v1.FunctionDeclaration function_declarations = 1 [(.google.api.field_behavior) = OPTIONAL];
| Parameter |
| Name |
Description |
index |
int
|
publicList<?extendsFunctionDeclarationOrBuilder>getFunctionDeclarationsOrBuilderList()
Optional. Function tool type.
One or more function declarations to be passed to the model along with the
current user query. Model may decide to call a subset of these functions
by populating FunctionCall in the response.
User should provide a FunctionResponse
for each function call in the next turn. Based on the function responses,
Model will generate the final response back to the user.
Maximum 64 function declarations can be provided.
repeated .google.cloud.vertexai.v1.FunctionDeclaration function_declarations = 1 [(.google.api.field_behavior) = OPTIONAL];
| Returns |
| Type |
Description |
List<? extends com.google.cloud.vertexai.api.FunctionDeclarationOrBuilder> |
publicGoogleSearchRetrievalgetGoogleSearchRetrieval()
Optional. GoogleSearchRetrieval tool type.
Specialized retrieval tool that is powered by Google search.
.google.cloud.vertexai.v1.GoogleSearchRetrieval google_search_retrieval = 3 [(.google.api.field_behavior) = OPTIONAL];
publicGoogleSearchRetrievalOrBuildergetGoogleSearchRetrievalOrBuilder()
Optional. GoogleSearchRetrieval tool type.
Specialized retrieval tool that is powered by Google search.
.google.cloud.vertexai.v1.GoogleSearchRetrieval google_search_retrieval = 3 [(.google.api.field_behavior) = OPTIONAL];
publicParser<Tool>getParserForType()
Overrides
publicRetrievalgetRetrieval()
Optional. Retrieval tool type.
System will always execute the provided retrieval tool(s) to get external
knowledge to answer the prompt. Retrieval results are presented to the
model for generation.
.google.cloud.vertexai.v1.Retrieval retrieval = 2 [(.google.api.field_behavior) = OPTIONAL];
| Returns |
| Type |
Description |
Retrieval |
The retrieval.
|
publicRetrievalOrBuildergetRetrievalOrBuilder()
Optional. Retrieval tool type.
System will always execute the provided retrieval tool(s) to get external
knowledge to answer the prompt. Retrieval results are presented to the
model for generation.
.google.cloud.vertexai.v1.Retrieval retrieval = 2 [(.google.api.field_behavior) = OPTIONAL];
publicintgetSerializedSize()
| Returns |
| Type |
Description |
int |
Overrides
publicbooleanhasGoogleSearchRetrieval()
Optional. GoogleSearchRetrieval tool type.
Specialized retrieval tool that is powered by Google search.
.google.cloud.vertexai.v1.GoogleSearchRetrieval google_search_retrieval = 3 [(.google.api.field_behavior) = OPTIONAL];
| Returns |
| Type |
Description |
boolean |
Whether the googleSearchRetrieval field is set.
|
publicbooleanhasRetrieval()
Optional. Retrieval tool type.
System will always execute the provided retrieval tool(s) to get external
knowledge to answer the prompt. Retrieval results are presented to the
model for generation.
.google.cloud.vertexai.v1.Retrieval retrieval = 2 [(.google.api.field_behavior) = OPTIONAL];
| Returns |
| Type |
Description |
boolean |
Whether the retrieval field is set.
|
| Returns |
| Type |
Description |
int |
Overrides
protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Overrides
publicfinalbooleanisInitialized()
Overrides
publicTool.BuildernewBuilderForType()
protectedTool.BuildernewBuilderForType(GeneratedMessageV3.BuilderParentparent)
Overrides
protectedObjectnewInstance(GeneratedMessageV3.UnusedPrivateParameterunused)
| Returns |
| Type |
Description |
Object |
Overrides
publicTool.BuildertoBuilder()
publicvoidwriteTo(CodedOutputStreamoutput)
Overrides