Class Tool

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.cloud.aiplatform.v1.Tool
All Implemented Interfaces:
ToolOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

@Generated public final class Tool extends com.google.protobuf.GeneratedMessage 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.v1.Tool
See Also:
  • Field Details

    • FUNCTION_DECLARATIONS_FIELD_NUMBER

      public static final int FUNCTION_DECLARATIONS_FIELD_NUMBER
      See Also:
    • RETRIEVAL_FIELD_NUMBER

      public static final int RETRIEVAL_FIELD_NUMBER
      See Also:
    • GOOGLE_SEARCH_FIELD_NUMBER

      public static final int GOOGLE_SEARCH_FIELD_NUMBER
      See Also:
    • GOOGLE_SEARCH_RETRIEVAL_FIELD_NUMBER

      public static final int GOOGLE_SEARCH_RETRIEVAL_FIELD_NUMBER
      See Also:
    • GOOGLE_MAPS_FIELD_NUMBER

      public static final int GOOGLE_MAPS_FIELD_NUMBER
      See Also:
    • ENTERPRISE_WEB_SEARCH_FIELD_NUMBER

      public static final int ENTERPRISE_WEB_SEARCH_FIELD_NUMBER
      See Also:
    • PARALLEL_AI_SEARCH_FIELD_NUMBER

      public static final int PARALLEL_AI_SEARCH_FIELD_NUMBER
      See Also:
    • CODE_EXECUTION_FIELD_NUMBER

      public static final int CODE_EXECUTION_FIELD_NUMBER
      See Also:
    • URL_CONTEXT_FIELD_NUMBER

      public static final int URL_CONTEXT_FIELD_NUMBER
      See Also:
    • COMPUTER_USE_FIELD_NUMBER

      public static final int COMPUTER_USE_FIELD_NUMBER
      See Also:
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage
    • 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][google.cloud.aiplatform.v1.Part.function_call]
       in the response. User should provide a
       [FunctionResponse][google.cloud.aiplatform.v1.Part.function_response] 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.v1.FunctionDeclaration function_declarations = 1 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getFunctionDeclarationsList in interface ToolOrBuilder
    • 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][google.cloud.aiplatform.v1.Part.function_call]
       in the response. User should provide a
       [FunctionResponse][google.cloud.aiplatform.v1.Part.function_response] 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.v1.FunctionDeclaration function_declarations = 1 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getFunctionDeclarationsOrBuilderList in interface ToolOrBuilder
    • 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][google.cloud.aiplatform.v1.Part.function_call]
       in the response. User should provide a
       [FunctionResponse][google.cloud.aiplatform.v1.Part.function_response] 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.v1.FunctionDeclaration function_declarations = 1 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getFunctionDeclarationsCount in interface ToolOrBuilder
    • getFunctionDeclarations

      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][google.cloud.aiplatform.v1.Part.function_call]
       in the response. User should provide a
       [FunctionResponse][google.cloud.aiplatform.v1.Part.function_response] 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.v1.FunctionDeclaration function_declarations = 1 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getFunctionDeclarations in interface ToolOrBuilder
    • getFunctionDeclarationsOrBuilder

      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][google.cloud.aiplatform.v1.Part.function_call]
       in the response. User should provide a
       [FunctionResponse][google.cloud.aiplatform.v1.Part.function_response] 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.v1.FunctionDeclaration function_declarations = 1 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getFunctionDeclarationsOrBuilder in interface ToolOrBuilder
    • 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.v1.Retrieval retrieval = 2 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      hasRetrieval in interface ToolOrBuilder
      Returns:
      Whether the retrieval field is set.
    • 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.v1.Retrieval retrieval = 2 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getRetrieval in interface ToolOrBuilder
      Returns:
      The retrieval.
    • 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.v1.Retrieval retrieval = 2 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getRetrievalOrBuilder in interface ToolOrBuilder
    • hasGoogleSearch

      public boolean hasGoogleSearch()
       Optional. GoogleSearch tool type.
       Tool to support Google Search in Model. Powered by Google.
       
      .google.cloud.aiplatform.v1.Tool.GoogleSearch google_search = 7 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      hasGoogleSearch in interface ToolOrBuilder
      Returns:
      Whether the googleSearch field is set.
    • getGoogleSearch

      public Tool.GoogleSearch getGoogleSearch()
       Optional. GoogleSearch tool type.
       Tool to support Google Search in Model. Powered by Google.
       
      .google.cloud.aiplatform.v1.Tool.GoogleSearch google_search = 7 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getGoogleSearch in interface ToolOrBuilder
      Returns:
      The googleSearch.
    • getGoogleSearchOrBuilder

      public Tool.GoogleSearchOrBuilder getGoogleSearchOrBuilder()
       Optional. GoogleSearch tool type.
       Tool to support Google Search in Model. Powered by Google.
       
      .google.cloud.aiplatform.v1.Tool.GoogleSearch google_search = 7 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getGoogleSearchOrBuilder in interface ToolOrBuilder
    • hasGoogleSearchRetrieval

      public boolean hasGoogleSearchRetrieval()
       Optional. GoogleSearchRetrieval tool type.
       Specialized retrieval tool that is powered by Google search.
       
      .google.cloud.aiplatform.v1.GoogleSearchRetrieval google_search_retrieval = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      hasGoogleSearchRetrieval in interface ToolOrBuilder
      Returns:
      Whether the googleSearchRetrieval field is set.
    • getGoogleSearchRetrieval

      public GoogleSearchRetrieval getGoogleSearchRetrieval()
       Optional. GoogleSearchRetrieval tool type.
       Specialized retrieval tool that is powered by Google search.
       
      .google.cloud.aiplatform.v1.GoogleSearchRetrieval google_search_retrieval = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getGoogleSearchRetrieval in interface ToolOrBuilder
      Returns:
      The googleSearchRetrieval.
    • getGoogleSearchRetrievalOrBuilder

      public GoogleSearchRetrievalOrBuilder getGoogleSearchRetrievalOrBuilder()
       Optional. GoogleSearchRetrieval tool type.
       Specialized retrieval tool that is powered by Google search.
       
      .google.cloud.aiplatform.v1.GoogleSearchRetrieval google_search_retrieval = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getGoogleSearchRetrievalOrBuilder in interface ToolOrBuilder
    • hasGoogleMaps

      public boolean hasGoogleMaps()
       Optional. GoogleMaps tool type.
       Tool to support Google Maps in Model.
       
      .google.cloud.aiplatform.v1.GoogleMaps google_maps = 5 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      hasGoogleMaps in interface ToolOrBuilder
      Returns:
      Whether the googleMaps field is set.
    • getGoogleMaps

      public GoogleMaps getGoogleMaps()
       Optional. GoogleMaps tool type.
       Tool to support Google Maps in Model.
       
      .google.cloud.aiplatform.v1.GoogleMaps google_maps = 5 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getGoogleMaps in interface ToolOrBuilder
      Returns:
      The googleMaps.
    • getGoogleMapsOrBuilder

      public GoogleMapsOrBuilder getGoogleMapsOrBuilder()
       Optional. GoogleMaps tool type.
       Tool to support Google Maps in Model.
       
      .google.cloud.aiplatform.v1.GoogleMaps google_maps = 5 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getGoogleMapsOrBuilder in interface ToolOrBuilder
    • hasEnterpriseWebSearch

      public boolean hasEnterpriseWebSearch()
       Optional. Tool to support searching public web data, powered by Vertex AI
       Search and Sec4 compliance.
       
      .google.cloud.aiplatform.v1.EnterpriseWebSearch enterprise_web_search = 6 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      hasEnterpriseWebSearch in interface ToolOrBuilder
      Returns:
      Whether the enterpriseWebSearch field is set.
    • getEnterpriseWebSearch

      public EnterpriseWebSearch getEnterpriseWebSearch()
       Optional. Tool to support searching public web data, powered by Vertex AI
       Search and Sec4 compliance.
       
      .google.cloud.aiplatform.v1.EnterpriseWebSearch enterprise_web_search = 6 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getEnterpriseWebSearch in interface ToolOrBuilder
      Returns:
      The enterpriseWebSearch.
    • getEnterpriseWebSearchOrBuilder

      public EnterpriseWebSearchOrBuilder getEnterpriseWebSearchOrBuilder()
       Optional. Tool to support searching public web data, powered by Vertex AI
       Search and Sec4 compliance.
       
      .google.cloud.aiplatform.v1.EnterpriseWebSearch enterprise_web_search = 6 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getEnterpriseWebSearchOrBuilder in interface ToolOrBuilder
    • hasParallelAiSearch

      public boolean hasParallelAiSearch()
       Optional. If specified, Vertex AI will use Parallel.ai to search for
       information to answer user queries. The search results will be grounded on
       Parallel.ai and presented to the model for response generation
       
      .google.cloud.aiplatform.v1.Tool.ParallelAiSearch parallel_ai_search = 13 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      hasParallelAiSearch in interface ToolOrBuilder
      Returns:
      Whether the parallelAiSearch field is set.
    • getParallelAiSearch

      public Tool.ParallelAiSearch getParallelAiSearch()
       Optional. If specified, Vertex AI will use Parallel.ai to search for
       information to answer user queries. The search results will be grounded on
       Parallel.ai and presented to the model for response generation
       
      .google.cloud.aiplatform.v1.Tool.ParallelAiSearch parallel_ai_search = 13 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getParallelAiSearch in interface ToolOrBuilder
      Returns:
      The parallelAiSearch.
    • getParallelAiSearchOrBuilder

      public Tool.ParallelAiSearchOrBuilder getParallelAiSearchOrBuilder()
       Optional. If specified, Vertex AI will use Parallel.ai to search for
       information to answer user queries. The search results will be grounded on
       Parallel.ai and presented to the model for response generation
       
      .google.cloud.aiplatform.v1.Tool.ParallelAiSearch parallel_ai_search = 13 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getParallelAiSearchOrBuilder in interface ToolOrBuilder
    • hasCodeExecution

      public boolean hasCodeExecution()
       Optional. CodeExecution tool type.
       Enables the model to execute code as part of generation.
       
      .google.cloud.aiplatform.v1.Tool.CodeExecution code_execution = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      hasCodeExecution in interface ToolOrBuilder
      Returns:
      Whether the codeExecution field is set.
    • getCodeExecution

      public Tool.CodeExecution getCodeExecution()
       Optional. CodeExecution tool type.
       Enables the model to execute code as part of generation.
       
      .google.cloud.aiplatform.v1.Tool.CodeExecution code_execution = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getCodeExecution in interface ToolOrBuilder
      Returns:
      The codeExecution.
    • getCodeExecutionOrBuilder

      public Tool.CodeExecutionOrBuilder getCodeExecutionOrBuilder()
       Optional. CodeExecution tool type.
       Enables the model to execute code as part of generation.
       
      .google.cloud.aiplatform.v1.Tool.CodeExecution code_execution = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getCodeExecutionOrBuilder in interface ToolOrBuilder
    • hasUrlContext

      public boolean hasUrlContext()
       Optional. Tool to support URL context retrieval.
       
      .google.cloud.aiplatform.v1.UrlContext url_context = 10 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      hasUrlContext in interface ToolOrBuilder
      Returns:
      Whether the urlContext field is set.
    • getUrlContext

      public UrlContext getUrlContext()
       Optional. Tool to support URL context retrieval.
       
      .google.cloud.aiplatform.v1.UrlContext url_context = 10 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getUrlContext in interface ToolOrBuilder
      Returns:
      The urlContext.
    • getUrlContextOrBuilder

      public UrlContextOrBuilder getUrlContextOrBuilder()
       Optional. Tool to support URL context retrieval.
       
      .google.cloud.aiplatform.v1.UrlContext url_context = 10 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getUrlContextOrBuilder in interface ToolOrBuilder
    • hasComputerUse

      public boolean hasComputerUse()
       Optional. Tool to support the model interacting directly with the computer.
       If enabled, it automatically populates computer-use specific Function
       Declarations.
       
      .google.cloud.aiplatform.v1.Tool.ComputerUse computer_use = 11 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      hasComputerUse in interface ToolOrBuilder
      Returns:
      Whether the computerUse field is set.
    • getComputerUse

      public Tool.ComputerUse getComputerUse()
       Optional. Tool to support the model interacting directly with the computer.
       If enabled, it automatically populates computer-use specific Function
       Declarations.
       
      .google.cloud.aiplatform.v1.Tool.ComputerUse computer_use = 11 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getComputerUse in interface ToolOrBuilder
      Returns:
      The computerUse.
    • getComputerUseOrBuilder

      public Tool.ComputerUseOrBuilder getComputerUseOrBuilder()
       Optional. Tool to support the model interacting directly with the computer.
       If enabled, it automatically populates computer-use specific Function
       Declarations.
       
      .google.cloud.aiplatform.v1.Tool.ComputerUse computer_use = 11 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getComputerUseOrBuilder in interface ToolOrBuilder
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessage
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessage
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.google.protobuf.AbstractMessage
    • parseFrom

      public static Tool parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Tool parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Tool parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Tool parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Tool parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Tool parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Tool parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Tool parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static Tool parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static Tool parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Tool parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Tool parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

      public Tool.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static Tool.Builder newBuilder()
    • newBuilder

      public static Tool.Builder newBuilder(Tool prototype)
    • toBuilder

      public Tool.Builder toBuilder()
      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected Tool.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
      Overrides:
      newBuilderForType in class com.google.protobuf.AbstractMessage
    • getDefaultInstance

      public static Tool getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<Tool> parser()
    • getParserForType

      public com.google.protobuf.Parser<Tool> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessage
    • getDefaultInstanceForType

      public Tool getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder