@google-cloud/discoveryengine 1.11.0 → 1.13.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/README.md +7 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/answer.proto +55 -2
- package/build/protos/google/cloud/discoveryengine/v1alpha/chunk.proto +1 -1
- package/build/protos/google/cloud/discoveryengine/v1alpha/completion.proto +31 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/completion_service.proto +38 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/conversational_search_service.proto +28 -9
- package/build/protos/google/cloud/discoveryengine/v1alpha/custom_tuning_model.proto +7 -1
- package/build/protos/google/cloud/discoveryengine/v1alpha/data_store.proto +23 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/data_store_service.proto +11 -1
- package/build/protos/google/cloud/discoveryengine/v1alpha/document.proto +4 -1
- package/build/protos/google/cloud/discoveryengine/v1alpha/document_processing_config.proto +6 -2
- package/build/protos/google/cloud/discoveryengine/v1alpha/document_service.proto +1 -1
- package/build/protos/google/cloud/discoveryengine/v1alpha/import_config.proto +114 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/purge_config.proto +57 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/schema.proto +5 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/search_service.proto +407 -11
- package/build/protos/google/cloud/discoveryengine/v1alpha/serving_config.proto +14 -5
- package/build/protos/google/cloud/discoveryengine/v1alpha/site_search_engine_service.proto +126 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/user_event_service.proto +3 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/answer.proto +14 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/completion.proto +31 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/completion_service.proto +38 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/conversational_search_service.proto +19 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/custom_tuning_model.proto +7 -1
- package/build/protos/google/cloud/discoveryengine/v1beta/data_store.proto +23 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/data_store_service.proto +10 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/import_config.proto +108 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/purge_config.proto +111 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/search_service.proto +303 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/user_event_service.proto +24 -0
- package/build/protos/protos.d.ts +22409 -16038
- package/build/protos/protos.js +38744 -22699
- package/build/protos/protos.json +1506 -49
- package/build/src/v1alpha/completion_service_client.d.ts +91 -0
- package/build/src/v1alpha/completion_service_client.js +90 -0
- package/build/src/v1alpha/completion_service_client_config.json +10 -0
- package/build/src/v1alpha/conversational_search_service_client.d.ts +18 -0
- package/build/src/v1alpha/data_store_service_client.d.ts +12 -3
- package/build/src/v1alpha/data_store_service_client.js +8 -2
- package/build/src/v1alpha/document_service_client.d.ts +4 -0
- package/build/src/v1alpha/document_service_client.js +6 -0
- package/build/src/v1alpha/engine_service_client.js +6 -0
- package/build/src/v1alpha/estimate_billing_service_client.js +6 -0
- package/build/src/v1alpha/evaluation_service_client.js +6 -0
- package/build/src/v1alpha/project_service_client.js +6 -0
- package/build/src/v1alpha/sample_query_service_client.js +6 -0
- package/build/src/v1alpha/schema_service_client.js +6 -0
- package/build/src/v1alpha/search_service_client.d.ts +219 -21
- package/build/src/v1alpha/search_service_client.js +146 -14
- package/build/src/v1alpha/search_tuning_service_client.js +6 -0
- package/build/src/v1alpha/site_search_engine_service_client.d.ts +101 -0
- package/build/src/v1alpha/site_search_engine_service_client.js +70 -0
- package/build/src/v1alpha/site_search_engine_service_client_config.json +8 -0
- package/build/src/v1alpha/user_event_service_client.js +6 -0
- package/build/src/v1beta/completion_service_client.d.ts +91 -0
- package/build/src/v1beta/completion_service_client.js +84 -0
- package/build/src/v1beta/completion_service_client_config.json +10 -0
- package/build/src/v1beta/conversational_search_service_client.d.ts +18 -0
- package/build/src/v1beta/data_store_service_client.d.ts +9 -0
- package/build/src/v1beta/document_service_client.d.ts +2 -0
- package/build/src/v1beta/search_service_client.d.ts +147 -0
- package/build/src/v1beta/search_service_client.js +98 -0
- package/build/src/v1beta/user_event_service_client.d.ts +75 -0
- package/build/src/v1beta/user_event_service_client.js +42 -0
- package/build/src/v1beta/user_event_service_client_config.json +5 -0
- package/package.json +2 -2
@@ -206,15 +206,29 @@ export declare class SearchServiceClient {
|
|
206
206
|
* object. Leave it unset if ordered by relevance. `order_by` expression is
|
207
207
|
* case-sensitive.
|
208
208
|
*
|
209
|
-
* For more information on ordering
|
210
|
-
* [
|
211
|
-
*
|
209
|
+
* For more information on ordering the website search results, see
|
210
|
+
* [Order web search
|
211
|
+
* results](https://cloud.google.com/generative-ai-app-builder/docs/order-web-search-results).
|
212
|
+
* For more information on ordering the healthcare search results, see
|
213
|
+
* [Order healthcare search
|
214
|
+
* results](https://cloud.google.com/generative-ai-app-builder/docs/order-hc-results).
|
212
215
|
* If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
|
213
216
|
* @param {google.cloud.discoveryengine.v1alpha.UserInfo} request.userInfo
|
214
217
|
* Information about the end user.
|
215
218
|
* Highly recommended for analytics.
|
216
219
|
* {@link protos.google.cloud.discoveryengine.v1alpha.UserInfo.user_agent|UserInfo.user_agent}
|
217
220
|
* is used to deduce `device_type` for analytics.
|
221
|
+
* @param {string} request.languageCode
|
222
|
+
* The BCP-47 language code, such as "en-US" or "sr-Latn". For more
|
223
|
+
* information, see [Standard
|
224
|
+
* fields](https://cloud.google.com/apis/design/standard_fields). This field
|
225
|
+
* helps to better interpret the query. If a value isn't specified, the query
|
226
|
+
* language code is automatically detected, which may not be accurate.
|
227
|
+
* @param {string} request.regionCode
|
228
|
+
* The Unicode country/region code (CLDR) of a location, such as "US" and
|
229
|
+
* "419". For more information, see [Standard
|
230
|
+
* fields](https://cloud.google.com/apis/design/standard_fields). If set,
|
231
|
+
* then results will be boosted based on the region_code provided.
|
218
232
|
* @param {number[]} request.facetSpecs
|
219
233
|
* Facet specifications for faceted search. If empty, no facets are returned.
|
220
234
|
*
|
@@ -279,20 +293,26 @@ export declare class SearchServiceClient {
|
|
279
293
|
* documents. This overrides
|
280
294
|
* {@link protos.google.cloud.discoveryengine.v1alpha.ServingConfig.ranking_expression|ServingConfig.ranking_expression}.
|
281
295
|
* The ranking expression is a single function or multiple functions that are
|
282
|
-
*
|
296
|
+
* joined by "+".
|
297
|
+
*
|
283
298
|
* * ranking_expression = function, { " + ", function };
|
299
|
+
*
|
284
300
|
* Supported functions:
|
301
|
+
*
|
285
302
|
* * double * relevance_score
|
286
303
|
* * double * dotProduct(embedding_field_path)
|
304
|
+
*
|
287
305
|
* Function variables:
|
288
|
-
*
|
306
|
+
*
|
307
|
+
* * `relevance_score`: pre-defined keywords, used for measure relevance
|
289
308
|
* between query and document.
|
290
|
-
* `embedding_field_path`: the document embedding field
|
309
|
+
* * `embedding_field_path`: the document embedding field
|
291
310
|
* used with query embedding vector.
|
292
|
-
* `dotProduct`: embedding function between embedding_field_path and query
|
311
|
+
* * `dotProduct`: embedding function between embedding_field_path and query
|
293
312
|
* embedding vector.
|
294
313
|
*
|
295
314
|
* Example ranking expression:
|
315
|
+
*
|
296
316
|
* If document has an embedding field doc_embedding, the ranking expression
|
297
317
|
* could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`.
|
298
318
|
* @param {boolean} request.safeSearch
|
@@ -316,8 +336,54 @@ export declare class SearchServiceClient {
|
|
316
336
|
* See [Google Cloud
|
317
337
|
* Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
|
318
338
|
* for more details.
|
339
|
+
* @param {google.cloud.discoveryengine.v1alpha.SearchRequest.NaturalLanguageQueryUnderstandingSpec} request.naturalLanguageQueryUnderstandingSpec
|
340
|
+
* If `naturalLanguageQueryUnderstandingSpec` is not specified, no additional
|
341
|
+
* natural language query understanding will be done.
|
342
|
+
* @param {google.cloud.discoveryengine.v1alpha.SearchRequest.SearchAsYouTypeSpec} request.searchAsYouTypeSpec
|
343
|
+
* Search as you type configuration. Only supported for the
|
344
|
+
* {@link protos.google.cloud.discoveryengine.v1alpha.IndustryVertical.MEDIA|IndustryVertical.MEDIA}
|
345
|
+
* vertical.
|
319
346
|
* @param {google.cloud.discoveryengine.v1alpha.CustomFineTuningSpec} request.customFineTuningSpec
|
320
347
|
* Custom fine tuning configs.
|
348
|
+
* If set, it has higher priority than the configs set in
|
349
|
+
* {@link protos.google.cloud.discoveryengine.v1alpha.ServingConfig.custom_fine_tuning_spec|ServingConfig.custom_fine_tuning_spec}.
|
350
|
+
* @param {string} request.session
|
351
|
+
* The session resource name. Optional.
|
352
|
+
*
|
353
|
+
* Session allows users to do multi-turn /search API calls or coordination
|
354
|
+
* between /search API calls and /answer API calls.
|
355
|
+
*
|
356
|
+
* Example #1 (multi-turn /search API calls):
|
357
|
+
* 1. Call /search API with the auto-session mode (see below).
|
358
|
+
* 2. Call /search API with the session ID generated in the first call.
|
359
|
+
* Here, the previous search query gets considered in query
|
360
|
+
* standing. I.e., if the first query is "How did Alphabet do in 2022?"
|
361
|
+
* and the current query is "How about 2023?", the current query will
|
362
|
+
* be interpreted as "How did Alphabet do in 2023?".
|
363
|
+
*
|
364
|
+
* Example #2 (coordination between /search API calls and /answer API calls):
|
365
|
+
* 1. Call /search API with the auto-session mode (see below).
|
366
|
+
* 2. Call /answer API with the session ID generated in the first call.
|
367
|
+
* Here, the answer generation happens in the context of the search
|
368
|
+
* results from the first search call.
|
369
|
+
*
|
370
|
+
* Auto-session mode: when `projects/.../sessions/-` is used, a new session
|
371
|
+
* gets automatically created. Otherwise, users can use the create-session API
|
372
|
+
* to create a session manually.
|
373
|
+
*
|
374
|
+
* Multi-turn Search feature is currently at private GA stage. Please use
|
375
|
+
* v1alpha or v1beta version instead before we launch this feature to public
|
376
|
+
* GA. Or ask for allowlisting through Google Support team.
|
377
|
+
* @param {google.cloud.discoveryengine.v1alpha.SearchRequest.SessionSpec} request.sessionSpec
|
378
|
+
* Session specification.
|
379
|
+
*
|
380
|
+
* Can be used only when `session` is set.
|
381
|
+
* @param {google.cloud.discoveryengine.v1alpha.SearchRequest.RelevanceThreshold} request.relevanceThreshold
|
382
|
+
* The relevance threshold of the search results.
|
383
|
+
*
|
384
|
+
* Default to Google defined threshold, leveraging a balance of
|
385
|
+
* precision and recall to deliver both highly accurate results and
|
386
|
+
* comprehensive coverage of relevant information.
|
321
387
|
* @param {object} [options]
|
322
388
|
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
323
389
|
* @returns {Promise} - The promise which resolves to an array.
|
@@ -427,15 +493,29 @@ export declare class SearchServiceClient {
|
|
427
493
|
* object. Leave it unset if ordered by relevance. `order_by` expression is
|
428
494
|
* case-sensitive.
|
429
495
|
*
|
430
|
-
* For more information on ordering
|
431
|
-
* [
|
432
|
-
*
|
496
|
+
* For more information on ordering the website search results, see
|
497
|
+
* [Order web search
|
498
|
+
* results](https://cloud.google.com/generative-ai-app-builder/docs/order-web-search-results).
|
499
|
+
* For more information on ordering the healthcare search results, see
|
500
|
+
* [Order healthcare search
|
501
|
+
* results](https://cloud.google.com/generative-ai-app-builder/docs/order-hc-results).
|
433
502
|
* If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
|
434
503
|
* @param {google.cloud.discoveryengine.v1alpha.UserInfo} request.userInfo
|
435
504
|
* Information about the end user.
|
436
505
|
* Highly recommended for analytics.
|
437
506
|
* {@link protos.google.cloud.discoveryengine.v1alpha.UserInfo.user_agent|UserInfo.user_agent}
|
438
507
|
* is used to deduce `device_type` for analytics.
|
508
|
+
* @param {string} request.languageCode
|
509
|
+
* The BCP-47 language code, such as "en-US" or "sr-Latn". For more
|
510
|
+
* information, see [Standard
|
511
|
+
* fields](https://cloud.google.com/apis/design/standard_fields). This field
|
512
|
+
* helps to better interpret the query. If a value isn't specified, the query
|
513
|
+
* language code is automatically detected, which may not be accurate.
|
514
|
+
* @param {string} request.regionCode
|
515
|
+
* The Unicode country/region code (CLDR) of a location, such as "US" and
|
516
|
+
* "419". For more information, see [Standard
|
517
|
+
* fields](https://cloud.google.com/apis/design/standard_fields). If set,
|
518
|
+
* then results will be boosted based on the region_code provided.
|
439
519
|
* @param {number[]} request.facetSpecs
|
440
520
|
* Facet specifications for faceted search. If empty, no facets are returned.
|
441
521
|
*
|
@@ -500,20 +580,26 @@ export declare class SearchServiceClient {
|
|
500
580
|
* documents. This overrides
|
501
581
|
* {@link protos.google.cloud.discoveryengine.v1alpha.ServingConfig.ranking_expression|ServingConfig.ranking_expression}.
|
502
582
|
* The ranking expression is a single function or multiple functions that are
|
503
|
-
*
|
583
|
+
* joined by "+".
|
584
|
+
*
|
504
585
|
* * ranking_expression = function, { " + ", function };
|
586
|
+
*
|
505
587
|
* Supported functions:
|
588
|
+
*
|
506
589
|
* * double * relevance_score
|
507
590
|
* * double * dotProduct(embedding_field_path)
|
591
|
+
*
|
508
592
|
* Function variables:
|
509
|
-
*
|
593
|
+
*
|
594
|
+
* * `relevance_score`: pre-defined keywords, used for measure relevance
|
510
595
|
* between query and document.
|
511
|
-
* `embedding_field_path`: the document embedding field
|
596
|
+
* * `embedding_field_path`: the document embedding field
|
512
597
|
* used with query embedding vector.
|
513
|
-
* `dotProduct`: embedding function between embedding_field_path and query
|
598
|
+
* * `dotProduct`: embedding function between embedding_field_path and query
|
514
599
|
* embedding vector.
|
515
600
|
*
|
516
601
|
* Example ranking expression:
|
602
|
+
*
|
517
603
|
* If document has an embedding field doc_embedding, the ranking expression
|
518
604
|
* could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`.
|
519
605
|
* @param {boolean} request.safeSearch
|
@@ -537,8 +623,54 @@ export declare class SearchServiceClient {
|
|
537
623
|
* See [Google Cloud
|
538
624
|
* Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
|
539
625
|
* for more details.
|
626
|
+
* @param {google.cloud.discoveryengine.v1alpha.SearchRequest.NaturalLanguageQueryUnderstandingSpec} request.naturalLanguageQueryUnderstandingSpec
|
627
|
+
* If `naturalLanguageQueryUnderstandingSpec` is not specified, no additional
|
628
|
+
* natural language query understanding will be done.
|
629
|
+
* @param {google.cloud.discoveryengine.v1alpha.SearchRequest.SearchAsYouTypeSpec} request.searchAsYouTypeSpec
|
630
|
+
* Search as you type configuration. Only supported for the
|
631
|
+
* {@link protos.google.cloud.discoveryengine.v1alpha.IndustryVertical.MEDIA|IndustryVertical.MEDIA}
|
632
|
+
* vertical.
|
540
633
|
* @param {google.cloud.discoveryengine.v1alpha.CustomFineTuningSpec} request.customFineTuningSpec
|
541
634
|
* Custom fine tuning configs.
|
635
|
+
* If set, it has higher priority than the configs set in
|
636
|
+
* {@link protos.google.cloud.discoveryengine.v1alpha.ServingConfig.custom_fine_tuning_spec|ServingConfig.custom_fine_tuning_spec}.
|
637
|
+
* @param {string} request.session
|
638
|
+
* The session resource name. Optional.
|
639
|
+
*
|
640
|
+
* Session allows users to do multi-turn /search API calls or coordination
|
641
|
+
* between /search API calls and /answer API calls.
|
642
|
+
*
|
643
|
+
* Example #1 (multi-turn /search API calls):
|
644
|
+
* 1. Call /search API with the auto-session mode (see below).
|
645
|
+
* 2. Call /search API with the session ID generated in the first call.
|
646
|
+
* Here, the previous search query gets considered in query
|
647
|
+
* standing. I.e., if the first query is "How did Alphabet do in 2022?"
|
648
|
+
* and the current query is "How about 2023?", the current query will
|
649
|
+
* be interpreted as "How did Alphabet do in 2023?".
|
650
|
+
*
|
651
|
+
* Example #2 (coordination between /search API calls and /answer API calls):
|
652
|
+
* 1. Call /search API with the auto-session mode (see below).
|
653
|
+
* 2. Call /answer API with the session ID generated in the first call.
|
654
|
+
* Here, the answer generation happens in the context of the search
|
655
|
+
* results from the first search call.
|
656
|
+
*
|
657
|
+
* Auto-session mode: when `projects/.../sessions/-` is used, a new session
|
658
|
+
* gets automatically created. Otherwise, users can use the create-session API
|
659
|
+
* to create a session manually.
|
660
|
+
*
|
661
|
+
* Multi-turn Search feature is currently at private GA stage. Please use
|
662
|
+
* v1alpha or v1beta version instead before we launch this feature to public
|
663
|
+
* GA. Or ask for allowlisting through Google Support team.
|
664
|
+
* @param {google.cloud.discoveryengine.v1alpha.SearchRequest.SessionSpec} request.sessionSpec
|
665
|
+
* Session specification.
|
666
|
+
*
|
667
|
+
* Can be used only when `session` is set.
|
668
|
+
* @param {google.cloud.discoveryengine.v1alpha.SearchRequest.RelevanceThreshold} request.relevanceThreshold
|
669
|
+
* The relevance threshold of the search results.
|
670
|
+
*
|
671
|
+
* Default to Google defined threshold, leveraging a balance of
|
672
|
+
* precision and recall to deliver both highly accurate results and
|
673
|
+
* comprehensive coverage of relevant information.
|
542
674
|
* @param {object} [options]
|
543
675
|
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
544
676
|
* @returns {Stream}
|
@@ -643,15 +775,29 @@ export declare class SearchServiceClient {
|
|
643
775
|
* object. Leave it unset if ordered by relevance. `order_by` expression is
|
644
776
|
* case-sensitive.
|
645
777
|
*
|
646
|
-
* For more information on ordering
|
647
|
-
* [
|
648
|
-
*
|
778
|
+
* For more information on ordering the website search results, see
|
779
|
+
* [Order web search
|
780
|
+
* results](https://cloud.google.com/generative-ai-app-builder/docs/order-web-search-results).
|
781
|
+
* For more information on ordering the healthcare search results, see
|
782
|
+
* [Order healthcare search
|
783
|
+
* results](https://cloud.google.com/generative-ai-app-builder/docs/order-hc-results).
|
649
784
|
* If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
|
650
785
|
* @param {google.cloud.discoveryengine.v1alpha.UserInfo} request.userInfo
|
651
786
|
* Information about the end user.
|
652
787
|
* Highly recommended for analytics.
|
653
788
|
* {@link protos.google.cloud.discoveryengine.v1alpha.UserInfo.user_agent|UserInfo.user_agent}
|
654
789
|
* is used to deduce `device_type` for analytics.
|
790
|
+
* @param {string} request.languageCode
|
791
|
+
* The BCP-47 language code, such as "en-US" or "sr-Latn". For more
|
792
|
+
* information, see [Standard
|
793
|
+
* fields](https://cloud.google.com/apis/design/standard_fields). This field
|
794
|
+
* helps to better interpret the query. If a value isn't specified, the query
|
795
|
+
* language code is automatically detected, which may not be accurate.
|
796
|
+
* @param {string} request.regionCode
|
797
|
+
* The Unicode country/region code (CLDR) of a location, such as "US" and
|
798
|
+
* "419". For more information, see [Standard
|
799
|
+
* fields](https://cloud.google.com/apis/design/standard_fields). If set,
|
800
|
+
* then results will be boosted based on the region_code provided.
|
655
801
|
* @param {number[]} request.facetSpecs
|
656
802
|
* Facet specifications for faceted search. If empty, no facets are returned.
|
657
803
|
*
|
@@ -716,20 +862,26 @@ export declare class SearchServiceClient {
|
|
716
862
|
* documents. This overrides
|
717
863
|
* {@link protos.google.cloud.discoveryengine.v1alpha.ServingConfig.ranking_expression|ServingConfig.ranking_expression}.
|
718
864
|
* The ranking expression is a single function or multiple functions that are
|
719
|
-
*
|
865
|
+
* joined by "+".
|
866
|
+
*
|
720
867
|
* * ranking_expression = function, { " + ", function };
|
868
|
+
*
|
721
869
|
* Supported functions:
|
870
|
+
*
|
722
871
|
* * double * relevance_score
|
723
872
|
* * double * dotProduct(embedding_field_path)
|
873
|
+
*
|
724
874
|
* Function variables:
|
725
|
-
*
|
875
|
+
*
|
876
|
+
* * `relevance_score`: pre-defined keywords, used for measure relevance
|
726
877
|
* between query and document.
|
727
|
-
* `embedding_field_path`: the document embedding field
|
878
|
+
* * `embedding_field_path`: the document embedding field
|
728
879
|
* used with query embedding vector.
|
729
|
-
* `dotProduct`: embedding function between embedding_field_path and query
|
880
|
+
* * `dotProduct`: embedding function between embedding_field_path and query
|
730
881
|
* embedding vector.
|
731
882
|
*
|
732
883
|
* Example ranking expression:
|
884
|
+
*
|
733
885
|
* If document has an embedding field doc_embedding, the ranking expression
|
734
886
|
* could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`.
|
735
887
|
* @param {boolean} request.safeSearch
|
@@ -753,8 +905,54 @@ export declare class SearchServiceClient {
|
|
753
905
|
* See [Google Cloud
|
754
906
|
* Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
|
755
907
|
* for more details.
|
908
|
+
* @param {google.cloud.discoveryengine.v1alpha.SearchRequest.NaturalLanguageQueryUnderstandingSpec} request.naturalLanguageQueryUnderstandingSpec
|
909
|
+
* If `naturalLanguageQueryUnderstandingSpec` is not specified, no additional
|
910
|
+
* natural language query understanding will be done.
|
911
|
+
* @param {google.cloud.discoveryengine.v1alpha.SearchRequest.SearchAsYouTypeSpec} request.searchAsYouTypeSpec
|
912
|
+
* Search as you type configuration. Only supported for the
|
913
|
+
* {@link protos.google.cloud.discoveryengine.v1alpha.IndustryVertical.MEDIA|IndustryVertical.MEDIA}
|
914
|
+
* vertical.
|
756
915
|
* @param {google.cloud.discoveryengine.v1alpha.CustomFineTuningSpec} request.customFineTuningSpec
|
757
916
|
* Custom fine tuning configs.
|
917
|
+
* If set, it has higher priority than the configs set in
|
918
|
+
* {@link protos.google.cloud.discoveryengine.v1alpha.ServingConfig.custom_fine_tuning_spec|ServingConfig.custom_fine_tuning_spec}.
|
919
|
+
* @param {string} request.session
|
920
|
+
* The session resource name. Optional.
|
921
|
+
*
|
922
|
+
* Session allows users to do multi-turn /search API calls or coordination
|
923
|
+
* between /search API calls and /answer API calls.
|
924
|
+
*
|
925
|
+
* Example #1 (multi-turn /search API calls):
|
926
|
+
* 1. Call /search API with the auto-session mode (see below).
|
927
|
+
* 2. Call /search API with the session ID generated in the first call.
|
928
|
+
* Here, the previous search query gets considered in query
|
929
|
+
* standing. I.e., if the first query is "How did Alphabet do in 2022?"
|
930
|
+
* and the current query is "How about 2023?", the current query will
|
931
|
+
* be interpreted as "How did Alphabet do in 2023?".
|
932
|
+
*
|
933
|
+
* Example #2 (coordination between /search API calls and /answer API calls):
|
934
|
+
* 1. Call /search API with the auto-session mode (see below).
|
935
|
+
* 2. Call /answer API with the session ID generated in the first call.
|
936
|
+
* Here, the answer generation happens in the context of the search
|
937
|
+
* results from the first search call.
|
938
|
+
*
|
939
|
+
* Auto-session mode: when `projects/.../sessions/-` is used, a new session
|
940
|
+
* gets automatically created. Otherwise, users can use the create-session API
|
941
|
+
* to create a session manually.
|
942
|
+
*
|
943
|
+
* Multi-turn Search feature is currently at private GA stage. Please use
|
944
|
+
* v1alpha or v1beta version instead before we launch this feature to public
|
945
|
+
* GA. Or ask for allowlisting through Google Support team.
|
946
|
+
* @param {google.cloud.discoveryengine.v1alpha.SearchRequest.SessionSpec} request.sessionSpec
|
947
|
+
* Session specification.
|
948
|
+
*
|
949
|
+
* Can be used only when `session` is set.
|
950
|
+
* @param {google.cloud.discoveryengine.v1alpha.SearchRequest.RelevanceThreshold} request.relevanceThreshold
|
951
|
+
* The relevance threshold of the search results.
|
952
|
+
*
|
953
|
+
* Default to Google defined threshold, leveraging a balance of
|
954
|
+
* precision and recall to deliver both highly accurate results and
|
955
|
+
* comprehensive coverage of relevant information.
|
758
956
|
* @param {object} [options]
|
759
957
|
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
760
958
|
* @returns {Object}
|
@@ -417,15 +417,29 @@ class SearchServiceClient {
|
|
417
417
|
* object. Leave it unset if ordered by relevance. `order_by` expression is
|
418
418
|
* case-sensitive.
|
419
419
|
*
|
420
|
-
* For more information on ordering
|
421
|
-
* [
|
422
|
-
*
|
420
|
+
* For more information on ordering the website search results, see
|
421
|
+
* [Order web search
|
422
|
+
* results](https://cloud.google.com/generative-ai-app-builder/docs/order-web-search-results).
|
423
|
+
* For more information on ordering the healthcare search results, see
|
424
|
+
* [Order healthcare search
|
425
|
+
* results](https://cloud.google.com/generative-ai-app-builder/docs/order-hc-results).
|
423
426
|
* If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
|
424
427
|
* @param {google.cloud.discoveryengine.v1alpha.UserInfo} request.userInfo
|
425
428
|
* Information about the end user.
|
426
429
|
* Highly recommended for analytics.
|
427
430
|
* {@link protos.google.cloud.discoveryengine.v1alpha.UserInfo.user_agent|UserInfo.user_agent}
|
428
431
|
* is used to deduce `device_type` for analytics.
|
432
|
+
* @param {string} request.languageCode
|
433
|
+
* The BCP-47 language code, such as "en-US" or "sr-Latn". For more
|
434
|
+
* information, see [Standard
|
435
|
+
* fields](https://cloud.google.com/apis/design/standard_fields). This field
|
436
|
+
* helps to better interpret the query. If a value isn't specified, the query
|
437
|
+
* language code is automatically detected, which may not be accurate.
|
438
|
+
* @param {string} request.regionCode
|
439
|
+
* The Unicode country/region code (CLDR) of a location, such as "US" and
|
440
|
+
* "419". For more information, see [Standard
|
441
|
+
* fields](https://cloud.google.com/apis/design/standard_fields). If set,
|
442
|
+
* then results will be boosted based on the region_code provided.
|
429
443
|
* @param {number[]} request.facetSpecs
|
430
444
|
* Facet specifications for faceted search. If empty, no facets are returned.
|
431
445
|
*
|
@@ -490,20 +504,26 @@ class SearchServiceClient {
|
|
490
504
|
* documents. This overrides
|
491
505
|
* {@link protos.google.cloud.discoveryengine.v1alpha.ServingConfig.ranking_expression|ServingConfig.ranking_expression}.
|
492
506
|
* The ranking expression is a single function or multiple functions that are
|
493
|
-
*
|
507
|
+
* joined by "+".
|
508
|
+
*
|
494
509
|
* * ranking_expression = function, { " + ", function };
|
510
|
+
*
|
495
511
|
* Supported functions:
|
512
|
+
*
|
496
513
|
* * double * relevance_score
|
497
514
|
* * double * dotProduct(embedding_field_path)
|
515
|
+
*
|
498
516
|
* Function variables:
|
499
|
-
*
|
517
|
+
*
|
518
|
+
* * `relevance_score`: pre-defined keywords, used for measure relevance
|
500
519
|
* between query and document.
|
501
|
-
* `embedding_field_path`: the document embedding field
|
520
|
+
* * `embedding_field_path`: the document embedding field
|
502
521
|
* used with query embedding vector.
|
503
|
-
* `dotProduct`: embedding function between embedding_field_path and query
|
522
|
+
* * `dotProduct`: embedding function between embedding_field_path and query
|
504
523
|
* embedding vector.
|
505
524
|
*
|
506
525
|
* Example ranking expression:
|
526
|
+
*
|
507
527
|
* If document has an embedding field doc_embedding, the ranking expression
|
508
528
|
* could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`.
|
509
529
|
* @param {boolean} request.safeSearch
|
@@ -527,8 +547,54 @@ class SearchServiceClient {
|
|
527
547
|
* See [Google Cloud
|
528
548
|
* Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
|
529
549
|
* for more details.
|
550
|
+
* @param {google.cloud.discoveryengine.v1alpha.SearchRequest.NaturalLanguageQueryUnderstandingSpec} request.naturalLanguageQueryUnderstandingSpec
|
551
|
+
* If `naturalLanguageQueryUnderstandingSpec` is not specified, no additional
|
552
|
+
* natural language query understanding will be done.
|
553
|
+
* @param {google.cloud.discoveryengine.v1alpha.SearchRequest.SearchAsYouTypeSpec} request.searchAsYouTypeSpec
|
554
|
+
* Search as you type configuration. Only supported for the
|
555
|
+
* {@link protos.google.cloud.discoveryengine.v1alpha.IndustryVertical.MEDIA|IndustryVertical.MEDIA}
|
556
|
+
* vertical.
|
530
557
|
* @param {google.cloud.discoveryengine.v1alpha.CustomFineTuningSpec} request.customFineTuningSpec
|
531
558
|
* Custom fine tuning configs.
|
559
|
+
* If set, it has higher priority than the configs set in
|
560
|
+
* {@link protos.google.cloud.discoveryengine.v1alpha.ServingConfig.custom_fine_tuning_spec|ServingConfig.custom_fine_tuning_spec}.
|
561
|
+
* @param {string} request.session
|
562
|
+
* The session resource name. Optional.
|
563
|
+
*
|
564
|
+
* Session allows users to do multi-turn /search API calls or coordination
|
565
|
+
* between /search API calls and /answer API calls.
|
566
|
+
*
|
567
|
+
* Example #1 (multi-turn /search API calls):
|
568
|
+
* 1. Call /search API with the auto-session mode (see below).
|
569
|
+
* 2. Call /search API with the session ID generated in the first call.
|
570
|
+
* Here, the previous search query gets considered in query
|
571
|
+
* standing. I.e., if the first query is "How did Alphabet do in 2022?"
|
572
|
+
* and the current query is "How about 2023?", the current query will
|
573
|
+
* be interpreted as "How did Alphabet do in 2023?".
|
574
|
+
*
|
575
|
+
* Example #2 (coordination between /search API calls and /answer API calls):
|
576
|
+
* 1. Call /search API with the auto-session mode (see below).
|
577
|
+
* 2. Call /answer API with the session ID generated in the first call.
|
578
|
+
* Here, the answer generation happens in the context of the search
|
579
|
+
* results from the first search call.
|
580
|
+
*
|
581
|
+
* Auto-session mode: when `projects/.../sessions/-` is used, a new session
|
582
|
+
* gets automatically created. Otherwise, users can use the create-session API
|
583
|
+
* to create a session manually.
|
584
|
+
*
|
585
|
+
* Multi-turn Search feature is currently at private GA stage. Please use
|
586
|
+
* v1alpha or v1beta version instead before we launch this feature to public
|
587
|
+
* GA. Or ask for allowlisting through Google Support team.
|
588
|
+
* @param {google.cloud.discoveryengine.v1alpha.SearchRequest.SessionSpec} request.sessionSpec
|
589
|
+
* Session specification.
|
590
|
+
*
|
591
|
+
* Can be used only when `session` is set.
|
592
|
+
* @param {google.cloud.discoveryengine.v1alpha.SearchRequest.RelevanceThreshold} request.relevanceThreshold
|
593
|
+
* The relevance threshold of the search results.
|
594
|
+
*
|
595
|
+
* Default to Google defined threshold, leveraging a balance of
|
596
|
+
* precision and recall to deliver both highly accurate results and
|
597
|
+
* comprehensive coverage of relevant information.
|
532
598
|
* @param {object} [options]
|
533
599
|
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
534
600
|
* @returns {Stream}
|
@@ -647,15 +713,29 @@ class SearchServiceClient {
|
|
647
713
|
* object. Leave it unset if ordered by relevance. `order_by` expression is
|
648
714
|
* case-sensitive.
|
649
715
|
*
|
650
|
-
* For more information on ordering
|
651
|
-
* [
|
652
|
-
*
|
716
|
+
* For more information on ordering the website search results, see
|
717
|
+
* [Order web search
|
718
|
+
* results](https://cloud.google.com/generative-ai-app-builder/docs/order-web-search-results).
|
719
|
+
* For more information on ordering the healthcare search results, see
|
720
|
+
* [Order healthcare search
|
721
|
+
* results](https://cloud.google.com/generative-ai-app-builder/docs/order-hc-results).
|
653
722
|
* If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
|
654
723
|
* @param {google.cloud.discoveryengine.v1alpha.UserInfo} request.userInfo
|
655
724
|
* Information about the end user.
|
656
725
|
* Highly recommended for analytics.
|
657
726
|
* {@link protos.google.cloud.discoveryengine.v1alpha.UserInfo.user_agent|UserInfo.user_agent}
|
658
727
|
* is used to deduce `device_type` for analytics.
|
728
|
+
* @param {string} request.languageCode
|
729
|
+
* The BCP-47 language code, such as "en-US" or "sr-Latn". For more
|
730
|
+
* information, see [Standard
|
731
|
+
* fields](https://cloud.google.com/apis/design/standard_fields). This field
|
732
|
+
* helps to better interpret the query. If a value isn't specified, the query
|
733
|
+
* language code is automatically detected, which may not be accurate.
|
734
|
+
* @param {string} request.regionCode
|
735
|
+
* The Unicode country/region code (CLDR) of a location, such as "US" and
|
736
|
+
* "419". For more information, see [Standard
|
737
|
+
* fields](https://cloud.google.com/apis/design/standard_fields). If set,
|
738
|
+
* then results will be boosted based on the region_code provided.
|
659
739
|
* @param {number[]} request.facetSpecs
|
660
740
|
* Facet specifications for faceted search. If empty, no facets are returned.
|
661
741
|
*
|
@@ -720,20 +800,26 @@ class SearchServiceClient {
|
|
720
800
|
* documents. This overrides
|
721
801
|
* {@link protos.google.cloud.discoveryengine.v1alpha.ServingConfig.ranking_expression|ServingConfig.ranking_expression}.
|
722
802
|
* The ranking expression is a single function or multiple functions that are
|
723
|
-
*
|
803
|
+
* joined by "+".
|
804
|
+
*
|
724
805
|
* * ranking_expression = function, { " + ", function };
|
806
|
+
*
|
725
807
|
* Supported functions:
|
808
|
+
*
|
726
809
|
* * double * relevance_score
|
727
810
|
* * double * dotProduct(embedding_field_path)
|
811
|
+
*
|
728
812
|
* Function variables:
|
729
|
-
*
|
813
|
+
*
|
814
|
+
* * `relevance_score`: pre-defined keywords, used for measure relevance
|
730
815
|
* between query and document.
|
731
|
-
* `embedding_field_path`: the document embedding field
|
816
|
+
* * `embedding_field_path`: the document embedding field
|
732
817
|
* used with query embedding vector.
|
733
|
-
* `dotProduct`: embedding function between embedding_field_path and query
|
818
|
+
* * `dotProduct`: embedding function between embedding_field_path and query
|
734
819
|
* embedding vector.
|
735
820
|
*
|
736
821
|
* Example ranking expression:
|
822
|
+
*
|
737
823
|
* If document has an embedding field doc_embedding, the ranking expression
|
738
824
|
* could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`.
|
739
825
|
* @param {boolean} request.safeSearch
|
@@ -757,8 +843,54 @@ class SearchServiceClient {
|
|
757
843
|
* See [Google Cloud
|
758
844
|
* Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
|
759
845
|
* for more details.
|
846
|
+
* @param {google.cloud.discoveryengine.v1alpha.SearchRequest.NaturalLanguageQueryUnderstandingSpec} request.naturalLanguageQueryUnderstandingSpec
|
847
|
+
* If `naturalLanguageQueryUnderstandingSpec` is not specified, no additional
|
848
|
+
* natural language query understanding will be done.
|
849
|
+
* @param {google.cloud.discoveryengine.v1alpha.SearchRequest.SearchAsYouTypeSpec} request.searchAsYouTypeSpec
|
850
|
+
* Search as you type configuration. Only supported for the
|
851
|
+
* {@link protos.google.cloud.discoveryengine.v1alpha.IndustryVertical.MEDIA|IndustryVertical.MEDIA}
|
852
|
+
* vertical.
|
760
853
|
* @param {google.cloud.discoveryengine.v1alpha.CustomFineTuningSpec} request.customFineTuningSpec
|
761
854
|
* Custom fine tuning configs.
|
855
|
+
* If set, it has higher priority than the configs set in
|
856
|
+
* {@link protos.google.cloud.discoveryengine.v1alpha.ServingConfig.custom_fine_tuning_spec|ServingConfig.custom_fine_tuning_spec}.
|
857
|
+
* @param {string} request.session
|
858
|
+
* The session resource name. Optional.
|
859
|
+
*
|
860
|
+
* Session allows users to do multi-turn /search API calls or coordination
|
861
|
+
* between /search API calls and /answer API calls.
|
862
|
+
*
|
863
|
+
* Example #1 (multi-turn /search API calls):
|
864
|
+
* 1. Call /search API with the auto-session mode (see below).
|
865
|
+
* 2. Call /search API with the session ID generated in the first call.
|
866
|
+
* Here, the previous search query gets considered in query
|
867
|
+
* standing. I.e., if the first query is "How did Alphabet do in 2022?"
|
868
|
+
* and the current query is "How about 2023?", the current query will
|
869
|
+
* be interpreted as "How did Alphabet do in 2023?".
|
870
|
+
*
|
871
|
+
* Example #2 (coordination between /search API calls and /answer API calls):
|
872
|
+
* 1. Call /search API with the auto-session mode (see below).
|
873
|
+
* 2. Call /answer API with the session ID generated in the first call.
|
874
|
+
* Here, the answer generation happens in the context of the search
|
875
|
+
* results from the first search call.
|
876
|
+
*
|
877
|
+
* Auto-session mode: when `projects/.../sessions/-` is used, a new session
|
878
|
+
* gets automatically created. Otherwise, users can use the create-session API
|
879
|
+
* to create a session manually.
|
880
|
+
*
|
881
|
+
* Multi-turn Search feature is currently at private GA stage. Please use
|
882
|
+
* v1alpha or v1beta version instead before we launch this feature to public
|
883
|
+
* GA. Or ask for allowlisting through Google Support team.
|
884
|
+
* @param {google.cloud.discoveryengine.v1alpha.SearchRequest.SessionSpec} request.sessionSpec
|
885
|
+
* Session specification.
|
886
|
+
*
|
887
|
+
* Can be used only when `session` is set.
|
888
|
+
* @param {google.cloud.discoveryengine.v1alpha.SearchRequest.RelevanceThreshold} request.relevanceThreshold
|
889
|
+
* The relevance threshold of the search results.
|
890
|
+
*
|
891
|
+
* Default to Google defined threshold, leveraging a balance of
|
892
|
+
* precision and recall to deliver both highly accurate results and
|
893
|
+
* comprehensive coverage of relevant information.
|
762
894
|
* @param {object} [options]
|
763
895
|
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
764
896
|
* @returns {Object}
|
@@ -249,6 +249,9 @@ class SearchTuningServiceClient {
|
|
249
249
|
{
|
250
250
|
get: '/v1alpha/{name=projects/*/locations/*/evaluations/*/operations/*}',
|
251
251
|
},
|
252
|
+
{
|
253
|
+
get: '/v1alpha/{name=projects/*/locations/*/identity_mapping_stores/*/operations/*}',
|
254
|
+
},
|
252
255
|
{ get: '/v1alpha/{name=projects/*/locations/*/operations/*}' },
|
253
256
|
{
|
254
257
|
get: '/v1alpha/{name=projects/*/locations/*/sampleQuerySets/*/operations/*}',
|
@@ -293,6 +296,9 @@ class SearchTuningServiceClient {
|
|
293
296
|
{
|
294
297
|
get: '/v1alpha/{name=projects/*/locations/*/dataStores/*}/operations',
|
295
298
|
},
|
299
|
+
{
|
300
|
+
get: '/v1alpha/{name=projects/*/locations/*/identity_mapping_stores/*}/operations',
|
301
|
+
},
|
296
302
|
{ get: '/v1alpha/{name=projects/*/locations/*}/operations' },
|
297
303
|
{ get: '/v1alpha/{name=projects/*}/operations' },
|
298
304
|
],
|