@google-cloud/discoveryengine 3.1.0 → 3.3.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/build/protos/google/cloud/discoveryengine/v1/search_service.proto +147 -19
- package/build/protos/protos.d.ts +608 -126
- package/build/protos/protos.js +1 -1
- package/build/protos/protos.json +185 -12
- package/build/src/v1/assistant_service_client.js +4 -4
- package/build/src/v1/cmek_config_service_client.js +9 -13
- package/build/src/v1/completion_service_client.js +10 -14
- package/build/src/v1/control_service_client.js +10 -10
- package/build/src/v1/conversational_search_service_client.js +21 -21
- package/build/src/v1/data_store_service_client.js +12 -16
- package/build/src/v1/document_service_client.js +15 -19
- package/build/src/v1/engine_service_client.js +12 -16
- package/build/src/v1/grounded_generation_service_client.js +6 -6
- package/build/src/v1/identity_mapping_store_service_client.js +16 -20
- package/build/src/v1/project_service_client.js +6 -10
- package/build/src/v1/rank_service_client.js +4 -4
- package/build/src/v1/recommendation_service_client.js +4 -4
- package/build/src/v1/schema_service_client.js +12 -16
- package/build/src/v1/search_service_client.d.ts +162 -24
- package/build/src/v1/search_service_client.js +123 -26
- package/build/src/v1/search_tuning_service_client.js +7 -11
- package/build/src/v1/serving_config_service_client.js +4 -4
- package/build/src/v1/session_service_client.js +10 -10
- package/build/src/v1/site_search_engine_service_client.js +24 -28
- package/build/src/v1/user_event_service_client.js +9 -13
- package/build/src/v1/user_license_service_client.js +9 -13
- package/build/src/v1alpha/acl_config_service_client.js +5 -5
- package/build/src/v1alpha/chunk_service_client.js +7 -7
- package/build/src/v1alpha/completion_service_client.js +8 -8
- package/build/src/v1alpha/control_service_client.js +10 -10
- package/build/src/v1alpha/conversational_search_service_client.js +20 -20
- package/build/src/v1alpha/data_store_service_client.js +12 -12
- package/build/src/v1alpha/document_service_client.js +14 -14
- package/build/src/v1alpha/engine_service_client.js +13 -13
- package/build/src/v1alpha/estimate_billing_service_client.js +4 -4
- package/build/src/v1alpha/evaluation_service_client.js +11 -11
- package/build/src/v1alpha/grounded_generation_service_client.js +4 -4
- package/build/src/v1alpha/project_service_client.js +6 -6
- package/build/src/v1alpha/rank_service_client.js +4 -4
- package/build/src/v1alpha/recommendation_service_client.js +4 -4
- package/build/src/v1alpha/sample_query_service_client.js +11 -11
- package/build/src/v1alpha/sample_query_set_service_client.js +10 -10
- package/build/src/v1alpha/schema_service_client.js +10 -10
- package/build/src/v1alpha/search_service_client.js +6 -6
- package/build/src/v1alpha/search_tuning_service_client.js +5 -5
- package/build/src/v1alpha/serving_config_service_client.js +8 -8
- package/build/src/v1alpha/session_service_client.js +13 -13
- package/build/src/v1alpha/site_search_engine_service_client.js +21 -21
- package/build/src/v1alpha/user_event_service_client.js +7 -7
- package/build/src/v1beta/acl_config_service_client.js +5 -5
- package/build/src/v1beta/assistant_service_client.js +11 -11
- package/build/src/v1beta/cmek_config_service_client.js +7 -7
- package/build/src/v1beta/completion_service_client.js +10 -10
- package/build/src/v1beta/control_service_client.js +10 -10
- package/build/src/v1beta/conversational_search_service_client.js +21 -21
- package/build/src/v1beta/data_store_service_client.js +10 -10
- package/build/src/v1beta/document_service_client.js +13 -13
- package/build/src/v1beta/engine_service_client.js +15 -15
- package/build/src/v1beta/evaluation_service_client.js +11 -11
- package/build/src/v1beta/grounded_generation_service_client.js +6 -6
- package/build/src/v1beta/identity_mapping_store_service_client.js +14 -14
- package/build/src/v1beta/license_config_service_client.js +11 -11
- package/build/src/v1beta/project_service_client.js +4 -4
- package/build/src/v1beta/rank_service_client.js +4 -4
- package/build/src/v1beta/recommendation_service_client.js +4 -4
- package/build/src/v1beta/sample_query_service_client.js +11 -11
- package/build/src/v1beta/sample_query_set_service_client.js +10 -10
- package/build/src/v1beta/schema_service_client.js +10 -10
- package/build/src/v1beta/search_service_client.js +9 -9
- package/build/src/v1beta/search_tuning_service_client.js +5 -5
- package/build/src/v1beta/serving_config_service_client.js +10 -10
- package/build/src/v1beta/session_service_client.js +10 -10
- package/build/src/v1beta/site_search_engine_service_client.js +22 -22
- package/build/src/v1beta/user_event_service_client.js +7 -7
- package/build/src/v1beta/user_license_service_client.js +8 -8
- package/build/src/v1beta/user_store_service_client.js +5 -5
- package/package.json +1 -1
|
@@ -253,7 +253,7 @@ class SearchServiceClient {
|
|
|
253
253
|
// and create an API call method for each.
|
|
254
254
|
const searchServiceStubMethods = ['search', 'searchLite'];
|
|
255
255
|
for (const methodName of searchServiceStubMethods) {
|
|
256
|
-
const callPromise = this.searchServiceStub.then(
|
|
256
|
+
const callPromise = this.searchServiceStub.then(stub => (...args) => {
|
|
257
257
|
if (this._terminated) {
|
|
258
258
|
return Promise.reject('The client has already been closed.');
|
|
259
259
|
}
|
|
@@ -315,7 +315,12 @@ class SearchServiceClient {
|
|
|
315
315
|
* @returns {string[]} List of default scopes.
|
|
316
316
|
*/
|
|
317
317
|
static get scopes() {
|
|
318
|
-
return [
|
|
318
|
+
return [
|
|
319
|
+
'https://www.googleapis.com/auth/cloud-platform',
|
|
320
|
+
'https://www.googleapis.com/auth/discoveryengine.assist.readwrite',
|
|
321
|
+
'https://www.googleapis.com/auth/discoveryengine.readwrite',
|
|
322
|
+
'https://www.googleapis.com/auth/discoveryengine.serving.readwrite',
|
|
323
|
+
];
|
|
319
324
|
}
|
|
320
325
|
/**
|
|
321
326
|
* Return the project ID used by this class.
|
|
@@ -345,7 +350,7 @@ class SearchServiceClient {
|
|
|
345
350
|
this._gaxModule.routingHeader.fromParams({
|
|
346
351
|
serving_config: request.servingConfig ?? '',
|
|
347
352
|
});
|
|
348
|
-
this.initialize().catch(
|
|
353
|
+
this.initialize().catch(err => {
|
|
349
354
|
throw err;
|
|
350
355
|
});
|
|
351
356
|
const wrappedCallback = callback
|
|
@@ -443,6 +448,11 @@ class SearchServiceClient {
|
|
|
443
448
|
* stores. For engines with a single data store, the specs directly under
|
|
444
449
|
* {@link protos.google.cloud.discoveryengine.v1.SearchRequest|SearchRequest} should be
|
|
445
450
|
* used.
|
|
451
|
+
* @param {number} [request.numResultsPerDataStore]
|
|
452
|
+
* Optional. The maximum number of results to retrieve from each data store.
|
|
453
|
+
* If not specified, it will use the
|
|
454
|
+
* {@link protos.google.cloud.discoveryengine.v1.SearchRequest.DataStoreSpec.num_results|SearchRequest.DataStoreSpec.num_results}
|
|
455
|
+
* if provided, otherwise there is no limit.
|
|
446
456
|
* @param {string} request.filter
|
|
447
457
|
* The filter syntax consists of an expression language for constructing a
|
|
448
458
|
* predicate from one or more fields of the documents being filtered. Filter
|
|
@@ -635,6 +645,15 @@ class SearchServiceClient {
|
|
|
635
645
|
* Google model to determine the keyword-based overlap between the query and
|
|
636
646
|
* the document.
|
|
637
647
|
* * `base_rank`: the default rank of the result
|
|
648
|
+
* * `media_actor_match`: whether the media actor matches the query
|
|
649
|
+
* * `media_director_match`: whether the media director matches the query
|
|
650
|
+
* * `media_genre_match`: whether the media genre matches the query
|
|
651
|
+
* * `media_language_match`: whether the media language matches the query
|
|
652
|
+
* * `media_title_match`: whether the media title matches the query
|
|
653
|
+
* * `media_prefix_similarity_rank`: prefix similarity rank for media
|
|
654
|
+
* results
|
|
655
|
+
* * `media_semantic_similarity_rank`: semantic similarity rank for media
|
|
656
|
+
* results
|
|
638
657
|
* @param {google.cloud.discoveryengine.v1.SearchRequest.RankingExpressionBackend} [request.rankingExpressionBackend]
|
|
639
658
|
* Optional. The backend to use for the ranking expression evaluation.
|
|
640
659
|
* @param {boolean} request.safeSearch
|
|
@@ -699,10 +718,6 @@ class SearchServiceClient {
|
|
|
699
718
|
* Call /answer API with the session ID generated in the first call.
|
|
700
719
|
* Here, the answer generation happens in the context of the search
|
|
701
720
|
* results from the first search call.
|
|
702
|
-
*
|
|
703
|
-
* Multi-turn Search feature is currently at private GA stage. Please use
|
|
704
|
-
* v1alpha or v1beta version instead before we launch this feature to public
|
|
705
|
-
* GA. Or ask for allowlisting through Google Support team.
|
|
706
721
|
* @param {google.cloud.discoveryengine.v1.SearchRequest.SessionSpec} request.sessionSpec
|
|
707
722
|
* Session specification.
|
|
708
723
|
*
|
|
@@ -728,6 +743,19 @@ class SearchServiceClient {
|
|
|
728
743
|
* This feature is currently supported only for custom and site search.
|
|
729
744
|
* @param {google.cloud.discoveryengine.v1.SearchRequest.RelevanceScoreSpec} [request.relevanceScoreSpec]
|
|
730
745
|
* Optional. The specification for returning the relevance score.
|
|
746
|
+
* @param {google.cloud.discoveryengine.v1.SearchRequest.SearchAddonSpec} [request.searchAddonSpec]
|
|
747
|
+
* Optional. SearchAddonSpec is used to disable add-ons for search as per new
|
|
748
|
+
* repricing model.
|
|
749
|
+
* This field is only supported for search requests.
|
|
750
|
+
* @param {google.cloud.discoveryengine.v1.SearchRequest.CustomRankingParams} [request.customRankingParams]
|
|
751
|
+
* Optional. Optional configuration for the Custom Ranking feature.
|
|
752
|
+
* @param {string} [request.entity]
|
|
753
|
+
* Optional. The entity for customers that may run multiple different
|
|
754
|
+
* entities, domains, sites or regions, for example, "Google US", "Google
|
|
755
|
+
* Ads", "Waymo", "google.com", "youtube.com", etc. If this is set, it should
|
|
756
|
+
* be exactly matched with
|
|
757
|
+
* {@link protos.google.cloud.discoveryengine.v1.UserEvent.entity|UserEvent.entity} to get
|
|
758
|
+
* search results boosted by entity.
|
|
731
759
|
* @param {object} [options]
|
|
732
760
|
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
733
761
|
* @returns {Stream}
|
|
@@ -750,7 +778,7 @@ class SearchServiceClient {
|
|
|
750
778
|
});
|
|
751
779
|
const defaultCallSettings = this._defaults['search'];
|
|
752
780
|
const callSettings = defaultCallSettings.merge(options);
|
|
753
|
-
this.initialize().catch(
|
|
781
|
+
this.initialize().catch(err => {
|
|
754
782
|
throw err;
|
|
755
783
|
});
|
|
756
784
|
this._log.info('search stream %j', request);
|
|
@@ -839,6 +867,11 @@ class SearchServiceClient {
|
|
|
839
867
|
* stores. For engines with a single data store, the specs directly under
|
|
840
868
|
* {@link protos.google.cloud.discoveryengine.v1.SearchRequest|SearchRequest} should be
|
|
841
869
|
* used.
|
|
870
|
+
* @param {number} [request.numResultsPerDataStore]
|
|
871
|
+
* Optional. The maximum number of results to retrieve from each data store.
|
|
872
|
+
* If not specified, it will use the
|
|
873
|
+
* {@link protos.google.cloud.discoveryengine.v1.SearchRequest.DataStoreSpec.num_results|SearchRequest.DataStoreSpec.num_results}
|
|
874
|
+
* if provided, otherwise there is no limit.
|
|
842
875
|
* @param {string} request.filter
|
|
843
876
|
* The filter syntax consists of an expression language for constructing a
|
|
844
877
|
* predicate from one or more fields of the documents being filtered. Filter
|
|
@@ -1031,6 +1064,15 @@ class SearchServiceClient {
|
|
|
1031
1064
|
* Google model to determine the keyword-based overlap between the query and
|
|
1032
1065
|
* the document.
|
|
1033
1066
|
* * `base_rank`: the default rank of the result
|
|
1067
|
+
* * `media_actor_match`: whether the media actor matches the query
|
|
1068
|
+
* * `media_director_match`: whether the media director matches the query
|
|
1069
|
+
* * `media_genre_match`: whether the media genre matches the query
|
|
1070
|
+
* * `media_language_match`: whether the media language matches the query
|
|
1071
|
+
* * `media_title_match`: whether the media title matches the query
|
|
1072
|
+
* * `media_prefix_similarity_rank`: prefix similarity rank for media
|
|
1073
|
+
* results
|
|
1074
|
+
* * `media_semantic_similarity_rank`: semantic similarity rank for media
|
|
1075
|
+
* results
|
|
1034
1076
|
* @param {google.cloud.discoveryengine.v1.SearchRequest.RankingExpressionBackend} [request.rankingExpressionBackend]
|
|
1035
1077
|
* Optional. The backend to use for the ranking expression evaluation.
|
|
1036
1078
|
* @param {boolean} request.safeSearch
|
|
@@ -1095,10 +1137,6 @@ class SearchServiceClient {
|
|
|
1095
1137
|
* Call /answer API with the session ID generated in the first call.
|
|
1096
1138
|
* Here, the answer generation happens in the context of the search
|
|
1097
1139
|
* results from the first search call.
|
|
1098
|
-
*
|
|
1099
|
-
* Multi-turn Search feature is currently at private GA stage. Please use
|
|
1100
|
-
* v1alpha or v1beta version instead before we launch this feature to public
|
|
1101
|
-
* GA. Or ask for allowlisting through Google Support team.
|
|
1102
1140
|
* @param {google.cloud.discoveryengine.v1.SearchRequest.SessionSpec} request.sessionSpec
|
|
1103
1141
|
* Session specification.
|
|
1104
1142
|
*
|
|
@@ -1124,6 +1162,19 @@ class SearchServiceClient {
|
|
|
1124
1162
|
* This feature is currently supported only for custom and site search.
|
|
1125
1163
|
* @param {google.cloud.discoveryengine.v1.SearchRequest.RelevanceScoreSpec} [request.relevanceScoreSpec]
|
|
1126
1164
|
* Optional. The specification for returning the relevance score.
|
|
1165
|
+
* @param {google.cloud.discoveryengine.v1.SearchRequest.SearchAddonSpec} [request.searchAddonSpec]
|
|
1166
|
+
* Optional. SearchAddonSpec is used to disable add-ons for search as per new
|
|
1167
|
+
* repricing model.
|
|
1168
|
+
* This field is only supported for search requests.
|
|
1169
|
+
* @param {google.cloud.discoveryengine.v1.SearchRequest.CustomRankingParams} [request.customRankingParams]
|
|
1170
|
+
* Optional. Optional configuration for the Custom Ranking feature.
|
|
1171
|
+
* @param {string} [request.entity]
|
|
1172
|
+
* Optional. The entity for customers that may run multiple different
|
|
1173
|
+
* entities, domains, sites or regions, for example, "Google US", "Google
|
|
1174
|
+
* Ads", "Waymo", "google.com", "youtube.com", etc. If this is set, it should
|
|
1175
|
+
* be exactly matched with
|
|
1176
|
+
* {@link protos.google.cloud.discoveryengine.v1.UserEvent.entity|UserEvent.entity} to get
|
|
1177
|
+
* search results boosted by entity.
|
|
1127
1178
|
* @param {object} [options]
|
|
1128
1179
|
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
1129
1180
|
* @returns {Object}
|
|
@@ -1147,7 +1198,7 @@ class SearchServiceClient {
|
|
|
1147
1198
|
});
|
|
1148
1199
|
const defaultCallSettings = this._defaults['search'];
|
|
1149
1200
|
const callSettings = defaultCallSettings.merge(options);
|
|
1150
|
-
this.initialize().catch(
|
|
1201
|
+
this.initialize().catch(err => {
|
|
1151
1202
|
throw err;
|
|
1152
1203
|
});
|
|
1153
1204
|
this._log.info('search iterate %j', request);
|
|
@@ -1170,7 +1221,7 @@ class SearchServiceClient {
|
|
|
1170
1221
|
this._gaxModule.routingHeader.fromParams({
|
|
1171
1222
|
serving_config: request.servingConfig ?? '',
|
|
1172
1223
|
});
|
|
1173
|
-
this.initialize().catch(
|
|
1224
|
+
this.initialize().catch(err => {
|
|
1174
1225
|
throw err;
|
|
1175
1226
|
});
|
|
1176
1227
|
const wrappedCallback = callback
|
|
@@ -1268,6 +1319,11 @@ class SearchServiceClient {
|
|
|
1268
1319
|
* stores. For engines with a single data store, the specs directly under
|
|
1269
1320
|
* {@link protos.google.cloud.discoveryengine.v1.SearchRequest|SearchRequest} should be
|
|
1270
1321
|
* used.
|
|
1322
|
+
* @param {number} [request.numResultsPerDataStore]
|
|
1323
|
+
* Optional. The maximum number of results to retrieve from each data store.
|
|
1324
|
+
* If not specified, it will use the
|
|
1325
|
+
* {@link protos.google.cloud.discoveryengine.v1.SearchRequest.DataStoreSpec.num_results|SearchRequest.DataStoreSpec.num_results}
|
|
1326
|
+
* if provided, otherwise there is no limit.
|
|
1271
1327
|
* @param {string} request.filter
|
|
1272
1328
|
* The filter syntax consists of an expression language for constructing a
|
|
1273
1329
|
* predicate from one or more fields of the documents being filtered. Filter
|
|
@@ -1460,6 +1516,15 @@ class SearchServiceClient {
|
|
|
1460
1516
|
* Google model to determine the keyword-based overlap between the query and
|
|
1461
1517
|
* the document.
|
|
1462
1518
|
* * `base_rank`: the default rank of the result
|
|
1519
|
+
* * `media_actor_match`: whether the media actor matches the query
|
|
1520
|
+
* * `media_director_match`: whether the media director matches the query
|
|
1521
|
+
* * `media_genre_match`: whether the media genre matches the query
|
|
1522
|
+
* * `media_language_match`: whether the media language matches the query
|
|
1523
|
+
* * `media_title_match`: whether the media title matches the query
|
|
1524
|
+
* * `media_prefix_similarity_rank`: prefix similarity rank for media
|
|
1525
|
+
* results
|
|
1526
|
+
* * `media_semantic_similarity_rank`: semantic similarity rank for media
|
|
1527
|
+
* results
|
|
1463
1528
|
* @param {google.cloud.discoveryengine.v1.SearchRequest.RankingExpressionBackend} [request.rankingExpressionBackend]
|
|
1464
1529
|
* Optional. The backend to use for the ranking expression evaluation.
|
|
1465
1530
|
* @param {boolean} request.safeSearch
|
|
@@ -1524,10 +1589,6 @@ class SearchServiceClient {
|
|
|
1524
1589
|
* Call /answer API with the session ID generated in the first call.
|
|
1525
1590
|
* Here, the answer generation happens in the context of the search
|
|
1526
1591
|
* results from the first search call.
|
|
1527
|
-
*
|
|
1528
|
-
* Multi-turn Search feature is currently at private GA stage. Please use
|
|
1529
|
-
* v1alpha or v1beta version instead before we launch this feature to public
|
|
1530
|
-
* GA. Or ask for allowlisting through Google Support team.
|
|
1531
1592
|
* @param {google.cloud.discoveryengine.v1.SearchRequest.SessionSpec} request.sessionSpec
|
|
1532
1593
|
* Session specification.
|
|
1533
1594
|
*
|
|
@@ -1553,6 +1614,19 @@ class SearchServiceClient {
|
|
|
1553
1614
|
* This feature is currently supported only for custom and site search.
|
|
1554
1615
|
* @param {google.cloud.discoveryengine.v1.SearchRequest.RelevanceScoreSpec} [request.relevanceScoreSpec]
|
|
1555
1616
|
* Optional. The specification for returning the relevance score.
|
|
1617
|
+
* @param {google.cloud.discoveryengine.v1.SearchRequest.SearchAddonSpec} [request.searchAddonSpec]
|
|
1618
|
+
* Optional. SearchAddonSpec is used to disable add-ons for search as per new
|
|
1619
|
+
* repricing model.
|
|
1620
|
+
* This field is only supported for search requests.
|
|
1621
|
+
* @param {google.cloud.discoveryengine.v1.SearchRequest.CustomRankingParams} [request.customRankingParams]
|
|
1622
|
+
* Optional. Optional configuration for the Custom Ranking feature.
|
|
1623
|
+
* @param {string} [request.entity]
|
|
1624
|
+
* Optional. The entity for customers that may run multiple different
|
|
1625
|
+
* entities, domains, sites or regions, for example, "Google US", "Google
|
|
1626
|
+
* Ads", "Waymo", "google.com", "youtube.com", etc. If this is set, it should
|
|
1627
|
+
* be exactly matched with
|
|
1628
|
+
* {@link protos.google.cloud.discoveryengine.v1.UserEvent.entity|UserEvent.entity} to get
|
|
1629
|
+
* search results boosted by entity.
|
|
1556
1630
|
* @param {object} [options]
|
|
1557
1631
|
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
1558
1632
|
* @returns {Stream}
|
|
@@ -1575,7 +1649,7 @@ class SearchServiceClient {
|
|
|
1575
1649
|
});
|
|
1576
1650
|
const defaultCallSettings = this._defaults['searchLite'];
|
|
1577
1651
|
const callSettings = defaultCallSettings.merge(options);
|
|
1578
|
-
this.initialize().catch(
|
|
1652
|
+
this.initialize().catch(err => {
|
|
1579
1653
|
throw err;
|
|
1580
1654
|
});
|
|
1581
1655
|
this._log.info('searchLite stream %j', request);
|
|
@@ -1664,6 +1738,11 @@ class SearchServiceClient {
|
|
|
1664
1738
|
* stores. For engines with a single data store, the specs directly under
|
|
1665
1739
|
* {@link protos.google.cloud.discoveryengine.v1.SearchRequest|SearchRequest} should be
|
|
1666
1740
|
* used.
|
|
1741
|
+
* @param {number} [request.numResultsPerDataStore]
|
|
1742
|
+
* Optional. The maximum number of results to retrieve from each data store.
|
|
1743
|
+
* If not specified, it will use the
|
|
1744
|
+
* {@link protos.google.cloud.discoveryengine.v1.SearchRequest.DataStoreSpec.num_results|SearchRequest.DataStoreSpec.num_results}
|
|
1745
|
+
* if provided, otherwise there is no limit.
|
|
1667
1746
|
* @param {string} request.filter
|
|
1668
1747
|
* The filter syntax consists of an expression language for constructing a
|
|
1669
1748
|
* predicate from one or more fields of the documents being filtered. Filter
|
|
@@ -1856,6 +1935,15 @@ class SearchServiceClient {
|
|
|
1856
1935
|
* Google model to determine the keyword-based overlap between the query and
|
|
1857
1936
|
* the document.
|
|
1858
1937
|
* * `base_rank`: the default rank of the result
|
|
1938
|
+
* * `media_actor_match`: whether the media actor matches the query
|
|
1939
|
+
* * `media_director_match`: whether the media director matches the query
|
|
1940
|
+
* * `media_genre_match`: whether the media genre matches the query
|
|
1941
|
+
* * `media_language_match`: whether the media language matches the query
|
|
1942
|
+
* * `media_title_match`: whether the media title matches the query
|
|
1943
|
+
* * `media_prefix_similarity_rank`: prefix similarity rank for media
|
|
1944
|
+
* results
|
|
1945
|
+
* * `media_semantic_similarity_rank`: semantic similarity rank for media
|
|
1946
|
+
* results
|
|
1859
1947
|
* @param {google.cloud.discoveryengine.v1.SearchRequest.RankingExpressionBackend} [request.rankingExpressionBackend]
|
|
1860
1948
|
* Optional. The backend to use for the ranking expression evaluation.
|
|
1861
1949
|
* @param {boolean} request.safeSearch
|
|
@@ -1920,10 +2008,6 @@ class SearchServiceClient {
|
|
|
1920
2008
|
* Call /answer API with the session ID generated in the first call.
|
|
1921
2009
|
* Here, the answer generation happens in the context of the search
|
|
1922
2010
|
* results from the first search call.
|
|
1923
|
-
*
|
|
1924
|
-
* Multi-turn Search feature is currently at private GA stage. Please use
|
|
1925
|
-
* v1alpha or v1beta version instead before we launch this feature to public
|
|
1926
|
-
* GA. Or ask for allowlisting through Google Support team.
|
|
1927
2011
|
* @param {google.cloud.discoveryengine.v1.SearchRequest.SessionSpec} request.sessionSpec
|
|
1928
2012
|
* Session specification.
|
|
1929
2013
|
*
|
|
@@ -1949,6 +2033,19 @@ class SearchServiceClient {
|
|
|
1949
2033
|
* This feature is currently supported only for custom and site search.
|
|
1950
2034
|
* @param {google.cloud.discoveryengine.v1.SearchRequest.RelevanceScoreSpec} [request.relevanceScoreSpec]
|
|
1951
2035
|
* Optional. The specification for returning the relevance score.
|
|
2036
|
+
* @param {google.cloud.discoveryengine.v1.SearchRequest.SearchAddonSpec} [request.searchAddonSpec]
|
|
2037
|
+
* Optional. SearchAddonSpec is used to disable add-ons for search as per new
|
|
2038
|
+
* repricing model.
|
|
2039
|
+
* This field is only supported for search requests.
|
|
2040
|
+
* @param {google.cloud.discoveryengine.v1.SearchRequest.CustomRankingParams} [request.customRankingParams]
|
|
2041
|
+
* Optional. Optional configuration for the Custom Ranking feature.
|
|
2042
|
+
* @param {string} [request.entity]
|
|
2043
|
+
* Optional. The entity for customers that may run multiple different
|
|
2044
|
+
* entities, domains, sites or regions, for example, "Google US", "Google
|
|
2045
|
+
* Ads", "Waymo", "google.com", "youtube.com", etc. If this is set, it should
|
|
2046
|
+
* be exactly matched with
|
|
2047
|
+
* {@link protos.google.cloud.discoveryengine.v1.UserEvent.entity|UserEvent.entity} to get
|
|
2048
|
+
* search results boosted by entity.
|
|
1952
2049
|
* @param {object} [options]
|
|
1953
2050
|
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
1954
2051
|
* @returns {Object}
|
|
@@ -1972,7 +2069,7 @@ class SearchServiceClient {
|
|
|
1972
2069
|
});
|
|
1973
2070
|
const defaultCallSettings = this._defaults['searchLite'];
|
|
1974
2071
|
const callSettings = defaultCallSettings.merge(options);
|
|
1975
|
-
this.initialize().catch(
|
|
2072
|
+
this.initialize().catch(err => {
|
|
1976
2073
|
throw err;
|
|
1977
2074
|
});
|
|
1978
2075
|
this._log.info('searchLite iterate %j', request);
|
|
@@ -4676,11 +4773,11 @@ class SearchServiceClient {
|
|
|
4676
4773
|
*/
|
|
4677
4774
|
close() {
|
|
4678
4775
|
if (this.searchServiceStub && !this._terminated) {
|
|
4679
|
-
return this.searchServiceStub.then(
|
|
4776
|
+
return this.searchServiceStub.then(stub => {
|
|
4680
4777
|
this._log.info('ending gRPC channel');
|
|
4681
4778
|
this._terminated = true;
|
|
4682
4779
|
stub.close();
|
|
4683
|
-
this.locationsClient.close().catch(
|
|
4780
|
+
this.locationsClient.close().catch(err => {
|
|
4684
4781
|
throw err;
|
|
4685
4782
|
});
|
|
4686
4783
|
});
|
|
@@ -315,18 +315,14 @@ class SearchTuningServiceClient {
|
|
|
315
315
|
{
|
|
316
316
|
get: '/v1/{name=projects/*/locations/*/collections/*/engines/*}/operations',
|
|
317
317
|
},
|
|
318
|
-
{
|
|
319
|
-
get: '/v1/{name=projects/*/locations/*/collections/*}/operations',
|
|
320
|
-
},
|
|
318
|
+
{ get: '/v1/{name=projects/*/locations/*/collections/*}/operations' },
|
|
321
319
|
{
|
|
322
320
|
get: '/v1/{name=projects/*/locations/*/dataStores/*/branches/*}/operations',
|
|
323
321
|
},
|
|
324
322
|
{
|
|
325
323
|
get: '/v1/{name=projects/*/locations/*/dataStores/*/models/*}/operations',
|
|
326
324
|
},
|
|
327
|
-
{
|
|
328
|
-
get: '/v1/{name=projects/*/locations/*/dataStores/*}/operations',
|
|
329
|
-
},
|
|
325
|
+
{ get: '/v1/{name=projects/*/locations/*/dataStores/*}/operations' },
|
|
330
326
|
{
|
|
331
327
|
get: '/v1/{name=projects/*/locations/*/identityMappingStores/*}/operations',
|
|
332
328
|
},
|
|
@@ -383,7 +379,7 @@ class SearchTuningServiceClient {
|
|
|
383
379
|
'listCustomModels',
|
|
384
380
|
];
|
|
385
381
|
for (const methodName of searchTuningServiceStubMethods) {
|
|
386
|
-
const callPromise = this.searchTuningServiceStub.then(
|
|
382
|
+
const callPromise = this.searchTuningServiceStub.then(stub => (...args) => {
|
|
387
383
|
if (this._terminated) {
|
|
388
384
|
return Promise.reject('The client has already been closed.');
|
|
389
385
|
}
|
|
@@ -475,7 +471,7 @@ class SearchTuningServiceClient {
|
|
|
475
471
|
this._gaxModule.routingHeader.fromParams({
|
|
476
472
|
data_store: request.dataStore ?? '',
|
|
477
473
|
});
|
|
478
|
-
this.initialize().catch(
|
|
474
|
+
this.initialize().catch(err => {
|
|
479
475
|
throw err;
|
|
480
476
|
});
|
|
481
477
|
this._log.info('listCustomModels request %j', request);
|
|
@@ -518,7 +514,7 @@ class SearchTuningServiceClient {
|
|
|
518
514
|
this._gaxModule.routingHeader.fromParams({
|
|
519
515
|
data_store: request.dataStore ?? '',
|
|
520
516
|
});
|
|
521
|
-
this.initialize().catch(
|
|
517
|
+
this.initialize().catch(err => {
|
|
522
518
|
throw err;
|
|
523
519
|
});
|
|
524
520
|
const wrappedCallback = callback
|
|
@@ -3305,11 +3301,11 @@ class SearchTuningServiceClient {
|
|
|
3305
3301
|
*/
|
|
3306
3302
|
close() {
|
|
3307
3303
|
if (this.searchTuningServiceStub && !this._terminated) {
|
|
3308
|
-
return this.searchTuningServiceStub.then(
|
|
3304
|
+
return this.searchTuningServiceStub.then(stub => {
|
|
3309
3305
|
this._log.info('ending gRPC channel');
|
|
3310
3306
|
this._terminated = true;
|
|
3311
3307
|
stub.close();
|
|
3312
|
-
this.locationsClient.close().catch(
|
|
3308
|
+
this.locationsClient.close().catch(err => {
|
|
3313
3309
|
throw err;
|
|
3314
3310
|
});
|
|
3315
3311
|
void this.operationsClient.close();
|
|
@@ -246,7 +246,7 @@ class ServingConfigServiceClient {
|
|
|
246
246
|
// and create an API call method for each.
|
|
247
247
|
const servingConfigServiceStubMethods = ['updateServingConfig'];
|
|
248
248
|
for (const methodName of servingConfigServiceStubMethods) {
|
|
249
|
-
const callPromise = this.servingConfigServiceStub.then(
|
|
249
|
+
const callPromise = this.servingConfigServiceStub.then(stub => (...args) => {
|
|
250
250
|
if (this._terminated) {
|
|
251
251
|
return Promise.reject('The client has already been closed.');
|
|
252
252
|
}
|
|
@@ -338,7 +338,7 @@ class ServingConfigServiceClient {
|
|
|
338
338
|
this._gaxModule.routingHeader.fromParams({
|
|
339
339
|
'serving_config.name': request.servingConfig.name ?? '',
|
|
340
340
|
});
|
|
341
|
-
this.initialize().catch(
|
|
341
|
+
this.initialize().catch(err => {
|
|
342
342
|
throw err;
|
|
343
343
|
});
|
|
344
344
|
this._log.info('updateServingConfig request %j', request);
|
|
@@ -2936,11 +2936,11 @@ class ServingConfigServiceClient {
|
|
|
2936
2936
|
*/
|
|
2937
2937
|
close() {
|
|
2938
2938
|
if (this.servingConfigServiceStub && !this._terminated) {
|
|
2939
|
-
return this.servingConfigServiceStub.then(
|
|
2939
|
+
return this.servingConfigServiceStub.then(stub => {
|
|
2940
2940
|
this._log.info('ending gRPC channel');
|
|
2941
2941
|
this._terminated = true;
|
|
2942
2942
|
stub.close();
|
|
2943
|
-
this.locationsClient.close().catch(
|
|
2943
|
+
this.locationsClient.close().catch(err => {
|
|
2944
2944
|
throw err;
|
|
2945
2945
|
});
|
|
2946
2946
|
});
|
|
@@ -256,7 +256,7 @@ class SessionServiceClient {
|
|
|
256
256
|
'listSessions',
|
|
257
257
|
];
|
|
258
258
|
for (const methodName of sessionServiceStubMethods) {
|
|
259
|
-
const callPromise = this.sessionServiceStub.then(
|
|
259
|
+
const callPromise = this.sessionServiceStub.then(stub => (...args) => {
|
|
260
260
|
if (this._terminated) {
|
|
261
261
|
return Promise.reject('The client has already been closed.');
|
|
262
262
|
}
|
|
@@ -348,7 +348,7 @@ class SessionServiceClient {
|
|
|
348
348
|
this._gaxModule.routingHeader.fromParams({
|
|
349
349
|
parent: request.parent ?? '',
|
|
350
350
|
});
|
|
351
|
-
this.initialize().catch(
|
|
351
|
+
this.initialize().catch(err => {
|
|
352
352
|
throw err;
|
|
353
353
|
});
|
|
354
354
|
this._log.info('createSession request %j', request);
|
|
@@ -391,7 +391,7 @@ class SessionServiceClient {
|
|
|
391
391
|
this._gaxModule.routingHeader.fromParams({
|
|
392
392
|
name: request.name ?? '',
|
|
393
393
|
});
|
|
394
|
-
this.initialize().catch(
|
|
394
|
+
this.initialize().catch(err => {
|
|
395
395
|
throw err;
|
|
396
396
|
});
|
|
397
397
|
this._log.info('deleteSession request %j', request);
|
|
@@ -434,7 +434,7 @@ class SessionServiceClient {
|
|
|
434
434
|
this._gaxModule.routingHeader.fromParams({
|
|
435
435
|
'session.name': request.session.name ?? '',
|
|
436
436
|
});
|
|
437
|
-
this.initialize().catch(
|
|
437
|
+
this.initialize().catch(err => {
|
|
438
438
|
throw err;
|
|
439
439
|
});
|
|
440
440
|
this._log.info('updateSession request %j', request);
|
|
@@ -477,7 +477,7 @@ class SessionServiceClient {
|
|
|
477
477
|
this._gaxModule.routingHeader.fromParams({
|
|
478
478
|
name: request.name ?? '',
|
|
479
479
|
});
|
|
480
|
-
this.initialize().catch(
|
|
480
|
+
this.initialize().catch(err => {
|
|
481
481
|
throw err;
|
|
482
482
|
});
|
|
483
483
|
this._log.info('getSession request %j', request);
|
|
@@ -520,7 +520,7 @@ class SessionServiceClient {
|
|
|
520
520
|
this._gaxModule.routingHeader.fromParams({
|
|
521
521
|
parent: request.parent ?? '',
|
|
522
522
|
});
|
|
523
|
-
this.initialize().catch(
|
|
523
|
+
this.initialize().catch(err => {
|
|
524
524
|
throw err;
|
|
525
525
|
});
|
|
526
526
|
const wrappedCallback = callback
|
|
@@ -606,7 +606,7 @@ class SessionServiceClient {
|
|
|
606
606
|
});
|
|
607
607
|
const defaultCallSettings = this._defaults['listSessions'];
|
|
608
608
|
const callSettings = defaultCallSettings.merge(options);
|
|
609
|
-
this.initialize().catch(
|
|
609
|
+
this.initialize().catch(err => {
|
|
610
610
|
throw err;
|
|
611
611
|
});
|
|
612
612
|
this._log.info('listSessions stream %j', request);
|
|
@@ -684,7 +684,7 @@ class SessionServiceClient {
|
|
|
684
684
|
});
|
|
685
685
|
const defaultCallSettings = this._defaults['listSessions'];
|
|
686
686
|
const callSettings = defaultCallSettings.merge(options);
|
|
687
|
-
this.initialize().catch(
|
|
687
|
+
this.initialize().catch(err => {
|
|
688
688
|
throw err;
|
|
689
689
|
});
|
|
690
690
|
this._log.info('listSessions iterate %j', request);
|
|
@@ -3262,11 +3262,11 @@ class SessionServiceClient {
|
|
|
3262
3262
|
*/
|
|
3263
3263
|
close() {
|
|
3264
3264
|
if (this.sessionServiceStub && !this._terminated) {
|
|
3265
|
-
return this.sessionServiceStub.then(
|
|
3265
|
+
return this.sessionServiceStub.then(stub => {
|
|
3266
3266
|
this._log.info('ending gRPC channel');
|
|
3267
3267
|
this._terminated = true;
|
|
3268
3268
|
stub.close();
|
|
3269
|
-
this.locationsClient.close().catch(
|
|
3269
|
+
this.locationsClient.close().catch(err => {
|
|
3270
3270
|
throw err;
|
|
3271
3271
|
});
|
|
3272
3272
|
});
|