@googleapis/discoveryengine 28.1.0 → 28.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/build/tsconfig.tsbuildinfo +1 -1
- package/build/v1.d.ts +450 -5
- package/build/v1.js +99 -0
- package/build/v1.js.map +1 -1
- package/build/v1alpha.d.ts +496 -4
- package/build/v1alpha.js +99 -0
- package/build/v1alpha.js.map +1 -1
- package/build/v1beta.d.ts +465 -2
- package/build/v1beta.js +99 -0
- package/build/v1beta.js.map +1 -1
- package/package.json +1 -1
- package/v1.ts +1096 -381
- package/v1alpha.ts +866 -104
- package/v1beta.ts +1111 -378
package/build/v1beta.d.ts
CHANGED
|
@@ -4093,12 +4093,16 @@ export declare namespace discoveryengine_v1beta {
|
|
|
4093
4093
|
* The Unicode country/region code (CLDR) of a location, such as "US" and "419". For more information, see [Standard fields](https://cloud.google.com/apis/design/standard_fields). If set, then results will be boosted based on the region_code provided.
|
|
4094
4094
|
*/
|
|
4095
4095
|
regionCode?: string | null;
|
|
4096
|
+
/**
|
|
4097
|
+
* Optional. The granular relevance filtering specification. If not specified, the global `relevance_threshold` will be used for all sub-searches. If specified, this overrides the global `relevance_threshold` to use thresholds on a per sub-search basis. This feature is currently supported only for custom and site search.
|
|
4098
|
+
*/
|
|
4099
|
+
relevanceFilterSpec?: Schema$GoogleCloudDiscoveryengineV1alphaSearchRequestRelevanceFilterSpec;
|
|
4096
4100
|
/**
|
|
4097
4101
|
* Optional. The specification for returning the relevance score.
|
|
4098
4102
|
*/
|
|
4099
4103
|
relevanceScoreSpec?: Schema$GoogleCloudDiscoveryengineV1alphaSearchRequestRelevanceScoreSpec;
|
|
4100
4104
|
/**
|
|
4101
|
-
* The relevance threshold of the search results.
|
|
4105
|
+
* The global relevance threshold of the search results. Defaults to Google defined threshold, leveraging a balance of precision and recall to deliver both highly accurate results and comprehensive coverage of relevant information. If more granular relevance filtering is required, use the `relevance_filter_spec` instead. This feature is not supported for healthcare search.
|
|
4102
4106
|
*/
|
|
4103
4107
|
relevanceThreshold?: string | null;
|
|
4104
4108
|
/**
|
|
@@ -4539,6 +4543,32 @@ export declare namespace discoveryengine_v1beta {
|
|
|
4539
4543
|
*/
|
|
4540
4544
|
pinUnexpandedResults?: boolean | null;
|
|
4541
4545
|
}
|
|
4546
|
+
/**
|
|
4547
|
+
* Relevance filtering specification.
|
|
4548
|
+
*/
|
|
4549
|
+
export interface Schema$GoogleCloudDiscoveryengineV1alphaSearchRequestRelevanceFilterSpec {
|
|
4550
|
+
/**
|
|
4551
|
+
* Optional. Relevance filtering threshold specification for keyword search.
|
|
4552
|
+
*/
|
|
4553
|
+
keywordSearchThreshold?: Schema$GoogleCloudDiscoveryengineV1alphaSearchRequestRelevanceFilterSpecRelevanceThresholdSpec;
|
|
4554
|
+
/**
|
|
4555
|
+
* Optional. Relevance filtering threshold specification for semantic search.
|
|
4556
|
+
*/
|
|
4557
|
+
semanticSearchThreshold?: Schema$GoogleCloudDiscoveryengineV1alphaSearchRequestRelevanceFilterSpecRelevanceThresholdSpec;
|
|
4558
|
+
}
|
|
4559
|
+
/**
|
|
4560
|
+
* Specification for relevance filtering on a specific sub-search.
|
|
4561
|
+
*/
|
|
4562
|
+
export interface Schema$GoogleCloudDiscoveryengineV1alphaSearchRequestRelevanceFilterSpecRelevanceThresholdSpec {
|
|
4563
|
+
/**
|
|
4564
|
+
* Pre-defined relevance threshold for the sub-search.
|
|
4565
|
+
*/
|
|
4566
|
+
relevanceThreshold?: string | null;
|
|
4567
|
+
/**
|
|
4568
|
+
* Custom relevance threshold for the sub-search. The value must be in [0.0, 1.0].
|
|
4569
|
+
*/
|
|
4570
|
+
semanticRelevanceThreshold?: number | null;
|
|
4571
|
+
}
|
|
4542
4572
|
/**
|
|
4543
4573
|
* The specification for returning the document relevance score.
|
|
4544
4574
|
*/
|
|
@@ -10801,12 +10831,16 @@ export declare namespace discoveryengine_v1beta {
|
|
|
10801
10831
|
* The Unicode country/region code (CLDR) of a location, such as "US" and "419". For more information, see [Standard fields](https://cloud.google.com/apis/design/standard_fields). If set, then results will be boosted based on the region_code provided.
|
|
10802
10832
|
*/
|
|
10803
10833
|
regionCode?: string | null;
|
|
10834
|
+
/**
|
|
10835
|
+
* Optional. The granular relevance filtering specification. If not specified, the global `relevance_threshold` will be used for all sub-searches. If specified, this overrides the global `relevance_threshold` to use thresholds on a per sub-search basis. This feature is currently supported only for custom and site search.
|
|
10836
|
+
*/
|
|
10837
|
+
relevanceFilterSpec?: Schema$GoogleCloudDiscoveryengineV1betaSearchRequestRelevanceFilterSpec;
|
|
10804
10838
|
/**
|
|
10805
10839
|
* Optional. The specification for returning the relevance score.
|
|
10806
10840
|
*/
|
|
10807
10841
|
relevanceScoreSpec?: Schema$GoogleCloudDiscoveryengineV1betaSearchRequestRelevanceScoreSpec;
|
|
10808
10842
|
/**
|
|
10809
|
-
* The relevance threshold of the search results.
|
|
10843
|
+
* The global relevance threshold of the search results. Defaults to Google defined threshold, leveraging a balance of precision and recall to deliver both highly accurate results and comprehensive coverage of relevant information. If more granular relevance filtering is required, use the `relevance_filter_spec` instead. This feature is not supported for healthcare search.
|
|
10810
10844
|
*/
|
|
10811
10845
|
relevanceThreshold?: string | null;
|
|
10812
10846
|
/**
|
|
@@ -11243,6 +11277,32 @@ export declare namespace discoveryengine_v1beta {
|
|
|
11243
11277
|
*/
|
|
11244
11278
|
pinUnexpandedResults?: boolean | null;
|
|
11245
11279
|
}
|
|
11280
|
+
/**
|
|
11281
|
+
* Relevance filtering specification.
|
|
11282
|
+
*/
|
|
11283
|
+
export interface Schema$GoogleCloudDiscoveryengineV1betaSearchRequestRelevanceFilterSpec {
|
|
11284
|
+
/**
|
|
11285
|
+
* Optional. Relevance filtering threshold specification for keyword search.
|
|
11286
|
+
*/
|
|
11287
|
+
keywordSearchThreshold?: Schema$GoogleCloudDiscoveryengineV1betaSearchRequestRelevanceFilterSpecRelevanceThresholdSpec;
|
|
11288
|
+
/**
|
|
11289
|
+
* Optional. Relevance filtering threshold specification for semantic search.
|
|
11290
|
+
*/
|
|
11291
|
+
semanticSearchThreshold?: Schema$GoogleCloudDiscoveryengineV1betaSearchRequestRelevanceFilterSpecRelevanceThresholdSpec;
|
|
11292
|
+
}
|
|
11293
|
+
/**
|
|
11294
|
+
* Specification for relevance filtering on a specific sub-search.
|
|
11295
|
+
*/
|
|
11296
|
+
export interface Schema$GoogleCloudDiscoveryengineV1betaSearchRequestRelevanceFilterSpecRelevanceThresholdSpec {
|
|
11297
|
+
/**
|
|
11298
|
+
* Pre-defined relevance threshold for the sub-search.
|
|
11299
|
+
*/
|
|
11300
|
+
relevanceThreshold?: string | null;
|
|
11301
|
+
/**
|
|
11302
|
+
* Custom relevance threshold for the sub-search. The value must be in [0.0, 1.0].
|
|
11303
|
+
*/
|
|
11304
|
+
semanticRelevanceThreshold?: number | null;
|
|
11305
|
+
}
|
|
11246
11306
|
/**
|
|
11247
11307
|
* The specification for returning the document relevance score.
|
|
11248
11308
|
*/
|
|
@@ -20733,6 +20793,125 @@ export declare namespace discoveryengine_v1beta {
|
|
|
20733
20793
|
answer(params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Answer, options: MethodOptions | BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaAnswerQueryResponse>, callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaAnswerQueryResponse>): void;
|
|
20734
20794
|
answer(params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Answer, callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaAnswerQueryResponse>): void;
|
|
20735
20795
|
answer(callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaAnswerQueryResponse>): void;
|
|
20796
|
+
/**
|
|
20797
|
+
* Creates a ServingConfig. Note: The Google Cloud console works only with the default serving config. Additional ServingConfigs can be created and managed only via the API. A maximum of 100 ServingConfigs are allowed in an Engine, otherwise a RESOURCE_EXHAUSTED error is returned.
|
|
20798
|
+
* @example
|
|
20799
|
+
* ```js
|
|
20800
|
+
* // Before running the sample:
|
|
20801
|
+
* // - Enable the API at:
|
|
20802
|
+
* // https://console.developers.google.com/apis/api/discoveryengine.googleapis.com
|
|
20803
|
+
* // - Login into gcloud by running:
|
|
20804
|
+
* // ```sh
|
|
20805
|
+
* // $ gcloud auth application-default login
|
|
20806
|
+
* // ```
|
|
20807
|
+
* // - Install the npm module by running:
|
|
20808
|
+
* // ```sh
|
|
20809
|
+
* // $ npm install googleapis
|
|
20810
|
+
* // ```
|
|
20811
|
+
*
|
|
20812
|
+
* const {google} = require('googleapis');
|
|
20813
|
+
* const discoveryengine = google.discoveryengine('v1beta');
|
|
20814
|
+
*
|
|
20815
|
+
* async function main() {
|
|
20816
|
+
* const auth = new google.auth.GoogleAuth({
|
|
20817
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
20818
|
+
* scopes: [
|
|
20819
|
+
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
20820
|
+
* 'https://www.googleapis.com/auth/discoveryengine.readwrite',
|
|
20821
|
+
* ],
|
|
20822
|
+
* });
|
|
20823
|
+
*
|
|
20824
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
20825
|
+
* const authClient = await auth.getClient();
|
|
20826
|
+
* google.options({auth: authClient});
|
|
20827
|
+
*
|
|
20828
|
+
* // Do the magic
|
|
20829
|
+
* const res =
|
|
20830
|
+
* await discoveryengine.projects.locations.collections.dataStores.servingConfigs.create(
|
|
20831
|
+
* {
|
|
20832
|
+
* // Required. Full resource name of parent. Format: `projects/{project\}/locations/{location\}/collections/{collection\}/engines/{engine\}`
|
|
20833
|
+
* parent:
|
|
20834
|
+
* 'projects/my-project/locations/my-location/collections/my-collection/dataStores/my-dataStore',
|
|
20835
|
+
* // Required. The ID to use for the ServingConfig, which will become the final component of the ServingConfig's resource name. This value should be 4-63 characters, and valid characters are /a-zA-Z0-9+/.
|
|
20836
|
+
* servingConfigId: 'placeholder-value',
|
|
20837
|
+
*
|
|
20838
|
+
* // Request body metadata
|
|
20839
|
+
* requestBody: {
|
|
20840
|
+
* // request body parameters
|
|
20841
|
+
* // {
|
|
20842
|
+
* // "answerGenerationSpec": {},
|
|
20843
|
+
* // "boostControlIds": [],
|
|
20844
|
+
* // "createTime": "my_createTime",
|
|
20845
|
+
* // "displayName": "my_displayName",
|
|
20846
|
+
* // "dissociateControlIds": [],
|
|
20847
|
+
* // "diversityLevel": "my_diversityLevel",
|
|
20848
|
+
* // "embeddingConfig": {},
|
|
20849
|
+
* // "filterControlIds": [],
|
|
20850
|
+
* // "genericConfig": {},
|
|
20851
|
+
* // "ignoreControlIds": [],
|
|
20852
|
+
* // "mediaConfig": {},
|
|
20853
|
+
* // "modelId": "my_modelId",
|
|
20854
|
+
* // "name": "my_name",
|
|
20855
|
+
* // "onewaySynonymsControlIds": [],
|
|
20856
|
+
* // "personalizationSpec": {},
|
|
20857
|
+
* // "promoteControlIds": [],
|
|
20858
|
+
* // "rankingExpression": "my_rankingExpression",
|
|
20859
|
+
* // "redirectControlIds": [],
|
|
20860
|
+
* // "replacementControlIds": [],
|
|
20861
|
+
* // "solutionType": "my_solutionType",
|
|
20862
|
+
* // "synonymsControlIds": [],
|
|
20863
|
+
* // "updateTime": "my_updateTime"
|
|
20864
|
+
* // }
|
|
20865
|
+
* },
|
|
20866
|
+
* },
|
|
20867
|
+
* );
|
|
20868
|
+
* console.log(res.data);
|
|
20869
|
+
*
|
|
20870
|
+
* // Example response
|
|
20871
|
+
* // {
|
|
20872
|
+
* // "answerGenerationSpec": {},
|
|
20873
|
+
* // "boostControlIds": [],
|
|
20874
|
+
* // "createTime": "my_createTime",
|
|
20875
|
+
* // "displayName": "my_displayName",
|
|
20876
|
+
* // "dissociateControlIds": [],
|
|
20877
|
+
* // "diversityLevel": "my_diversityLevel",
|
|
20878
|
+
* // "embeddingConfig": {},
|
|
20879
|
+
* // "filterControlIds": [],
|
|
20880
|
+
* // "genericConfig": {},
|
|
20881
|
+
* // "ignoreControlIds": [],
|
|
20882
|
+
* // "mediaConfig": {},
|
|
20883
|
+
* // "modelId": "my_modelId",
|
|
20884
|
+
* // "name": "my_name",
|
|
20885
|
+
* // "onewaySynonymsControlIds": [],
|
|
20886
|
+
* // "personalizationSpec": {},
|
|
20887
|
+
* // "promoteControlIds": [],
|
|
20888
|
+
* // "rankingExpression": "my_rankingExpression",
|
|
20889
|
+
* // "redirectControlIds": [],
|
|
20890
|
+
* // "replacementControlIds": [],
|
|
20891
|
+
* // "solutionType": "my_solutionType",
|
|
20892
|
+
* // "synonymsControlIds": [],
|
|
20893
|
+
* // "updateTime": "my_updateTime"
|
|
20894
|
+
* // }
|
|
20895
|
+
* }
|
|
20896
|
+
*
|
|
20897
|
+
* main().catch(e => {
|
|
20898
|
+
* console.error(e);
|
|
20899
|
+
* throw e;
|
|
20900
|
+
* });
|
|
20901
|
+
*
|
|
20902
|
+
* ```
|
|
20903
|
+
*
|
|
20904
|
+
* @param params - Parameters for request
|
|
20905
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
20906
|
+
* @param callback - Optional callback that handles the response.
|
|
20907
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
20908
|
+
*/
|
|
20909
|
+
create(params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Create, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
20910
|
+
create(params?: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Create, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$GoogleCloudDiscoveryengineV1betaServingConfig>>;
|
|
20911
|
+
create(params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Create, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
20912
|
+
create(params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Create, options: MethodOptions | BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaServingConfig>, callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaServingConfig>): void;
|
|
20913
|
+
create(params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Create, callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaServingConfig>): void;
|
|
20914
|
+
create(callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaServingConfig>): void;
|
|
20736
20915
|
/**
|
|
20737
20916
|
* Deletes a ServingConfig. Returns a NOT_FOUND error if the ServingConfig does not exist.
|
|
20738
20917
|
* @example
|
|
@@ -21228,6 +21407,7 @@ export declare namespace discoveryengine_v1beta {
|
|
|
21228
21407
|
* // "rankingExpression": "my_rankingExpression",
|
|
21229
21408
|
* // "rankingExpressionBackend": "my_rankingExpressionBackend",
|
|
21230
21409
|
* // "regionCode": "my_regionCode",
|
|
21410
|
+
* // "relevanceFilterSpec": {},
|
|
21231
21411
|
* // "relevanceScoreSpec": {},
|
|
21232
21412
|
* // "relevanceThreshold": "my_relevanceThreshold",
|
|
21233
21413
|
* // "safeSearch": false,
|
|
@@ -21358,6 +21538,7 @@ export declare namespace discoveryengine_v1beta {
|
|
|
21358
21538
|
* // "rankingExpression": "my_rankingExpression",
|
|
21359
21539
|
* // "rankingExpressionBackend": "my_rankingExpressionBackend",
|
|
21360
21540
|
* // "regionCode": "my_regionCode",
|
|
21541
|
+
* // "relevanceFilterSpec": {},
|
|
21361
21542
|
* // "relevanceScoreSpec": {},
|
|
21362
21543
|
* // "relevanceThreshold": "my_relevanceThreshold",
|
|
21363
21544
|
* // "safeSearch": false,
|
|
@@ -21516,6 +21697,20 @@ export declare namespace discoveryengine_v1beta {
|
|
|
21516
21697
|
*/
|
|
21517
21698
|
requestBody?: Schema$GoogleCloudDiscoveryengineV1betaAnswerQueryRequest;
|
|
21518
21699
|
}
|
|
21700
|
+
export interface Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Create extends StandardParameters {
|
|
21701
|
+
/**
|
|
21702
|
+
* Required. Full resource name of parent. Format: `projects/{project\}/locations/{location\}/collections/{collection\}/engines/{engine\}`
|
|
21703
|
+
*/
|
|
21704
|
+
parent?: string;
|
|
21705
|
+
/**
|
|
21706
|
+
* Required. The ID to use for the ServingConfig, which will become the final component of the ServingConfig's resource name. This value should be 4-63 characters, and valid characters are /a-zA-Z0-9+/.
|
|
21707
|
+
*/
|
|
21708
|
+
servingConfigId?: string;
|
|
21709
|
+
/**
|
|
21710
|
+
* Request body metadata
|
|
21711
|
+
*/
|
|
21712
|
+
requestBody?: Schema$GoogleCloudDiscoveryengineV1betaServingConfig;
|
|
21713
|
+
}
|
|
21519
21714
|
export interface Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Delete extends StandardParameters {
|
|
21520
21715
|
/**
|
|
21521
21716
|
* Required. The resource name of the ServingConfig to delete. Format: `projects/{project\}/locations/{location\}/collections/{collection\}/engines/{engine\}/servingConfigs/{serving_config_id\}`
|
|
@@ -27202,6 +27397,125 @@ export declare namespace discoveryengine_v1beta {
|
|
|
27202
27397
|
answer(params: Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$Answer, options: MethodOptions | BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaAnswerQueryResponse>, callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaAnswerQueryResponse>): void;
|
|
27203
27398
|
answer(params: Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$Answer, callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaAnswerQueryResponse>): void;
|
|
27204
27399
|
answer(callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaAnswerQueryResponse>): void;
|
|
27400
|
+
/**
|
|
27401
|
+
* Creates a ServingConfig. Note: The Google Cloud console works only with the default serving config. Additional ServingConfigs can be created and managed only via the API. A maximum of 100 ServingConfigs are allowed in an Engine, otherwise a RESOURCE_EXHAUSTED error is returned.
|
|
27402
|
+
* @example
|
|
27403
|
+
* ```js
|
|
27404
|
+
* // Before running the sample:
|
|
27405
|
+
* // - Enable the API at:
|
|
27406
|
+
* // https://console.developers.google.com/apis/api/discoveryengine.googleapis.com
|
|
27407
|
+
* // - Login into gcloud by running:
|
|
27408
|
+
* // ```sh
|
|
27409
|
+
* // $ gcloud auth application-default login
|
|
27410
|
+
* // ```
|
|
27411
|
+
* // - Install the npm module by running:
|
|
27412
|
+
* // ```sh
|
|
27413
|
+
* // $ npm install googleapis
|
|
27414
|
+
* // ```
|
|
27415
|
+
*
|
|
27416
|
+
* const {google} = require('googleapis');
|
|
27417
|
+
* const discoveryengine = google.discoveryengine('v1beta');
|
|
27418
|
+
*
|
|
27419
|
+
* async function main() {
|
|
27420
|
+
* const auth = new google.auth.GoogleAuth({
|
|
27421
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
27422
|
+
* scopes: [
|
|
27423
|
+
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
27424
|
+
* 'https://www.googleapis.com/auth/discoveryengine.readwrite',
|
|
27425
|
+
* ],
|
|
27426
|
+
* });
|
|
27427
|
+
*
|
|
27428
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
27429
|
+
* const authClient = await auth.getClient();
|
|
27430
|
+
* google.options({auth: authClient});
|
|
27431
|
+
*
|
|
27432
|
+
* // Do the magic
|
|
27433
|
+
* const res =
|
|
27434
|
+
* await discoveryengine.projects.locations.collections.engines.servingConfigs.create(
|
|
27435
|
+
* {
|
|
27436
|
+
* // Required. Full resource name of parent. Format: `projects/{project\}/locations/{location\}/collections/{collection\}/engines/{engine\}`
|
|
27437
|
+
* parent:
|
|
27438
|
+
* 'projects/my-project/locations/my-location/collections/my-collection/engines/my-engine',
|
|
27439
|
+
* // Required. The ID to use for the ServingConfig, which will become the final component of the ServingConfig's resource name. This value should be 4-63 characters, and valid characters are /a-zA-Z0-9+/.
|
|
27440
|
+
* servingConfigId: 'placeholder-value',
|
|
27441
|
+
*
|
|
27442
|
+
* // Request body metadata
|
|
27443
|
+
* requestBody: {
|
|
27444
|
+
* // request body parameters
|
|
27445
|
+
* // {
|
|
27446
|
+
* // "answerGenerationSpec": {},
|
|
27447
|
+
* // "boostControlIds": [],
|
|
27448
|
+
* // "createTime": "my_createTime",
|
|
27449
|
+
* // "displayName": "my_displayName",
|
|
27450
|
+
* // "dissociateControlIds": [],
|
|
27451
|
+
* // "diversityLevel": "my_diversityLevel",
|
|
27452
|
+
* // "embeddingConfig": {},
|
|
27453
|
+
* // "filterControlIds": [],
|
|
27454
|
+
* // "genericConfig": {},
|
|
27455
|
+
* // "ignoreControlIds": [],
|
|
27456
|
+
* // "mediaConfig": {},
|
|
27457
|
+
* // "modelId": "my_modelId",
|
|
27458
|
+
* // "name": "my_name",
|
|
27459
|
+
* // "onewaySynonymsControlIds": [],
|
|
27460
|
+
* // "personalizationSpec": {},
|
|
27461
|
+
* // "promoteControlIds": [],
|
|
27462
|
+
* // "rankingExpression": "my_rankingExpression",
|
|
27463
|
+
* // "redirectControlIds": [],
|
|
27464
|
+
* // "replacementControlIds": [],
|
|
27465
|
+
* // "solutionType": "my_solutionType",
|
|
27466
|
+
* // "synonymsControlIds": [],
|
|
27467
|
+
* // "updateTime": "my_updateTime"
|
|
27468
|
+
* // }
|
|
27469
|
+
* },
|
|
27470
|
+
* },
|
|
27471
|
+
* );
|
|
27472
|
+
* console.log(res.data);
|
|
27473
|
+
*
|
|
27474
|
+
* // Example response
|
|
27475
|
+
* // {
|
|
27476
|
+
* // "answerGenerationSpec": {},
|
|
27477
|
+
* // "boostControlIds": [],
|
|
27478
|
+
* // "createTime": "my_createTime",
|
|
27479
|
+
* // "displayName": "my_displayName",
|
|
27480
|
+
* // "dissociateControlIds": [],
|
|
27481
|
+
* // "diversityLevel": "my_diversityLevel",
|
|
27482
|
+
* // "embeddingConfig": {},
|
|
27483
|
+
* // "filterControlIds": [],
|
|
27484
|
+
* // "genericConfig": {},
|
|
27485
|
+
* // "ignoreControlIds": [],
|
|
27486
|
+
* // "mediaConfig": {},
|
|
27487
|
+
* // "modelId": "my_modelId",
|
|
27488
|
+
* // "name": "my_name",
|
|
27489
|
+
* // "onewaySynonymsControlIds": [],
|
|
27490
|
+
* // "personalizationSpec": {},
|
|
27491
|
+
* // "promoteControlIds": [],
|
|
27492
|
+
* // "rankingExpression": "my_rankingExpression",
|
|
27493
|
+
* // "redirectControlIds": [],
|
|
27494
|
+
* // "replacementControlIds": [],
|
|
27495
|
+
* // "solutionType": "my_solutionType",
|
|
27496
|
+
* // "synonymsControlIds": [],
|
|
27497
|
+
* // "updateTime": "my_updateTime"
|
|
27498
|
+
* // }
|
|
27499
|
+
* }
|
|
27500
|
+
*
|
|
27501
|
+
* main().catch(e => {
|
|
27502
|
+
* console.error(e);
|
|
27503
|
+
* throw e;
|
|
27504
|
+
* });
|
|
27505
|
+
*
|
|
27506
|
+
* ```
|
|
27507
|
+
*
|
|
27508
|
+
* @param params - Parameters for request
|
|
27509
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
27510
|
+
* @param callback - Optional callback that handles the response.
|
|
27511
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
27512
|
+
*/
|
|
27513
|
+
create(params: Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$Create, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
27514
|
+
create(params?: Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$Create, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$GoogleCloudDiscoveryengineV1betaServingConfig>>;
|
|
27515
|
+
create(params: Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$Create, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
27516
|
+
create(params: Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$Create, options: MethodOptions | BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaServingConfig>, callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaServingConfig>): void;
|
|
27517
|
+
create(params: Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$Create, callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaServingConfig>): void;
|
|
27518
|
+
create(callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaServingConfig>): void;
|
|
27205
27519
|
/**
|
|
27206
27520
|
* Deletes a ServingConfig. Returns a NOT_FOUND error if the ServingConfig does not exist.
|
|
27207
27521
|
* @example
|
|
@@ -27697,6 +28011,7 @@ export declare namespace discoveryengine_v1beta {
|
|
|
27697
28011
|
* // "rankingExpression": "my_rankingExpression",
|
|
27698
28012
|
* // "rankingExpressionBackend": "my_rankingExpressionBackend",
|
|
27699
28013
|
* // "regionCode": "my_regionCode",
|
|
28014
|
+
* // "relevanceFilterSpec": {},
|
|
27700
28015
|
* // "relevanceScoreSpec": {},
|
|
27701
28016
|
* // "relevanceThreshold": "my_relevanceThreshold",
|
|
27702
28017
|
* // "safeSearch": false,
|
|
@@ -27827,6 +28142,7 @@ export declare namespace discoveryengine_v1beta {
|
|
|
27827
28142
|
* // "rankingExpression": "my_rankingExpression",
|
|
27828
28143
|
* // "rankingExpressionBackend": "my_rankingExpressionBackend",
|
|
27829
28144
|
* // "regionCode": "my_regionCode",
|
|
28145
|
+
* // "relevanceFilterSpec": {},
|
|
27830
28146
|
* // "relevanceScoreSpec": {},
|
|
27831
28147
|
* // "relevanceThreshold": "my_relevanceThreshold",
|
|
27832
28148
|
* // "safeSearch": false,
|
|
@@ -27985,6 +28301,20 @@ export declare namespace discoveryengine_v1beta {
|
|
|
27985
28301
|
*/
|
|
27986
28302
|
requestBody?: Schema$GoogleCloudDiscoveryengineV1betaAnswerQueryRequest;
|
|
27987
28303
|
}
|
|
28304
|
+
export interface Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$Create extends StandardParameters {
|
|
28305
|
+
/**
|
|
28306
|
+
* Required. Full resource name of parent. Format: `projects/{project\}/locations/{location\}/collections/{collection\}/engines/{engine\}`
|
|
28307
|
+
*/
|
|
28308
|
+
parent?: string;
|
|
28309
|
+
/**
|
|
28310
|
+
* Required. The ID to use for the ServingConfig, which will become the final component of the ServingConfig's resource name. This value should be 4-63 characters, and valid characters are /a-zA-Z0-9+/.
|
|
28311
|
+
*/
|
|
28312
|
+
servingConfigId?: string;
|
|
28313
|
+
/**
|
|
28314
|
+
* Request body metadata
|
|
28315
|
+
*/
|
|
28316
|
+
requestBody?: Schema$GoogleCloudDiscoveryengineV1betaServingConfig;
|
|
28317
|
+
}
|
|
27988
28318
|
export interface Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$Delete extends StandardParameters {
|
|
27989
28319
|
/**
|
|
27990
28320
|
* Required. The resource name of the ServingConfig to delete. Format: `projects/{project\}/locations/{location\}/collections/{collection\}/engines/{engine\}/servingConfigs/{serving_config_id\}`
|
|
@@ -32649,6 +32979,123 @@ export declare namespace discoveryengine_v1beta {
|
|
|
32649
32979
|
answer(params: Params$Resource$Projects$Locations$Datastores$Servingconfigs$Answer, options: MethodOptions | BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaAnswerQueryResponse>, callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaAnswerQueryResponse>): void;
|
|
32650
32980
|
answer(params: Params$Resource$Projects$Locations$Datastores$Servingconfigs$Answer, callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaAnswerQueryResponse>): void;
|
|
32651
32981
|
answer(callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaAnswerQueryResponse>): void;
|
|
32982
|
+
/**
|
|
32983
|
+
* Creates a ServingConfig. Note: The Google Cloud console works only with the default serving config. Additional ServingConfigs can be created and managed only via the API. A maximum of 100 ServingConfigs are allowed in an Engine, otherwise a RESOURCE_EXHAUSTED error is returned.
|
|
32984
|
+
* @example
|
|
32985
|
+
* ```js
|
|
32986
|
+
* // Before running the sample:
|
|
32987
|
+
* // - Enable the API at:
|
|
32988
|
+
* // https://console.developers.google.com/apis/api/discoveryengine.googleapis.com
|
|
32989
|
+
* // - Login into gcloud by running:
|
|
32990
|
+
* // ```sh
|
|
32991
|
+
* // $ gcloud auth application-default login
|
|
32992
|
+
* // ```
|
|
32993
|
+
* // - Install the npm module by running:
|
|
32994
|
+
* // ```sh
|
|
32995
|
+
* // $ npm install googleapis
|
|
32996
|
+
* // ```
|
|
32997
|
+
*
|
|
32998
|
+
* const {google} = require('googleapis');
|
|
32999
|
+
* const discoveryengine = google.discoveryengine('v1beta');
|
|
33000
|
+
*
|
|
33001
|
+
* async function main() {
|
|
33002
|
+
* const auth = new google.auth.GoogleAuth({
|
|
33003
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
33004
|
+
* scopes: [
|
|
33005
|
+
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
33006
|
+
* 'https://www.googleapis.com/auth/discoveryengine.readwrite',
|
|
33007
|
+
* ],
|
|
33008
|
+
* });
|
|
33009
|
+
*
|
|
33010
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
33011
|
+
* const authClient = await auth.getClient();
|
|
33012
|
+
* google.options({auth: authClient});
|
|
33013
|
+
*
|
|
33014
|
+
* // Do the magic
|
|
33015
|
+
* const res =
|
|
33016
|
+
* await discoveryengine.projects.locations.dataStores.servingConfigs.create({
|
|
33017
|
+
* // Required. Full resource name of parent. Format: `projects/{project\}/locations/{location\}/collections/{collection\}/engines/{engine\}`
|
|
33018
|
+
* parent:
|
|
33019
|
+
* 'projects/my-project/locations/my-location/dataStores/my-dataStore',
|
|
33020
|
+
* // Required. The ID to use for the ServingConfig, which will become the final component of the ServingConfig's resource name. This value should be 4-63 characters, and valid characters are /a-zA-Z0-9+/.
|
|
33021
|
+
* servingConfigId: 'placeholder-value',
|
|
33022
|
+
*
|
|
33023
|
+
* // Request body metadata
|
|
33024
|
+
* requestBody: {
|
|
33025
|
+
* // request body parameters
|
|
33026
|
+
* // {
|
|
33027
|
+
* // "answerGenerationSpec": {},
|
|
33028
|
+
* // "boostControlIds": [],
|
|
33029
|
+
* // "createTime": "my_createTime",
|
|
33030
|
+
* // "displayName": "my_displayName",
|
|
33031
|
+
* // "dissociateControlIds": [],
|
|
33032
|
+
* // "diversityLevel": "my_diversityLevel",
|
|
33033
|
+
* // "embeddingConfig": {},
|
|
33034
|
+
* // "filterControlIds": [],
|
|
33035
|
+
* // "genericConfig": {},
|
|
33036
|
+
* // "ignoreControlIds": [],
|
|
33037
|
+
* // "mediaConfig": {},
|
|
33038
|
+
* // "modelId": "my_modelId",
|
|
33039
|
+
* // "name": "my_name",
|
|
33040
|
+
* // "onewaySynonymsControlIds": [],
|
|
33041
|
+
* // "personalizationSpec": {},
|
|
33042
|
+
* // "promoteControlIds": [],
|
|
33043
|
+
* // "rankingExpression": "my_rankingExpression",
|
|
33044
|
+
* // "redirectControlIds": [],
|
|
33045
|
+
* // "replacementControlIds": [],
|
|
33046
|
+
* // "solutionType": "my_solutionType",
|
|
33047
|
+
* // "synonymsControlIds": [],
|
|
33048
|
+
* // "updateTime": "my_updateTime"
|
|
33049
|
+
* // }
|
|
33050
|
+
* },
|
|
33051
|
+
* });
|
|
33052
|
+
* console.log(res.data);
|
|
33053
|
+
*
|
|
33054
|
+
* // Example response
|
|
33055
|
+
* // {
|
|
33056
|
+
* // "answerGenerationSpec": {},
|
|
33057
|
+
* // "boostControlIds": [],
|
|
33058
|
+
* // "createTime": "my_createTime",
|
|
33059
|
+
* // "displayName": "my_displayName",
|
|
33060
|
+
* // "dissociateControlIds": [],
|
|
33061
|
+
* // "diversityLevel": "my_diversityLevel",
|
|
33062
|
+
* // "embeddingConfig": {},
|
|
33063
|
+
* // "filterControlIds": [],
|
|
33064
|
+
* // "genericConfig": {},
|
|
33065
|
+
* // "ignoreControlIds": [],
|
|
33066
|
+
* // "mediaConfig": {},
|
|
33067
|
+
* // "modelId": "my_modelId",
|
|
33068
|
+
* // "name": "my_name",
|
|
33069
|
+
* // "onewaySynonymsControlIds": [],
|
|
33070
|
+
* // "personalizationSpec": {},
|
|
33071
|
+
* // "promoteControlIds": [],
|
|
33072
|
+
* // "rankingExpression": "my_rankingExpression",
|
|
33073
|
+
* // "redirectControlIds": [],
|
|
33074
|
+
* // "replacementControlIds": [],
|
|
33075
|
+
* // "solutionType": "my_solutionType",
|
|
33076
|
+
* // "synonymsControlIds": [],
|
|
33077
|
+
* // "updateTime": "my_updateTime"
|
|
33078
|
+
* // }
|
|
33079
|
+
* }
|
|
33080
|
+
*
|
|
33081
|
+
* main().catch(e => {
|
|
33082
|
+
* console.error(e);
|
|
33083
|
+
* throw e;
|
|
33084
|
+
* });
|
|
33085
|
+
*
|
|
33086
|
+
* ```
|
|
33087
|
+
*
|
|
33088
|
+
* @param params - Parameters for request
|
|
33089
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
33090
|
+
* @param callback - Optional callback that handles the response.
|
|
33091
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
33092
|
+
*/
|
|
33093
|
+
create(params: Params$Resource$Projects$Locations$Datastores$Servingconfigs$Create, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
33094
|
+
create(params?: Params$Resource$Projects$Locations$Datastores$Servingconfigs$Create, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$GoogleCloudDiscoveryengineV1betaServingConfig>>;
|
|
33095
|
+
create(params: Params$Resource$Projects$Locations$Datastores$Servingconfigs$Create, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
33096
|
+
create(params: Params$Resource$Projects$Locations$Datastores$Servingconfigs$Create, options: MethodOptions | BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaServingConfig>, callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaServingConfig>): void;
|
|
33097
|
+
create(params: Params$Resource$Projects$Locations$Datastores$Servingconfigs$Create, callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaServingConfig>): void;
|
|
33098
|
+
create(callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaServingConfig>): void;
|
|
32652
33099
|
/**
|
|
32653
33100
|
* Deletes a ServingConfig. Returns a NOT_FOUND error if the ServingConfig does not exist.
|
|
32654
33101
|
* @example
|
|
@@ -33135,6 +33582,7 @@ export declare namespace discoveryengine_v1beta {
|
|
|
33135
33582
|
* // "rankingExpression": "my_rankingExpression",
|
|
33136
33583
|
* // "rankingExpressionBackend": "my_rankingExpressionBackend",
|
|
33137
33584
|
* // "regionCode": "my_regionCode",
|
|
33585
|
+
* // "relevanceFilterSpec": {},
|
|
33138
33586
|
* // "relevanceScoreSpec": {},
|
|
33139
33587
|
* // "relevanceThreshold": "my_relevanceThreshold",
|
|
33140
33588
|
* // "safeSearch": false,
|
|
@@ -33264,6 +33712,7 @@ export declare namespace discoveryengine_v1beta {
|
|
|
33264
33712
|
* // "rankingExpression": "my_rankingExpression",
|
|
33265
33713
|
* // "rankingExpressionBackend": "my_rankingExpressionBackend",
|
|
33266
33714
|
* // "regionCode": "my_regionCode",
|
|
33715
|
+
* // "relevanceFilterSpec": {},
|
|
33267
33716
|
* // "relevanceScoreSpec": {},
|
|
33268
33717
|
* // "relevanceThreshold": "my_relevanceThreshold",
|
|
33269
33718
|
* // "safeSearch": false,
|
|
@@ -33422,6 +33871,20 @@ export declare namespace discoveryengine_v1beta {
|
|
|
33422
33871
|
*/
|
|
33423
33872
|
requestBody?: Schema$GoogleCloudDiscoveryengineV1betaAnswerQueryRequest;
|
|
33424
33873
|
}
|
|
33874
|
+
export interface Params$Resource$Projects$Locations$Datastores$Servingconfigs$Create extends StandardParameters {
|
|
33875
|
+
/**
|
|
33876
|
+
* Required. Full resource name of parent. Format: `projects/{project\}/locations/{location\}/collections/{collection\}/engines/{engine\}`
|
|
33877
|
+
*/
|
|
33878
|
+
parent?: string;
|
|
33879
|
+
/**
|
|
33880
|
+
* Required. The ID to use for the ServingConfig, which will become the final component of the ServingConfig's resource name. This value should be 4-63 characters, and valid characters are /a-zA-Z0-9+/.
|
|
33881
|
+
*/
|
|
33882
|
+
servingConfigId?: string;
|
|
33883
|
+
/**
|
|
33884
|
+
* Request body metadata
|
|
33885
|
+
*/
|
|
33886
|
+
requestBody?: Schema$GoogleCloudDiscoveryengineV1betaServingConfig;
|
|
33887
|
+
}
|
|
33425
33888
|
export interface Params$Resource$Projects$Locations$Datastores$Servingconfigs$Delete extends StandardParameters {
|
|
33426
33889
|
/**
|
|
33427
33890
|
* Required. The resource name of the ServingConfig to delete. Format: `projects/{project\}/locations/{location\}/collections/{collection\}/engines/{engine\}/servingConfigs/{serving_config_id\}`
|