Skip to content

Commit 92966c7

Browse files
feat: [AiPlatform] add Grounding with Google Maps tool (#8491)
* feat: add exclude_domains for grounding with GoogleSearch and EnterpriseWebSearch PiperOrigin-RevId: 790759548 Source-Link: googleapis/googleapis@ebcf3f5 Source-Link: googleapis/googleapis-gen@3d1ac34 Copy-Tag: eyJwIjoiQWlQbGF0Zm9ybS8uT3dsQm90LnlhbWwiLCJoIjoiM2QxYWMzNDI2NjEyOGEwZThkNzE3NjI3MGQ0ZTM2OWE4NjkwODMzNCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: add embedding_metadata to google.cloud.aiplatform.v1.Index PiperOrigin-RevId: 790786891 Source-Link: googleapis/googleapis@5d7a4a6 Source-Link: googleapis/googleapis-gen@97ad4f6 Copy-Tag: eyJwIjoiQWlQbGF0Zm9ybS8uT3dsQm90LnlhbWwiLCJoIjoiOTdhZDRmNjQ3ZGRlZGQyYmVkNTFjODBhN2E2OGFlOWEzNzJkOGJiYSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: A new value `NVIDIA_GB200` is added to enum `AcceleratorType` PiperOrigin-RevId: 790824087 Source-Link: googleapis/googleapis@d2dbcdb Source-Link: googleapis/googleapis-gen@5dd29a4 Copy-Tag: eyJwIjoiQWlQbGF0Zm9ybS8uT3dsQm90LnlhbWwiLCJoIjoiNWRkMjlhNGVlYjI0ZDVlYzg2YjkzZTI0NWQ4OGExMDE2MTY1NGQxMSJ9 * 🦉 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 FeatureViewDirectWrite API in v1 PiperOrigin-RevId: 790876671 Source-Link: googleapis/googleapis@8c74a4f Source-Link: googleapis/googleapis-gen@43879fb Copy-Tag: eyJwIjoiQWlQbGF0Zm9ybS8uT3dsQm90LnlhbWwiLCJoIjoiNDM4NzlmYmFhN2ZlOWY3NGI2NWFiMjVhNzM3ZDUxNTI5ZjEwN2Y3MiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: add Grounding with Google Maps tool PiperOrigin-RevId: 792213276 Source-Link: googleapis/googleapis@e58f813 Source-Link: googleapis/googleapis-gen@70b047f Copy-Tag: eyJwIjoiQWlQbGF0Zm9ybS8uT3dsQm90LnlhbWwiLCJoIjoiNzBiMDQ3ZmIyNWNjZTY1MDc3YmE0MmIxZjgxOTQyMDEzYzg1NzM2MSJ9 * 🦉 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 9c2f1fe commit 92966c7

27 files changed

Lines changed: 1367 additions & 13 deletions
18 Bytes
Binary file not shown.

AiPlatform/metadata/V1/Content.php

285 Bytes
Binary file not shown.
1.24 KB
Binary file not shown.

AiPlatform/metadata/V1/Index.php

58 Bytes
Binary file not shown.

AiPlatform/metadata/V1/Tool.php

140 Bytes
Binary file not shown.
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
<?php
2+
/*
3+
* Copyright 2025 Google LLC
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* https://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
18+
/*
19+
* GENERATED CODE WARNING
20+
* This file was automatically generated - do not edit!
21+
*/
22+
23+
require_once __DIR__ . '/../../../vendor/autoload.php';
24+
25+
// [START aiplatform_v1_generated_FeatureOnlineStoreService_FeatureViewDirectWrite_sync]
26+
use Google\ApiCore\ApiException;
27+
use Google\ApiCore\BidiStream;
28+
use Google\Cloud\AIPlatform\V1\Client\FeatureOnlineStoreServiceClient;
29+
use Google\Cloud\AIPlatform\V1\FeatureViewDirectWriteRequest;
30+
use Google\Cloud\AIPlatform\V1\FeatureViewDirectWriteRequest\DataKeyAndFeatureValues;
31+
use Google\Cloud\AIPlatform\V1\FeatureViewDirectWriteResponse;
32+
33+
/**
34+
* Bidirectional streaming RPC to directly write to feature values in a
35+
* feature view. Requests may not have a one-to-one mapping to responses and
36+
* responses may be returned out-of-order to reduce latency.
37+
*
38+
* This sample has been automatically generated and should be regarded as a code
39+
* template only. It will require modifications to work:
40+
* - It may require correct/in-range values for request initialization.
41+
* - It may require specifying regional endpoints when creating the service client,
42+
* please see the apiEndpoint client configuration option for more details.
43+
*/
44+
function feature_view_direct_write_sample(): void
45+
{
46+
// Create a client.
47+
$featureOnlineStoreServiceClient = new FeatureOnlineStoreServiceClient();
48+
49+
// Prepare the request message.
50+
$dataKeyAndFeatureValues = [new DataKeyAndFeatureValues()];
51+
$request = (new FeatureViewDirectWriteRequest())
52+
->setDataKeyAndFeatureValues($dataKeyAndFeatureValues);
53+
54+
// Call the API and handle any network failures.
55+
try {
56+
/** @var BidiStream $stream */
57+
$stream = $featureOnlineStoreServiceClient->featureViewDirectWrite();
58+
$stream->writeAll([$request,]);
59+
60+
/** @var FeatureViewDirectWriteResponse $element */
61+
foreach ($stream->closeWriteAndReadAll() as $element) {
62+
printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString());
63+
}
64+
} catch (ApiException $ex) {
65+
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
66+
}
67+
}
68+
// [END aiplatform_v1_generated_FeatureOnlineStoreService_FeatureViewDirectWrite_sync]

AiPlatform/src/V1/AcceleratorType.php

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

AiPlatform/src/V1/Client/FeatureOnlineStoreServiceClient.php

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
namespace Google\Cloud\AIPlatform\V1\Client;
2626

2727
use Google\ApiCore\ApiException;
28+
use Google\ApiCore\BidiStream;
2829
use Google\ApiCore\CredentialsWrapper;
2930
use Google\ApiCore\GapicClientTrait;
3031
use Google\ApiCore\PagedListResponse;
@@ -243,6 +244,29 @@ public function __call($method, $args)
243244
return call_user_func_array([$this, 'startAsyncCall'], $args);
244245
}
245246

247+
/**
248+
* Bidirectional streaming RPC to directly write to feature values in a
249+
* feature view. Requests may not have a one-to-one mapping to responses and
250+
* responses may be returned out-of-order to reduce latency.
251+
*
252+
* @example samples/V1/FeatureOnlineStoreServiceClient/feature_view_direct_write.php
253+
*
254+
* @param array $callOptions {
255+
* Optional.
256+
*
257+
* @type int $timeoutMillis
258+
* Timeout to use for this call.
259+
* }
260+
*
261+
* @return BidiStream
262+
*
263+
* @throws ApiException Thrown if the API call fails.
264+
*/
265+
public function featureViewDirectWrite(array $callOptions = []): BidiStream
266+
{
267+
return $this->startApiCall('FeatureViewDirectWrite', null, $callOptions);
268+
}
269+
246270
/**
247271
* Fetch feature values under a FeatureView.
248272
*

AiPlatform/src/V1/EnterpriseWebSearch.php

Lines changed: 38 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

AiPlatform/src/V1/FeatureValue/Metadata.php

Lines changed: 16 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)