Skip to content

Commit

Permalink
feat: [aiplatform] add Content (#10116)
Browse files Browse the repository at this point in the history
* feat: add data_stats to Model
feat: add data_stats to ExportDataResponse
feat: add filter_split to ExportDataConfig
feat: add saved_query_id to ExportDataConfig
feat: add annotation_schema_uri to ExportDataConfig
feat: add export_use to ExportDataConfig
docs: update exported_files description in ExportDataResponse

PiperOrigin-RevId: 588136649

Source-Link: googleapis/googleapis@57b57f4

Source-Link: googleapis/googleapis-gen@0d91143
Copy-Tag: eyJwIjoiamF2YS1haXBsYXRmb3JtLy5Pd2xCb3QueWFtbCIsImgiOiIwZDkxMTQzN2I3NjQxMDgxZGQ3NTc3ZTFkNjBmMDBmZGVmOGVmMTQyIn0=

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* feat: add Content
feat: add data_stats to ExportDataResponse
feat: add display_name to DeployedIndex
feat: add ExportEndpointOperationMetadata to EndpointService
docs: changes name from OUTPUT_ONLY to IDENTIFIER in FeatureGroup
feat: add FunctionCall and FunctionResponse
feat: add REBOOTING and notebook_runtime_template to PersistentResource
feat: add BatchCancelPipelineJobs to PipelineService
feat: add StreamGenerateContent and GenerateContentRequest to PredictionService
feat: add Tool

PiperOrigin-RevId: 589253340

Source-Link: googleapis/googleapis@0ed84b3

Source-Link: googleapis/googleapis-gen@b56eb45
Copy-Tag: eyJwIjoiamF2YS1haXBsYXRmb3JtLy5Pd2xCb3QueWFtbCIsImgiOiJiNTZlYjQ1NjkwOWU4ZTEyNDkxNGVkYzYwNjRiMTRmODhiMWZkMjYxIn0=

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* feat: add Content
feat: add ExportUse and ExportFilterSplit to Dataset
feat: add data_stats to ExportDataResponse
feat: add display_name to DeployedIndex
feat: add DeploymentResourcePool
feat: add DeploymentResourcePoolService
feat: add shared_resources to DeployedModel
docs: changes name from OUTPUT_ONLY to IDENTIFIER in FeatureGroup
feat: add DataStats to Model
feat: add model and contents to PredictionService
feat: add Tool

PiperOrigin-RevId: 589254081

Source-Link: googleapis/googleapis@00931e0

Source-Link: googleapis/googleapis-gen@1393818
Copy-Tag: eyJwIjoiamF2YS1haXBsYXRmb3JtLy5Pd2xCb3QueWFtbCIsImgiOiIxMzkzODE4MDQ1MzRjNzI0OGUyNmIwZTIzYzQxOGIyZTA2N2I2YmI2In0=

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] committed Dec 11, 2023
1 parent a55ad88 commit b6c07b9
Show file tree
Hide file tree
Showing 298 changed files with 98,125 additions and 1,371 deletions.
4 changes: 2 additions & 2 deletions java-aiplatform/README.md
Expand Up @@ -20,7 +20,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file:
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>libraries-bom</artifactId>
<version>26.27.0</version>
<version>26.28.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down Expand Up @@ -195,7 +195,7 @@ Java is a registered trademark of Oracle and/or its affiliates.
[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html
[stability-image]: https://img.shields.io/badge/stability-stable-green
[maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-aiplatform.svg
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-aiplatform/3.31.0
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-aiplatform/3.32.0
[authentication]: https://github.com/googleapis/google-cloud-java#authentication
[auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes
[predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Expand Up @@ -259,7 +259,9 @@ public final CountTokensResponse countTokens(String endpoint, List<Value> instan
* EndpointName.ofProjectLocationEndpointName(
* "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
* .toString())
* .setModel("model104069929")
* .addAllInstances(new ArrayList<Value>())
* .addAllContents(new ArrayList<Content>())
* .build();
* CountTokensResponse response = llmUtilityServiceClient.countTokens(request);
* }
Expand Down Expand Up @@ -291,7 +293,9 @@ public final CountTokensResponse countTokens(CountTokensRequest request) {
* EndpointName.ofProjectLocationEndpointName(
* "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
* .toString())
* .setModel("model104069929")
* .addAllInstances(new ArrayList<Value>())
* .addAllContents(new ArrayList<Content>())
* .build();
* ApiFuture<CountTokensResponse> future =
* llmUtilityServiceClient.countTokensCallable().futureCall(request);
Expand Down
Expand Up @@ -986,6 +986,40 @@ public final UnaryCallable<ExplainRequest, ExplainResponse> explainCallable() {
return stub.explainCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Generate content with multimodal inputs with streaming support.
*
* <p>Sample code:
*
* <pre>{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
* GenerateContentRequest request =
* GenerateContentRequest.newBuilder()
* .setModel("model104069929")
* .addAllContents(new ArrayList<Content>())
* .addAllTools(new ArrayList<Tool>())
* .addAllSafetySettings(new ArrayList<SafetySetting>())
* .setGenerationConfig(GenerationConfig.newBuilder().build())
* .build();
* ServerStream<GenerateContentResponse> stream =
* predictionServiceClient.streamGenerateContentCallable().call(request);
* for (GenerateContentResponse response : stream) {
* // Do something when a response is received.
* }
* }
* }</pre>
*/
public final ServerStreamingCallable<GenerateContentRequest, GenerateContentResponse>
streamGenerateContentCallable() {
return stub.streamGenerateContentCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists information about the supported locations for this service.
Expand Down
Expand Up @@ -130,6 +130,12 @@ public UnaryCallSettings<ExplainRequest, ExplainResponse> explainSettings() {
return ((PredictionServiceStubSettings) getStubSettings()).explainSettings();
}

/** Returns the object with the settings used for calls to streamGenerateContent. */
public ServerStreamingCallSettings<GenerateContentRequest, GenerateContentResponse>
streamGenerateContentSettings() {
return ((PredictionServiceStubSettings) getStubSettings()).streamGenerateContentSettings();
}

/** Returns the object with the settings used for calls to listLocations. */
public PagedCallSettings<ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
listLocationsSettings() {
Expand Down Expand Up @@ -299,6 +305,12 @@ public UnaryCallSettings.Builder<ExplainRequest, ExplainResponse> explainSetting
return getStubSettingsBuilder().explainSettings();
}

/** Returns the builder for the settings used for calls to streamGenerateContent. */
public ServerStreamingCallSettings.Builder<GenerateContentRequest, GenerateContentResponse>
streamGenerateContentSettings() {
return getStubSettingsBuilder().streamGenerateContentSettings();
}

/** Returns the builder for the settings used for calls to listLocations. */
public PagedCallSettings.Builder<
ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
Expand Down
Expand Up @@ -83,6 +83,45 @@
}
}
},
"DeploymentResourcePoolService": {
"clients": {
"grpc": {
"libraryClient": "DeploymentResourcePoolServiceClient",
"rpcs": {
"CreateDeploymentResourcePool": {
"methods": ["createDeploymentResourcePoolAsync", "createDeploymentResourcePoolAsync", "createDeploymentResourcePoolAsync", "createDeploymentResourcePoolOperationCallable", "createDeploymentResourcePoolCallable"]
},
"DeleteDeploymentResourcePool": {
"methods": ["deleteDeploymentResourcePoolAsync", "deleteDeploymentResourcePoolAsync", "deleteDeploymentResourcePoolAsync", "deleteDeploymentResourcePoolOperationCallable", "deleteDeploymentResourcePoolCallable"]
},
"GetDeploymentResourcePool": {
"methods": ["getDeploymentResourcePool", "getDeploymentResourcePool", "getDeploymentResourcePool", "getDeploymentResourcePoolCallable"]
},
"GetIamPolicy": {
"methods": ["getIamPolicy", "getIamPolicyCallable"]
},
"GetLocation": {
"methods": ["getLocation", "getLocationCallable"]
},
"ListDeploymentResourcePools": {
"methods": ["listDeploymentResourcePools", "listDeploymentResourcePools", "listDeploymentResourcePools", "listDeploymentResourcePoolsPagedCallable", "listDeploymentResourcePoolsCallable"]
},
"ListLocations": {
"methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"]
},
"QueryDeployedModels": {
"methods": ["queryDeployedModels", "queryDeployedModels", "queryDeployedModelsPagedCallable", "queryDeployedModelsCallable"]
},
"SetIamPolicy": {
"methods": ["setIamPolicy", "setIamPolicyCallable"]
},
"TestIamPermissions": {
"methods": ["testIamPermissions", "testIamPermissionsCallable"]
}
}
}
}
},
"EndpointService": {
"clients": {
"grpc": {
Expand Down Expand Up @@ -1021,6 +1060,9 @@
"SetIamPolicy": {
"methods": ["setIamPolicy", "setIamPolicyCallable"]
},
"StreamGenerateContent": {
"methods": ["streamGenerateContentCallable"]
},
"StreamingPredict": {
"methods": ["streamingPredictCallable"]
},
Expand Down
Expand Up @@ -37,6 +37,27 @@
* }
* }</pre>
*
* <p>======================= DeploymentResourcePoolServiceClient =======================
*
* <p>Service Description: A service that manages the DeploymentResourcePool resource.
*
* <p>Sample for DeploymentResourcePoolServiceClient:
*
* <pre>{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (DeploymentResourcePoolServiceClient deploymentResourcePoolServiceClient =
* DeploymentResourcePoolServiceClient.create()) {
* DeploymentResourcePoolName name =
* DeploymentResourcePoolName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT_RESOURCE_POOL]");
* DeploymentResourcePool response =
* deploymentResourcePoolServiceClient.getDeploymentResourcePool(name);
* }
* }</pre>
*
* <p>======================= EndpointServiceClient =======================
*
* <p>Service Description: A service for managing Vertex AI's Endpoints.
Expand Down
@@ -0,0 +1,145 @@
/*
* 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.google.cloud.aiplatform.v1.stub;

import static com.google.cloud.aiplatform.v1.DeploymentResourcePoolServiceClient.ListDeploymentResourcePoolsPagedResponse;
import static com.google.cloud.aiplatform.v1.DeploymentResourcePoolServiceClient.ListLocationsPagedResponse;
import static com.google.cloud.aiplatform.v1.DeploymentResourcePoolServiceClient.QueryDeployedModelsPagedResponse;

import com.google.api.gax.core.BackgroundResource;
import com.google.api.gax.rpc.OperationCallable;
import com.google.api.gax.rpc.UnaryCallable;
import com.google.cloud.aiplatform.v1.CreateDeploymentResourcePoolOperationMetadata;
import com.google.cloud.aiplatform.v1.CreateDeploymentResourcePoolRequest;
import com.google.cloud.aiplatform.v1.DeleteDeploymentResourcePoolRequest;
import com.google.cloud.aiplatform.v1.DeleteOperationMetadata;
import com.google.cloud.aiplatform.v1.DeploymentResourcePool;
import com.google.cloud.aiplatform.v1.GetDeploymentResourcePoolRequest;
import com.google.cloud.aiplatform.v1.ListDeploymentResourcePoolsRequest;
import com.google.cloud.aiplatform.v1.ListDeploymentResourcePoolsResponse;
import com.google.cloud.aiplatform.v1.QueryDeployedModelsRequest;
import com.google.cloud.aiplatform.v1.QueryDeployedModelsResponse;
import com.google.cloud.location.GetLocationRequest;
import com.google.cloud.location.ListLocationsRequest;
import com.google.cloud.location.ListLocationsResponse;
import com.google.cloud.location.Location;
import com.google.iam.v1.GetIamPolicyRequest;
import com.google.iam.v1.Policy;
import com.google.iam.v1.SetIamPolicyRequest;
import com.google.iam.v1.TestIamPermissionsRequest;
import com.google.iam.v1.TestIamPermissionsResponse;
import com.google.longrunning.Operation;
import com.google.longrunning.stub.OperationsStub;
import com.google.protobuf.Empty;
import javax.annotation.Generated;

// AUTO-GENERATED DOCUMENTATION AND CLASS.
/**
* Base stub class for the DeploymentResourcePoolService service API.
*
* <p>This class is for advanced usage and reflects the underlying API directly.
*/
@Generated("by gapic-generator-java")
public abstract class DeploymentResourcePoolServiceStub implements BackgroundResource {

public OperationsStub getOperationsStub() {
throw new UnsupportedOperationException("Not implemented: getOperationsStub()");
}

public OperationCallable<
CreateDeploymentResourcePoolRequest,
DeploymentResourcePool,
CreateDeploymentResourcePoolOperationMetadata>
createDeploymentResourcePoolOperationCallable() {
throw new UnsupportedOperationException(
"Not implemented: createDeploymentResourcePoolOperationCallable()");
}

public UnaryCallable<CreateDeploymentResourcePoolRequest, Operation>
createDeploymentResourcePoolCallable() {
throw new UnsupportedOperationException(
"Not implemented: createDeploymentResourcePoolCallable()");
}

public UnaryCallable<GetDeploymentResourcePoolRequest, DeploymentResourcePool>
getDeploymentResourcePoolCallable() {
throw new UnsupportedOperationException("Not implemented: getDeploymentResourcePoolCallable()");
}

public UnaryCallable<ListDeploymentResourcePoolsRequest, ListDeploymentResourcePoolsPagedResponse>
listDeploymentResourcePoolsPagedCallable() {
throw new UnsupportedOperationException(
"Not implemented: listDeploymentResourcePoolsPagedCallable()");
}

public UnaryCallable<ListDeploymentResourcePoolsRequest, ListDeploymentResourcePoolsResponse>
listDeploymentResourcePoolsCallable() {
throw new UnsupportedOperationException(
"Not implemented: listDeploymentResourcePoolsCallable()");
}

public OperationCallable<DeleteDeploymentResourcePoolRequest, Empty, DeleteOperationMetadata>
deleteDeploymentResourcePoolOperationCallable() {
throw new UnsupportedOperationException(
"Not implemented: deleteDeploymentResourcePoolOperationCallable()");
}

public UnaryCallable<DeleteDeploymentResourcePoolRequest, Operation>
deleteDeploymentResourcePoolCallable() {
throw new UnsupportedOperationException(
"Not implemented: deleteDeploymentResourcePoolCallable()");
}

public UnaryCallable<QueryDeployedModelsRequest, QueryDeployedModelsPagedResponse>
queryDeployedModelsPagedCallable() {
throw new UnsupportedOperationException("Not implemented: queryDeployedModelsPagedCallable()");
}

public UnaryCallable<QueryDeployedModelsRequest, QueryDeployedModelsResponse>
queryDeployedModelsCallable() {
throw new UnsupportedOperationException("Not implemented: queryDeployedModelsCallable()");
}

public UnaryCallable<ListLocationsRequest, ListLocationsPagedResponse>
listLocationsPagedCallable() {
throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()");
}

public UnaryCallable<ListLocationsRequest, ListLocationsResponse> listLocationsCallable() {
throw new UnsupportedOperationException("Not implemented: listLocationsCallable()");
}

public UnaryCallable<GetLocationRequest, Location> getLocationCallable() {
throw new UnsupportedOperationException("Not implemented: getLocationCallable()");
}

public UnaryCallable<SetIamPolicyRequest, Policy> setIamPolicyCallable() {
throw new UnsupportedOperationException("Not implemented: setIamPolicyCallable()");
}

public UnaryCallable<GetIamPolicyRequest, Policy> getIamPolicyCallable() {
throw new UnsupportedOperationException("Not implemented: getIamPolicyCallable()");
}

public UnaryCallable<TestIamPermissionsRequest, TestIamPermissionsResponse>
testIamPermissionsCallable() {
throw new UnsupportedOperationException("Not implemented: testIamPermissionsCallable()");
}

@Override
public abstract void close();
}

0 comments on commit b6c07b9

Please sign in to comment.