-
Notifications
You must be signed in to change notification settings - Fork 438
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: A new field
score
is added to message `.google.cloud.aiplatfo…
…rm.v1.Candidate` (#7557) feat: A new message `Segment` is added feat: A new message `GroundingChunk` is added feat: A new message `GroundingSupport` is added feat: A new field `grounding_chunks` is added to message `.google.cloud.aiplatform.v1.GroundingMetadata` feat: A new field `grounding_supports` is added to message `.google.cloud.aiplatform.v1.GroundingMetadata` feat: A new enum `Strategy` is added feat: A new field `strategy` is added to message `.google.cloud.aiplatform.v1.Scheduling` feat: A new field `dedicated_endpoint_enabled` is added to message `.google.cloud.aiplatform.v1.Endpoint` feat: A new field `dedicated_endpoint_dns` is added to message `.google.cloud.aiplatform.v1.Endpoint` feat: A new field `satisfies_pzs` is added to message `.google.cloud.aiplatform.v1.Endpoint` feat: A new field `satisfies_pzi` is added to message `.google.cloud.aiplatform.v1.Endpoint` feat: A new message `NumericFilter` is added feat: A new field `numeric_filters` is added to message `.google.cloud.aiplatform.v1.NearestNeighborQuery` feat: A new field `is_hugging_face_model` is added to message `.google.cloud.aiplatform.v1.GetPublisherModelRequest` feat: A new message `NotebookExecutionJob` is added feat: A new resource_definition `aiplatform.googleapis.com/NotebookExecutionJob` is added feat: A new method `CreateNotebookExecutionJob` is added to service `NotebookService` feat: A new method `GetNotebookExecutionJob` is added to service `NotebookService` feat: A new method `ListNotebookExecutionJobs` is added to service `NotebookService` feat: A new method `DeleteNotebookExecutionJob` is added to service `NotebookService` feat: A new enum `NotebookExecutionJobView` is added feat: A new message `CreateNotebookExecutionJobRequest` is added feat: A new message `CreateNotebookExecutionJobOperationMetadata` is added feat: A new message `GetNotebookExecutionJobRequest` is added feat: A new message `ListNotebookExecutionJobsRequest` is added feat: A new message `ListNotebookExecutionJobsResponse` is added feat: A new message `DeleteNotebookExecutionJobRequest` is added feat: A new field `ray_logs_spec` is added to message `.google.cloud.aiplatform.v1.RaySpec` feat: A new message `RayLogsSpec` is added feat: A new field `system_instruction` is added to message `.google.cloud.aiplatform.v1.CountTokensRequest` feat: A new field `tools` is added to message `.google.cloud.aiplatform.v1.CountTokensRequest` feat: A new field `billable_sum` is added to message `.google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution` feat: A new field `total_billable_token_count` is added to message `.google.cloud.aiplatform.v1.SupervisedTuningDataStats` feat: A new value `ADAPTER_SIZE_THIRTY_TWO` is added to enum `AdapterSize` docs: A comment for field `name` in message `.google.cloud.aiplatform.v1.Dataset` is changed docs: A comment for field `name` in message `.google.cloud.aiplatform.v1.DatasetVersion` is changed docs: A comment for field `update_mask` in message `.google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreRequest` is changed docs: A comment for field `update_mask` in message `.google.cloud.aiplatform.v1.UpdateFeatureViewRequest` is changed docs: A comment for field `update_mask` in message `.google.cloud.aiplatform.v1.UpdateFeatureGroupRequest` is changed docs: A comment for field `update_mask` in message `.google.cloud.aiplatform.v1.UpdateFeatureRequest` is changed docs: A comment for field `language_code` in message `.google.cloud.aiplatform.v1.GetPublisherModelRequest` is changed docs: A comment for field `model` in message `.google.cloud.aiplatform.v1.CountTokensRequest` is changed docs: A comment for field `instances` in message `.google.cloud.aiplatform.v1.CountTokensRequest` is changed docs: A comment for field `contents` in message `.google.cloud.aiplatform.v1.CountTokensRequest` is changed docs: A comment for message `TrialContext` is changed docs: A comment for field `disable_attribution` in message `.google.cloud.aiplatform.v1.Retrieval` is changed PiperOrigin-RevId: 656538560 Source-Link: googleapis/googleapis@0fa9ce8 Source-Link: googleapis/googleapis-gen@5c99c52 Copy-Tag: eyJwIjoiQWlQbGF0Zm9ybS8uT3dsQm90LnlhbWwiLCJoIjoiNWM5OWM1MjczNmU0OTA1NjEyZWNhNjU1YTY5Yzc0NjQyNzc5ZWM5YSJ9
- Loading branch information
1 parent
d868a50
commit c31f326
Showing
66 changed files
with
4,973 additions
and
130 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
86 changes: 86 additions & 0 deletions
86
AiPlatform/samples/V1/NotebookServiceClient/create_notebook_execution_job.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
<?php | ||
/* | ||
* Copyright 2024 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. | ||
*/ | ||
|
||
/* | ||
* GENERATED CODE WARNING | ||
* This file was automatically generated - do not edit! | ||
*/ | ||
|
||
require_once __DIR__ . '/../../../vendor/autoload.php'; | ||
|
||
// [START aiplatform_v1_generated_NotebookService_CreateNotebookExecutionJob_sync] | ||
use Google\ApiCore\ApiException; | ||
use Google\ApiCore\OperationResponse; | ||
use Google\Cloud\AIPlatform\V1\Client\NotebookServiceClient; | ||
use Google\Cloud\AIPlatform\V1\CreateNotebookExecutionJobRequest; | ||
use Google\Cloud\AIPlatform\V1\NotebookExecutionJob; | ||
use Google\Rpc\Status; | ||
|
||
/** | ||
* Creates a NotebookExecutionJob. | ||
* | ||
* @param string $formattedParent The resource name of the Location to create the | ||
* NotebookExecutionJob. Format: `projects/{project}/locations/{location}` | ||
* Please see {@see NotebookServiceClient::locationName()} for help formatting this field. | ||
*/ | ||
function create_notebook_execution_job_sample(string $formattedParent): void | ||
{ | ||
// Create a client. | ||
$notebookServiceClient = new NotebookServiceClient(); | ||
|
||
// Prepare the request message. | ||
$notebookExecutionJob = new NotebookExecutionJob(); | ||
$request = (new CreateNotebookExecutionJobRequest()) | ||
->setParent($formattedParent) | ||
->setNotebookExecutionJob($notebookExecutionJob); | ||
|
||
// Call the API and handle any network failures. | ||
try { | ||
/** @var OperationResponse $response */ | ||
$response = $notebookServiceClient->createNotebookExecutionJob($request); | ||
$response->pollUntilComplete(); | ||
|
||
if ($response->operationSucceeded()) { | ||
/** @var NotebookExecutionJob $result */ | ||
$result = $response->getResult(); | ||
printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); | ||
} else { | ||
/** @var Status $error */ | ||
$error = $response->getError(); | ||
printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); | ||
} | ||
} catch (ApiException $ex) { | ||
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); | ||
} | ||
} | ||
|
||
/** | ||
* Helper to execute the sample. | ||
* | ||
* This sample 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, | ||
* please see the apiEndpoint client configuration option for more details. | ||
*/ | ||
function callSample(): void | ||
{ | ||
$formattedParent = NotebookServiceClient::locationName('[PROJECT]', '[LOCATION]'); | ||
|
||
create_notebook_execution_job_sample($formattedParent); | ||
} | ||
// [END aiplatform_v1_generated_NotebookService_CreateNotebookExecutionJob_sync] |
84 changes: 84 additions & 0 deletions
84
AiPlatform/samples/V1/NotebookServiceClient/delete_notebook_execution_job.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
<?php | ||
/* | ||
* Copyright 2024 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. | ||
*/ | ||
|
||
/* | ||
* GENERATED CODE WARNING | ||
* This file was automatically generated - do not edit! | ||
*/ | ||
|
||
require_once __DIR__ . '/../../../vendor/autoload.php'; | ||
|
||
// [START aiplatform_v1_generated_NotebookService_DeleteNotebookExecutionJob_sync] | ||
use Google\ApiCore\ApiException; | ||
use Google\ApiCore\OperationResponse; | ||
use Google\Cloud\AIPlatform\V1\Client\NotebookServiceClient; | ||
use Google\Cloud\AIPlatform\V1\DeleteNotebookExecutionJobRequest; | ||
use Google\Rpc\Status; | ||
|
||
/** | ||
* Deletes a NotebookExecutionJob. | ||
* | ||
* @param string $formattedName The name of the NotebookExecutionJob resource to be deleted. Please see | ||
* {@see NotebookServiceClient::notebookExecutionJobName()} for help formatting this field. | ||
*/ | ||
function delete_notebook_execution_job_sample(string $formattedName): void | ||
{ | ||
// Create a client. | ||
$notebookServiceClient = new NotebookServiceClient(); | ||
|
||
// Prepare the request message. | ||
$request = (new DeleteNotebookExecutionJobRequest()) | ||
->setName($formattedName); | ||
|
||
// Call the API and handle any network failures. | ||
try { | ||
/** @var OperationResponse $response */ | ||
$response = $notebookServiceClient->deleteNotebookExecutionJob($request); | ||
$response->pollUntilComplete(); | ||
|
||
if ($response->operationSucceeded()) { | ||
printf('Operation completed successfully.' . PHP_EOL); | ||
} else { | ||
/** @var Status $error */ | ||
$error = $response->getError(); | ||
printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); | ||
} | ||
} catch (ApiException $ex) { | ||
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); | ||
} | ||
} | ||
|
||
/** | ||
* Helper to execute the sample. | ||
* | ||
* This sample 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, | ||
* please see the apiEndpoint client configuration option for more details. | ||
*/ | ||
function callSample(): void | ||
{ | ||
$formattedName = NotebookServiceClient::notebookExecutionJobName( | ||
'[PROJECT]', | ||
'[LOCATION]', | ||
'[NOTEBOOK_EXECUTION_JOB]' | ||
); | ||
|
||
delete_notebook_execution_job_sample($formattedName); | ||
} | ||
// [END aiplatform_v1_generated_NotebookService_DeleteNotebookExecutionJob_sync] |
75 changes: 75 additions & 0 deletions
75
AiPlatform/samples/V1/NotebookServiceClient/get_notebook_execution_job.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
<?php | ||
/* | ||
* Copyright 2024 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. | ||
*/ | ||
|
||
/* | ||
* GENERATED CODE WARNING | ||
* This file was automatically generated - do not edit! | ||
*/ | ||
|
||
require_once __DIR__ . '/../../../vendor/autoload.php'; | ||
|
||
// [START aiplatform_v1_generated_NotebookService_GetNotebookExecutionJob_sync] | ||
use Google\ApiCore\ApiException; | ||
use Google\Cloud\AIPlatform\V1\Client\NotebookServiceClient; | ||
use Google\Cloud\AIPlatform\V1\GetNotebookExecutionJobRequest; | ||
use Google\Cloud\AIPlatform\V1\NotebookExecutionJob; | ||
|
||
/** | ||
* Gets a NotebookExecutionJob. | ||
* | ||
* @param string $formattedName The name of the NotebookExecutionJob resource. Please see | ||
* {@see NotebookServiceClient::notebookExecutionJobName()} for help formatting this field. | ||
*/ | ||
function get_notebook_execution_job_sample(string $formattedName): void | ||
{ | ||
// Create a client. | ||
$notebookServiceClient = new NotebookServiceClient(); | ||
|
||
// Prepare the request message. | ||
$request = (new GetNotebookExecutionJobRequest()) | ||
->setName($formattedName); | ||
|
||
// Call the API and handle any network failures. | ||
try { | ||
/** @var NotebookExecutionJob $response */ | ||
$response = $notebookServiceClient->getNotebookExecutionJob($request); | ||
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); | ||
} catch (ApiException $ex) { | ||
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); | ||
} | ||
} | ||
|
||
/** | ||
* Helper to execute the sample. | ||
* | ||
* This sample 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, | ||
* please see the apiEndpoint client configuration option for more details. | ||
*/ | ||
function callSample(): void | ||
{ | ||
$formattedName = NotebookServiceClient::notebookExecutionJobName( | ||
'[PROJECT]', | ||
'[LOCATION]', | ||
'[NOTEBOOK_EXECUTION_JOB]' | ||
); | ||
|
||
get_notebook_execution_job_sample($formattedName); | ||
} | ||
// [END aiplatform_v1_generated_NotebookService_GetNotebookExecutionJob_sync] |
78 changes: 78 additions & 0 deletions
78
AiPlatform/samples/V1/NotebookServiceClient/list_notebook_execution_jobs.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
<?php | ||
/* | ||
* Copyright 2024 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. | ||
*/ | ||
|
||
/* | ||
* GENERATED CODE WARNING | ||
* This file was automatically generated - do not edit! | ||
*/ | ||
|
||
require_once __DIR__ . '/../../../vendor/autoload.php'; | ||
|
||
// [START aiplatform_v1_generated_NotebookService_ListNotebookExecutionJobs_sync] | ||
use Google\ApiCore\ApiException; | ||
use Google\ApiCore\PagedListResponse; | ||
use Google\Cloud\AIPlatform\V1\Client\NotebookServiceClient; | ||
use Google\Cloud\AIPlatform\V1\ListNotebookExecutionJobsRequest; | ||
use Google\Cloud\AIPlatform\V1\NotebookExecutionJob; | ||
|
||
/** | ||
* Lists NotebookExecutionJobs in a Location. | ||
* | ||
* @param string $formattedParent The resource name of the Location from which to list the | ||
* NotebookExecutionJobs. | ||
* Format: `projects/{project}/locations/{location}` | ||
* Please see {@see NotebookServiceClient::locationName()} for help formatting this field. | ||
*/ | ||
function list_notebook_execution_jobs_sample(string $formattedParent): void | ||
{ | ||
// Create a client. | ||
$notebookServiceClient = new NotebookServiceClient(); | ||
|
||
// Prepare the request message. | ||
$request = (new ListNotebookExecutionJobsRequest()) | ||
->setParent($formattedParent); | ||
|
||
// Call the API and handle any network failures. | ||
try { | ||
/** @var PagedListResponse $response */ | ||
$response = $notebookServiceClient->listNotebookExecutionJobs($request); | ||
|
||
/** @var NotebookExecutionJob $element */ | ||
foreach ($response as $element) { | ||
printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); | ||
} | ||
} catch (ApiException $ex) { | ||
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); | ||
} | ||
} | ||
|
||
/** | ||
* Helper to execute the sample. | ||
* | ||
* This sample 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, | ||
* please see the apiEndpoint client configuration option for more details. | ||
*/ | ||
function callSample(): void | ||
{ | ||
$formattedParent = NotebookServiceClient::locationName('[PROJECT]', '[LOCATION]'); | ||
|
||
list_notebook_execution_jobs_sample($formattedParent); | ||
} | ||
// [END aiplatform_v1_generated_NotebookService_ListNotebookExecutionJobs_sync] |
Oops, something went wrong.