- 3.56.0 (latest)
- 3.55.0
- 3.54.0
- 3.53.0
- 3.52.0
- 3.50.0
- 3.49.0
- 3.48.0
- 3.47.0
- 3.46.0
- 3.45.0
- 3.44.0
- 3.43.0
- 3.42.0
- 3.41.0
- 3.40.0
- 3.38.0
- 3.37.0
- 3.36.0
- 3.35.0
- 3.34.0
- 3.33.0
- 3.32.0
- 3.31.0
- 3.30.0
- 3.29.0
- 3.28.0
- 3.25.0
- 3.24.0
- 3.23.0
- 3.22.0
- 3.21.0
- 3.20.0
- 3.19.0
- 3.18.0
- 3.17.0
- 3.16.0
- 3.15.0
- 3.14.0
- 3.13.0
- 3.12.0
- 3.11.0
- 3.10.0
- 3.9.0
- 3.8.0
- 3.7.0
- 3.6.0
- 3.5.0
- 3.4.2
- 3.3.0
- 3.2.0
- 3.0.0
- 2.9.8
- 2.8.9
- 2.7.4
- 2.5.3
- 2.4.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. A Tool object should contain exactly
one type of Tool (e.g FunctionDeclaration, Retrieval or
GoogleSearchRetrieval).
Protobuf type google.cloud.aiplatform.v1beta1.Tool
Inheritance
Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessageV3.Builder > Tool.BuilderImplements
ToolOrBuilderStatic 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. 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 128 function declarations can be provided.
repeated .google.cloud.aiplatform.v1beta1.FunctionDeclaration function_declarations = 1 [(.google.api.field_behavior) = OPTIONAL];
Parameter | |
---|---|
Name | Description |
values |
Iterable<? extends com.google.cloud.aiplatform.v1beta1.FunctionDeclaration> |
Returns | |
---|---|
Type | Description |
Tool.Builder |
addFunctionDeclarations(FunctionDeclaration value)
public Tool.Builder addFunctionDeclarations(FunctionDeclaration value)
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 128 function declarations can be provided.
repeated .google.cloud.aiplatform.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. 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 128 function declarations can be provided.
repeated .google.cloud.aiplatform.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. 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 128 function declarations can be provided.
repeated .google.cloud.aiplatform.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. 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 128 function declarations can be provided.
repeated .google.cloud.aiplatform.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. 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 128 function declarations can be provided.
repeated .google.cloud.aiplatform.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. 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 128 function declarations can be provided.
repeated .google.cloud.aiplatform.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 |
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 |
clearCodeExecution()
public Tool.Builder clearCodeExecution()
Optional. CodeExecution tool type. Enables the model to execute code as part of generation. This field is only used by the Gemini Developer API services.
.google.cloud.aiplatform.v1beta1.Tool.CodeExecution code_execution = 4 [(.google.api.field_behavior) = OPTIONAL];
Returns | |
---|---|
Type | Description |
Tool.Builder |
clearField(Descriptors.FieldDescriptor field)
public Tool.Builder clearField(Descriptors.FieldDescriptor field)
Parameter | |
---|---|
Name | Description |
field |
FieldDescriptor |
Returns | |
---|---|
Type | Description |
Tool.Builder |
clearFunctionDeclarations()
public Tool.Builder clearFunctionDeclarations()
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 128 function declarations can be provided.
repeated .google.cloud.aiplatform.v1beta1.FunctionDeclaration function_declarations = 1 [(.google.api.field_behavior) = OPTIONAL];
Returns | |
---|---|
Type | Description |
Tool.Builder |
clearGoogleSearchRetrieval()
public Tool.Builder clearGoogleSearchRetrieval()
Optional. GoogleSearchRetrieval tool type. Specialized retrieval tool that is powered by Google search.
.google.cloud.aiplatform.v1beta1.GoogleSearchRetrieval google_search_retrieval = 3 [(.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 |
clearRetrieval()
public Tool.Builder clearRetrieval()
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.aiplatform.v1beta1.Retrieval retrieval = 2 [(.google.api.field_behavior) = OPTIONAL];
Returns | |
---|---|
Type | Description |
Tool.Builder |
clone()
public Tool.Builder clone()
Returns | |
---|---|
Type | Description |
Tool.Builder |
getCodeExecution()
public Tool.CodeExecution getCodeExecution()
Optional. CodeExecution tool type. Enables the model to execute code as part of generation. This field is only used by the Gemini Developer API services.
.google.cloud.aiplatform.v1beta1.Tool.CodeExecution code_execution = 4 [(.google.api.field_behavior) = OPTIONAL];
Returns | |
---|---|
Type | Description |
Tool.CodeExecution |
The codeExecution. |
getCodeExecutionBuilder()
public Tool.CodeExecution.Builder getCodeExecutionBuilder()
Optional. CodeExecution tool type. Enables the model to execute code as part of generation. This field is only used by the Gemini Developer API services.
.google.cloud.aiplatform.v1beta1.Tool.CodeExecution code_execution = 4 [(.google.api.field_behavior) = OPTIONAL];
Returns | |
---|---|
Type | Description |
Tool.CodeExecution.Builder |
getCodeExecutionOrBuilder()
public Tool.CodeExecutionOrBuilder getCodeExecutionOrBuilder()
Optional. CodeExecution tool type. Enables the model to execute code as part of generation. This field is only used by the Gemini Developer API services.
.google.cloud.aiplatform.v1beta1.Tool.CodeExecution code_execution = 4 [(.google.api.field_behavior) = OPTIONAL];
Returns | |
---|---|
Type | Description |
Tool.CodeExecutionOrBuilder |
getDefaultInstanceForType()
public Tool getDefaultInstanceForType()
Returns | |
---|---|
Type | Description |
Tool |
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Returns | |
---|---|
Type | Description |
Descriptor |
getFunctionDeclarations(int index)
public FunctionDeclaration getFunctionDeclarations(int index)
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 128 function declarations can be provided.
repeated .google.cloud.aiplatform.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. 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 128 function declarations can be provided.
repeated .google.cloud.aiplatform.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. 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 128 function declarations can be provided.
repeated .google.cloud.aiplatform.v1beta1.FunctionDeclaration function_declarations = 1 [(.google.api.field_behavior) = OPTIONAL];
Returns | |
---|---|
Type | Description |
List<Builder> |
getFunctionDeclarationsCount()
public int getFunctionDeclarationsCount()
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 128 function declarations can be provided.
repeated .google.cloud.aiplatform.v1beta1.FunctionDeclaration function_declarations = 1 [(.google.api.field_behavior) = OPTIONAL];
Returns | |
---|---|
Type | Description |
int |
getFunctionDeclarationsList()
public List<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 128 function declarations can be provided.
repeated .google.cloud.aiplatform.v1beta1.FunctionDeclaration function_declarations = 1 [(.google.api.field_behavior) = OPTIONAL];
Returns | |
---|---|
Type | Description |
List<FunctionDeclaration> |
getFunctionDeclarationsOrBuilder(int index)
public FunctionDeclarationOrBuilder getFunctionDeclarationsOrBuilder(int index)
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 128 function declarations can be provided.
repeated .google.cloud.aiplatform.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. 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 128 function declarations can be provided.
repeated .google.cloud.aiplatform.v1beta1.FunctionDeclaration function_declarations = 1 [(.google.api.field_behavior) = OPTIONAL];
Returns | |
---|---|
Type | Description |
List<? extends com.google.cloud.aiplatform.v1beta1.FunctionDeclarationOrBuilder> |
getGoogleSearchRetrieval()
public GoogleSearchRetrieval getGoogleSearchRetrieval()
Optional. GoogleSearchRetrieval tool type. Specialized retrieval tool that is powered by Google search.
.google.cloud.aiplatform.v1beta1.GoogleSearchRetrieval google_search_retrieval = 3 [(.google.api.field_behavior) = OPTIONAL];
Returns | |
---|---|
Type | Description |
GoogleSearchRetrieval |
The googleSearchRetrieval. |
getGoogleSearchRetrievalBuilder()
public GoogleSearchRetrieval.Builder getGoogleSearchRetrievalBuilder()
Optional. GoogleSearchRetrieval tool type. Specialized retrieval tool that is powered by Google search.
.google.cloud.aiplatform.v1beta1.GoogleSearchRetrieval google_search_retrieval = 3 [(.google.api.field_behavior) = OPTIONAL];
Returns | |
---|---|
Type | Description |
GoogleSearchRetrieval.Builder |
getGoogleSearchRetrievalOrBuilder()
public GoogleSearchRetrievalOrBuilder getGoogleSearchRetrievalOrBuilder()
Optional. GoogleSearchRetrieval tool type. Specialized retrieval tool that is powered by Google search.
.google.cloud.aiplatform.v1beta1.GoogleSearchRetrieval google_search_retrieval = 3 [(.google.api.field_behavior) = OPTIONAL];
Returns | |
---|---|
Type | Description |
GoogleSearchRetrievalOrBuilder |
getRetrieval()
public Retrieval getRetrieval()
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.aiplatform.v1beta1.Retrieval retrieval = 2 [(.google.api.field_behavior) = OPTIONAL];
Returns | |
---|---|
Type | Description |
Retrieval |
The retrieval. |
getRetrievalBuilder()
public Retrieval.Builder getRetrievalBuilder()
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.aiplatform.v1beta1.Retrieval retrieval = 2 [(.google.api.field_behavior) = OPTIONAL];
Returns | |
---|---|
Type | Description |
Retrieval.Builder |
getRetrievalOrBuilder()
public RetrievalOrBuilder getRetrievalOrBuilder()
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.aiplatform.v1beta1.Retrieval retrieval = 2 [(.google.api.field_behavior) = OPTIONAL];
Returns | |
---|---|
Type | Description |
RetrievalOrBuilder |
hasCodeExecution()
public boolean hasCodeExecution()
Optional. CodeExecution tool type. Enables the model to execute code as part of generation. This field is only used by the Gemini Developer API services.
.google.cloud.aiplatform.v1beta1.Tool.CodeExecution code_execution = 4 [(.google.api.field_behavior) = OPTIONAL];
Returns | |
---|---|
Type | Description |
boolean |
Whether the codeExecution field is set. |
hasGoogleSearchRetrieval()
public boolean hasGoogleSearchRetrieval()
Optional. GoogleSearchRetrieval tool type. Specialized retrieval tool that is powered by Google search.
.google.cloud.aiplatform.v1beta1.GoogleSearchRetrieval google_search_retrieval = 3 [(.google.api.field_behavior) = OPTIONAL];
Returns | |
---|---|
Type | Description |
boolean |
Whether the googleSearchRetrieval field is set. |
hasRetrieval()
public boolean hasRetrieval()
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.aiplatform.v1beta1.Retrieval retrieval = 2 [(.google.api.field_behavior) = OPTIONAL];
Returns | |
---|---|
Type | Description |
boolean |
Whether the retrieval field is set. |
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns | |
---|---|
Type | Description |
FieldAccessorTable |
isInitialized()
public final boolean isInitialized()
Returns | |
---|---|
Type | Description |
boolean |
mergeCodeExecution(Tool.CodeExecution value)
public Tool.Builder mergeCodeExecution(Tool.CodeExecution value)
Optional. CodeExecution tool type. Enables the model to execute code as part of generation. This field is only used by the Gemini Developer API services.
.google.cloud.aiplatform.v1beta1.Tool.CodeExecution code_execution = 4 [(.google.api.field_behavior) = OPTIONAL];
Parameter | |
---|---|
Name | Description |
value |
Tool.CodeExecution |
Returns | |
---|---|
Type | Description |
Tool.Builder |
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 |
Exceptions | |
---|---|
Type | Description |
IOException |
mergeFrom(Message other)
public Tool.Builder mergeFrom(Message other)
Parameter | |
---|---|
Name | Description |
other |
Message |
Returns | |
---|---|
Type | Description |
Tool.Builder |
mergeGoogleSearchRetrieval(GoogleSearchRetrieval value)
public Tool.Builder mergeGoogleSearchRetrieval(GoogleSearchRetrieval value)
Optional. GoogleSearchRetrieval tool type. Specialized retrieval tool that is powered by Google search.
.google.cloud.aiplatform.v1beta1.GoogleSearchRetrieval google_search_retrieval = 3 [(.google.api.field_behavior) = OPTIONAL];
Parameter | |
---|---|
Name | Description |
value |
GoogleSearchRetrieval |
Returns | |
---|---|
Type | Description |
Tool.Builder |
mergeRetrieval(Retrieval value)
public Tool.Builder mergeRetrieval(Retrieval value)
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.aiplatform.v1beta1.Retrieval retrieval = 2 [(.google.api.field_behavior) = OPTIONAL];
Parameter | |
---|---|
Name | Description |
value |
Retrieval |
Returns | |
---|---|
Type | Description |
Tool.Builder |
mergeUnknownFields(UnknownFieldSet unknownFields)
public final Tool.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter | |
---|---|
Name | Description |
unknownFields |
UnknownFieldSet |
Returns | |
---|---|
Type | Description |
Tool.Builder |
removeFunctionDeclarations(int index)
public Tool.Builder removeFunctionDeclarations(int index)
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 128 function declarations can be provided.
repeated .google.cloud.aiplatform.v1beta1.FunctionDeclaration function_declarations = 1 [(.google.api.field_behavior) = OPTIONAL];
Parameter | |
---|---|
Name | Description |
index |
int |
Returns | |
---|---|
Type | Description |
Tool.Builder |
setCodeExecution(Tool.CodeExecution value)
public Tool.Builder setCodeExecution(Tool.CodeExecution value)
Optional. CodeExecution tool type. Enables the model to execute code as part of generation. This field is only used by the Gemini Developer API services.
.google.cloud.aiplatform.v1beta1.Tool.CodeExecution code_execution = 4 [(.google.api.field_behavior) = OPTIONAL];
Parameter | |
---|---|
Name | Description |
value |
Tool.CodeExecution |
Returns | |
---|---|
Type | Description |
Tool.Builder |
setCodeExecution(Tool.CodeExecution.Builder builderForValue)
public Tool.Builder setCodeExecution(Tool.CodeExecution.Builder builderForValue)
Optional. CodeExecution tool type. Enables the model to execute code as part of generation. This field is only used by the Gemini Developer API services.
.google.cloud.aiplatform.v1beta1.Tool.CodeExecution code_execution = 4 [(.google.api.field_behavior) = OPTIONAL];
Parameter | |
---|---|
Name | Description |
builderForValue |
Tool.CodeExecution.Builder |
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 |
setFunctionDeclarations(int index, FunctionDeclaration value)
public Tool.Builder setFunctionDeclarations(int index, FunctionDeclaration value)
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 128 function declarations can be provided.
repeated .google.cloud.aiplatform.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. 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 128 function declarations can be provided.
repeated .google.cloud.aiplatform.v1beta1.FunctionDeclaration function_declarations = 1 [(.google.api.field_behavior) = OPTIONAL];
Parameters | |
---|---|
Name | Description |
index |
int |
builderForValue |
FunctionDeclaration.Builder |
Returns | |
---|---|
Type | Description |
Tool.Builder |
setGoogleSearchRetrieval(GoogleSearchRetrieval value)
public Tool.Builder setGoogleSearchRetrieval(GoogleSearchRetrieval value)
Optional. GoogleSearchRetrieval tool type. Specialized retrieval tool that is powered by Google search.
.google.cloud.aiplatform.v1beta1.GoogleSearchRetrieval google_search_retrieval = 3 [(.google.api.field_behavior) = OPTIONAL];
Parameter | |
---|---|
Name | Description |
value |
GoogleSearchRetrieval |
Returns | |
---|---|
Type | Description |
Tool.Builder |
setGoogleSearchRetrieval(GoogleSearchRetrieval.Builder builderForValue)
public Tool.Builder setGoogleSearchRetrieval(GoogleSearchRetrieval.Builder builderForValue)
Optional. GoogleSearchRetrieval tool type. Specialized retrieval tool that is powered by Google search.
.google.cloud.aiplatform.v1beta1.GoogleSearchRetrieval google_search_retrieval = 3 [(.google.api.field_behavior) = OPTIONAL];
Parameter | |
---|---|
Name | Description |
builderForValue |
GoogleSearchRetrieval.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 |
setRetrieval(Retrieval value)
public Tool.Builder setRetrieval(Retrieval value)
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.aiplatform.v1beta1.Retrieval retrieval = 2 [(.google.api.field_behavior) = OPTIONAL];
Parameter | |
---|---|
Name | Description |
value |
Retrieval |
Returns | |
---|---|
Type | Description |
Tool.Builder |
setRetrieval(Retrieval.Builder builderForValue)
public Tool.Builder setRetrieval(Retrieval.Builder builderForValue)
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.aiplatform.v1beta1.Retrieval retrieval = 2 [(.google.api.field_behavior) = OPTIONAL];
Parameter | |
---|---|
Name | Description |
builderForValue |
Retrieval.Builder |
Returns | |
---|---|
Type | Description |
Tool.Builder |
setUnknownFields(UnknownFieldSet unknownFields)
public final Tool.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter | |
---|---|
Name | Description |
unknownFields |
UnknownFieldSet |
Returns | |
---|---|
Type | Description |
Tool.Builder |