diff --git a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/EndpointServiceSettings.java b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/EndpointServiceSettings.java index 82303d127407..a4bbf3da6107 100644 --- a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/EndpointServiceSettings.java +++ b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/EndpointServiceSettings.java @@ -242,7 +242,6 @@ public static Builder newBuilder() { } /** Returns a new REST builder for this class. */ - @BetaApi public static Builder newHttpJsonBuilder() { return Builder.createHttpJsonDefault(); } @@ -284,7 +283,6 @@ private static Builder createDefault() { return new Builder(EndpointServiceStubSettings.newBuilder()); } - @BetaApi private static Builder createHttpJsonDefault() { return new Builder(EndpointServiceStubSettings.newHttpJsonBuilder()); } diff --git a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/LlmUtilityServiceSettings.java b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/LlmUtilityServiceSettings.java index 037071042839..a10dd1ae4629 100644 --- a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/LlmUtilityServiceSettings.java +++ b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/LlmUtilityServiceSettings.java @@ -172,7 +172,6 @@ public static Builder newBuilder() { } /** Returns a new REST builder for this class. */ - @BetaApi public static Builder newHttpJsonBuilder() { return Builder.createHttpJsonDefault(); } @@ -214,7 +213,6 @@ private static Builder createDefault() { return new Builder(LlmUtilityServiceStubSettings.newBuilder()); } - @BetaApi private static Builder createHttpJsonDefault() { return new Builder(LlmUtilityServiceStubSettings.newHttpJsonBuilder()); } diff --git a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/PredictionServiceSettings.java b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/PredictionServiceSettings.java index 7c24e5b9fe32..b8a38d1811e0 100644 --- a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/PredictionServiceSettings.java +++ b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/PredictionServiceSettings.java @@ -238,7 +238,6 @@ public static Builder newBuilder() { } /** Returns a new REST builder for this class. */ - @BetaApi public static Builder newHttpJsonBuilder() { return Builder.createHttpJsonDefault(); } @@ -280,7 +279,6 @@ private static Builder createDefault() { return new Builder(PredictionServiceStubSettings.newBuilder()); } - @BetaApi private static Builder createHttpJsonDefault() { return new Builder(PredictionServiceStubSettings.newHttpJsonBuilder()); } diff --git a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/EndpointServiceStubSettings.java b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/EndpointServiceStubSettings.java index 8bdb2e4301f1..2653f8b141f4 100644 --- a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/EndpointServiceStubSettings.java +++ b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/EndpointServiceStubSettings.java @@ -897,8 +897,6 @@ public UnaryCallSettings.Builder createEndpoin } /** Returns the builder for the settings used for calls to createEndpoint. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") public OperationCallSettings.Builder< CreateEndpointRequest, Endpoint, CreateEndpointOperationMetadata> createEndpointOperationSettings() { @@ -928,8 +926,6 @@ public UnaryCallSettings.Builder deleteEndpoin } /** Returns the builder for the settings used for calls to deleteEndpoint. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") public OperationCallSettings.Builder deleteEndpointOperationSettings() { return deleteEndpointOperationSettings; @@ -941,8 +937,6 @@ public UnaryCallSettings.Builder deployModelSetti } /** Returns the builder for the settings used for calls to deployModel. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") public OperationCallSettings.Builder< DeployModelRequest, DeployModelResponse, DeployModelOperationMetadata> deployModelOperationSettings() { @@ -955,8 +949,6 @@ public UnaryCallSettings.Builder undeployModelS } /** Returns the builder for the settings used for calls to undeployModel. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") public OperationCallSettings.Builder< UndeployModelRequest, UndeployModelResponse, UndeployModelOperationMetadata> undeployModelOperationSettings() { @@ -970,8 +962,6 @@ public UnaryCallSettings.Builder undeployModelS } /** Returns the builder for the settings used for calls to mutateDeployedModel. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") public OperationCallSettings.Builder< MutateDeployedModelRequest, MutateDeployedModelResponse, diff --git a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/HttpJsonEndpointServiceCallableFactory.java b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/HttpJsonEndpointServiceCallableFactory.java index 96e3d6fe078a..1fee23603f05 100644 --- a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/HttpJsonEndpointServiceCallableFactory.java +++ b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/HttpJsonEndpointServiceCallableFactory.java @@ -16,7 +16,6 @@ package com.google.cloud.vertexai.api.stub; -import com.google.api.core.BetaApi; import com.google.api.gax.httpjson.HttpJsonCallSettings; import com.google.api.gax.httpjson.HttpJsonCallableFactory; import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; @@ -41,7 +40,6 @@ *

This class is for advanced usage. */ @Generated("by gapic-generator-java") -@BetaApi public class HttpJsonEndpointServiceCallableFactory implements HttpJsonStubCallableFactory { @@ -73,8 +71,6 @@ public UnaryCallable createBatchingCa httpJsonCallSettings, callSettings, clientContext); } - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") @Override public OperationCallable createOperationCallable( diff --git a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/HttpJsonEndpointServiceStub.java b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/HttpJsonEndpointServiceStub.java index cbf0e7c7aded..ea2859a0878b 100644 --- a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/HttpJsonEndpointServiceStub.java +++ b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/HttpJsonEndpointServiceStub.java @@ -20,7 +20,6 @@ import static com.google.cloud.vertexai.api.EndpointServiceClient.ListLocationsPagedResponse; import com.google.api.HttpRule; -import com.google.api.core.BetaApi; import com.google.api.core.InternalApi; import com.google.api.gax.core.BackgroundResource; import com.google.api.gax.core.BackgroundResourceAggregation; @@ -82,7 +81,6 @@ *

This class is for advanced usage and reflects the underlying API directly. */ @Generated("by gapic-generator-java") -@BetaApi public class HttpJsonEndpointServiceStub extends EndpointServiceStub { private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder() @@ -493,7 +491,9 @@ public class HttpJsonEndpointServiceStub extends EndpointServiceStub { "/ui/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:setIamPolicy", "/ui/{resource=projects/*/locations/*/models/*}:setIamPolicy", "/ui/{resource=projects/*/locations/*/endpoints/*}:setIamPolicy", - "/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:setIamPolicy") + "/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:setIamPolicy", + "/ui/{resource=projects/*/locations/*/featureOnlineStores/*}:setIamPolicy", + "/ui/{resource=projects/*/locations/*/featureOnlineStores/*/featureViews/*}:setIamPolicy") .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); @@ -539,7 +539,9 @@ public class HttpJsonEndpointServiceStub extends EndpointServiceStub { "/ui/{resource=projects/*/locations/*/models/*}:getIamPolicy", "/ui/{resource=projects/*/locations/*/endpoints/*}:getIamPolicy", "/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:getIamPolicy", - "/ui/{resource=projects/*/locations/*/publishers/*/models/*}:getIamPolicy") + "/ui/{resource=projects/*/locations/*/publishers/*/models/*}:getIamPolicy", + "/ui/{resource=projects/*/locations/*/featureOnlineStores/*}:getIamPolicy", + "/ui/{resource=projects/*/locations/*/featureOnlineStores/*/featureViews/*}:getIamPolicy") .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); @@ -581,7 +583,9 @@ public class HttpJsonEndpointServiceStub extends EndpointServiceStub { "/ui/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:testIamPermissions", "/ui/{resource=projects/*/locations/*/models/*}:testIamPermissions", "/ui/{resource=projects/*/locations/*/endpoints/*}:testIamPermissions", - "/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:testIamPermissions") + "/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:testIamPermissions", + "/ui/{resource=projects/*/locations/*/featureOnlineStores/*}:testIamPermissions", + "/ui/{resource=projects/*/locations/*/featureOnlineStores/*/featureViews/*}:testIamPermissions") .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); @@ -764,6 +768,11 @@ protected HttpJsonEndpointServiceStub( .setPost( "/ui/{name=projects/*/locations/*/hyperparameterTuningJobs/*/operations/*}:cancel") .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setPost( + "/ui/{name=projects/*/locations/*/tuningJobs/*/operations/*}:cancel") + .build()) .addAdditionalBindings( HttpRule.newBuilder() .setPost( @@ -938,6 +947,11 @@ protected HttpJsonEndpointServiceStub( .setPost( "/v1/{name=projects/*/locations/*/hyperparameterTuningJobs/*/operations/*}:cancel") .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setPost( + "/v1/{name=projects/*/locations/*/tuningJobs/*/operations/*}:cancel") + .build()) .addAdditionalBindings( HttpRule.newBuilder() .setPost( @@ -1526,6 +1540,11 @@ protected HttpJsonEndpointServiceStub( .setGet( "/ui/{name=projects/*/locations/*/hyperparameterTuningJobs/*/operations/*}") .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/ui/{name=projects/*/locations/*/tuningJobs/*/operations/*}") + .build()) .addAdditionalBindings( HttpRule.newBuilder() .setGet("/ui/{name=projects/*/locations/*/indexes/*/operations/*}") @@ -1716,6 +1735,11 @@ protected HttpJsonEndpointServiceStub( .setGet( "/v1/{name=projects/*/locations/*/hyperparameterTuningJobs/*/operations/*}") .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1/{name=projects/*/locations/*/tuningJobs/*/operations/*}") + .build()) .addAdditionalBindings( HttpRule.newBuilder() .setGet("/v1/{name=projects/*/locations/*/indexes/*/operations/*}") @@ -1914,6 +1938,10 @@ protected HttpJsonEndpointServiceStub( .setGet( "/ui/{name=projects/*/locations/*/hyperparameterTuningJobs/*}/operations") .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet("/ui/{name=projects/*/locations/*/tuningJobs/*}/operations") + .build()) .addAdditionalBindings( HttpRule.newBuilder() .setGet("/ui/{name=projects/*/locations/*/indexes/*}/operations") @@ -2101,6 +2129,10 @@ protected HttpJsonEndpointServiceStub( .setGet( "/v1/{name=projects/*/locations/*/hyperparameterTuningJobs/*}/operations") .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet("/ui/{name=projects/*/locations/*/tuningJobs/*}/operations") + .build()) .addAdditionalBindings( HttpRule.newBuilder() .setGet("/v1/{name=projects/*/locations/*/indexes/*}/operations") @@ -2302,6 +2334,11 @@ protected HttpJsonEndpointServiceStub( .setPost( "/ui/{name=projects/*/locations/*/hyperparameterTuningJobs/*/operations/*}:wait") .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setPost( + "/ui/{name=projects/*/locations/*/tuningJobs/*/operations/*}:wait") + .build()) .addAdditionalBindings( HttpRule.newBuilder() .setPost( diff --git a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/HttpJsonLlmUtilityServiceCallableFactory.java b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/HttpJsonLlmUtilityServiceCallableFactory.java index 4e4e68d66c2c..0a802f14f3df 100644 --- a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/HttpJsonLlmUtilityServiceCallableFactory.java +++ b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/HttpJsonLlmUtilityServiceCallableFactory.java @@ -16,7 +16,6 @@ package com.google.cloud.vertexai.api.stub; -import com.google.api.core.BetaApi; import com.google.api.gax.httpjson.HttpJsonCallSettings; import com.google.api.gax.httpjson.HttpJsonCallableFactory; import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; @@ -41,7 +40,6 @@ *

This class is for advanced usage. */ @Generated("by gapic-generator-java") -@BetaApi public class HttpJsonLlmUtilityServiceCallableFactory implements HttpJsonStubCallableFactory { @@ -73,8 +71,6 @@ public UnaryCallable createBatchingCa httpJsonCallSettings, callSettings, clientContext); } - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") @Override public OperationCallable createOperationCallable( diff --git a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/HttpJsonLlmUtilityServiceStub.java b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/HttpJsonLlmUtilityServiceStub.java index af7d16495cec..8086891047d0 100644 --- a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/HttpJsonLlmUtilityServiceStub.java +++ b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/HttpJsonLlmUtilityServiceStub.java @@ -18,7 +18,6 @@ import static com.google.cloud.vertexai.api.LlmUtilityServiceClient.ListLocationsPagedResponse; -import com.google.api.core.BetaApi; import com.google.api.core.InternalApi; import com.google.api.gax.core.BackgroundResource; import com.google.api.gax.core.BackgroundResourceAggregation; @@ -60,7 +59,6 @@ *

This class is for advanced usage and reflects the underlying API directly. */ @Generated("by gapic-generator-java") -@BetaApi public class HttpJsonLlmUtilityServiceStub extends LlmUtilityServiceStub { private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build(); @@ -234,7 +232,9 @@ public class HttpJsonLlmUtilityServiceStub extends LlmUtilityServiceStub { "/ui/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:setIamPolicy", "/ui/{resource=projects/*/locations/*/models/*}:setIamPolicy", "/ui/{resource=projects/*/locations/*/endpoints/*}:setIamPolicy", - "/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:setIamPolicy") + "/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:setIamPolicy", + "/ui/{resource=projects/*/locations/*/featureOnlineStores/*}:setIamPolicy", + "/ui/{resource=projects/*/locations/*/featureOnlineStores/*/featureViews/*}:setIamPolicy") .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); @@ -280,7 +280,9 @@ public class HttpJsonLlmUtilityServiceStub extends LlmUtilityServiceStub { "/ui/{resource=projects/*/locations/*/models/*}:getIamPolicy", "/ui/{resource=projects/*/locations/*/endpoints/*}:getIamPolicy", "/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:getIamPolicy", - "/ui/{resource=projects/*/locations/*/publishers/*/models/*}:getIamPolicy") + "/ui/{resource=projects/*/locations/*/publishers/*/models/*}:getIamPolicy", + "/ui/{resource=projects/*/locations/*/featureOnlineStores/*}:getIamPolicy", + "/ui/{resource=projects/*/locations/*/featureOnlineStores/*/featureViews/*}:getIamPolicy") .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); @@ -322,7 +324,9 @@ public class HttpJsonLlmUtilityServiceStub extends LlmUtilityServiceStub { "/ui/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:testIamPermissions", "/ui/{resource=projects/*/locations/*/models/*}:testIamPermissions", "/ui/{resource=projects/*/locations/*/endpoints/*}:testIamPermissions", - "/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:testIamPermissions") + "/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:testIamPermissions", + "/ui/{resource=projects/*/locations/*/featureOnlineStores/*}:testIamPermissions", + "/ui/{resource=projects/*/locations/*/featureOnlineStores/*/featureViews/*}:testIamPermissions") .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); diff --git a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/HttpJsonPredictionServiceCallableFactory.java b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/HttpJsonPredictionServiceCallableFactory.java index fd2fc94df53c..b36b7cdff61f 100644 --- a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/HttpJsonPredictionServiceCallableFactory.java +++ b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/HttpJsonPredictionServiceCallableFactory.java @@ -16,7 +16,6 @@ package com.google.cloud.vertexai.api.stub; -import com.google.api.core.BetaApi; import com.google.api.gax.httpjson.HttpJsonCallSettings; import com.google.api.gax.httpjson.HttpJsonCallableFactory; import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; @@ -41,7 +40,6 @@ *

This class is for advanced usage. */ @Generated("by gapic-generator-java") -@BetaApi public class HttpJsonPredictionServiceCallableFactory implements HttpJsonStubCallableFactory { @@ -73,8 +71,6 @@ public UnaryCallable createBatchingCa httpJsonCallSettings, callSettings, clientContext); } - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") @Override public OperationCallable createOperationCallable( diff --git a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/HttpJsonPredictionServiceStub.java b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/HttpJsonPredictionServiceStub.java index f609806585d7..338523203985 100644 --- a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/HttpJsonPredictionServiceStub.java +++ b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/HttpJsonPredictionServiceStub.java @@ -19,7 +19,6 @@ import static com.google.cloud.vertexai.api.PredictionServiceClient.ListLocationsPagedResponse; import com.google.api.HttpBody; -import com.google.api.core.BetaApi; import com.google.api.core.InternalApi; import com.google.api.gax.core.BackgroundResource; import com.google.api.gax.core.BackgroundResourceAggregation; @@ -79,7 +78,6 @@ *

This class is for advanced usage and reflects the underlying API directly. */ @Generated("by gapic-generator-java") -@BetaApi public class HttpJsonPredictionServiceStub extends PredictionServiceStub { private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build(); @@ -513,7 +511,9 @@ public class HttpJsonPredictionServiceStub extends PredictionServiceStub { "/ui/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:setIamPolicy", "/ui/{resource=projects/*/locations/*/models/*}:setIamPolicy", "/ui/{resource=projects/*/locations/*/endpoints/*}:setIamPolicy", - "/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:setIamPolicy") + "/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:setIamPolicy", + "/ui/{resource=projects/*/locations/*/featureOnlineStores/*}:setIamPolicy", + "/ui/{resource=projects/*/locations/*/featureOnlineStores/*/featureViews/*}:setIamPolicy") .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); @@ -559,7 +559,9 @@ public class HttpJsonPredictionServiceStub extends PredictionServiceStub { "/ui/{resource=projects/*/locations/*/models/*}:getIamPolicy", "/ui/{resource=projects/*/locations/*/endpoints/*}:getIamPolicy", "/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:getIamPolicy", - "/ui/{resource=projects/*/locations/*/publishers/*/models/*}:getIamPolicy") + "/ui/{resource=projects/*/locations/*/publishers/*/models/*}:getIamPolicy", + "/ui/{resource=projects/*/locations/*/featureOnlineStores/*}:getIamPolicy", + "/ui/{resource=projects/*/locations/*/featureOnlineStores/*/featureViews/*}:getIamPolicy") .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); @@ -601,7 +603,9 @@ public class HttpJsonPredictionServiceStub extends PredictionServiceStub { "/ui/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:testIamPermissions", "/ui/{resource=projects/*/locations/*/models/*}:testIamPermissions", "/ui/{resource=projects/*/locations/*/endpoints/*}:testIamPermissions", - "/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:testIamPermissions") + "/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:testIamPermissions", + "/ui/{resource=projects/*/locations/*/featureOnlineStores/*}:testIamPermissions", + "/ui/{resource=projects/*/locations/*/featureOnlineStores/*/featureViews/*}:testIamPermissions") .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); diff --git a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/generativeai/GenerativeModel.java b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/generativeai/GenerativeModel.java index e50ea1d90067..12ebe51bf2b1 100644 --- a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/generativeai/GenerativeModel.java +++ b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/generativeai/GenerativeModel.java @@ -32,6 +32,7 @@ import com.google.common.base.Strings; import com.google.common.collect.ImmutableList; import java.io.IOException; +import java.util.ArrayList; import java.util.Arrays; import java.util.List; @@ -40,9 +41,9 @@ public final class GenerativeModel { private final String modelName; private final String resourceName; private final VertexAI vertexAi; - private final GenerationConfig generationConfig; - private final ImmutableList safetySettings; - private final ImmutableList tools; + private GenerationConfig generationConfig = GenerationConfig.getDefaultInstance(); + private ImmutableList safetySettings = ImmutableList.of(); + private ImmutableList tools = ImmutableList.of(); /** * Constructs a GenerativeModel instance. @@ -58,8 +59,8 @@ public GenerativeModel(String modelName, VertexAI vertexAi) { this( modelName, GenerationConfig.getDefaultInstance(), - ImmutableList.of(), - ImmutableList.of(), + new ArrayList(), + new ArrayList(), vertexAi); } @@ -80,29 +81,22 @@ public GenerativeModel(String modelName, VertexAI vertexAi) { private GenerativeModel( String modelName, GenerationConfig generationConfig, - ImmutableList safetySettings, - ImmutableList tools, + List safetySettings, + List tools, VertexAI vertexAi) { - checkArgument( - !Strings.isNullOrEmpty(modelName), - "modelName can't be null or empty. Please refer to" - + " https://cloud.google.com/vertex-ai/docs/generative-ai/learn/models#gemini-models" - + " to find the right model name."); - checkNotNull(vertexAi, "VertexAI can't be null."); - checkNotNull(generationConfig, "GenerationConfig can't be null."); - checkNotNull(safetySettings, "ImmutableList can't be null."); - checkNotNull(tools, "ImmutableList can't be null."); - modelName = reconcileModelName(modelName); this.modelName = modelName; this.resourceName = String.format( "projects/%s/locations/%s/publishers/google/models/%s", vertexAi.getProjectId(), vertexAi.getLocation(), modelName); + checkNotNull(generationConfig, "GenerationConfig can't be null."); + checkNotNull(safetySettings, "List can't be null."); + checkNotNull(tools, "List can't be null."); this.vertexAi = vertexAi; this.generationConfig = generationConfig; - this.safetySettings = safetySettings; - this.tools = tools; + this.safetySettings = ImmutableList.copyOf(safetySettings); + this.tools = ImmutableList.copyOf(tools); } /** Builder class for {@link GenerativeModel}. */ @@ -169,6 +163,7 @@ public Builder setSafetySettings(List safetySettings) { checkNotNull( safetySettings, "safetySettings can't be null. Use an empty list if no safety settings is intended."); + safetySettings.removeIf(safetySetting -> safetySetting == null); this.safetySettings = ImmutableList.copyOf(safetySettings); return this; } @@ -180,6 +175,7 @@ public Builder setSafetySettings(List safetySettings) { @BetaApi public Builder setTools(List tools) { checkNotNull(tools, "tools can't be null. Use an empty list if no tool is to be used."); + tools.removeIf(tool -> tool == null); this.tools = ImmutableList.copyOf(tools); return this; } diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/AcceleratorType.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/AcceleratorType.java index 4d12b5e98384..c6fd6afc8042 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/AcceleratorType.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/AcceleratorType.java @@ -119,6 +119,16 @@ public enum AcceleratorType implements com.google.protobuf.ProtocolMessageEnum { * NVIDIA_L4 = 11; */ NVIDIA_L4(11), + /** + * + * + *

+   * Nvidia H100 80Gb GPU.
+   * 
+ * + * NVIDIA_H100_80GB = 13; + */ + NVIDIA_H100_80GB(13), /** * * @@ -242,6 +252,16 @@ public enum AcceleratorType implements com.google.protobuf.ProtocolMessageEnum { * NVIDIA_L4 = 11; */ public static final int NVIDIA_L4_VALUE = 11; + /** + * + * + *
+   * Nvidia H100 80Gb GPU.
+   * 
+ * + * NVIDIA_H100_80GB = 13; + */ + public static final int NVIDIA_H100_80GB_VALUE = 13; /** * * @@ -315,6 +335,8 @@ public static AcceleratorType forNumber(int value) { return NVIDIA_A100_80GB; case 11: return NVIDIA_L4; + case 13: + return NVIDIA_H100_80GB; case 6: return TPU_V2; case 7: diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/AcceleratorTypeProto.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/AcceleratorTypeProto.java index 44fba78cb9e3..c942c2bbf7e4 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/AcceleratorTypeProto.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/AcceleratorTypeProto.java @@ -37,19 +37,20 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { static { java.lang.String[] descriptorData = { "\n/google/cloud/vertexai/v1/accelerator_t" - + "ype.proto\022\030google.cloud.vertexai.v1*\205\002\n\017" + + "ype.proto\022\030google.cloud.vertexai.v1*\233\002\n\017" + "AcceleratorType\022 \n\034ACCELERATOR_TYPE_UNSP" + "ECIFIED\020\000\022\024\n\020NVIDIA_TESLA_K80\020\001\022\025\n\021NVIDI" + "A_TESLA_P100\020\002\022\025\n\021NVIDIA_TESLA_V100\020\003\022\023\n" + "\017NVIDIA_TESLA_P4\020\004\022\023\n\017NVIDIA_TESLA_T4\020\005\022" + "\025\n\021NVIDIA_TESLA_A100\020\010\022\024\n\020NVIDIA_A100_80" - + "GB\020\t\022\r\n\tNVIDIA_L4\020\013\022\n\n\006TPU_V2\020\006\022\n\n\006TPU_V" - + "3\020\007\022\016\n\nTPU_V4_POD\020\nB\321\001\n\035com.google.cloud" - + ".vertexai.apiB\024AcceleratorTypeProtoP\001Z>c" - + "loud.google.com/go/aiplatform/apiv1/aipl" - + "atformpb;aiplatformpb\252\002\032Google.Cloud.AIP" - + "latform.V1\312\002\032Google\\Cloud\\AIPlatform\\V1\352" - + "\002\035Google::Cloud::AIPlatform::V1b\006proto3" + + "GB\020\t\022\r\n\tNVIDIA_L4\020\013\022\024\n\020NVIDIA_H100_80GB\020" + + "\r\022\n\n\006TPU_V2\020\006\022\n\n\006TPU_V3\020\007\022\016\n\nTPU_V4_POD\020" + + "\nB\321\001\n\035com.google.cloud.vertexai.apiB\024Acc" + + "eleratorTypeProtoP\001Z>cloud.google.com/go" + + "/aiplatform/apiv1/aiplatformpb;aiplatfor" + + "mpb\252\002\032Google.Cloud.AIPlatform.V1\312\002\032Googl" + + "e\\Cloud\\AIPlatform\\V1\352\002\035Google::Cloud::A" + + "IPlatform::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Candidate.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Candidate.java index 98e45b2d4437..b5c0768bf117 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Candidate.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Candidate.java @@ -139,6 +139,39 @@ public enum FinishReason implements com.google.protobuf.ProtocolMessageEnum { * OTHER = 5; */ OTHER(5), + /** + * + * + *
+     * The token generation was stopped as the response was flagged for the
+     * terms which are included from the terminology blocklist.
+     * 
+ * + * BLOCKLIST = 6; + */ + BLOCKLIST(6), + /** + * + * + *
+     * The token generation was stopped as the response was flagged for
+     * the prohibited contents.
+     * 
+ * + * PROHIBITED_CONTENT = 7; + */ + PROHIBITED_CONTENT(7), + /** + * + * + *
+     * The token generation was stopped as the response was flagged for
+     * Sensitive Personally Identifiable Information (SPII) contents.
+     * 
+ * + * SPII = 8; + */ + SPII(8), UNRECOGNIZED(-1), ; @@ -205,6 +238,39 @@ public enum FinishReason implements com.google.protobuf.ProtocolMessageEnum { * OTHER = 5; */ public static final int OTHER_VALUE = 5; + /** + * + * + *
+     * The token generation was stopped as the response was flagged for the
+     * terms which are included from the terminology blocklist.
+     * 
+ * + * BLOCKLIST = 6; + */ + public static final int BLOCKLIST_VALUE = 6; + /** + * + * + *
+     * The token generation was stopped as the response was flagged for
+     * the prohibited contents.
+     * 
+ * + * PROHIBITED_CONTENT = 7; + */ + public static final int PROHIBITED_CONTENT_VALUE = 7; + /** + * + * + *
+     * The token generation was stopped as the response was flagged for
+     * Sensitive Personally Identifiable Information (SPII) contents.
+     * 
+ * + * SPII = 8; + */ + public static final int SPII_VALUE = 8; public final int getNumber() { if (this == UNRECOGNIZED) { @@ -242,6 +308,12 @@ public static FinishReason forNumber(int value) { return RECITATION; case 5: return OTHER; + case 6: + return BLOCKLIST; + case 7: + return PROHIBITED_CONTENT; + case 8: + return SPII; default: return null; } diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ContentProto.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ContentProto.java index d8cfbbccd30e..f4af34b40251 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ContentProto.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ContentProto.java @@ -134,57 +134,65 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "hreshold\022$\n HARM_BLOCK_THRESHOLD_UNSPECI" + "FIED\020\000\022\027\n\023BLOCK_LOW_AND_ABOVE\020\001\022\032\n\026BLOCK" + "_MEDIUM_AND_ABOVE\020\002\022\023\n\017BLOCK_ONLY_HIGH\020\003" - + "\022\016\n\nBLOCK_NONE\020\004\"\231\002\n\014SafetyRating\022=\n\010cat" + + "\022\016\n\nBLOCK_NONE\020\004\"\271\004\n\014SafetyRating\022=\n\010cat" + "egory\030\001 \001(\0162&.google.cloud.vertexai.v1.H" + "armCategoryB\003\340A\003\022P\n\013probability\030\002 \001(\01626." + "google.cloud.vertexai.v1.SafetyRating.Ha" - + "rmProbabilityB\003\340A\003\022\024\n\007blocked\030\003 \001(\010B\003\340A\003" - + "\"b\n\017HarmProbability\022 \n\034HARM_PROBABILITY_" - + "UNSPECIFIED\020\000\022\016\n\nNEGLIGIBLE\020\001\022\007\n\003LOW\020\002\022\n" - + "\n\006MEDIUM\020\003\022\010\n\004HIGH\020\004\"N\n\020CitationMetadata" - + "\022:\n\tcitations\030\001 \003(\0132\".google.cloud.verte" - + "xai.v1.CitationB\003\340A\003\"\252\001\n\010Citation\022\030\n\013sta" - + "rt_index\030\001 \001(\005B\003\340A\003\022\026\n\tend_index\030\002 \001(\005B\003" - + "\340A\003\022\020\n\003uri\030\003 \001(\tB\003\340A\003\022\022\n\005title\030\004 \001(\tB\003\340A" - + "\003\022\024\n\007license\030\005 \001(\tB\003\340A\003\0220\n\020publication_d" - + "ate\030\006 \001(\0132\021.google.type.DateB\003\340A\003\"\252\004\n\tCa" - + "ndidate\022\022\n\005index\030\001 \001(\005B\003\340A\003\0227\n\007content\030\002" - + " \001(\0132!.google.cloud.vertexai.v1.ContentB" - + "\003\340A\003\022L\n\rfinish_reason\030\003 \001(\01620.google.clo" - + "ud.vertexai.v1.Candidate.FinishReasonB\003\340" - + "A\003\022C\n\016safety_ratings\030\004 \003(\0132&.google.clou" - + "d.vertexai.v1.SafetyRatingB\003\340A\003\022 \n\016finis" - + "h_message\030\005 \001(\tB\003\340A\003H\000\210\001\001\022J\n\021citation_me" - + "tadata\030\006 \001(\0132*.google.cloud.vertexai.v1." - + "CitationMetadataB\003\340A\003\022L\n\022grounding_metad" - + "ata\030\007 \001(\0132+.google.cloud.vertexai.v1.Gro" - + "undingMetadataB\003\340A\003\"n\n\014FinishReason\022\035\n\031F" - + "INISH_REASON_UNSPECIFIED\020\000\022\010\n\004STOP\020\001\022\016\n\n" - + "MAX_TOKENS\020\002\022\n\n\006SAFETY\020\003\022\016\n\nRECITATION\020\004" - + "\022\t\n\005OTHER\020\005B\021\n\017_finish_message\"T\n\007Segmen" - + "t\022\027\n\npart_index\030\001 \001(\005B\003\340A\003\022\030\n\013start_inde" - + "x\030\002 \001(\005B\003\340A\003\022\026\n\tend_index\030\003 \001(\005B\003\340A\003\"\215\002\n" - + "\024GroundingAttribution\022F\n\003web\030\003 \001(\01322.goo" - + "gle.cloud.vertexai.v1.GroundingAttributi" - + "on.WebB\003\340A\001H\000\0227\n\007segment\030\001 \001(\0132!.google." - + "cloud.vertexai.v1.SegmentB\003\340A\003\022%\n\020confid" - + "ence_score\030\002 \001(\002B\006\340A\001\340A\003H\001\210\001\001\032+\n\003Web\022\020\n\003" - + "uri\030\001 \001(\tB\003\340A\003\022\022\n\005title\030\002 \001(\tB\003\340A\003B\013\n\tre" - + "ferenceB\023\n\021_confidence_score\"\211\001\n\021Groundi" - + "ngMetadata\022\037\n\022web_search_queries\030\001 \003(\tB\003" - + "\340A\001\022S\n\026grounding_attributions\030\002 \003(\0132..go" - + "ogle.cloud.vertexai.v1.GroundingAttribut" - + "ionB\003\340A\001*\264\001\n\014HarmCategory\022\035\n\031HARM_CATEGO" - + "RY_UNSPECIFIED\020\000\022\035\n\031HARM_CATEGORY_HATE_S" - + "PEECH\020\001\022#\n\037HARM_CATEGORY_DANGEROUS_CONTE" - + "NT\020\002\022\034\n\030HARM_CATEGORY_HARASSMENT\020\003\022#\n\037HA" - + "RM_CATEGORY_SEXUALLY_EXPLICIT\020\004B\311\001\n\035com." - + "google.cloud.vertexai.apiB\014ContentProtoP" - + "\001Z>cloud.google.com/go/aiplatform/apiv1/" - + "aiplatformpb;aiplatformpb\252\002\032Google.Cloud" - + ".AIPlatform.V1\312\002\032Google\\Cloud\\AIPlatform" - + "\\V1\352\002\035Google::Cloud::AIPlatform::V1b\006pro" - + "to3" + + "rmProbabilityB\003\340A\003\022\036\n\021probability_score\030" + + "\005 \001(\002B\003\340A\003\022J\n\010severity\030\006 \001(\01623.google.cl" + + "oud.vertexai.v1.SafetyRating.HarmSeverit" + + "yB\003\340A\003\022\033\n\016severity_score\030\007 \001(\002B\003\340A\003\022\024\n\007b" + + "locked\030\003 \001(\010B\003\340A\003\"b\n\017HarmProbability\022 \n\034" + + "HARM_PROBABILITY_UNSPECIFIED\020\000\022\016\n\nNEGLIG" + + "IBLE\020\001\022\007\n\003LOW\020\002\022\n\n\006MEDIUM\020\003\022\010\n\004HIGH\020\004\"\224\001" + + "\n\014HarmSeverity\022\035\n\031HARM_SEVERITY_UNSPECIF" + + "IED\020\000\022\034\n\030HARM_SEVERITY_NEGLIGIBLE\020\001\022\025\n\021H" + + "ARM_SEVERITY_LOW\020\002\022\030\n\024HARM_SEVERITY_MEDI" + + "UM\020\003\022\026\n\022HARM_SEVERITY_HIGH\020\004\"N\n\020Citation" + + "Metadata\022:\n\tcitations\030\001 \003(\0132\".google.clo" + + "ud.vertexai.v1.CitationB\003\340A\003\"\252\001\n\010Citatio" + + "n\022\030\n\013start_index\030\001 \001(\005B\003\340A\003\022\026\n\tend_index" + + "\030\002 \001(\005B\003\340A\003\022\020\n\003uri\030\003 \001(\tB\003\340A\003\022\022\n\005title\030\004" + + " \001(\tB\003\340A\003\022\024\n\007license\030\005 \001(\tB\003\340A\003\0220\n\020publi" + + "cation_date\030\006 \001(\0132\021.google.type.DateB\003\340A" + + "\003\"\334\004\n\tCandidate\022\022\n\005index\030\001 \001(\005B\003\340A\003\0227\n\007c" + + "ontent\030\002 \001(\0132!.google.cloud.vertexai.v1." + + "ContentB\003\340A\003\022L\n\rfinish_reason\030\003 \001(\01620.go" + + "ogle.cloud.vertexai.v1.Candidate.FinishR" + + "easonB\003\340A\003\022C\n\016safety_ratings\030\004 \003(\0132&.goo" + + "gle.cloud.vertexai.v1.SafetyRatingB\003\340A\003\022" + + " \n\016finish_message\030\005 \001(\tB\003\340A\003H\000\210\001\001\022J\n\021cit" + + "ation_metadata\030\006 \001(\0132*.google.cloud.vert" + + "exai.v1.CitationMetadataB\003\340A\003\022L\n\022groundi" + + "ng_metadata\030\007 \001(\0132+.google.cloud.vertexa" + + "i.v1.GroundingMetadataB\003\340A\003\"\237\001\n\014FinishRe" + + "ason\022\035\n\031FINISH_REASON_UNSPECIFIED\020\000\022\010\n\004S" + + "TOP\020\001\022\016\n\nMAX_TOKENS\020\002\022\n\n\006SAFETY\020\003\022\016\n\nREC" + + "ITATION\020\004\022\t\n\005OTHER\020\005\022\r\n\tBLOCKLIST\020\006\022\026\n\022P" + + "ROHIBITED_CONTENT\020\007\022\010\n\004SPII\020\010B\021\n\017_finish" + + "_message\"T\n\007Segment\022\027\n\npart_index\030\001 \001(\005B" + + "\003\340A\003\022\030\n\013start_index\030\002 \001(\005B\003\340A\003\022\026\n\tend_in" + + "dex\030\003 \001(\005B\003\340A\003\"\215\002\n\024GroundingAttribution\022" + + "F\n\003web\030\003 \001(\01322.google.cloud.vertexai.v1." + + "GroundingAttribution.WebB\003\340A\001H\000\0227\n\007segme" + + "nt\030\001 \001(\0132!.google.cloud.vertexai.v1.Segm" + + "entB\003\340A\003\022%\n\020confidence_score\030\002 \001(\002B\006\340A\001\340" + + "A\003H\001\210\001\001\032+\n\003Web\022\020\n\003uri\030\001 \001(\tB\003\340A\003\022\022\n\005titl" + + "e\030\002 \001(\tB\003\340A\003B\013\n\treferenceB\023\n\021_confidence" + + "_score\"\211\001\n\021GroundingMetadata\022\037\n\022web_sear" + + "ch_queries\030\001 \003(\tB\003\340A\001\022S\n\026grounding_attri" + + "butions\030\002 \003(\0132..google.cloud.vertexai.v1" + + ".GroundingAttributionB\003\340A\001*\264\001\n\014HarmCateg" + + "ory\022\035\n\031HARM_CATEGORY_UNSPECIFIED\020\000\022\035\n\031HA" + + "RM_CATEGORY_HATE_SPEECH\020\001\022#\n\037HARM_CATEGO" + + "RY_DANGEROUS_CONTENT\020\002\022\034\n\030HARM_CATEGORY_" + + "HARASSMENT\020\003\022#\n\037HARM_CATEGORY_SEXUALLY_E" + + "XPLICIT\020\004B\311\001\n\035com.google.cloud.vertexai." + + "apiB\014ContentProtoP\001Z>cloud.google.com/go" + + "/aiplatform/apiv1/aiplatformpb;aiplatfor" + + "mpb\252\002\032Google.Cloud.AIPlatform.V1\312\002\032Googl" + + "e\\Cloud\\AIPlatform\\V1\352\002\035Google::Cloud::A" + + "IPlatform::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -264,7 +272,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_vertexai_v1_SafetyRating_descriptor, new java.lang.String[] { - "Category", "Probability", "Blocked", + "Category", "Probability", "ProbabilityScore", "Severity", "SeverityScore", "Blocked", }); internal_static_google_cloud_vertexai_v1_CitationMetadata_descriptor = getDescriptor().getMessageTypes().get(8); diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/EndpointName.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/EndpointName.java index 89e43f1b4307..89863e4b39f6 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/EndpointName.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/EndpointName.java @@ -16,7 +16,6 @@ package com.google.cloud.vertexai.api; -import com.google.api.core.BetaApi; import com.google.api.pathtemplate.PathTemplate; import com.google.api.pathtemplate.ValidationException; import com.google.api.resourcenames.ResourceName; @@ -97,12 +96,10 @@ public static Builder newBuilder() { return new Builder(); } - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") public static Builder newProjectLocationEndpointBuilder() { return new Builder(); } - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") public static ProjectLocationPublisherModelBuilder newProjectLocationPublisherModelBuilder() { return new ProjectLocationPublisherModelBuilder(); } @@ -115,13 +112,11 @@ public static EndpointName of(String project, String location, String endpoint) return newBuilder().setProject(project).setLocation(location).setEndpoint(endpoint).build(); } - @BetaApi("The static create methods are not stable yet and may be changed in the future.") public static EndpointName ofProjectLocationEndpointName( String project, String location, String endpoint) { return newBuilder().setProject(project).setLocation(location).setEndpoint(endpoint).build(); } - @BetaApi("The static create methods are not stable yet and may be changed in the future.") public static EndpointName ofProjectLocationPublisherModelName( String project, String location, String publisher, String model) { return newProjectLocationPublisherModelBuilder() @@ -141,7 +136,6 @@ public static String format(String project, String location, String endpoint) { .toString(); } - @BetaApi("The static format methods are not stable yet and may be changed in the future.") public static String formatProjectLocationEndpointName( String project, String location, String endpoint) { return newBuilder() @@ -152,7 +146,6 @@ public static String formatProjectLocationEndpointName( .toString(); } - @BetaApi("The static format methods are not stable yet and may be changed in the future.") public static String formatProjectLocationPublisherModelName( String project, String location, String publisher, String model) { return newProjectLocationPublisherModelBuilder() @@ -329,7 +322,6 @@ public EndpointName build() { } /** Builder for projects/{project}/locations/{location}/publishers/{publisher}/models/{model}. */ - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") public static class ProjectLocationPublisherModelBuilder { private String project; private String location; diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ListEndpointsRequest.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ListEndpointsRequest.java index 4264c0c9b31d..3fbc28481210 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ListEndpointsRequest.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ListEndpointsRequest.java @@ -136,20 +136,23 @@ public com.google.protobuf.ByteString getParentBytes() { * Optional. An expression for filtering the results of the request. For field * names both snake_case and camelCase are supported. * - * * `endpoint` supports = and !=. `endpoint` represents the Endpoint ID, + * * `endpoint` supports `=` and `!=`. `endpoint` represents the Endpoint + * ID, * i.e. the last segment of the Endpoint's [resource * name][google.cloud.aiplatform.v1.Endpoint.name]. - * * `display_name` supports = and, != + * * `display_name` supports `=` and `!=`. * * `labels` supports general map functions that is: * * `labels.key=value` - key:value equality - * * `labels.key:* or labels:key - key existence + * * `labels.key:*` or `labels:key` - key existence * * A key including a space must be quoted. `labels."a key"`. + * * `base_model_name` only supports `=`. * * Some examples: * * * `endpoint=1` * * `displayName="myDisplayName"` * * `labels.myKey="myValue"` + * * `baseModelName="text-bison"` * * * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -175,20 +178,23 @@ public java.lang.String getFilter() { * Optional. An expression for filtering the results of the request. For field * names both snake_case and camelCase are supported. * - * * `endpoint` supports = and !=. `endpoint` represents the Endpoint ID, + * * `endpoint` supports `=` and `!=`. `endpoint` represents the Endpoint + * ID, * i.e. the last segment of the Endpoint's [resource * name][google.cloud.aiplatform.v1.Endpoint.name]. - * * `display_name` supports = and, != + * * `display_name` supports `=` and `!=`. * * `labels` supports general map functions that is: * * `labels.key=value` - key:value equality - * * `labels.key:* or labels:key - key existence + * * `labels.key:*` or `labels:key` - key existence * * A key including a space must be quoted. `labels."a key"`. + * * `base_model_name` only supports `=`. * * Some examples: * * * `endpoint=1` * * `displayName="myDisplayName"` * * `labels.myKey="myValue"` + * * `baseModelName="text-bison"` * * * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -1012,20 +1018,23 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { * Optional. An expression for filtering the results of the request. For field * names both snake_case and camelCase are supported. * - * * `endpoint` supports = and !=. `endpoint` represents the Endpoint ID, + * * `endpoint` supports `=` and `!=`. `endpoint` represents the Endpoint + * ID, * i.e. the last segment of the Endpoint's [resource * name][google.cloud.aiplatform.v1.Endpoint.name]. - * * `display_name` supports = and, != + * * `display_name` supports `=` and `!=`. * * `labels` supports general map functions that is: * * `labels.key=value` - key:value equality - * * `labels.key:* or labels:key - key existence + * * `labels.key:*` or `labels:key` - key existence * * A key including a space must be quoted. `labels."a key"`. + * * `base_model_name` only supports `=`. * * Some examples: * * * `endpoint=1` * * `displayName="myDisplayName"` * * `labels.myKey="myValue"` + * * `baseModelName="text-bison"` * * * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -1050,20 +1059,23 @@ public java.lang.String getFilter() { * Optional. An expression for filtering the results of the request. For field * names both snake_case and camelCase are supported. * - * * `endpoint` supports = and !=. `endpoint` represents the Endpoint ID, + * * `endpoint` supports `=` and `!=`. `endpoint` represents the Endpoint + * ID, * i.e. the last segment of the Endpoint's [resource * name][google.cloud.aiplatform.v1.Endpoint.name]. - * * `display_name` supports = and, != + * * `display_name` supports `=` and `!=`. * * `labels` supports general map functions that is: * * `labels.key=value` - key:value equality - * * `labels.key:* or labels:key - key existence + * * `labels.key:*` or `labels:key` - key existence * * A key including a space must be quoted. `labels."a key"`. + * * `base_model_name` only supports `=`. * * Some examples: * * * `endpoint=1` * * `displayName="myDisplayName"` * * `labels.myKey="myValue"` + * * `baseModelName="text-bison"` * * * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -1088,20 +1100,23 @@ public com.google.protobuf.ByteString getFilterBytes() { * Optional. An expression for filtering the results of the request. For field * names both snake_case and camelCase are supported. * - * * `endpoint` supports = and !=. `endpoint` represents the Endpoint ID, + * * `endpoint` supports `=` and `!=`. `endpoint` represents the Endpoint + * ID, * i.e. the last segment of the Endpoint's [resource * name][google.cloud.aiplatform.v1.Endpoint.name]. - * * `display_name` supports = and, != + * * `display_name` supports `=` and `!=`. * * `labels` supports general map functions that is: * * `labels.key=value` - key:value equality - * * `labels.key:* or labels:key - key existence + * * `labels.key:*` or `labels:key` - key existence * * A key including a space must be quoted. `labels."a key"`. + * * `base_model_name` only supports `=`. * * Some examples: * * * `endpoint=1` * * `displayName="myDisplayName"` * * `labels.myKey="myValue"` + * * `baseModelName="text-bison"` * * * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -1125,20 +1140,23 @@ public Builder setFilter(java.lang.String value) { * Optional. An expression for filtering the results of the request. For field * names both snake_case and camelCase are supported. * - * * `endpoint` supports = and !=. `endpoint` represents the Endpoint ID, + * * `endpoint` supports `=` and `!=`. `endpoint` represents the Endpoint + * ID, * i.e. the last segment of the Endpoint's [resource * name][google.cloud.aiplatform.v1.Endpoint.name]. - * * `display_name` supports = and, != + * * `display_name` supports `=` and `!=`. * * `labels` supports general map functions that is: * * `labels.key=value` - key:value equality - * * `labels.key:* or labels:key - key existence + * * `labels.key:*` or `labels:key` - key existence * * A key including a space must be quoted. `labels."a key"`. + * * `base_model_name` only supports `=`. * * Some examples: * * * `endpoint=1` * * `displayName="myDisplayName"` * * `labels.myKey="myValue"` + * * `baseModelName="text-bison"` * * * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -1158,20 +1176,23 @@ public Builder clearFilter() { * Optional. An expression for filtering the results of the request. For field * names both snake_case and camelCase are supported. * - * * `endpoint` supports = and !=. `endpoint` represents the Endpoint ID, + * * `endpoint` supports `=` and `!=`. `endpoint` represents the Endpoint + * ID, * i.e. the last segment of the Endpoint's [resource * name][google.cloud.aiplatform.v1.Endpoint.name]. - * * `display_name` supports = and, != + * * `display_name` supports `=` and `!=`. * * `labels` supports general map functions that is: * * `labels.key=value` - key:value equality - * * `labels.key:* or labels:key - key existence + * * `labels.key:*` or `labels:key` - key existence * * A key including a space must be quoted. `labels."a key"`. + * * `base_model_name` only supports `=`. * * Some examples: * * * `endpoint=1` * * `displayName="myDisplayName"` * * `labels.myKey="myValue"` + * * `baseModelName="text-bison"` * * * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ListEndpointsRequestOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ListEndpointsRequestOrBuilder.java index a52ea45c7c43..8706304a2a0c 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ListEndpointsRequestOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ListEndpointsRequestOrBuilder.java @@ -62,20 +62,23 @@ public interface ListEndpointsRequestOrBuilder * Optional. An expression for filtering the results of the request. For field * names both snake_case and camelCase are supported. * - * * `endpoint` supports = and !=. `endpoint` represents the Endpoint ID, + * * `endpoint` supports `=` and `!=`. `endpoint` represents the Endpoint + * ID, * i.e. the last segment of the Endpoint's [resource * name][google.cloud.aiplatform.v1.Endpoint.name]. - * * `display_name` supports = and, != + * * `display_name` supports `=` and `!=`. * * `labels` supports general map functions that is: * * `labels.key=value` - key:value equality - * * `labels.key:* or labels:key - key existence + * * `labels.key:*` or `labels:key` - key existence * * A key including a space must be quoted. `labels."a key"`. + * * `base_model_name` only supports `=`. * * Some examples: * * * `endpoint=1` * * `displayName="myDisplayName"` * * `labels.myKey="myValue"` + * * `baseModelName="text-bison"` * * * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -90,20 +93,23 @@ public interface ListEndpointsRequestOrBuilder * Optional. An expression for filtering the results of the request. For field * names both snake_case and camelCase are supported. * - * * `endpoint` supports = and !=. `endpoint` represents the Endpoint ID, + * * `endpoint` supports `=` and `!=`. `endpoint` represents the Endpoint + * ID, * i.e. the last segment of the Endpoint's [resource * name][google.cloud.aiplatform.v1.Endpoint.name]. - * * `display_name` supports = and, != + * * `display_name` supports `=` and `!=`. * * `labels` supports general map functions that is: * * `labels.key=value` - key:value equality - * * `labels.key:* or labels:key - key existence + * * `labels.key:*` or `labels:key` - key existence * * A key including a space must be quoted. `labels."a key"`. + * * `base_model_name` only supports `=`. * * Some examples: * * * `endpoint=1` * * `displayName="myDisplayName"` * * `labels.myKey="myValue"` + * * `baseModelName="text-bison"` * * * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SafetyRating.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SafetyRating.java index 0d1dbc13345d..291284e61672 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SafetyRating.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SafetyRating.java @@ -41,6 +41,7 @@ private SafetyRating(com.google.protobuf.GeneratedMessageV3.Builder builder) private SafetyRating() { category_ = 0; probability_ = 0; + severity_ = 0; } @java.lang.Override @@ -267,6 +268,207 @@ private HarmProbability(int value) { // @@protoc_insertion_point(enum_scope:google.cloud.vertexai.v1.SafetyRating.HarmProbability) } + /** + * + * + *
+   * Harm severity levels.
+   * 
+ * + * Protobuf enum {@code google.cloud.vertexai.v1.SafetyRating.HarmSeverity} + */ + public enum HarmSeverity implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Harm severity unspecified.
+     * 
+ * + * HARM_SEVERITY_UNSPECIFIED = 0; + */ + HARM_SEVERITY_UNSPECIFIED(0), + /** + * + * + *
+     * Negligible level of harm severity.
+     * 
+ * + * HARM_SEVERITY_NEGLIGIBLE = 1; + */ + HARM_SEVERITY_NEGLIGIBLE(1), + /** + * + * + *
+     * Low level of harm severity.
+     * 
+ * + * HARM_SEVERITY_LOW = 2; + */ + HARM_SEVERITY_LOW(2), + /** + * + * + *
+     * Medium level of harm severity.
+     * 
+ * + * HARM_SEVERITY_MEDIUM = 3; + */ + HARM_SEVERITY_MEDIUM(3), + /** + * + * + *
+     * High level of harm severity.
+     * 
+ * + * HARM_SEVERITY_HIGH = 4; + */ + HARM_SEVERITY_HIGH(4), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Harm severity unspecified.
+     * 
+ * + * HARM_SEVERITY_UNSPECIFIED = 0; + */ + public static final int HARM_SEVERITY_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Negligible level of harm severity.
+     * 
+ * + * HARM_SEVERITY_NEGLIGIBLE = 1; + */ + public static final int HARM_SEVERITY_NEGLIGIBLE_VALUE = 1; + /** + * + * + *
+     * Low level of harm severity.
+     * 
+ * + * HARM_SEVERITY_LOW = 2; + */ + public static final int HARM_SEVERITY_LOW_VALUE = 2; + /** + * + * + *
+     * Medium level of harm severity.
+     * 
+ * + * HARM_SEVERITY_MEDIUM = 3; + */ + public static final int HARM_SEVERITY_MEDIUM_VALUE = 3; + /** + * + * + *
+     * High level of harm severity.
+     * 
+ * + * HARM_SEVERITY_HIGH = 4; + */ + public static final int HARM_SEVERITY_HIGH_VALUE = 4; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static HarmSeverity valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static HarmSeverity forNumber(int value) { + switch (value) { + case 0: + return HARM_SEVERITY_UNSPECIFIED; + case 1: + return HARM_SEVERITY_NEGLIGIBLE; + case 2: + return HARM_SEVERITY_LOW; + case 3: + return HARM_SEVERITY_MEDIUM; + case 4: + return HARM_SEVERITY_HIGH; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public HarmSeverity findValueByNumber(int number) { + return HarmSeverity.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.vertexai.api.SafetyRating.getDescriptor().getEnumTypes().get(1); + } + + private static final HarmSeverity[] VALUES = values(); + + public static HarmSeverity valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private HarmSeverity(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.vertexai.v1.SafetyRating.HarmSeverity) + } + public static final int CATEGORY_FIELD_NUMBER = 1; private int category_ = 0; /** @@ -347,6 +549,83 @@ public com.google.cloud.vertexai.api.SafetyRating.HarmProbability getProbability : result; } + public static final int PROBABILITY_SCORE_FIELD_NUMBER = 5; + private float probabilityScore_ = 0F; + /** + * + * + *
+   * Output only. Harm probability score.
+   * 
+ * + * float probability_score = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The probabilityScore. + */ + @java.lang.Override + public float getProbabilityScore() { + return probabilityScore_; + } + + public static final int SEVERITY_FIELD_NUMBER = 6; + private int severity_ = 0; + /** + * + * + *
+   * Output only. Harm severity levels in the content.
+   * 
+ * + * + * .google.cloud.vertexai.v1.SafetyRating.HarmSeverity severity = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for severity. + */ + @java.lang.Override + public int getSeverityValue() { + return severity_; + } + /** + * + * + *
+   * Output only. Harm severity levels in the content.
+   * 
+ * + * + * .google.cloud.vertexai.v1.SafetyRating.HarmSeverity severity = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The severity. + */ + @java.lang.Override + public com.google.cloud.vertexai.api.SafetyRating.HarmSeverity getSeverity() { + com.google.cloud.vertexai.api.SafetyRating.HarmSeverity result = + com.google.cloud.vertexai.api.SafetyRating.HarmSeverity.forNumber(severity_); + return result == null + ? com.google.cloud.vertexai.api.SafetyRating.HarmSeverity.UNRECOGNIZED + : result; + } + + public static final int SEVERITY_SCORE_FIELD_NUMBER = 7; + private float severityScore_ = 0F; + /** + * + * + *
+   * Output only. Harm severity score.
+   * 
+ * + * float severity_score = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The severityScore. + */ + @java.lang.Override + public float getSeverityScore() { + return severityScore_; + } + public static final int BLOCKED_FIELD_NUMBER = 3; private boolean blocked_ = false; /** @@ -392,6 +671,17 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (blocked_ != false) { output.writeBool(3, blocked_); } + if (java.lang.Float.floatToRawIntBits(probabilityScore_) != 0) { + output.writeFloat(5, probabilityScore_); + } + if (severity_ + != com.google.cloud.vertexai.api.SafetyRating.HarmSeverity.HARM_SEVERITY_UNSPECIFIED + .getNumber()) { + output.writeEnum(6, severity_); + } + if (java.lang.Float.floatToRawIntBits(severityScore_) != 0) { + output.writeFloat(7, severityScore_); + } getUnknownFields().writeTo(output); } @@ -413,6 +703,17 @@ public int getSerializedSize() { if (blocked_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, blocked_); } + if (java.lang.Float.floatToRawIntBits(probabilityScore_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(5, probabilityScore_); + } + if (severity_ + != com.google.cloud.vertexai.api.SafetyRating.HarmSeverity.HARM_SEVERITY_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, severity_); + } + if (java.lang.Float.floatToRawIntBits(severityScore_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(7, severityScore_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -431,6 +732,11 @@ public boolean equals(final java.lang.Object obj) { if (category_ != other.category_) return false; if (probability_ != other.probability_) return false; + if (java.lang.Float.floatToIntBits(getProbabilityScore()) + != java.lang.Float.floatToIntBits(other.getProbabilityScore())) return false; + if (severity_ != other.severity_) return false; + if (java.lang.Float.floatToIntBits(getSeverityScore()) + != java.lang.Float.floatToIntBits(other.getSeverityScore())) return false; if (getBlocked() != other.getBlocked()) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; @@ -447,6 +753,12 @@ public int hashCode() { hash = (53 * hash) + category_; hash = (37 * hash) + PROBABILITY_FIELD_NUMBER; hash = (53 * hash) + probability_; + hash = (37 * hash) + PROBABILITY_SCORE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getProbabilityScore()); + hash = (37 * hash) + SEVERITY_FIELD_NUMBER; + hash = (53 * hash) + severity_; + hash = (37 * hash) + SEVERITY_SCORE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getSeverityScore()); hash = (37 * hash) + BLOCKED_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getBlocked()); hash = (29 * hash) + getUnknownFields().hashCode(); @@ -590,6 +902,9 @@ public Builder clear() { bitField0_ = 0; category_ = 0; probability_ = 0; + probabilityScore_ = 0F; + severity_ = 0; + severityScore_ = 0F; blocked_ = false; return this; } @@ -634,6 +949,15 @@ private void buildPartial0(com.google.cloud.vertexai.api.SafetyRating result) { result.probability_ = probability_; } if (((from_bitField0_ & 0x00000004) != 0)) { + result.probabilityScore_ = probabilityScore_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.severity_ = severity_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.severityScore_ = severityScore_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { result.blocked_ = blocked_; } } @@ -689,6 +1013,15 @@ public Builder mergeFrom(com.google.cloud.vertexai.api.SafetyRating other) { if (other.probability_ != 0) { setProbabilityValue(other.getProbabilityValue()); } + if (other.getProbabilityScore() != 0F) { + setProbabilityScore(other.getProbabilityScore()); + } + if (other.severity_ != 0) { + setSeverityValue(other.getSeverityValue()); + } + if (other.getSeverityScore() != 0F) { + setSeverityScore(other.getSeverityScore()); + } if (other.getBlocked() != false) { setBlocked(other.getBlocked()); } @@ -733,9 +1066,27 @@ public Builder mergeFrom( case 24: { blocked_ = input.readBool(); - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000020; break; } // case 24 + case 45: + { + probabilityScore_ = input.readFloat(); + bitField0_ |= 0x00000004; + break; + } // case 45 + case 48: + { + severity_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 48 + case 61: + { + severityScore_ = input.readFloat(); + bitField0_ |= 0x00000010; + break; + } // case 61 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -958,6 +1309,214 @@ public Builder clearProbability() { return this; } + private float probabilityScore_; + /** + * + * + *
+     * Output only. Harm probability score.
+     * 
+ * + * float probability_score = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The probabilityScore. + */ + @java.lang.Override + public float getProbabilityScore() { + return probabilityScore_; + } + /** + * + * + *
+     * Output only. Harm probability score.
+     * 
+ * + * float probability_score = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The probabilityScore to set. + * @return This builder for chaining. + */ + public Builder setProbabilityScore(float value) { + + probabilityScore_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Harm probability score.
+     * 
+ * + * float probability_score = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearProbabilityScore() { + bitField0_ = (bitField0_ & ~0x00000004); + probabilityScore_ = 0F; + onChanged(); + return this; + } + + private int severity_ = 0; + /** + * + * + *
+     * Output only. Harm severity levels in the content.
+     * 
+ * + * + * .google.cloud.vertexai.v1.SafetyRating.HarmSeverity severity = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for severity. + */ + @java.lang.Override + public int getSeverityValue() { + return severity_; + } + /** + * + * + *
+     * Output only. Harm severity levels in the content.
+     * 
+ * + * + * .google.cloud.vertexai.v1.SafetyRating.HarmSeverity severity = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for severity to set. + * @return This builder for chaining. + */ + public Builder setSeverityValue(int value) { + severity_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Harm severity levels in the content.
+     * 
+ * + * + * .google.cloud.vertexai.v1.SafetyRating.HarmSeverity severity = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The severity. + */ + @java.lang.Override + public com.google.cloud.vertexai.api.SafetyRating.HarmSeverity getSeverity() { + com.google.cloud.vertexai.api.SafetyRating.HarmSeverity result = + com.google.cloud.vertexai.api.SafetyRating.HarmSeverity.forNumber(severity_); + return result == null + ? com.google.cloud.vertexai.api.SafetyRating.HarmSeverity.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Output only. Harm severity levels in the content.
+     * 
+ * + * + * .google.cloud.vertexai.v1.SafetyRating.HarmSeverity severity = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The severity to set. + * @return This builder for chaining. + */ + public Builder setSeverity(com.google.cloud.vertexai.api.SafetyRating.HarmSeverity value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + severity_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Harm severity levels in the content.
+     * 
+ * + * + * .google.cloud.vertexai.v1.SafetyRating.HarmSeverity severity = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearSeverity() { + bitField0_ = (bitField0_ & ~0x00000008); + severity_ = 0; + onChanged(); + return this; + } + + private float severityScore_; + /** + * + * + *
+     * Output only. Harm severity score.
+     * 
+ * + * float severity_score = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The severityScore. + */ + @java.lang.Override + public float getSeverityScore() { + return severityScore_; + } + /** + * + * + *
+     * Output only. Harm severity score.
+     * 
+ * + * float severity_score = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The severityScore to set. + * @return This builder for chaining. + */ + public Builder setSeverityScore(float value) { + + severityScore_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Harm severity score.
+     * 
+ * + * float severity_score = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearSeverityScore() { + bitField0_ = (bitField0_ & ~0x00000010); + severityScore_ = 0F; + onChanged(); + return this; + } + private boolean blocked_; /** * @@ -991,7 +1550,7 @@ public boolean getBlocked() { public Builder setBlocked(boolean value) { blocked_ = value; - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -1008,7 +1567,7 @@ public Builder setBlocked(boolean value) { * @return This builder for chaining. */ public Builder clearBlocked() { - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000020); blocked_ = false; onChanged(); return this; diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SafetyRatingOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SafetyRatingOrBuilder.java index 8cb60f54a6ba..56c32dd6c1a4 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SafetyRatingOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SafetyRatingOrBuilder.java @@ -82,6 +82,61 @@ public interface SafetyRatingOrBuilder */ com.google.cloud.vertexai.api.SafetyRating.HarmProbability getProbability(); + /** + * + * + *
+   * Output only. Harm probability score.
+   * 
+ * + * float probability_score = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The probabilityScore. + */ + float getProbabilityScore(); + + /** + * + * + *
+   * Output only. Harm severity levels in the content.
+   * 
+ * + * + * .google.cloud.vertexai.v1.SafetyRating.HarmSeverity severity = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for severity. + */ + int getSeverityValue(); + /** + * + * + *
+   * Output only. Harm severity levels in the content.
+   * 
+ * + * + * .google.cloud.vertexai.v1.SafetyRating.HarmSeverity severity = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The severity. + */ + com.google.cloud.vertexai.api.SafetyRating.HarmSeverity getSeverity(); + + /** + * + * + *
+   * Output only. Harm severity score.
+   * 
+ * + * float severity_score = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The severityScore. + */ + float getSeverityScore(); + /** * * diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Tool.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Tool.java index 7ea8a844461e..e0ca2d3492aa 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Tool.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Tool.java @@ -28,7 +28,8 @@ * 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. + * one type of Tool (e.g FunctionDeclaration, Retrieval or + * GoogleSearchRetrieval). * * * Protobuf type {@code google.cloud.vertexai.v1.Tool} @@ -77,14 +78,14 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * 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][content.part.function_call] in the
-   * response. User should provide a
-   * [FunctionResponse][content.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 64 function declarations can be
-   * provided.
+   * 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][content.part.function_call] in the response.
+   * User should provide a [FunctionResponse][content.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 64 function declarations can be provided.
    * 
* * @@ -100,14 +101,14 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * 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][content.part.function_call] in the
-   * response. User should provide a
-   * [FunctionResponse][content.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 64 function declarations can be
-   * provided.
+   * 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][content.part.function_call] in the response.
+   * User should provide a [FunctionResponse][content.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 64 function declarations can be provided.
    * 
* * @@ -123,14 +124,14 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * 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][content.part.function_call] in the
-   * response. User should provide a
-   * [FunctionResponse][content.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 64 function declarations can be
-   * provided.
+   * 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][content.part.function_call] in the response.
+   * User should provide a [FunctionResponse][content.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 64 function declarations can be provided.
    * 
* * @@ -145,14 +146,14 @@ 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][content.part.function_call] in the
-   * response. User should provide a
-   * [FunctionResponse][content.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 64 function declarations can be
-   * provided.
+   * 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][content.part.function_call] in the response.
+   * User should provide a [FunctionResponse][content.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 64 function declarations can be provided.
    * 
* * @@ -167,14 +168,14 @@ public com.google.cloud.vertexai.api.FunctionDeclaration getFunctionDeclarations * * *
-   * 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][content.part.function_call] in the
-   * response. User should provide a
-   * [FunctionResponse][content.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 64 function declarations can be
-   * provided.
+   * 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][content.part.function_call] in the response.
+   * User should provide a [FunctionResponse][content.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 64 function declarations can be provided.
    * 
* * @@ -193,9 +194,10 @@ public com.google.cloud.vertexai.api.FunctionDeclaration getFunctionDeclarations * * *
-   * Optional. 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.
+   * 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.
    * 
* * @@ -212,9 +214,10 @@ public boolean hasRetrieval() { * * *
-   * Optional. 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.
+   * 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.
    * 
* * @@ -233,9 +236,10 @@ public com.google.cloud.vertexai.api.Retrieval getRetrieval() { * * *
-   * Optional. 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.
+   * 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.
    * 
* * @@ -255,7 +259,8 @@ public com.google.cloud.vertexai.api.RetrievalOrBuilder getRetrievalOrBuilder() * * *
-   * Optional. Specialized retrieval tool that is powered by Google search.
+   * Optional. GoogleSearchRetrieval tool type.
+   * Specialized retrieval tool that is powered by Google search.
    * 
* * @@ -272,7 +277,8 @@ public boolean hasGoogleSearchRetrieval() { * * *
-   * Optional. Specialized retrieval tool that is powered by Google search.
+   * Optional. GoogleSearchRetrieval tool type.
+   * Specialized retrieval tool that is powered by Google search.
    * 
* * @@ -291,7 +297,8 @@ public com.google.cloud.vertexai.api.GoogleSearchRetrieval getGoogleSearchRetrie * * *
-   * Optional. Specialized retrieval tool that is powered by Google search.
+   * Optional. GoogleSearchRetrieval tool type.
+   * Specialized retrieval tool that is powered by Google search.
    * 
* * @@ -504,7 +511,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * 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. + * one type of Tool (e.g FunctionDeclaration, Retrieval or + * GoogleSearchRetrieval). * * * Protobuf type {@code google.cloud.vertexai.v1.Tool} @@ -802,14 +810,14 @@ private void ensureFunctionDeclarationsIsMutable() { * * *
-     * 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][content.part.function_call] in the
-     * response. User should provide a
-     * [FunctionResponse][content.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 64 function declarations can be
-     * provided.
+     * 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][content.part.function_call] in the response.
+     * User should provide a [FunctionResponse][content.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 64 function declarations can be provided.
      * 
* * @@ -828,14 +836,14 @@ private void ensureFunctionDeclarationsIsMutable() { * * *
-     * 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][content.part.function_call] in the
-     * response. User should provide a
-     * [FunctionResponse][content.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 64 function declarations can be
-     * provided.
+     * 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][content.part.function_call] in the response.
+     * User should provide a [FunctionResponse][content.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 64 function declarations can be provided.
      * 
* * @@ -853,14 +861,14 @@ 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][content.part.function_call] in the
-     * response. User should provide a
-     * [FunctionResponse][content.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 64 function declarations can be
-     * provided.
+     * 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][content.part.function_call] in the response.
+     * User should provide a [FunctionResponse][content.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 64 function declarations can be provided.
      * 
* * @@ -878,14 +886,14 @@ public com.google.cloud.vertexai.api.FunctionDeclaration getFunctionDeclarations * * *
-     * 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][content.part.function_call] in the
-     * response. User should provide a
-     * [FunctionResponse][content.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 64 function declarations can be
-     * provided.
+     * 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][content.part.function_call] in the response.
+     * User should provide a [FunctionResponse][content.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 64 function declarations can be provided.
      * 
* * @@ -910,14 +918,14 @@ public Builder setFunctionDeclarations( * * *
-     * 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][content.part.function_call] in the
-     * response. User should provide a
-     * [FunctionResponse][content.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 64 function declarations can be
-     * provided.
+     * 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][content.part.function_call] in the response.
+     * User should provide a [FunctionResponse][content.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 64 function declarations can be provided.
      * 
* * @@ -939,14 +947,14 @@ public Builder setFunctionDeclarations( * * *
-     * 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][content.part.function_call] in the
-     * response. User should provide a
-     * [FunctionResponse][content.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 64 function declarations can be
-     * provided.
+     * 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][content.part.function_call] in the response.
+     * User should provide a [FunctionResponse][content.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 64 function declarations can be provided.
      * 
* * @@ -971,14 +979,14 @@ public Builder addFunctionDeclarations( * * *
-     * 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][content.part.function_call] in the
-     * response. User should provide a
-     * [FunctionResponse][content.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 64 function declarations can be
-     * provided.
+     * 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][content.part.function_call] in the response.
+     * User should provide a [FunctionResponse][content.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 64 function declarations can be provided.
      * 
* * @@ -1003,14 +1011,14 @@ public Builder addFunctionDeclarations( * * *
-     * 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][content.part.function_call] in the
-     * response. User should provide a
-     * [FunctionResponse][content.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 64 function declarations can be
-     * provided.
+     * 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][content.part.function_call] in the response.
+     * User should provide a [FunctionResponse][content.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 64 function declarations can be provided.
      * 
* * @@ -1032,14 +1040,14 @@ public Builder addFunctionDeclarations( * * *
-     * 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][content.part.function_call] in the
-     * response. User should provide a
-     * [FunctionResponse][content.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 64 function declarations can be
-     * provided.
+     * 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][content.part.function_call] in the response.
+     * User should provide a [FunctionResponse][content.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 64 function declarations can be provided.
      * 
* * @@ -1061,14 +1069,14 @@ public Builder addFunctionDeclarations( * * *
-     * 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][content.part.function_call] in the
-     * response. User should provide a
-     * [FunctionResponse][content.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 64 function declarations can be
-     * provided.
+     * 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][content.part.function_call] in the response.
+     * User should provide a [FunctionResponse][content.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 64 function declarations can be provided.
      * 
* * @@ -1090,14 +1098,14 @@ public Builder addAllFunctionDeclarations( * * *
-     * 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][content.part.function_call] in the
-     * response. User should provide a
-     * [FunctionResponse][content.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 64 function declarations can be
-     * provided.
+     * 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][content.part.function_call] in the response.
+     * User should provide a [FunctionResponse][content.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 64 function declarations can be provided.
      * 
* * @@ -1118,14 +1126,14 @@ public 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][content.part.function_call] in the
-     * response. User should provide a
-     * [FunctionResponse][content.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 64 function declarations can be
-     * provided.
+     * 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][content.part.function_call] in the response.
+     * User should provide a [FunctionResponse][content.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 64 function declarations can be provided.
      * 
* * @@ -1146,14 +1154,14 @@ public 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][content.part.function_call] in the
-     * response. User should provide a
-     * [FunctionResponse][content.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 64 function declarations can be
-     * provided.
+     * 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][content.part.function_call] in the response.
+     * User should provide a [FunctionResponse][content.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 64 function declarations can be provided.
      * 
* * @@ -1168,14 +1176,14 @@ public com.google.cloud.vertexai.api.FunctionDeclaration.Builder getFunctionDecl * * *
-     * 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][content.part.function_call] in the
-     * response. User should provide a
-     * [FunctionResponse][content.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 64 function declarations can be
-     * provided.
+     * 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][content.part.function_call] in the response.
+     * User should provide a [FunctionResponse][content.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 64 function declarations can be provided.
      * 
* * @@ -1194,14 +1202,14 @@ public com.google.cloud.vertexai.api.FunctionDeclaration.Builder getFunctionDecl * * *
-     * 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][content.part.function_call] in the
-     * response. User should provide a
-     * [FunctionResponse][content.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 64 function declarations can be
-     * provided.
+     * 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][content.part.function_call] in the response.
+     * User should provide a [FunctionResponse][content.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 64 function declarations can be provided.
      * 
* * @@ -1220,14 +1228,14 @@ public com.google.cloud.vertexai.api.FunctionDeclaration.Builder getFunctionDecl * * *
-     * 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][content.part.function_call] in the
-     * response. User should provide a
-     * [FunctionResponse][content.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 64 function declarations can be
-     * provided.
+     * 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][content.part.function_call] in the response.
+     * User should provide a [FunctionResponse][content.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 64 function declarations can be provided.
      * 
* * @@ -1243,14 +1251,14 @@ public com.google.cloud.vertexai.api.FunctionDeclaration.Builder getFunctionDecl * * *
-     * 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][content.part.function_call] in the
-     * response. User should provide a
-     * [FunctionResponse][content.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 64 function declarations can be
-     * provided.
+     * 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][content.part.function_call] in the response.
+     * User should provide a [FunctionResponse][content.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 64 function declarations can be provided.
      * 
* * @@ -1267,14 +1275,14 @@ public com.google.cloud.vertexai.api.FunctionDeclaration.Builder addFunctionDecl * * *
-     * 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][content.part.function_call] in the
-     * response. User should provide a
-     * [FunctionResponse][content.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 64 function declarations can be
-     * provided.
+     * 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][content.part.function_call] in the response.
+     * User should provide a [FunctionResponse][content.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 64 function declarations can be provided.
      * 
* * @@ -1316,9 +1324,10 @@ public com.google.cloud.vertexai.api.FunctionDeclaration.Builder addFunctionDecl * * *
-     * Optional. 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.
+     * 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.
      * 
* * @@ -1334,9 +1343,10 @@ public boolean hasRetrieval() { * * *
-     * Optional. 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.
+     * 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.
      * 
* * @@ -1358,9 +1368,10 @@ public com.google.cloud.vertexai.api.Retrieval getRetrieval() { * * *
-     * Optional. 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.
+     * 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.
      * 
* * @@ -1384,9 +1395,10 @@ public Builder setRetrieval(com.google.cloud.vertexai.api.Retrieval value) { * * *
-     * Optional. 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.
+     * 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.
      * 
* * @@ -1407,9 +1419,10 @@ public Builder setRetrieval(com.google.cloud.vertexai.api.Retrieval.Builder buil * * *
-     * Optional. 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.
+     * 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.
      * 
* * @@ -1438,9 +1451,10 @@ public Builder mergeRetrieval(com.google.cloud.vertexai.api.Retrieval value) { * * *
-     * Optional. 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.
+     * 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.
      * 
* * @@ -1461,9 +1475,10 @@ public Builder clearRetrieval() { * * *
-     * Optional. 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.
+     * 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.
      * 
* * @@ -1479,9 +1494,10 @@ public com.google.cloud.vertexai.api.Retrieval.Builder getRetrievalBuilder() { * * *
-     * Optional. 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.
+     * 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.
      * 
* * @@ -1501,9 +1517,10 @@ public com.google.cloud.vertexai.api.RetrievalOrBuilder getRetrievalOrBuilder() * * *
-     * Optional. 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.
+     * 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.
      * 
* * @@ -1537,7 +1554,8 @@ public com.google.cloud.vertexai.api.RetrievalOrBuilder getRetrievalOrBuilder() * * *
-     * Optional. Specialized retrieval tool that is powered by Google search.
+     * Optional. GoogleSearchRetrieval tool type.
+     * Specialized retrieval tool that is powered by Google search.
      * 
* * @@ -1553,7 +1571,8 @@ public boolean hasGoogleSearchRetrieval() { * * *
-     * Optional. Specialized retrieval tool that is powered by Google search.
+     * Optional. GoogleSearchRetrieval tool type.
+     * Specialized retrieval tool that is powered by Google search.
      * 
* * @@ -1575,7 +1594,8 @@ public com.google.cloud.vertexai.api.GoogleSearchRetrieval getGoogleSearchRetrie * * *
-     * Optional. Specialized retrieval tool that is powered by Google search.
+     * Optional. GoogleSearchRetrieval tool type.
+     * Specialized retrieval tool that is powered by Google search.
      * 
* * @@ -1600,7 +1620,8 @@ public Builder setGoogleSearchRetrieval( * * *
-     * Optional. Specialized retrieval tool that is powered by Google search.
+     * Optional. GoogleSearchRetrieval tool type.
+     * Specialized retrieval tool that is powered by Google search.
      * 
* * @@ -1622,7 +1643,8 @@ public Builder setGoogleSearchRetrieval( * * *
-     * Optional. Specialized retrieval tool that is powered by Google search.
+     * Optional. GoogleSearchRetrieval tool type.
+     * Specialized retrieval tool that is powered by Google search.
      * 
* * @@ -1653,7 +1675,8 @@ public Builder mergeGoogleSearchRetrieval( * * *
-     * Optional. Specialized retrieval tool that is powered by Google search.
+     * Optional. GoogleSearchRetrieval tool type.
+     * Specialized retrieval tool that is powered by Google search.
      * 
* * @@ -1674,7 +1697,8 @@ public Builder clearGoogleSearchRetrieval() { * * *
-     * Optional. Specialized retrieval tool that is powered by Google search.
+     * Optional. GoogleSearchRetrieval tool type.
+     * Specialized retrieval tool that is powered by Google search.
      * 
* * @@ -1691,7 +1715,8 @@ public Builder clearGoogleSearchRetrieval() { * * *
-     * Optional. Specialized retrieval tool that is powered by Google search.
+     * Optional. GoogleSearchRetrieval tool type.
+     * Specialized retrieval tool that is powered by Google search.
      * 
* * @@ -1712,7 +1737,8 @@ public Builder clearGoogleSearchRetrieval() { * * *
-     * Optional. Specialized retrieval tool that is powered by Google search.
+     * Optional. GoogleSearchRetrieval tool type.
+     * Specialized retrieval tool that is powered by Google search.
      * 
* * diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ToolOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ToolOrBuilder.java index be4c3bd56bfd..a49dc8e20bbc 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ToolOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ToolOrBuilder.java @@ -28,14 +28,14 @@ public interface ToolOrBuilder * * *
-   * 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][content.part.function_call] in the
-   * response. User should provide a
-   * [FunctionResponse][content.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 64 function declarations can be
-   * provided.
+   * 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][content.part.function_call] in the response.
+   * User should provide a [FunctionResponse][content.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 64 function declarations can be provided.
    * 
* * @@ -47,14 +47,14 @@ public interface ToolOrBuilder * * *
-   * 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][content.part.function_call] in the
-   * response. User should provide a
-   * [FunctionResponse][content.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 64 function declarations can be
-   * provided.
+   * 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][content.part.function_call] in the response.
+   * User should provide a [FunctionResponse][content.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 64 function declarations can be provided.
    * 
* * @@ -66,14 +66,14 @@ public interface ToolOrBuilder * * *
-   * 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][content.part.function_call] in the
-   * response. User should provide a
-   * [FunctionResponse][content.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 64 function declarations can be
-   * provided.
+   * 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][content.part.function_call] in the response.
+   * User should provide a [FunctionResponse][content.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 64 function declarations can be provided.
    * 
* * @@ -85,14 +85,14 @@ public interface ToolOrBuilder * * *
-   * 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][content.part.function_call] in the
-   * response. User should provide a
-   * [FunctionResponse][content.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 64 function declarations can be
-   * provided.
+   * 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][content.part.function_call] in the response.
+   * User should provide a [FunctionResponse][content.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 64 function declarations can be provided.
    * 
* * @@ -105,14 +105,14 @@ public interface ToolOrBuilder * * *
-   * 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][content.part.function_call] in the
-   * response. User should provide a
-   * [FunctionResponse][content.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 64 function declarations can be
-   * provided.
+   * 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][content.part.function_call] in the response.
+   * User should provide a [FunctionResponse][content.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 64 function declarations can be provided.
    * 
* * @@ -126,9 +126,10 @@ com.google.cloud.vertexai.api.FunctionDeclarationOrBuilder getFunctionDeclaratio * * *
-   * Optional. 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.
+   * 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.
    * 
* * @@ -142,9 +143,10 @@ com.google.cloud.vertexai.api.FunctionDeclarationOrBuilder getFunctionDeclaratio * * *
-   * Optional. 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.
+   * 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.
    * 
* * @@ -158,9 +160,10 @@ com.google.cloud.vertexai.api.FunctionDeclarationOrBuilder getFunctionDeclaratio * * *
-   * Optional. 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.
+   * 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.
    * 
* * @@ -173,7 +176,8 @@ com.google.cloud.vertexai.api.FunctionDeclarationOrBuilder getFunctionDeclaratio * * *
-   * Optional. Specialized retrieval tool that is powered by Google search.
+   * Optional. GoogleSearchRetrieval tool type.
+   * Specialized retrieval tool that is powered by Google search.
    * 
* * @@ -187,7 +191,8 @@ com.google.cloud.vertexai.api.FunctionDeclarationOrBuilder getFunctionDeclaratio * * *
-   * Optional. Specialized retrieval tool that is powered by Google search.
+   * Optional. GoogleSearchRetrieval tool type.
+   * Specialized retrieval tool that is powered by Google search.
    * 
* * @@ -201,7 +206,8 @@ com.google.cloud.vertexai.api.FunctionDeclarationOrBuilder getFunctionDeclaratio * * *
-   * Optional. Specialized retrieval tool that is powered by Google search.
+   * Optional. GoogleSearchRetrieval tool type.
+   * Specialized retrieval tool that is powered by Google search.
    * 
* * diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ToolProto.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ToolProto.java index cebd5978d231..2de475a30f9c 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ToolProto.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ToolProto.java @@ -65,47 +65,43 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { static { java.lang.String[] descriptorData = { - "\n" - + "#google/cloud/vertexai/v1/tool.proto\022\030g" + "\n#google/cloud/vertexai/v1/tool.proto\022\030g" + "oogle.cloud.vertexai.v1\032\037google/api/fiel" - + "d_behavior.proto\032&google/cloud/vertexai/" - + "v1/openapi.proto\032\034google/protobuf/struct.proto\"\355\001\n" - + "\004Tool\022Q\n" - + "\025function_declarations\030\001" - + " \003(\0132-.google.cloud.vertexai.v1.FunctionDeclarationB\003\340A\001\022;\n" - + "\tretrieval\030\002 \001(\0132#." - + "google.cloud.vertexai.v1.RetrievalB\003\340A\001\022U\n" - + "\027google_search_retrieval\030\003 \001(\0132/.googl" - + "e.cloud.vertexai.v1.GoogleSearchRetrievalB\003\340A\001\"}\n" - + "\023FunctionDeclaration\022\021\n" - + "\004name\030\001 \001(\tB\003\340A\002\022\030\n" - + "\013description\030\002 \001(\tB\003\340A\001\0229\n\n" - + "parameters\030\003 \001(\0132 .google.cloud.vertexai.v1.SchemaB\003\340A\001\"M\n" - + "\014FunctionCall\022\021\n" - + "\004name\030\001 \001(\tB\003\340A\002\022*\n" - + "\004args\030\002 \001(\0132\027.google.protobuf.StructB\003\340A\001\"U\n" - + "\020FunctionResponse\022\021\n" - + "\004name\030\001 \001(\tB\003\340A\002\022.\n" - + "\010response\030\002 \001(\0132\027.google.protobuf.StructB\003\340A\002\"}\n" - + "\tRetrieval\022D\n" - + "\020vertex_ai_search\030\002" - + " \001(\0132(.google.cloud.vertexai.v1.VertexAISearchH\000\022 \n" - + "\023disable_attribution\030\003 \001(\010B\003\340A\001B\010\n" - + "\006source\"(\n" - + "\016VertexAISearch\022\026\n" - + "\tdatastore\030\001 \001(\tB\003\340A\002\"9\n" - + "\025GoogleSearchRetrieval\022 \n" - + "\023disable_attribution\030\001 \001(\010B\003\340A\001B\306\001\n" - + "\035com.google.cloud.vertexai.apiB\tToolProtoP\001Z>cloud.google.com/go/aipl" - + "atform/apiv1/aiplatformpb;aiplatformpb\252\002" - + "\032Google.Cloud.AIPlatform.V1\312\002\032Google\\Clo" - + "ud\\AIPlatform\\V1\352\002\035Google::Cloud::AIPlatform::V1b\006proto3" + + "d_behavior.proto\032\031google/api/resource.pr" + + "oto\032&google/cloud/vertexai/v1/openapi.pr" + + "oto\032\034google/protobuf/struct.proto\"\355\001\n\004To" + + "ol\022Q\n\025function_declarations\030\001 \003(\0132-.goog" + + "le.cloud.vertexai.v1.FunctionDeclaration" + + "B\003\340A\001\022;\n\tretrieval\030\002 \001(\0132#.google.cloud." + + "vertexai.v1.RetrievalB\003\340A\001\022U\n\027google_sea" + + "rch_retrieval\030\003 \001(\0132/.google.cloud.verte" + + "xai.v1.GoogleSearchRetrievalB\003\340A\001\"}\n\023Fun" + + "ctionDeclaration\022\021\n\004name\030\001 \001(\tB\003\340A\002\022\030\n\013d" + + "escription\030\002 \001(\tB\003\340A\001\0229\n\nparameters\030\003 \001(" + + "\0132 .google.cloud.vertexai.v1.SchemaB\003\340A\001" + + "\"M\n\014FunctionCall\022\021\n\004name\030\001 \001(\tB\003\340A\002\022*\n\004a" + + "rgs\030\002 \001(\0132\027.google.protobuf.StructB\003\340A\001\"" + + "U\n\020FunctionResponse\022\021\n\004name\030\001 \001(\tB\003\340A\002\022." + + "\n\010response\030\002 \001(\0132\027.google.protobuf.Struc" + + "tB\003\340A\002\"}\n\tRetrieval\022D\n\020vertex_ai_search\030" + + "\002 \001(\0132(.google.cloud.vertexai.v1.VertexA" + + "ISearchH\000\022 \n\023disable_attribution\030\003 \001(\010B\003" + + "\340A\001B\010\n\006source\"(\n\016VertexAISearch\022\026\n\tdatas" + + "tore\030\001 \001(\tB\003\340A\002\"9\n\025GoogleSearchRetrieval" + + "\022 \n\023disable_attribution\030\001 \001(\010B\003\340A\001B\306\001\n\035c" + + "om.google.cloud.vertexai.apiB\tToolProtoP" + + "\001Z>cloud.google.com/go/aiplatform/apiv1/" + + "aiplatformpb;aiplatformpb\252\002\032Google.Cloud" + + ".AIPlatform.V1\312\002\032Google\\Cloud\\AIPlatform" + + "\\V1\352\002\035Google::Cloud::AIPlatform::V1b\006pro" + + "to3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), com.google.cloud.vertexai.api.OpenApiProto.getDescriptor(), com.google.protobuf.StructProto.getDescriptor(), }); @@ -171,6 +167,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( descriptor, registry); com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); com.google.cloud.vertexai.api.OpenApiProto.getDescriptor(); com.google.protobuf.StructProto.getDescriptor(); } diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/VertexAISearch.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/VertexAISearch.java index def8d04e4551..87bf67f530a7 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/VertexAISearch.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/VertexAISearch.java @@ -73,7 +73,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
    * Required. Fully-qualified Vertex AI Search's datastore resource ID.
-   * projects/<>/locations/<>/collections/<>/dataStores/<>
+   * Format:
+   * projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}
    * 
* * string datastore = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -97,7 +98,8 @@ public java.lang.String getDatastore() { * *
    * Required. Fully-qualified Vertex AI Search's datastore resource ID.
-   * projects/<>/locations/<>/collections/<>/dataStores/<>
+   * Format:
+   * projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}
    * 
* * string datastore = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -465,7 +467,8 @@ public Builder mergeFrom( * *
      * Required. Fully-qualified Vertex AI Search's datastore resource ID.
-     * projects/<>/locations/<>/collections/<>/dataStores/<>
+     * Format:
+     * projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}
      * 
* * string datastore = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -488,7 +491,8 @@ public java.lang.String getDatastore() { * *
      * Required. Fully-qualified Vertex AI Search's datastore resource ID.
-     * projects/<>/locations/<>/collections/<>/dataStores/<>
+     * Format:
+     * projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}
      * 
* * string datastore = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -511,7 +515,8 @@ public com.google.protobuf.ByteString getDatastoreBytes() { * *
      * Required. Fully-qualified Vertex AI Search's datastore resource ID.
-     * projects/<>/locations/<>/collections/<>/dataStores/<>
+     * Format:
+     * projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}
      * 
* * string datastore = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -533,7 +538,8 @@ public Builder setDatastore(java.lang.String value) { * *
      * Required. Fully-qualified Vertex AI Search's datastore resource ID.
-     * projects/<>/locations/<>/collections/<>/dataStores/<>
+     * Format:
+     * projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}
      * 
* * string datastore = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -551,7 +557,8 @@ public Builder clearDatastore() { * *
      * Required. Fully-qualified Vertex AI Search's datastore resource ID.
-     * projects/<>/locations/<>/collections/<>/dataStores/<>
+     * Format:
+     * projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}
      * 
* * string datastore = 1 [(.google.api.field_behavior) = REQUIRED]; diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/VertexAISearchOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/VertexAISearchOrBuilder.java index 0966d74e9e57..b31423934914 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/VertexAISearchOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/VertexAISearchOrBuilder.java @@ -29,7 +29,8 @@ public interface VertexAISearchOrBuilder * *
    * Required. Fully-qualified Vertex AI Search's datastore resource ID.
-   * projects/<>/locations/<>/collections/<>/dataStores/<>
+   * Format:
+   * projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}
    * 
* * string datastore = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -42,7 +43,8 @@ public interface VertexAISearchOrBuilder * *
    * Required. Fully-qualified Vertex AI Search's datastore resource ID.
-   * projects/<>/locations/<>/collections/<>/dataStores/<>
+   * Format:
+   * projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}
    * 
* * string datastore = 1 [(.google.api.field_behavior) = REQUIRED]; diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/accelerator_type.proto b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/accelerator_type.proto index bb4231b49bdf..716d8ea6a98d 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/accelerator_type.proto +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/accelerator_type.proto @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -53,6 +53,9 @@ enum AcceleratorType { // Nvidia L4 GPU. NVIDIA_L4 = 11; + // Nvidia H100 80Gb GPU. + NVIDIA_H100_80GB = 13; + // TPU v2. TPU_V2 = 6; diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/content.proto b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/content.proto index fa61f0e57f7c..a29017a890f8 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/content.proto +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/content.proto @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -201,12 +201,39 @@ message SafetyRating { HIGH = 4; } + // Harm severity levels. + enum HarmSeverity { + // Harm severity unspecified. + HARM_SEVERITY_UNSPECIFIED = 0; + + // Negligible level of harm severity. + HARM_SEVERITY_NEGLIGIBLE = 1; + + // Low level of harm severity. + HARM_SEVERITY_LOW = 2; + + // Medium level of harm severity. + HARM_SEVERITY_MEDIUM = 3; + + // High level of harm severity. + HARM_SEVERITY_HIGH = 4; + } + // Output only. Harm category. HarmCategory category = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Harm probability levels in the content. HarmProbability probability = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. Harm probability score. + float probability_score = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Harm severity levels in the content. + HarmSeverity severity = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Harm severity score. + float severity_score = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. Indicates whether the content was filtered out because of this // rating. bool blocked = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -265,6 +292,18 @@ message Candidate { // All other reasons that stopped the token generation OTHER = 5; + + // The token generation was stopped as the response was flagged for the + // terms which are included from the terminology blocklist. + BLOCKLIST = 6; + + // The token generation was stopped as the response was flagged for + // the prohibited contents. + PROHIBITED_CONTENT = 7; + + // The token generation was stopped as the response was flagged for + // Sensitive Personally Identifiable Information (SPII) contents. + SPII = 8; } // Output only. Index of the candidate. diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/encryption_spec.proto b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/encryption_spec.proto index 4df41173b2c8..68dbf3b1bc6d 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/encryption_spec.proto +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/encryption_spec.proto @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/endpoint.proto b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/endpoint.proto index e6cfa21839bc..46d86c71556c 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/endpoint.proto +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/endpoint.proto @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/endpoint_service.proto b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/endpoint_service.proto index 89a0fd3c2a80..a74c4858bf1f 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/endpoint_service.proto +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/endpoint_service.proto @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -210,20 +210,23 @@ message ListEndpointsRequest { // Optional. An expression for filtering the results of the request. For field // names both snake_case and camelCase are supported. // - // * `endpoint` supports = and !=. `endpoint` represents the Endpoint ID, + // * `endpoint` supports `=` and `!=`. `endpoint` represents the Endpoint + // ID, // i.e. the last segment of the Endpoint's [resource // name][google.cloud.aiplatform.v1.Endpoint.name]. - // * `display_name` supports = and, != + // * `display_name` supports `=` and `!=`. // * `labels` supports general map functions that is: // * `labels.key=value` - key:value equality - // * `labels.key:* or labels:key - key existence + // * `labels.key:*` or `labels:key` - key existence // * A key including a space must be quoted. `labels."a key"`. + // * `base_model_name` only supports `=`. // // Some examples: // // * `endpoint=1` // * `displayName="myDisplayName"` // * `labels.myKey="myValue"` + // * `baseModelName="text-bison"` string filter = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. The standard list page size. diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/explanation.proto b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/explanation.proto index fc648393cf7a..5a4cb09c1f6f 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/explanation.proto +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/explanation.proto @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/explanation_metadata.proto b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/explanation_metadata.proto index b67696632dcd..25a4e9004de5 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/explanation_metadata.proto +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/explanation_metadata.proto @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/io.proto b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/io.proto index 53cd5b924981..055c83a2fe35 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/io.proto +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/io.proto @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/llm_utility_service.proto b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/llm_utility_service.proto index 12c86c0ba9e3..8fc85854fe94 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/llm_utility_service.proto +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/llm_utility_service.proto @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/machine_resources.proto b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/machine_resources.proto index 6fba1fef1183..469118c0616a 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/machine_resources.proto +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/machine_resources.proto @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/openapi.proto b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/openapi.proto index ec98da45000b..f72213380eb0 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/openapi.proto +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/openapi.proto @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/operation.proto b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/operation.proto index ee20d6786225..66683c2c9b34 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/operation.proto +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/operation.proto @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/prediction_service.proto b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/prediction_service.proto index c3ff2b8c39f8..3a1134e41228 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/prediction_service.proto +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/prediction_service.proto @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/tool.proto b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/tool.proto index 08b7dddb6c8d..00f605487ba7 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/tool.proto +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/tool.proto @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -17,6 +17,7 @@ syntax = "proto3"; package google.cloud.vertexai.v1; import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/cloud/vertexai/v1/openapi.proto"; import "google/protobuf/struct.proto"; @@ -33,25 +34,28 @@ option ruby_package = "Google::Cloud::AIPlatform::V1"; // 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. +// one type of Tool (e.g FunctionDeclaration, Retrieval or +// GoogleSearchRetrieval). message Tool { - // 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][content.part.function_call] in the - // response. User should provide a - // [FunctionResponse][content.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 64 function declarations can be - // provided. + // 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][content.part.function_call] in the response. + // User should provide a [FunctionResponse][content.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 64 function declarations can be provided. repeated FunctionDeclaration function_declarations = 1 [(google.api.field_behavior) = OPTIONAL]; - // Optional. 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. + // 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. Retrieval retrieval = 2 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Specialized retrieval tool that is powered by Google search. + // Optional. GoogleSearchRetrieval tool type. + // Specialized retrieval tool that is powered by Google search. GoogleSearchRetrieval google_search_retrieval = 3 [(google.api.field_behavior) = OPTIONAL]; } @@ -130,7 +134,8 @@ message Retrieval { // See https://cloud.google.com/vertex-ai-search-and-conversation message VertexAISearch { // Required. Fully-qualified Vertex AI Search's datastore resource ID. - // projects/<>/locations/<>/collections/<>/dataStores/<> + // Format: + // projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore} string datastore = 1 [(google.api.field_behavior) = REQUIRED]; } diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/types.proto b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/types.proto index 43fa83ae78f1..fc5f3b8c48df 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/types.proto +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/types.proto @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License.