@googleapis/discoveryengine 28.0.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 +15 -0
- package/build/tsconfig.tsbuildinfo +1 -1
- package/build/v1.d.ts +691 -17
- package/build/v1.js +198 -0
- package/build/v1.js.map +1 -1
- package/build/v1alpha.d.ts +1136 -406
- package/build/v1alpha.js +198 -0
- package/build/v1alpha.js.map +1 -1
- package/build/v1beta.d.ts +720 -36
- package/build/v1beta.js +198 -0
- package/build/v1beta.js.map +1 -1
- package/package.json +1 -1
- package/v1.ts +1554 -382
- package/v1alpha.ts +1483 -256
- package/v1beta.ts +1561 -379
package/build/v1beta.d.ts
CHANGED
|
@@ -4052,7 +4052,7 @@ export declare namespace discoveryengine_v1beta {
|
|
|
4052
4052
|
*/
|
|
4053
4053
|
orderBy?: string | null;
|
|
4054
4054
|
/**
|
|
4055
|
-
* Optional. The categories associated with a category page. Must be set for category navigation queries to achieve good search quality. The format should be the same as UserEvent.PageInfo.page_category. This field is the equivalent of the query for browse (navigation) queries. It's used by the browse model when the query is empty. If the field is empty, it will not be used by the browse model. To represent full path of a category, use '\>' character to separate different hierarchies. If '\>' is part of the category name, replace it with other character(s). For example, `Graphics Cards \> RTX\>4090 \> Founders Edition` where "RTX \> 4090" represents one level, can be rewritten as `Graphics Cards \> RTX_4090 \> Founders Edition`
|
|
4055
|
+
* Optional. The categories associated with a category page. Must be set for category navigation queries to achieve good search quality. The format should be the same as UserEvent.PageInfo.page_category. This field is the equivalent of the query for browse (navigation) queries. It's used by the browse model when the query is empty. If the field is empty, it will not be used by the browse model. If the field contains more than one element, only the first element will be used. To represent full path of a category, use '\>' character to separate different hierarchies. If '\>' is part of the category name, replace it with other character(s). For example, `Graphics Cards \> RTX\>4090 \> Founders Edition` where "RTX \> 4090" represents one level, can be rewritten as `Graphics Cards \> RTX_4090 \> Founders Edition`
|
|
4056
4056
|
*/
|
|
4057
4057
|
pageCategories?: string[] | null;
|
|
4058
4058
|
/**
|
|
@@ -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
|
*/
|
|
@@ -10760,7 +10790,7 @@ export declare namespace discoveryengine_v1beta {
|
|
|
10760
10790
|
*/
|
|
10761
10791
|
orderBy?: string | null;
|
|
10762
10792
|
/**
|
|
10763
|
-
* Optional. The categories associated with a category page. Must be set for category navigation queries to achieve good search quality. The format should be the same as UserEvent.PageInfo.page_category. This field is the equivalent of the query for browse (navigation) queries. It's used by the browse model when the query is empty. If the field is empty, it will not be used by the browse model. To represent full path of a category, use '\>' character to separate different hierarchies. If '\>' is part of the category name, replace it with other character(s). For example, `Graphics Cards \> RTX\>4090 \> Founders Edition` where "RTX \> 4090" represents one level, can be rewritten as `Graphics Cards \> RTX_4090 \> Founders Edition`
|
|
10793
|
+
* Optional. The categories associated with a category page. Must be set for category navigation queries to achieve good search quality. The format should be the same as UserEvent.PageInfo.page_category. This field is the equivalent of the query for browse (navigation) queries. It's used by the browse model when the query is empty. If the field is empty, it will not be used by the browse model. If the field contains more than one element, only the first element will be used. To represent full path of a category, use '\>' character to separate different hierarchies. If '\>' is part of the category name, replace it with other character(s). For example, `Graphics Cards \> RTX\>4090 \> Founders Edition` where "RTX \> 4090" represents one level, can be rewritten as `Graphics Cards \> RTX_4090 \> Founders Edition`
|
|
10764
10794
|
*/
|
|
10765
10795
|
pageCategories?: string[] | null;
|
|
10766
10796
|
/**
|
|
@@ -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
|
*/
|
|
@@ -12577,7 +12637,7 @@ export declare namespace discoveryengine_v1beta {
|
|
|
12577
12637
|
*/
|
|
12578
12638
|
eventType?: string | null;
|
|
12579
12639
|
/**
|
|
12580
|
-
* The filter syntax consists of an expression language for constructing a predicate from one or more fields of the documents being filtered. One example is for `search` events, the associated SearchRequest may contain a filter expression in SearchRequest.filter conforming to https://google.aip.dev/160#filtering. Similarly, for `view-item-list` events that are generated from a RecommendRequest, this field may be populated directly from RecommendRequest.filter conforming to https://google.aip.dev/160#filtering. The value must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
|
|
12640
|
+
* Optional. The filter syntax consists of an expression language for constructing a predicate from one or more fields of the documents being filtered. One example is for `search` events, the associated SearchRequest may contain a filter expression in SearchRequest.filter conforming to https://google.aip.dev/160#filtering. Similarly, for `view-item-list` events that are generated from a RecommendRequest, this field may be populated directly from RecommendRequest.filter conforming to https://google.aip.dev/160#filtering. The value must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
|
|
12581
12641
|
*/
|
|
12582
12642
|
filter?: string | null;
|
|
12583
12643
|
/**
|
|
@@ -13383,6 +13443,10 @@ export declare namespace discoveryengine_v1beta {
|
|
|
13383
13443
|
* Immutable. Identifier. The full resource name of the data store. Format: `projects/{project\}/locations/{location\}/collections/{collection_id\}/dataStores/{data_store_id\}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.
|
|
13384
13444
|
*/
|
|
13385
13445
|
name?: string | null;
|
|
13446
|
+
/**
|
|
13447
|
+
* Optional. Configuration for Natural Language Query Understanding.
|
|
13448
|
+
*/
|
|
13449
|
+
naturalLanguageQueryUnderstandingConfig?: Schema$GoogleCloudDiscoveryengineV1NaturalLanguageQueryUnderstandingConfig;
|
|
13386
13450
|
/**
|
|
13387
13451
|
* Optional. Stores serving config at DataStore level.
|
|
13388
13452
|
*/
|
|
@@ -14226,6 +14290,15 @@ export declare namespace discoveryengine_v1beta {
|
|
|
14226
14290
|
*/
|
|
14227
14291
|
subscriptionTier?: string | null;
|
|
14228
14292
|
}
|
|
14293
|
+
/**
|
|
14294
|
+
* Configuration for Natural Language Query Understanding.
|
|
14295
|
+
*/
|
|
14296
|
+
export interface Schema$GoogleCloudDiscoveryengineV1NaturalLanguageQueryUnderstandingConfig {
|
|
14297
|
+
/**
|
|
14298
|
+
* Mode of Natural Language Query Understanding. If this field is unset, the behavior defaults to NaturalLanguageQueryUnderstandingConfig.Mode.DISABLED.
|
|
14299
|
+
*/
|
|
14300
|
+
mode?: string | null;
|
|
14301
|
+
}
|
|
14229
14302
|
/**
|
|
14230
14303
|
* Metadata and configurations for a Google Cloud project in the service.
|
|
14231
14304
|
*/
|
|
@@ -20720,6 +20793,189 @@ export declare namespace discoveryengine_v1beta {
|
|
|
20720
20793
|
answer(params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Answer, options: MethodOptions | BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaAnswerQueryResponse>, callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaAnswerQueryResponse>): void;
|
|
20721
20794
|
answer(params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Answer, callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaAnswerQueryResponse>): void;
|
|
20722
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;
|
|
20915
|
+
/**
|
|
20916
|
+
* Deletes a ServingConfig. Returns a NOT_FOUND error if the ServingConfig does not exist.
|
|
20917
|
+
* @example
|
|
20918
|
+
* ```js
|
|
20919
|
+
* // Before running the sample:
|
|
20920
|
+
* // - Enable the API at:
|
|
20921
|
+
* // https://console.developers.google.com/apis/api/discoveryengine.googleapis.com
|
|
20922
|
+
* // - Login into gcloud by running:
|
|
20923
|
+
* // ```sh
|
|
20924
|
+
* // $ gcloud auth application-default login
|
|
20925
|
+
* // ```
|
|
20926
|
+
* // - Install the npm module by running:
|
|
20927
|
+
* // ```sh
|
|
20928
|
+
* // $ npm install googleapis
|
|
20929
|
+
* // ```
|
|
20930
|
+
*
|
|
20931
|
+
* const {google} = require('googleapis');
|
|
20932
|
+
* const discoveryengine = google.discoveryengine('v1beta');
|
|
20933
|
+
*
|
|
20934
|
+
* async function main() {
|
|
20935
|
+
* const auth = new google.auth.GoogleAuth({
|
|
20936
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
20937
|
+
* scopes: [
|
|
20938
|
+
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
20939
|
+
* 'https://www.googleapis.com/auth/discoveryengine.readwrite',
|
|
20940
|
+
* ],
|
|
20941
|
+
* });
|
|
20942
|
+
*
|
|
20943
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
20944
|
+
* const authClient = await auth.getClient();
|
|
20945
|
+
* google.options({auth: authClient});
|
|
20946
|
+
*
|
|
20947
|
+
* // Do the magic
|
|
20948
|
+
* const res =
|
|
20949
|
+
* await discoveryengine.projects.locations.collections.dataStores.servingConfigs.delete(
|
|
20950
|
+
* {
|
|
20951
|
+
* // Required. The resource name of the ServingConfig to delete. Format: `projects/{project\}/locations/{location\}/collections/{collection\}/engines/{engine\}/servingConfigs/{serving_config_id\}`
|
|
20952
|
+
* name: 'projects/my-project/locations/my-location/collections/my-collection/dataStores/my-dataStore/servingConfigs/my-servingConfig',
|
|
20953
|
+
* },
|
|
20954
|
+
* );
|
|
20955
|
+
* console.log(res.data);
|
|
20956
|
+
*
|
|
20957
|
+
* // Example response
|
|
20958
|
+
* // {}
|
|
20959
|
+
* }
|
|
20960
|
+
*
|
|
20961
|
+
* main().catch(e => {
|
|
20962
|
+
* console.error(e);
|
|
20963
|
+
* throw e;
|
|
20964
|
+
* });
|
|
20965
|
+
*
|
|
20966
|
+
* ```
|
|
20967
|
+
*
|
|
20968
|
+
* @param params - Parameters for request
|
|
20969
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
20970
|
+
* @param callback - Optional callback that handles the response.
|
|
20971
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
20972
|
+
*/
|
|
20973
|
+
delete(params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Delete, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
20974
|
+
delete(params?: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Delete, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$GoogleProtobufEmpty>>;
|
|
20975
|
+
delete(params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Delete, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
20976
|
+
delete(params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Delete, options: MethodOptions | BodyResponseCallback<Schema$GoogleProtobufEmpty>, callback: BodyResponseCallback<Schema$GoogleProtobufEmpty>): void;
|
|
20977
|
+
delete(params: Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Delete, callback: BodyResponseCallback<Schema$GoogleProtobufEmpty>): void;
|
|
20978
|
+
delete(callback: BodyResponseCallback<Schema$GoogleProtobufEmpty>): void;
|
|
20723
20979
|
/**
|
|
20724
20980
|
* Gets a ServingConfig. Returns a NotFound error if the ServingConfig does not exist.
|
|
20725
20981
|
* @example
|
|
@@ -21151,6 +21407,7 @@ export declare namespace discoveryengine_v1beta {
|
|
|
21151
21407
|
* // "rankingExpression": "my_rankingExpression",
|
|
21152
21408
|
* // "rankingExpressionBackend": "my_rankingExpressionBackend",
|
|
21153
21409
|
* // "regionCode": "my_regionCode",
|
|
21410
|
+
* // "relevanceFilterSpec": {},
|
|
21154
21411
|
* // "relevanceScoreSpec": {},
|
|
21155
21412
|
* // "relevanceThreshold": "my_relevanceThreshold",
|
|
21156
21413
|
* // "safeSearch": false,
|
|
@@ -21281,6 +21538,7 @@ export declare namespace discoveryengine_v1beta {
|
|
|
21281
21538
|
* // "rankingExpression": "my_rankingExpression",
|
|
21282
21539
|
* // "rankingExpressionBackend": "my_rankingExpressionBackend",
|
|
21283
21540
|
* // "regionCode": "my_regionCode",
|
|
21541
|
+
* // "relevanceFilterSpec": {},
|
|
21284
21542
|
* // "relevanceScoreSpec": {},
|
|
21285
21543
|
* // "relevanceThreshold": "my_relevanceThreshold",
|
|
21286
21544
|
* // "safeSearch": false,
|
|
@@ -21439,6 +21697,26 @@ export declare namespace discoveryengine_v1beta {
|
|
|
21439
21697
|
*/
|
|
21440
21698
|
requestBody?: Schema$GoogleCloudDiscoveryengineV1betaAnswerQueryRequest;
|
|
21441
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
|
+
}
|
|
21714
|
+
export interface Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Delete extends StandardParameters {
|
|
21715
|
+
/**
|
|
21716
|
+
* Required. The resource name of the ServingConfig to delete. Format: `projects/{project\}/locations/{location\}/collections/{collection\}/engines/{engine\}/servingConfigs/{serving_config_id\}`
|
|
21717
|
+
*/
|
|
21718
|
+
name?: string;
|
|
21719
|
+
}
|
|
21442
21720
|
export interface Params$Resource$Projects$Locations$Collections$Datastores$Servingconfigs$Get extends StandardParameters {
|
|
21443
21721
|
/**
|
|
21444
21722
|
* Required. The resource name of the ServingConfig to get. Format: `projects/{project\}/locations/{location\}/collections/{collection\}/engines/{engine\}/servingConfigs/{serving_config_id\}`
|
|
@@ -27120,7 +27398,7 @@ export declare namespace discoveryengine_v1beta {
|
|
|
27120
27398
|
answer(params: Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$Answer, callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaAnswerQueryResponse>): void;
|
|
27121
27399
|
answer(callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaAnswerQueryResponse>): void;
|
|
27122
27400
|
/**
|
|
27123
|
-
*
|
|
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.
|
|
27124
27402
|
* @example
|
|
27125
27403
|
* ```js
|
|
27126
27404
|
* // Before running the sample:
|
|
@@ -27153,38 +27431,221 @@ export declare namespace discoveryengine_v1beta {
|
|
|
27153
27431
|
*
|
|
27154
27432
|
* // Do the magic
|
|
27155
27433
|
* const res =
|
|
27156
|
-
* await discoveryengine.projects.locations.collections.engines.servingConfigs.
|
|
27434
|
+
* await discoveryengine.projects.locations.collections.engines.servingConfigs.create(
|
|
27157
27435
|
* {
|
|
27158
|
-
* // Required.
|
|
27159
|
-
*
|
|
27160
|
-
*
|
|
27161
|
-
*
|
|
27162
|
-
*
|
|
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',
|
|
27163
27441
|
*
|
|
27164
|
-
*
|
|
27165
|
-
*
|
|
27166
|
-
*
|
|
27167
|
-
*
|
|
27168
|
-
*
|
|
27169
|
-
*
|
|
27170
|
-
*
|
|
27171
|
-
*
|
|
27172
|
-
*
|
|
27173
|
-
*
|
|
27174
|
-
*
|
|
27175
|
-
*
|
|
27176
|
-
*
|
|
27177
|
-
*
|
|
27178
|
-
*
|
|
27179
|
-
*
|
|
27180
|
-
*
|
|
27181
|
-
*
|
|
27182
|
-
*
|
|
27183
|
-
*
|
|
27184
|
-
*
|
|
27185
|
-
*
|
|
27186
|
-
*
|
|
27187
|
-
*
|
|
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;
|
|
27519
|
+
/**
|
|
27520
|
+
* Deletes a ServingConfig. Returns a NOT_FOUND error if the ServingConfig does not exist.
|
|
27521
|
+
* @example
|
|
27522
|
+
* ```js
|
|
27523
|
+
* // Before running the sample:
|
|
27524
|
+
* // - Enable the API at:
|
|
27525
|
+
* // https://console.developers.google.com/apis/api/discoveryengine.googleapis.com
|
|
27526
|
+
* // - Login into gcloud by running:
|
|
27527
|
+
* // ```sh
|
|
27528
|
+
* // $ gcloud auth application-default login
|
|
27529
|
+
* // ```
|
|
27530
|
+
* // - Install the npm module by running:
|
|
27531
|
+
* // ```sh
|
|
27532
|
+
* // $ npm install googleapis
|
|
27533
|
+
* // ```
|
|
27534
|
+
*
|
|
27535
|
+
* const {google} = require('googleapis');
|
|
27536
|
+
* const discoveryengine = google.discoveryengine('v1beta');
|
|
27537
|
+
*
|
|
27538
|
+
* async function main() {
|
|
27539
|
+
* const auth = new google.auth.GoogleAuth({
|
|
27540
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
27541
|
+
* scopes: [
|
|
27542
|
+
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
27543
|
+
* 'https://www.googleapis.com/auth/discoveryengine.readwrite',
|
|
27544
|
+
* ],
|
|
27545
|
+
* });
|
|
27546
|
+
*
|
|
27547
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
27548
|
+
* const authClient = await auth.getClient();
|
|
27549
|
+
* google.options({auth: authClient});
|
|
27550
|
+
*
|
|
27551
|
+
* // Do the magic
|
|
27552
|
+
* const res =
|
|
27553
|
+
* await discoveryengine.projects.locations.collections.engines.servingConfigs.delete(
|
|
27554
|
+
* {
|
|
27555
|
+
* // Required. The resource name of the ServingConfig to delete. Format: `projects/{project\}/locations/{location\}/collections/{collection\}/engines/{engine\}/servingConfigs/{serving_config_id\}`
|
|
27556
|
+
* name: 'projects/my-project/locations/my-location/collections/my-collection/engines/my-engine/servingConfigs/my-servingConfig',
|
|
27557
|
+
* },
|
|
27558
|
+
* );
|
|
27559
|
+
* console.log(res.data);
|
|
27560
|
+
*
|
|
27561
|
+
* // Example response
|
|
27562
|
+
* // {}
|
|
27563
|
+
* }
|
|
27564
|
+
*
|
|
27565
|
+
* main().catch(e => {
|
|
27566
|
+
* console.error(e);
|
|
27567
|
+
* throw e;
|
|
27568
|
+
* });
|
|
27569
|
+
*
|
|
27570
|
+
* ```
|
|
27571
|
+
*
|
|
27572
|
+
* @param params - Parameters for request
|
|
27573
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
27574
|
+
* @param callback - Optional callback that handles the response.
|
|
27575
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
27576
|
+
*/
|
|
27577
|
+
delete(params: Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$Delete, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
27578
|
+
delete(params?: Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$Delete, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$GoogleProtobufEmpty>>;
|
|
27579
|
+
delete(params: Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$Delete, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
27580
|
+
delete(params: Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$Delete, options: MethodOptions | BodyResponseCallback<Schema$GoogleProtobufEmpty>, callback: BodyResponseCallback<Schema$GoogleProtobufEmpty>): void;
|
|
27581
|
+
delete(params: Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$Delete, callback: BodyResponseCallback<Schema$GoogleProtobufEmpty>): void;
|
|
27582
|
+
delete(callback: BodyResponseCallback<Schema$GoogleProtobufEmpty>): void;
|
|
27583
|
+
/**
|
|
27584
|
+
* Gets a ServingConfig. Returns a NotFound error if the ServingConfig does not exist.
|
|
27585
|
+
* @example
|
|
27586
|
+
* ```js
|
|
27587
|
+
* // Before running the sample:
|
|
27588
|
+
* // - Enable the API at:
|
|
27589
|
+
* // https://console.developers.google.com/apis/api/discoveryengine.googleapis.com
|
|
27590
|
+
* // - Login into gcloud by running:
|
|
27591
|
+
* // ```sh
|
|
27592
|
+
* // $ gcloud auth application-default login
|
|
27593
|
+
* // ```
|
|
27594
|
+
* // - Install the npm module by running:
|
|
27595
|
+
* // ```sh
|
|
27596
|
+
* // $ npm install googleapis
|
|
27597
|
+
* // ```
|
|
27598
|
+
*
|
|
27599
|
+
* const {google} = require('googleapis');
|
|
27600
|
+
* const discoveryengine = google.discoveryengine('v1beta');
|
|
27601
|
+
*
|
|
27602
|
+
* async function main() {
|
|
27603
|
+
* const auth = new google.auth.GoogleAuth({
|
|
27604
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
27605
|
+
* scopes: [
|
|
27606
|
+
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
27607
|
+
* 'https://www.googleapis.com/auth/discoveryengine.readwrite',
|
|
27608
|
+
* ],
|
|
27609
|
+
* });
|
|
27610
|
+
*
|
|
27611
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
27612
|
+
* const authClient = await auth.getClient();
|
|
27613
|
+
* google.options({auth: authClient});
|
|
27614
|
+
*
|
|
27615
|
+
* // Do the magic
|
|
27616
|
+
* const res =
|
|
27617
|
+
* await discoveryengine.projects.locations.collections.engines.servingConfigs.get(
|
|
27618
|
+
* {
|
|
27619
|
+
* // Required. The resource name of the ServingConfig to get. Format: `projects/{project\}/locations/{location\}/collections/{collection\}/engines/{engine\}/servingConfigs/{serving_config_id\}`
|
|
27620
|
+
* name: 'projects/my-project/locations/my-location/collections/my-collection/engines/my-engine/servingConfigs/my-servingConfig',
|
|
27621
|
+
* },
|
|
27622
|
+
* );
|
|
27623
|
+
* console.log(res.data);
|
|
27624
|
+
*
|
|
27625
|
+
* // Example response
|
|
27626
|
+
* // {
|
|
27627
|
+
* // "answerGenerationSpec": {},
|
|
27628
|
+
* // "boostControlIds": [],
|
|
27629
|
+
* // "createTime": "my_createTime",
|
|
27630
|
+
* // "displayName": "my_displayName",
|
|
27631
|
+
* // "dissociateControlIds": [],
|
|
27632
|
+
* // "diversityLevel": "my_diversityLevel",
|
|
27633
|
+
* // "embeddingConfig": {},
|
|
27634
|
+
* // "filterControlIds": [],
|
|
27635
|
+
* // "genericConfig": {},
|
|
27636
|
+
* // "ignoreControlIds": [],
|
|
27637
|
+
* // "mediaConfig": {},
|
|
27638
|
+
* // "modelId": "my_modelId",
|
|
27639
|
+
* // "name": "my_name",
|
|
27640
|
+
* // "onewaySynonymsControlIds": [],
|
|
27641
|
+
* // "personalizationSpec": {},
|
|
27642
|
+
* // "promoteControlIds": [],
|
|
27643
|
+
* // "rankingExpression": "my_rankingExpression",
|
|
27644
|
+
* // "redirectControlIds": [],
|
|
27645
|
+
* // "replacementControlIds": [],
|
|
27646
|
+
* // "solutionType": "my_solutionType",
|
|
27647
|
+
* // "synonymsControlIds": [],
|
|
27648
|
+
* // "updateTime": "my_updateTime"
|
|
27188
27649
|
* // }
|
|
27189
27650
|
* }
|
|
27190
27651
|
*
|
|
@@ -27550,6 +28011,7 @@ export declare namespace discoveryengine_v1beta {
|
|
|
27550
28011
|
* // "rankingExpression": "my_rankingExpression",
|
|
27551
28012
|
* // "rankingExpressionBackend": "my_rankingExpressionBackend",
|
|
27552
28013
|
* // "regionCode": "my_regionCode",
|
|
28014
|
+
* // "relevanceFilterSpec": {},
|
|
27553
28015
|
* // "relevanceScoreSpec": {},
|
|
27554
28016
|
* // "relevanceThreshold": "my_relevanceThreshold",
|
|
27555
28017
|
* // "safeSearch": false,
|
|
@@ -27680,6 +28142,7 @@ export declare namespace discoveryengine_v1beta {
|
|
|
27680
28142
|
* // "rankingExpression": "my_rankingExpression",
|
|
27681
28143
|
* // "rankingExpressionBackend": "my_rankingExpressionBackend",
|
|
27682
28144
|
* // "regionCode": "my_regionCode",
|
|
28145
|
+
* // "relevanceFilterSpec": {},
|
|
27683
28146
|
* // "relevanceScoreSpec": {},
|
|
27684
28147
|
* // "relevanceThreshold": "my_relevanceThreshold",
|
|
27685
28148
|
* // "safeSearch": false,
|
|
@@ -27838,6 +28301,26 @@ export declare namespace discoveryengine_v1beta {
|
|
|
27838
28301
|
*/
|
|
27839
28302
|
requestBody?: Schema$GoogleCloudDiscoveryengineV1betaAnswerQueryRequest;
|
|
27840
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
|
+
}
|
|
28318
|
+
export interface Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$Delete extends StandardParameters {
|
|
28319
|
+
/**
|
|
28320
|
+
* Required. The resource name of the ServingConfig to delete. Format: `projects/{project\}/locations/{location\}/collections/{collection\}/engines/{engine\}/servingConfigs/{serving_config_id\}`
|
|
28321
|
+
*/
|
|
28322
|
+
name?: string;
|
|
28323
|
+
}
|
|
27841
28324
|
export interface Params$Resource$Projects$Locations$Collections$Engines$Servingconfigs$Get extends StandardParameters {
|
|
27842
28325
|
/**
|
|
27843
28326
|
* Required. The resource name of the ServingConfig to get. Format: `projects/{project\}/locations/{location\}/collections/{collection\}/engines/{engine\}/servingConfigs/{serving_config_id\}`
|
|
@@ -32496,6 +32979,185 @@ export declare namespace discoveryengine_v1beta {
|
|
|
32496
32979
|
answer(params: Params$Resource$Projects$Locations$Datastores$Servingconfigs$Answer, options: MethodOptions | BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaAnswerQueryResponse>, callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaAnswerQueryResponse>): void;
|
|
32497
32980
|
answer(params: Params$Resource$Projects$Locations$Datastores$Servingconfigs$Answer, callback: BodyResponseCallback<Schema$GoogleCloudDiscoveryengineV1betaAnswerQueryResponse>): void;
|
|
32498
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;
|
|
33099
|
+
/**
|
|
33100
|
+
* Deletes a ServingConfig. Returns a NOT_FOUND error if the ServingConfig does not exist.
|
|
33101
|
+
* @example
|
|
33102
|
+
* ```js
|
|
33103
|
+
* // Before running the sample:
|
|
33104
|
+
* // - Enable the API at:
|
|
33105
|
+
* // https://console.developers.google.com/apis/api/discoveryengine.googleapis.com
|
|
33106
|
+
* // - Login into gcloud by running:
|
|
33107
|
+
* // ```sh
|
|
33108
|
+
* // $ gcloud auth application-default login
|
|
33109
|
+
* // ```
|
|
33110
|
+
* // - Install the npm module by running:
|
|
33111
|
+
* // ```sh
|
|
33112
|
+
* // $ npm install googleapis
|
|
33113
|
+
* // ```
|
|
33114
|
+
*
|
|
33115
|
+
* const {google} = require('googleapis');
|
|
33116
|
+
* const discoveryengine = google.discoveryengine('v1beta');
|
|
33117
|
+
*
|
|
33118
|
+
* async function main() {
|
|
33119
|
+
* const auth = new google.auth.GoogleAuth({
|
|
33120
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
33121
|
+
* scopes: [
|
|
33122
|
+
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
33123
|
+
* 'https://www.googleapis.com/auth/discoveryengine.readwrite',
|
|
33124
|
+
* ],
|
|
33125
|
+
* });
|
|
33126
|
+
*
|
|
33127
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
33128
|
+
* const authClient = await auth.getClient();
|
|
33129
|
+
* google.options({auth: authClient});
|
|
33130
|
+
*
|
|
33131
|
+
* // Do the magic
|
|
33132
|
+
* const res =
|
|
33133
|
+
* await discoveryengine.projects.locations.dataStores.servingConfigs.delete({
|
|
33134
|
+
* // Required. The resource name of the ServingConfig to delete. Format: `projects/{project\}/locations/{location\}/collections/{collection\}/engines/{engine\}/servingConfigs/{serving_config_id\}`
|
|
33135
|
+
* name: 'projects/my-project/locations/my-location/dataStores/my-dataStore/servingConfigs/my-servingConfig',
|
|
33136
|
+
* });
|
|
33137
|
+
* console.log(res.data);
|
|
33138
|
+
*
|
|
33139
|
+
* // Example response
|
|
33140
|
+
* // {}
|
|
33141
|
+
* }
|
|
33142
|
+
*
|
|
33143
|
+
* main().catch(e => {
|
|
33144
|
+
* console.error(e);
|
|
33145
|
+
* throw e;
|
|
33146
|
+
* });
|
|
33147
|
+
*
|
|
33148
|
+
* ```
|
|
33149
|
+
*
|
|
33150
|
+
* @param params - Parameters for request
|
|
33151
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
33152
|
+
* @param callback - Optional callback that handles the response.
|
|
33153
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
33154
|
+
*/
|
|
33155
|
+
delete(params: Params$Resource$Projects$Locations$Datastores$Servingconfigs$Delete, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
33156
|
+
delete(params?: Params$Resource$Projects$Locations$Datastores$Servingconfigs$Delete, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$GoogleProtobufEmpty>>;
|
|
33157
|
+
delete(params: Params$Resource$Projects$Locations$Datastores$Servingconfigs$Delete, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
33158
|
+
delete(params: Params$Resource$Projects$Locations$Datastores$Servingconfigs$Delete, options: MethodOptions | BodyResponseCallback<Schema$GoogleProtobufEmpty>, callback: BodyResponseCallback<Schema$GoogleProtobufEmpty>): void;
|
|
33159
|
+
delete(params: Params$Resource$Projects$Locations$Datastores$Servingconfigs$Delete, callback: BodyResponseCallback<Schema$GoogleProtobufEmpty>): void;
|
|
33160
|
+
delete(callback: BodyResponseCallback<Schema$GoogleProtobufEmpty>): void;
|
|
32499
33161
|
/**
|
|
32500
33162
|
* Gets a ServingConfig. Returns a NotFound error if the ServingConfig does not exist.
|
|
32501
33163
|
* @example
|
|
@@ -32920,6 +33582,7 @@ export declare namespace discoveryengine_v1beta {
|
|
|
32920
33582
|
* // "rankingExpression": "my_rankingExpression",
|
|
32921
33583
|
* // "rankingExpressionBackend": "my_rankingExpressionBackend",
|
|
32922
33584
|
* // "regionCode": "my_regionCode",
|
|
33585
|
+
* // "relevanceFilterSpec": {},
|
|
32923
33586
|
* // "relevanceScoreSpec": {},
|
|
32924
33587
|
* // "relevanceThreshold": "my_relevanceThreshold",
|
|
32925
33588
|
* // "safeSearch": false,
|
|
@@ -33049,6 +33712,7 @@ export declare namespace discoveryengine_v1beta {
|
|
|
33049
33712
|
* // "rankingExpression": "my_rankingExpression",
|
|
33050
33713
|
* // "rankingExpressionBackend": "my_rankingExpressionBackend",
|
|
33051
33714
|
* // "regionCode": "my_regionCode",
|
|
33715
|
+
* // "relevanceFilterSpec": {},
|
|
33052
33716
|
* // "relevanceScoreSpec": {},
|
|
33053
33717
|
* // "relevanceThreshold": "my_relevanceThreshold",
|
|
33054
33718
|
* // "safeSearch": false,
|
|
@@ -33207,6 +33871,26 @@ export declare namespace discoveryengine_v1beta {
|
|
|
33207
33871
|
*/
|
|
33208
33872
|
requestBody?: Schema$GoogleCloudDiscoveryengineV1betaAnswerQueryRequest;
|
|
33209
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
|
+
}
|
|
33888
|
+
export interface Params$Resource$Projects$Locations$Datastores$Servingconfigs$Delete extends StandardParameters {
|
|
33889
|
+
/**
|
|
33890
|
+
* Required. The resource name of the ServingConfig to delete. Format: `projects/{project\}/locations/{location\}/collections/{collection\}/engines/{engine\}/servingConfigs/{serving_config_id\}`
|
|
33891
|
+
*/
|
|
33892
|
+
name?: string;
|
|
33893
|
+
}
|
|
33210
33894
|
export interface Params$Resource$Projects$Locations$Datastores$Servingconfigs$Get extends StandardParameters {
|
|
33211
33895
|
/**
|
|
33212
33896
|
* Required. The resource name of the ServingConfig to get. Format: `projects/{project\}/locations/{location\}/collections/{collection\}/engines/{engine\}/servingConfigs/{serving_config_id\}`
|