Content-Length: 1910354 | pFad | https://github.com/googleapis/google-cloud-java/commit/b6c07b96a10c1d1920138b8eae06385af14823f1

07 feat: [aiplatform] add Content (#10116) · googleapis/google-cloud-java@b6c07b9 · GitHub
Skip to content

Commit b6c07b9

Browse files
feat: [aiplatform] add Content (#10116)
* 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: https://github.com/googleapis/googleapis-gen/commit/0d911437b7641081dd7577e1d60f00fdef8ef142 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: https://github.com/googleapis/googleapis-gen/commit/b56eb456909e8e124914edc6064b14f88b1fd261 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: https://github.com/googleapis/googleapis-gen/commit/139381804534c7248e26b0e23c418b2e067b6bb6 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>
1 parent a55ad88 commit b6c07b9

File tree

298 files changed

+98125
-1371
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

298 files changed

+98125
-1371
lines changed

java-aiplatform/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file:
2020
<dependency>
2121
<groupId>com.google.cloud</groupId>
2222
<artifactId>libraries-bom</artifactId>
23-
<version>26.27.0</version>
23+
<version>26.28.0</version>
2424
<type>pom</type>
2525
<scope>import</scope>
2626
</dependency>
@@ -195,7 +195,7 @@ Java is a registered trademark of Oracle and/or its affiliates.
195195
[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html
196196
[stability-image]: https://img.shields.io/badge/stability-stable-green
197197
[maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-aiplatform.svg
198-
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-aiplatform/3.31.0
198+
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-aiplatform/3.32.0
199199
[authentication]: https://github.com/googleapis/google-cloud-java#authentication
200200
[auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes
201201
[predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles

java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/DeploymentResourcePoolServiceClient.java

Lines changed: 1695 additions & 0 deletions
Large diffs are not rendered by default.

java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/DeploymentResourcePoolServiceSettings.java

Lines changed: 360 additions & 0 deletions
Large diffs are not rendered by default.

java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/LlmUtilityServiceClient.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,9 @@ public final CountTokensResponse countTokens(String endpoint, List<Value> instan
259259
* EndpointName.ofProjectLocationEndpointName(
260260
* "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
261261
* .toString())
262+
* .setModel("model104069929")
262263
* .addAllInstances(new ArrayList<Value>())
264+
* .addAllContents(new ArrayList<Content>())
263265
* .build();
264266
* CountTokensResponse response = llmUtilityServiceClient.countTokens(request);
265267
* }
@@ -291,7 +293,9 @@ public final CountTokensResponse countTokens(CountTokensRequest request) {
291293
* EndpointName.ofProjectLocationEndpointName(
292294
* "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
293295
* .toString())
296+
* .setModel("model104069929")
294297
* .addAllInstances(new ArrayList<Value>())
298+
* .addAllContents(new ArrayList<Content>())
295299
* .build();
296300
* ApiFuture<CountTokensResponse> future =
297301
* llmUtilityServiceClient.countTokensCallable().futureCall(request);

java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/PredictionServiceClient.java

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -986,6 +986,40 @@ public final UnaryCallable<ExplainRequest, ExplainResponse> explainCallable() {
986986
return stub.explainCallable();
987987
}
988988

989+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
990+
/**
991+
* Generate content with multimodal inputs with streaming support.
992+
*
993+
* <p>Sample code:
994+
*
995+
* <pre>{@code
996+
* // This snippet has been automatically generated and should be regarded as a code template only.
997+
* // It will require modifications to work:
998+
* // - It may require correct/in-range values for request initialization.
999+
* // - It may require specifying regional endpoints when creating the service client as shown in
1000+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1001+
* try (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
1002+
* GenerateContentRequest request =
1003+
* GenerateContentRequest.newBuilder()
1004+
* .setModel("model104069929")
1005+
* .addAllContents(new ArrayList<Content>())
1006+
* .addAllTools(new ArrayList<Tool>())
1007+
* .addAllSafetySettings(new ArrayList<SafetySetting>())
1008+
* .setGenerationConfig(GenerationConfig.newBuilder().build())
1009+
* .build();
1010+
* ServerStream<GenerateContentResponse> stream =
1011+
* predictionServiceClient.streamGenerateContentCallable().call(request);
1012+
* for (GenerateContentResponse response : stream) {
1013+
* // Do something when a response is received.
1014+
* }
1015+
* }
1016+
* }</pre>
1017+
*/
1018+
public final ServerStreamingCallable<GenerateContentRequest, GenerateContentResponse>
1019+
streamGenerateContentCallable() {
1020+
return stub.streamGenerateContentCallable();
1021+
}
1022+
9891023
// AUTO-GENERATED DOCUMENTATION AND METHOD.
9901024
/**
9911025
* Lists information about the supported locations for this service.

java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/PredictionServiceSettings.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,12 @@ public UnaryCallSettings<ExplainRequest, ExplainResponse> explainSettings() {
130130
return ((PredictionServiceStubSettings) getStubSettings()).explainSettings();
131131
}
132132

133+
/** Returns the object with the settings used for calls to streamGenerateContent. */
134+
public ServerStreamingCallSettings<GenerateContentRequest, GenerateContentResponse>
135+
streamGenerateContentSettings() {
136+
return ((PredictionServiceStubSettings) getStubSettings()).streamGenerateContentSettings();
137+
}
138+
133139
/** Returns the object with the settings used for calls to listLocations. */
134140
public PagedCallSettings<ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
135141
listLocationsSettings() {
@@ -299,6 +305,12 @@ public UnaryCallSettings.Builder<ExplainRequest, ExplainResponse> explainSetting
299305
return getStubSettingsBuilder().explainSettings();
300306
}
301307

308+
/** Returns the builder for the settings used for calls to streamGenerateContent. */
309+
public ServerStreamingCallSettings.Builder<GenerateContentRequest, GenerateContentResponse>
310+
streamGenerateContentSettings() {
311+
return getStubSettingsBuilder().streamGenerateContentSettings();
312+
}
313+
302314
/** Returns the builder for the settings used for calls to listLocations. */
303315
public PagedCallSettings.Builder<
304316
ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>

java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/gapic_metadata.json

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,45 @@
8383
}
8484
}
8585
},
86+
"DeploymentResourcePoolService": {
87+
"clients": {
88+
"grpc": {
89+
"libraryClient": "DeploymentResourcePoolServiceClient",
90+
"rpcs": {
91+
"CreateDeploymentResourcePool": {
92+
"methods": ["createDeploymentResourcePoolAsync", "createDeploymentResourcePoolAsync", "createDeploymentResourcePoolAsync", "createDeploymentResourcePoolOperationCallable", "createDeploymentResourcePoolCallable"]
93+
},
94+
"DeleteDeploymentResourcePool": {
95+
"methods": ["deleteDeploymentResourcePoolAsync", "deleteDeploymentResourcePoolAsync", "deleteDeploymentResourcePoolAsync", "deleteDeploymentResourcePoolOperationCallable", "deleteDeploymentResourcePoolCallable"]
96+
},
97+
"GetDeploymentResourcePool": {
98+
"methods": ["getDeploymentResourcePool", "getDeploymentResourcePool", "getDeploymentResourcePool", "getDeploymentResourcePoolCallable"]
99+
},
100+
"GetIamPolicy": {
101+
"methods": ["getIamPolicy", "getIamPolicyCallable"]
102+
},
103+
"GetLocation": {
104+
"methods": ["getLocation", "getLocationCallable"]
105+
},
106+
"ListDeploymentResourcePools": {
107+
"methods": ["listDeploymentResourcePools", "listDeploymentResourcePools", "listDeploymentResourcePools", "listDeploymentResourcePoolsPagedCallable", "listDeploymentResourcePoolsCallable"]
108+
},
109+
"ListLocations": {
110+
"methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"]
111+
},
112+
"QueryDeployedModels": {
113+
"methods": ["queryDeployedModels", "queryDeployedModels", "queryDeployedModelsPagedCallable", "queryDeployedModelsCallable"]
114+
},
115+
"SetIamPolicy": {
116+
"methods": ["setIamPolicy", "setIamPolicyCallable"]
117+
},
118+
"TestIamPermissions": {
119+
"methods": ["testIamPermissions", "testIamPermissionsCallable"]
120+
}
121+
}
122+
}
123+
}
124+
},
86125
"EndpointService": {
87126
"clients": {
88127
"grpc": {
@@ -1021,6 +1060,9 @@
10211060
"SetIamPolicy": {
10221061
"methods": ["setIamPolicy", "setIamPolicyCallable"]
10231062
},
1063+
"StreamGenerateContent": {
1064+
"methods": ["streamGenerateContentCallable"]
1065+
},
10241066
"StreamingPredict": {
10251067
"methods": ["streamingPredictCallable"]
10261068
},

java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/package-info.java

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,27 @@
3737
* }
3838
* }</pre>
3939
*
40+
* <p>======================= DeploymentResourcePoolServiceClient =======================
41+
*
42+
* <p>Service Description: A service that manages the DeploymentResourcePool resource.
43+
*
44+
* <p>Sample for DeploymentResourcePoolServiceClient:
45+
*
46+
* <pre>{@code
47+
* // This snippet has been automatically generated and should be regarded as a code template only.
48+
* // It will require modifications to work:
49+
* // - It may require correct/in-range values for request initialization.
50+
* // - It may require specifying regional endpoints when creating the service client as shown in
51+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
52+
* try (DeploymentResourcePoolServiceClient deploymentResourcePoolServiceClient =
53+
* DeploymentResourcePoolServiceClient.create()) {
54+
* DeploymentResourcePoolName name =
55+
* DeploymentResourcePoolName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT_RESOURCE_POOL]");
56+
* DeploymentResourcePool response =
57+
* deploymentResourcePoolServiceClient.getDeploymentResourcePool(name);
58+
* }
59+
* }</pre>
60+
*
4061
* <p>======================= EndpointServiceClient =======================
4162
*
4263
* <p>Service Description: A service for managing Vertex AI's Endpoints.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
/*
2+
* Copyright 2023 Google LLC
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package com.google.cloud.aiplatform.v1.stub;
18+
19+
import static com.google.cloud.aiplatform.v1.DeploymentResourcePoolServiceClient.ListDeploymentResourcePoolsPagedResponse;
20+
import static com.google.cloud.aiplatform.v1.DeploymentResourcePoolServiceClient.ListLocationsPagedResponse;
21+
import static com.google.cloud.aiplatform.v1.DeploymentResourcePoolServiceClient.QueryDeployedModelsPagedResponse;
22+
23+
import com.google.api.gax.core.BackgroundResource;
24+
import com.google.api.gax.rpc.OperationCallable;
25+
import com.google.api.gax.rpc.UnaryCallable;
26+
import com.google.cloud.aiplatform.v1.CreateDeploymentResourcePoolOperationMetadata;
27+
import com.google.cloud.aiplatform.v1.CreateDeploymentResourcePoolRequest;
28+
import com.google.cloud.aiplatform.v1.DeleteDeploymentResourcePoolRequest;
29+
import com.google.cloud.aiplatform.v1.DeleteOperationMetadata;
30+
import com.google.cloud.aiplatform.v1.DeploymentResourcePool;
31+
import com.google.cloud.aiplatform.v1.GetDeploymentResourcePoolRequest;
32+
import com.google.cloud.aiplatform.v1.ListDeploymentResourcePoolsRequest;
33+
import com.google.cloud.aiplatform.v1.ListDeploymentResourcePoolsResponse;
34+
import com.google.cloud.aiplatform.v1.QueryDeployedModelsRequest;
35+
import com.google.cloud.aiplatform.v1.QueryDeployedModelsResponse;
36+
import com.google.cloud.location.GetLocationRequest;
37+
import com.google.cloud.location.ListLocationsRequest;
38+
import com.google.cloud.location.ListLocationsResponse;
39+
import com.google.cloud.location.Location;
40+
import com.google.iam.v1.GetIamPolicyRequest;
41+
import com.google.iam.v1.Policy;
42+
import com.google.iam.v1.SetIamPolicyRequest;
43+
import com.google.iam.v1.TestIamPermissionsRequest;
44+
import com.google.iam.v1.TestIamPermissionsResponse;
45+
import com.google.longrunning.Operation;
46+
import com.google.longrunning.stub.OperationsStub;
47+
import com.google.protobuf.Empty;
48+
import javax.annotation.Generated;
49+
50+
// AUTO-GENERATED DOCUMENTATION AND CLASS.
51+
/**
52+
* Base stub class for the DeploymentResourcePoolService service API.
53+
*
54+
* <p>This class is for advanced usage and reflects the underlying API directly.
55+
*/
56+
@Generated("by gapic-generator-java")
57+
public abstract class DeploymentResourcePoolServiceStub implements BackgroundResource {
58+
59+
public OperationsStub getOperationsStub() {
60+
throw new UnsupportedOperationException("Not implemented: getOperationsStub()");
61+
}
62+
63+
public OperationCallable<
64+
CreateDeploymentResourcePoolRequest,
65+
DeploymentResourcePool,
66+
CreateDeploymentResourcePoolOperationMetadata>
67+
createDeploymentResourcePoolOperationCallable() {
68+
throw new UnsupportedOperationException(
69+
"Not implemented: createDeploymentResourcePoolOperationCallable()");
70+
}
71+
72+
public UnaryCallable<CreateDeploymentResourcePoolRequest, Operation>
73+
createDeploymentResourcePoolCallable() {
74+
throw new UnsupportedOperationException(
75+
"Not implemented: createDeploymentResourcePoolCallable()");
76+
}
77+
78+
public UnaryCallable<GetDeploymentResourcePoolRequest, DeploymentResourcePool>
79+
getDeploymentResourcePoolCallable() {
80+
throw new UnsupportedOperationException("Not implemented: getDeploymentResourcePoolCallable()");
81+
}
82+
83+
public UnaryCallable<ListDeploymentResourcePoolsRequest, ListDeploymentResourcePoolsPagedResponse>
84+
listDeploymentResourcePoolsPagedCallable() {
85+
throw new UnsupportedOperationException(
86+
"Not implemented: listDeploymentResourcePoolsPagedCallable()");
87+
}
88+
89+
public UnaryCallable<ListDeploymentResourcePoolsRequest, ListDeploymentResourcePoolsResponse>
90+
listDeploymentResourcePoolsCallable() {
91+
throw new UnsupportedOperationException(
92+
"Not implemented: listDeploymentResourcePoolsCallable()");
93+
}
94+
95+
public OperationCallable<DeleteDeploymentResourcePoolRequest, Empty, DeleteOperationMetadata>
96+
deleteDeploymentResourcePoolOperationCallable() {
97+
throw new UnsupportedOperationException(
98+
"Not implemented: deleteDeploymentResourcePoolOperationCallable()");
99+
}
100+
101+
public UnaryCallable<DeleteDeploymentResourcePoolRequest, Operation>
102+
deleteDeploymentResourcePoolCallable() {
103+
throw new UnsupportedOperationException(
104+
"Not implemented: deleteDeploymentResourcePoolCallable()");
105+
}
106+
107+
public UnaryCallable<QueryDeployedModelsRequest, QueryDeployedModelsPagedResponse>
108+
queryDeployedModelsPagedCallable() {
109+
throw new UnsupportedOperationException("Not implemented: queryDeployedModelsPagedCallable()");
110+
}
111+
112+
public UnaryCallable<QueryDeployedModelsRequest, QueryDeployedModelsResponse>
113+
queryDeployedModelsCallable() {
114+
throw new UnsupportedOperationException("Not implemented: queryDeployedModelsCallable()");
115+
}
116+
117+
public UnaryCallable<ListLocationsRequest, ListLocationsPagedResponse>
118+
listLocationsPagedCallable() {
119+
throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()");
120+
}
121+
122+
public UnaryCallable<ListLocationsRequest, ListLocationsResponse> listLocationsCallable() {
123+
throw new UnsupportedOperationException("Not implemented: listLocationsCallable()");
124+
}
125+
126+
public UnaryCallable<GetLocationRequest, Location> getLocationCallable() {
127+
throw new UnsupportedOperationException("Not implemented: getLocationCallable()");
128+
}
129+
130+
public UnaryCallable<SetIamPolicyRequest, Policy> setIamPolicyCallable() {
131+
throw new UnsupportedOperationException("Not implemented: setIamPolicyCallable()");
132+
}
133+
134+
public UnaryCallable<GetIamPolicyRequest, Policy> getIamPolicyCallable() {
135+
throw new UnsupportedOperationException("Not implemented: getIamPolicyCallable()");
136+
}
137+
138+
public UnaryCallable<TestIamPermissionsRequest, TestIamPermissionsResponse>
139+
testIamPermissionsCallable() {
140+
throw new UnsupportedOperationException("Not implemented: testIamPermissionsCallable()");
141+
}
142+
143+
@Override
144+
public abstract void close();
145+
}

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/googleapis/google-cloud-java/commit/b6c07b96a10c1d1920138b8eae06385af14823f1

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy