-
Notifications
You must be signed in to change notification settings - Fork 436
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: location type annotation (#7739)
PiperOrigin-RevId: 684535402 Source-Link: googleapis/googleapis@d544df7 Source-Link: googleapis/googleapis-gen@8bdbcef Copy-Tag: eyJwIjoiRGlzY292ZXJ5RW5naW5lLy5Pd2xCb3QueWFtbCIsImgiOiI4YmRiY2VmODUxMDczZjQ5Y2Y5NmU0NTg2NGM0ZWFkYjM3Y2Q3ZDY5In0= feat: Add GroundedGenerationService API feat: Add BillingEstimation in data store feat: Support Google Workspace search feat: Support advanced boost search feat: Add one_box_page_size on search feat: Add site_credential for site search config docs: Update documentation PiperOrigin-RevId: 684224724 Source-Link: googleapis/googleapis@72be138 Source-Link: googleapis/googleapis-gen@eecf784 Copy-Tag: eyJwIjoiRGlzY292ZXJ5RW5naW5lLy5Pd2xCb3QueWFtbCIsImgiOiJlZWNmNzg0YjAyMGZkYWM1ZTc1ODg0ZmQzNjM0YjFhYTQwMDIyYWNhIn0=
- Loading branch information
1 parent
3252d24
commit a93ec74
Showing
122 changed files
with
5,664 additions
and
192 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file modified
BIN
+282 Bytes
(100%)
DiscoveryEngine/metadata/V1/ConversationalSearchService.php
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
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
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
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
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
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
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
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
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
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
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
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
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
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
73 changes: 73 additions & 0 deletions
73
DiscoveryEngine/samples/V1/GroundedGenerationServiceClient/generate_grounded_content.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,73 @@ | ||
<?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 discoveryengine_v1_generated_GroundedGenerationService_GenerateGroundedContent_sync] | ||
use Google\ApiCore\ApiException; | ||
use Google\Cloud\DiscoveryEngine\V1\Client\GroundedGenerationServiceClient; | ||
use Google\Cloud\DiscoveryEngine\V1\GenerateGroundedContentRequest; | ||
use Google\Cloud\DiscoveryEngine\V1\GenerateGroundedContentResponse; | ||
|
||
/** | ||
* Generates grounded content. | ||
* | ||
* @param string $formattedLocation Location resource. | ||
* | ||
* Format: `projects/{project}/locations/{location}`. Please see | ||
* {@see GroundedGenerationServiceClient::locationName()} for help formatting this field. | ||
*/ | ||
function generate_grounded_content_sample(string $formattedLocation): void | ||
{ | ||
// Create a client. | ||
$groundedGenerationServiceClient = new GroundedGenerationServiceClient(); | ||
|
||
// Prepare the request message. | ||
$request = (new GenerateGroundedContentRequest()) | ||
->setLocation($formattedLocation); | ||
|
||
// Call the API and handle any network failures. | ||
try { | ||
/** @var GenerateGroundedContentResponse $response */ | ||
$response = $groundedGenerationServiceClient->generateGroundedContent($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 | ||
{ | ||
$formattedLocation = GroundedGenerationServiceClient::locationName('[PROJECT]', '[LOCATION]'); | ||
|
||
generate_grounded_content_sample($formattedLocation); | ||
} | ||
// [END discoveryengine_v1_generated_GroundedGenerationService_GenerateGroundedContent_sync] |
79 changes: 79 additions & 0 deletions
79
...eryEngine/samples/V1/GroundedGenerationServiceClient/stream_generate_grounded_content.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,79 @@ | ||
<?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 discoveryengine_v1_generated_GroundedGenerationService_StreamGenerateGroundedContent_sync] | ||
use Google\ApiCore\ApiException; | ||
use Google\ApiCore\BidiStream; | ||
use Google\Cloud\DiscoveryEngine\V1\Client\GroundedGenerationServiceClient; | ||
use Google\Cloud\DiscoveryEngine\V1\GenerateGroundedContentRequest; | ||
use Google\Cloud\DiscoveryEngine\V1\GenerateGroundedContentResponse; | ||
|
||
/** | ||
* Generates grounded content in a streaming fashion. | ||
* | ||
* @param string $formattedLocation Location resource. | ||
* | ||
* Format: `projects/{project}/locations/{location}`. Please see | ||
* {@see GroundedGenerationServiceClient::locationName()} for help formatting this field. | ||
*/ | ||
function stream_generate_grounded_content_sample(string $formattedLocation): void | ||
{ | ||
// Create a client. | ||
$groundedGenerationServiceClient = new GroundedGenerationServiceClient(); | ||
|
||
// Prepare the request message. | ||
$request = (new GenerateGroundedContentRequest()) | ||
->setLocation($formattedLocation); | ||
|
||
// Call the API and handle any network failures. | ||
try { | ||
/** @var BidiStream $stream */ | ||
$stream = $groundedGenerationServiceClient->streamGenerateGroundedContent(); | ||
$stream->writeAll([$request,]); | ||
|
||
/** @var GenerateGroundedContentResponse $element */ | ||
foreach ($stream->closeWriteAndReadAll() 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 | ||
{ | ||
$formattedLocation = GroundedGenerationServiceClient::locationName('[PROJECT]', '[LOCATION]'); | ||
|
||
stream_generate_grounded_content_sample($formattedLocation); | ||
} | ||
// [END discoveryengine_v1_generated_GroundedGenerationService_StreamGenerateGroundedContent_sync] |
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
9 changes: 8 additions & 1 deletion
9
DiscoveryEngine/src/V1/Answer/QueryUnderstandingInfo/QueryClassificationInfo/Type.php
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.