Class Tool.Builder (0.2.0)

public static final class Tool.Builder extends GeneratedMessageV3.Builder<Tool.Builder> implements ToolOrBuilder

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.

Protobuf type google.cloud.vertexai.v1beta1.Tool

Implements

ToolOrBuilder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addAllFunctionDeclarations(Iterable<? extends FunctionDeclaration> values)

public Tool.Builder addAllFunctionDeclarations(Iterable<? extends FunctionDeclaration> values)

Optional. 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.v1beta1.FunctionDeclaration function_declarations = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
values Iterable<? extends com.google.cloud.vertexai.api.FunctionDeclaration>
Returns
Type Description
Tool.Builder

addFunctionDeclarations(FunctionDeclaration value)

public Tool.Builder addFunctionDeclarations(FunctionDeclaration value)

Optional. 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.v1beta1.FunctionDeclaration function_declarations = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value FunctionDeclaration
Returns
Type Description
Tool.Builder

addFunctionDeclarations(FunctionDeclaration.Builder builderForValue)

public Tool.Builder addFunctionDeclarations(FunctionDeclaration.Builder builderForValue)

Optional. 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.v1beta1.FunctionDeclaration function_declarations = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue FunctionDeclaration.Builder
Returns
Type Description
Tool.Builder

addFunctionDeclarations(int index, FunctionDeclaration value)

public Tool.Builder addFunctionDeclarations(int index, FunctionDeclaration value)

Optional. 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.v1beta1.FunctionDeclaration function_declarations = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
value FunctionDeclaration
Returns
Type Description
Tool.Builder

addFunctionDeclarations(int index, FunctionDeclaration.Builder builderForValue)

public Tool.Builder addFunctionDeclarations(int index, FunctionDeclaration.Builder builderForValue)

Optional. 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.v1beta1.FunctionDeclaration function_declarations = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
builderForValue FunctionDeclaration.Builder
Returns
Type Description
Tool.Builder

addFunctionDeclarationsBuilder()

public FunctionDeclaration.Builder addFunctionDeclarationsBuilder()

Optional. 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.v1beta1.FunctionDeclaration function_declarations = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
FunctionDeclaration.Builder

addFunctionDeclarationsBuilder(int index)

public FunctionDeclaration.Builder addFunctionDeclarationsBuilder(int index)

Optional. 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.v1beta1.FunctionDeclaration function_declarations = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
FunctionDeclaration.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Tool.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Tool.Builder
Overrides

build()

public Tool build()
Returns
Type Description
Tool

buildPartial()

public Tool buildPartial()
Returns
Type Description
Tool

clear()

public Tool.Builder clear()
Returns
Type Description
Tool.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public Tool.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
Tool.Builder
Overrides

clearFunctionDeclarations()

public Tool.Builder clearFunctionDeclarations()

Optional. 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.v1beta1.FunctionDeclaration function_declarations = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Tool.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public Tool.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
Tool.Builder
Overrides

clone()

public Tool.Builder clone()
Returns
Type Description
Tool.Builder
Overrides

getDefaultInstanceForType()

public Tool getDefaultInstanceForType()
Returns
Type Description
Tool

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getFunctionDeclarations(int index)

public FunctionDeclaration getFunctionDeclarations(int index)

Optional. 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.v1beta1.FunctionDeclaration function_declarations = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
FunctionDeclaration

getFunctionDeclarationsBuilder(int index)

public FunctionDeclaration.Builder getFunctionDeclarationsBuilder(int index)

Optional. 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.v1beta1.FunctionDeclaration function_declarations = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
FunctionDeclaration.Builder

getFunctionDeclarationsBuilderList()

public List<FunctionDeclaration.Builder> getFunctionDeclarationsBuilderList()

Optional. 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.v1beta1.FunctionDeclaration function_declarations = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<Builder>

getFunctionDeclarationsCount()

public int getFunctionDeclarationsCount()

Optional. 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.v1beta1.FunctionDeclaration function_declarations = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

getFunctionDeclarationsList()

public List<FunctionDeclaration> getFunctionDeclarationsList()

Optional. 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.v1beta1.FunctionDeclaration function_declarations = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<FunctionDeclaration>

getFunctionDeclarationsOrBuilder(int index)

public FunctionDeclarationOrBuilder getFunctionDeclarationsOrBuilder(int index)

Optional. 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.v1beta1.FunctionDeclaration function_declarations = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
FunctionDeclarationOrBuilder

getFunctionDeclarationsOrBuilderList()

public List<? extends FunctionDeclarationOrBuilder> getFunctionDeclarationsOrBuilderList()

Optional. 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.v1beta1.FunctionDeclaration function_declarations = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<? extends com.google.cloud.vertexai.api.FunctionDeclarationOrBuilder>

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(Tool other)

public Tool.Builder mergeFrom(Tool other)
Parameter
Name Description
other Tool
Returns
Type Description
Tool.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Tool.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Tool.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public Tool.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
Tool.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Tool.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Tool.Builder
Overrides

removeFunctionDeclarations(int index)

public Tool.Builder removeFunctionDeclarations(int index)

Optional. 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.v1beta1.FunctionDeclaration function_declarations = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
Tool.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public Tool.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Tool.Builder
Overrides

setFunctionDeclarations(int index, FunctionDeclaration value)

public Tool.Builder setFunctionDeclarations(int index, FunctionDeclaration value)

Optional. 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.v1beta1.FunctionDeclaration function_declarations = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
value FunctionDeclaration
Returns
Type Description
Tool.Builder

setFunctionDeclarations(int index, FunctionDeclaration.Builder builderForValue)

public Tool.Builder setFunctionDeclarations(int index, FunctionDeclaration.Builder builderForValue)

Optional. 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.v1beta1.FunctionDeclaration function_declarations = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
builderForValue FunctionDeclaration.Builder
Returns
Type Description
Tool.Builder

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public Tool.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
Tool.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final Tool.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Tool.Builder
Overrides