@google-cloud/discoveryengine 1.10.0 → 1.12.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.
Files changed (129) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/README.md +33 -0
  3. package/build/protos/google/cloud/discoveryengine/v1alpha/evaluation.proto +232 -0
  4. package/build/protos/google/cloud/discoveryengine/v1alpha/evaluation_service.proto +252 -0
  5. package/build/protos/google/cloud/discoveryengine/v1alpha/import_config.proto +83 -0
  6. package/build/protos/google/cloud/discoveryengine/v1alpha/sample_query.proto +86 -0
  7. package/build/protos/google/cloud/discoveryengine/v1alpha/sample_query_service.proto +264 -0
  8. package/build/protos/google/cloud/discoveryengine/v1alpha/sample_query_set.proto +64 -0
  9. package/build/protos/google/cloud/discoveryengine/v1alpha/sample_query_set_service.proto +258 -0
  10. package/build/protos/google/cloud/discoveryengine/v1beta/answer.proto +14 -0
  11. package/build/protos/google/cloud/discoveryengine/v1beta/chunk.proto +119 -0
  12. package/build/protos/google/cloud/discoveryengine/v1beta/common.proto +0 -5
  13. package/build/protos/google/cloud/discoveryengine/v1beta/completion.proto +31 -0
  14. package/build/protos/google/cloud/discoveryengine/v1beta/completion_service.proto +38 -0
  15. package/build/protos/google/cloud/discoveryengine/v1beta/conversational_search_service.proto +29 -2
  16. package/build/protos/google/cloud/discoveryengine/v1beta/custom_tuning_model.proto +7 -1
  17. package/build/protos/google/cloud/discoveryengine/v1beta/data_store.proto +23 -0
  18. package/build/protos/google/cloud/discoveryengine/v1beta/data_store_service.proto +10 -0
  19. package/build/protos/google/cloud/discoveryengine/v1beta/document.proto +1 -1
  20. package/build/protos/google/cloud/discoveryengine/v1beta/document_processing_config.proto +37 -2
  21. package/build/protos/google/cloud/discoveryengine/v1beta/evaluation.proto +231 -0
  22. package/build/protos/google/cloud/discoveryengine/v1beta/evaluation_service.proto +252 -0
  23. package/build/protos/google/cloud/discoveryengine/v1beta/import_config.proto +191 -0
  24. package/build/protos/google/cloud/discoveryengine/v1beta/purge_config.proto +111 -0
  25. package/build/protos/google/cloud/discoveryengine/v1beta/sample_query.proto +86 -0
  26. package/build/protos/google/cloud/discoveryengine/v1beta/sample_query_service.proto +264 -0
  27. package/build/protos/google/cloud/discoveryengine/v1beta/sample_query_set.proto +64 -0
  28. package/build/protos/google/cloud/discoveryengine/v1beta/sample_query_set_service.proto +256 -0
  29. package/build/protos/google/cloud/discoveryengine/v1beta/search_service.proto +370 -8
  30. package/build/protos/google/cloud/discoveryengine/v1beta/serving_config.proto +11 -5
  31. package/build/protos/google/cloud/discoveryengine/v1beta/user_event_service.proto +24 -0
  32. package/build/protos/protos.d.ts +32735 -21073
  33. package/build/protos/protos.js +80768 -53241
  34. package/build/protos/protos.json +5309 -2481
  35. package/build/src/v1alpha/acl_config_service_client.d.ts +108 -0
  36. package/build/src/v1alpha/acl_config_service_client.js +157 -0
  37. package/build/src/v1alpha/chunk_service_client.d.ts +108 -0
  38. package/build/src/v1alpha/chunk_service_client.js +157 -0
  39. package/build/src/v1alpha/completion_service_client.d.ts +108 -0
  40. package/build/src/v1alpha/completion_service_client.js +157 -0
  41. package/build/src/v1alpha/control_service_client.d.ts +108 -0
  42. package/build/src/v1alpha/control_service_client.js +157 -0
  43. package/build/src/v1alpha/conversational_search_service_client.d.ts +108 -0
  44. package/build/src/v1alpha/conversational_search_service_client.js +157 -0
  45. package/build/src/v1alpha/data_store_service_client.d.ts +108 -0
  46. package/build/src/v1alpha/data_store_service_client.js +157 -0
  47. package/build/src/v1alpha/document_service_client.d.ts +108 -0
  48. package/build/src/v1alpha/document_service_client.js +157 -0
  49. package/build/src/v1alpha/engine_service_client.d.ts +108 -0
  50. package/build/src/v1alpha/engine_service_client.js +157 -0
  51. package/build/src/v1alpha/estimate_billing_service_client.d.ts +108 -0
  52. package/build/src/v1alpha/estimate_billing_service_client.js +157 -0
  53. package/build/src/v1alpha/evaluation_service_client.d.ts +2349 -0
  54. package/build/src/v1alpha/evaluation_service_client.js +3288 -0
  55. package/build/src/v1alpha/evaluation_service_client_config.json +58 -0
  56. package/build/src/v1alpha/grounded_generation_service_client.d.ts +108 -0
  57. package/build/src/v1alpha/grounded_generation_service_client.js +157 -0
  58. package/build/src/v1alpha/index.d.ts +3 -0
  59. package/build/src/v1alpha/index.js +7 -1
  60. package/build/src/v1alpha/project_service_client.d.ts +108 -0
  61. package/build/src/v1alpha/project_service_client.js +157 -0
  62. package/build/src/v1alpha/rank_service_client.d.ts +108 -0
  63. package/build/src/v1alpha/rank_service_client.js +157 -0
  64. package/build/src/v1alpha/recommendation_service_client.d.ts +108 -0
  65. package/build/src/v1alpha/recommendation_service_client.js +157 -0
  66. package/build/src/v1alpha/sample_query_service_client.d.ts +2317 -0
  67. package/build/src/v1alpha/sample_query_service_client.js +3186 -0
  68. package/build/src/v1alpha/sample_query_service_client_config.json +68 -0
  69. package/build/src/v1alpha/sample_query_set_service_client.d.ts +2176 -0
  70. package/build/src/v1alpha/sample_query_set_service_client.js +2931 -0
  71. package/build/src/v1alpha/sample_query_set_service_client_config.json +63 -0
  72. package/build/src/v1alpha/schema_service_client.d.ts +108 -0
  73. package/build/src/v1alpha/schema_service_client.js +157 -0
  74. package/build/src/v1alpha/search_service_client.d.ts +108 -0
  75. package/build/src/v1alpha/search_service_client.js +157 -0
  76. package/build/src/v1alpha/search_tuning_service_client.d.ts +108 -0
  77. package/build/src/v1alpha/search_tuning_service_client.js +157 -0
  78. package/build/src/v1alpha/serving_config_service_client.d.ts +108 -0
  79. package/build/src/v1alpha/serving_config_service_client.js +157 -0
  80. package/build/src/v1alpha/site_search_engine_service_client.d.ts +108 -0
  81. package/build/src/v1alpha/site_search_engine_service_client.js +157 -0
  82. package/build/src/v1alpha/user_event_service_client.d.ts +108 -0
  83. package/build/src/v1alpha/user_event_service_client.js +157 -0
  84. package/build/src/v1beta/completion_service_client.d.ts +328 -0
  85. package/build/src/v1beta/completion_service_client.js +423 -0
  86. package/build/src/v1beta/completion_service_client_config.json +10 -0
  87. package/build/src/v1beta/control_service_client.d.ts +237 -0
  88. package/build/src/v1beta/control_service_client.js +333 -0
  89. package/build/src/v1beta/conversational_search_service_client.d.ts +255 -0
  90. package/build/src/v1beta/conversational_search_service_client.js +333 -0
  91. package/build/src/v1beta/data_store_service_client.d.ts +246 -0
  92. package/build/src/v1beta/data_store_service_client.js +339 -0
  93. package/build/src/v1beta/document_service_client.d.ts +239 -0
  94. package/build/src/v1beta/document_service_client.js +339 -0
  95. package/build/src/v1beta/engine_service_client.d.ts +237 -0
  96. package/build/src/v1beta/engine_service_client.js +339 -0
  97. package/build/src/v1beta/evaluation_service_client.d.ts +2325 -0
  98. package/build/src/v1beta/evaluation_service_client.js +3252 -0
  99. package/build/src/v1beta/evaluation_service_client_config.json +58 -0
  100. package/build/src/v1beta/grounded_generation_service_client.d.ts +237 -0
  101. package/build/src/v1beta/grounded_generation_service_client.js +333 -0
  102. package/build/src/v1beta/index.d.ts +3 -0
  103. package/build/src/v1beta/index.js +7 -1
  104. package/build/src/v1beta/project_service_client.d.ts +237 -0
  105. package/build/src/v1beta/project_service_client.js +339 -0
  106. package/build/src/v1beta/rank_service_client.d.ts +237 -0
  107. package/build/src/v1beta/rank_service_client.js +333 -0
  108. package/build/src/v1beta/recommendation_service_client.d.ts +237 -0
  109. package/build/src/v1beta/recommendation_service_client.js +333 -0
  110. package/build/src/v1beta/sample_query_service_client.d.ts +2293 -0
  111. package/build/src/v1beta/sample_query_service_client.js +3150 -0
  112. package/build/src/v1beta/sample_query_service_client_config.json +68 -0
  113. package/build/src/v1beta/sample_query_set_service_client.d.ts +2150 -0
  114. package/build/src/v1beta/sample_query_set_service_client.js +2895 -0
  115. package/build/src/v1beta/sample_query_set_service_client_config.json +63 -0
  116. package/build/src/v1beta/schema_service_client.d.ts +237 -0
  117. package/build/src/v1beta/schema_service_client.js +339 -0
  118. package/build/src/v1beta/search_service_client.d.ts +414 -12
  119. package/build/src/v1beta/search_service_client.js +451 -8
  120. package/build/src/v1beta/search_tuning_service_client.d.ts +237 -0
  121. package/build/src/v1beta/search_tuning_service_client.js +339 -0
  122. package/build/src/v1beta/serving_config_service_client.d.ts +237 -0
  123. package/build/src/v1beta/serving_config_service_client.js +333 -0
  124. package/build/src/v1beta/site_search_engine_service_client.d.ts +237 -0
  125. package/build/src/v1beta/site_search_engine_service_client.js +339 -0
  126. package/build/src/v1beta/user_event_service_client.d.ts +312 -0
  127. package/build/src/v1beta/user_event_service_client.js +381 -0
  128. package/build/src/v1beta/user_event_service_client_config.json +5 -0
  129. package/package.json +1 -1
@@ -150,10 +150,12 @@ class SearchServiceClient {
150
150
  // Create useful helper objects for these.
151
151
  this.pathTemplates = {
152
152
  enginePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/engines/{engine}'),
153
+ evaluationPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/evaluations/{evaluation}'),
153
154
  projectPathTemplate: new this._gaxModule.PathTemplate('projects/{project}'),
154
155
  projectLocationCollectionDataStorePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}'),
155
156
  projectLocationCollectionDataStoreBranchPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}'),
156
157
  projectLocationCollectionDataStoreBranchDocumentPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}'),
158
+ projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}'),
157
159
  projectLocationCollectionDataStoreControlPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/controls/{control}'),
158
160
  projectLocationCollectionDataStoreConversationPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/conversations/{conversation}'),
159
161
  projectLocationCollectionDataStoreCustomTuningModelPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/customTuningModels/{custom_tuning_model}'),
@@ -172,6 +174,7 @@ class SearchServiceClient {
172
174
  projectLocationDataStorePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}'),
173
175
  projectLocationDataStoreBranchPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}'),
174
176
  projectLocationDataStoreBranchDocumentPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}'),
177
+ projectLocationDataStoreBranchDocumentChunkPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}'),
175
178
  projectLocationDataStoreControlPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/controls/{control}'),
176
179
  projectLocationDataStoreConversationPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/conversations/{conversation}'),
177
180
  projectLocationDataStoreCustomTuningModelPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/customTuningModels/{custom_tuning_model}'),
@@ -182,6 +185,8 @@ class SearchServiceClient {
182
185
  projectLocationDataStoreSessionAnswerPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/sessions/{session}/answers/{answer}'),
183
186
  projectLocationDataStoreSiteSearchEnginePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/siteSearchEngine'),
184
187
  projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}'),
188
+ sampleQueryPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/sampleQuerySets/{sample_query_set}/sampleQueries/{sample_query}'),
189
+ sampleQuerySetPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/sampleQuerySets/{sample_query_set}'),
185
190
  };
186
191
  // Some of the methods on this service return "paged" results,
187
192
  // (e.g. 50 results at a time, with tokens to get subsequent
@@ -419,6 +424,17 @@ class SearchServiceClient {
419
424
  * Highly recommended for analytics.
420
425
  * {@link protos.google.cloud.discoveryengine.v1beta.UserInfo.user_agent|UserInfo.user_agent}
421
426
  * is used to deduce `device_type` for analytics.
427
+ * @param {string} request.languageCode
428
+ * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
429
+ * information, see [Standard
430
+ * fields](https://cloud.google.com/apis/design/standard_fields). This field
431
+ * helps to better interpret the query. If a value isn't specified, the query
432
+ * language code is automatically detected, which may not be accurate.
433
+ * @param {string} request.regionCode
434
+ * The Unicode country/region code (CLDR) of a location, such as "US" and
435
+ * "419". For more information, see [Standard
436
+ * fields](https://cloud.google.com/apis/design/standard_fields). If set,
437
+ * then results will be boosted based on the region_code provided.
422
438
  * @param {number[]} request.facetSpecs
423
439
  * Facet specifications for faceted search. If empty, no facets are returned.
424
440
  *
@@ -483,20 +499,26 @@ class SearchServiceClient {
483
499
  * documents. This overrides
484
500
  * {@link protos.google.cloud.discoveryengine.v1beta.ServingConfig.ranking_expression|ServingConfig.ranking_expression}.
485
501
  * The ranking expression is a single function or multiple functions that are
486
- * joint by "+".
502
+ * joined by "+".
503
+ *
487
504
  * * ranking_expression = function, { " + ", function };
505
+ *
488
506
  * Supported functions:
507
+ *
489
508
  * * double * relevance_score
490
509
  * * double * dotProduct(embedding_field_path)
510
+ *
491
511
  * Function variables:
492
- * `relevance_score`: pre-defined keywords, used for measure relevance
512
+ *
513
+ * * `relevance_score`: pre-defined keywords, used for measure relevance
493
514
  * between query and document.
494
- * `embedding_field_path`: the document embedding field
515
+ * * `embedding_field_path`: the document embedding field
495
516
  * used with query embedding vector.
496
- * `dotProduct`: embedding function between embedding_field_path and query
517
+ * * `dotProduct`: embedding function between embedding_field_path and query
497
518
  * embedding vector.
498
519
  *
499
520
  * Example ranking expression:
521
+ *
500
522
  * If document has an embedding field doc_embedding, the ranking expression
501
523
  * could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`.
502
524
  * @param {boolean} request.safeSearch
@@ -520,6 +542,44 @@ class SearchServiceClient {
520
542
  * See [Google Cloud
521
543
  * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
522
544
  * for more details.
545
+ * @param {google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec} request.naturalLanguageQueryUnderstandingSpec
546
+ * If `naturalLanguageQueryUnderstandingSpec` is not specified, no additional
547
+ * natural language query understanding will be done.
548
+ * @param {google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec} request.searchAsYouTypeSpec
549
+ * Search as you type configuration. Only supported for the
550
+ * {@link protos.google.cloud.discoveryengine.v1beta.IndustryVertical.MEDIA|IndustryVertical.MEDIA}
551
+ * vertical.
552
+ * @param {string} request.session
553
+ * The session resource name. Optional.
554
+ *
555
+ * Session allows users to do multi-turn /search API calls or coordination
556
+ * between /search API calls and /answer API calls.
557
+ *
558
+ * Example #1 (multi-turn /search API calls):
559
+ * 1. Call /search API with the auto-session mode (see below).
560
+ * 2. Call /search API with the session ID generated in the first call.
561
+ * Here, the previous search query gets considered in query
562
+ * standing. I.e., if the first query is "How did Alphabet do in 2022?"
563
+ * and the current query is "How about 2023?", the current query will
564
+ * be interpreted as "How did Alphabet do in 2023?".
565
+ *
566
+ * Example #2 (coordination between /search API calls and /answer API calls):
567
+ * 1. Call /search API with the auto-session mode (see below).
568
+ * 2. Call /answer API with the session ID generated in the first call.
569
+ * Here, the answer generation happens in the context of the search
570
+ * results from the first search call.
571
+ *
572
+ * Auto-session mode: when `projects/.../sessions/-` is used, a new session
573
+ * gets automatically created. Otherwise, users can use the create-session API
574
+ * to create a session manually.
575
+ *
576
+ * Multi-turn Search feature is currently at private GA stage. Please use
577
+ * v1alpha or v1beta version instead before we launch this feature to public
578
+ * GA. Or ask for allowlisting through Google Support team.
579
+ * @param {google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec} request.sessionSpec
580
+ * Session specification.
581
+ *
582
+ * Can be used only when `session` is set.
523
583
  * @param {object} [options]
524
584
  * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
525
585
  * @returns {Stream}
@@ -646,6 +706,17 @@ class SearchServiceClient {
646
706
  * Highly recommended for analytics.
647
707
  * {@link protos.google.cloud.discoveryengine.v1beta.UserInfo.user_agent|UserInfo.user_agent}
648
708
  * is used to deduce `device_type` for analytics.
709
+ * @param {string} request.languageCode
710
+ * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
711
+ * information, see [Standard
712
+ * fields](https://cloud.google.com/apis/design/standard_fields). This field
713
+ * helps to better interpret the query. If a value isn't specified, the query
714
+ * language code is automatically detected, which may not be accurate.
715
+ * @param {string} request.regionCode
716
+ * The Unicode country/region code (CLDR) of a location, such as "US" and
717
+ * "419". For more information, see [Standard
718
+ * fields](https://cloud.google.com/apis/design/standard_fields). If set,
719
+ * then results will be boosted based on the region_code provided.
649
720
  * @param {number[]} request.facetSpecs
650
721
  * Facet specifications for faceted search. If empty, no facets are returned.
651
722
  *
@@ -710,20 +781,26 @@ class SearchServiceClient {
710
781
  * documents. This overrides
711
782
  * {@link protos.google.cloud.discoveryengine.v1beta.ServingConfig.ranking_expression|ServingConfig.ranking_expression}.
712
783
  * The ranking expression is a single function or multiple functions that are
713
- * joint by "+".
784
+ * joined by "+".
785
+ *
714
786
  * * ranking_expression = function, { " + ", function };
787
+ *
715
788
  * Supported functions:
789
+ *
716
790
  * * double * relevance_score
717
791
  * * double * dotProduct(embedding_field_path)
792
+ *
718
793
  * Function variables:
719
- * `relevance_score`: pre-defined keywords, used for measure relevance
794
+ *
795
+ * * `relevance_score`: pre-defined keywords, used for measure relevance
720
796
  * between query and document.
721
- * `embedding_field_path`: the document embedding field
797
+ * * `embedding_field_path`: the document embedding field
722
798
  * used with query embedding vector.
723
- * `dotProduct`: embedding function between embedding_field_path and query
799
+ * * `dotProduct`: embedding function between embedding_field_path and query
724
800
  * embedding vector.
725
801
  *
726
802
  * Example ranking expression:
803
+ *
727
804
  * If document has an embedding field doc_embedding, the ranking expression
728
805
  * could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`.
729
806
  * @param {boolean} request.safeSearch
@@ -747,6 +824,44 @@ class SearchServiceClient {
747
824
  * See [Google Cloud
748
825
  * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
749
826
  * for more details.
827
+ * @param {google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec} request.naturalLanguageQueryUnderstandingSpec
828
+ * If `naturalLanguageQueryUnderstandingSpec` is not specified, no additional
829
+ * natural language query understanding will be done.
830
+ * @param {google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec} request.searchAsYouTypeSpec
831
+ * Search as you type configuration. Only supported for the
832
+ * {@link protos.google.cloud.discoveryengine.v1beta.IndustryVertical.MEDIA|IndustryVertical.MEDIA}
833
+ * vertical.
834
+ * @param {string} request.session
835
+ * The session resource name. Optional.
836
+ *
837
+ * Session allows users to do multi-turn /search API calls or coordination
838
+ * between /search API calls and /answer API calls.
839
+ *
840
+ * Example #1 (multi-turn /search API calls):
841
+ * 1. Call /search API with the auto-session mode (see below).
842
+ * 2. Call /search API with the session ID generated in the first call.
843
+ * Here, the previous search query gets considered in query
844
+ * standing. I.e., if the first query is "How did Alphabet do in 2022?"
845
+ * and the current query is "How about 2023?", the current query will
846
+ * be interpreted as "How did Alphabet do in 2023?".
847
+ *
848
+ * Example #2 (coordination between /search API calls and /answer API calls):
849
+ * 1. Call /search API with the auto-session mode (see below).
850
+ * 2. Call /answer API with the session ID generated in the first call.
851
+ * Here, the answer generation happens in the context of the search
852
+ * results from the first search call.
853
+ *
854
+ * Auto-session mode: when `projects/.../sessions/-` is used, a new session
855
+ * gets automatically created. Otherwise, users can use the create-session API
856
+ * to create a session manually.
857
+ *
858
+ * Multi-turn Search feature is currently at private GA stage. Please use
859
+ * v1alpha or v1beta version instead before we launch this feature to public
860
+ * GA. Or ask for allowlisting through Google Support team.
861
+ * @param {google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec} request.sessionSpec
862
+ * Session specification.
863
+ *
864
+ * Can be used only when `session` is set.
750
865
  * @param {object} [options]
751
866
  * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
752
867
  * @returns {Object}
@@ -889,6 +1004,54 @@ class SearchServiceClient {
889
1004
  matchEngineFromEngineName(engineName) {
890
1005
  return this.pathTemplates.enginePathTemplate.match(engineName).engine;
891
1006
  }
1007
+ /**
1008
+ * Return a fully-qualified evaluation resource name string.
1009
+ *
1010
+ * @param {string} project
1011
+ * @param {string} location
1012
+ * @param {string} evaluation
1013
+ * @returns {string} Resource name string.
1014
+ */
1015
+ evaluationPath(project, location, evaluation) {
1016
+ return this.pathTemplates.evaluationPathTemplate.render({
1017
+ project: project,
1018
+ location: location,
1019
+ evaluation: evaluation,
1020
+ });
1021
+ }
1022
+ /**
1023
+ * Parse the project from Evaluation resource.
1024
+ *
1025
+ * @param {string} evaluationName
1026
+ * A fully-qualified path representing Evaluation resource.
1027
+ * @returns {string} A string representing the project.
1028
+ */
1029
+ matchProjectFromEvaluationName(evaluationName) {
1030
+ return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
1031
+ .project;
1032
+ }
1033
+ /**
1034
+ * Parse the location from Evaluation resource.
1035
+ *
1036
+ * @param {string} evaluationName
1037
+ * A fully-qualified path representing Evaluation resource.
1038
+ * @returns {string} A string representing the location.
1039
+ */
1040
+ matchLocationFromEvaluationName(evaluationName) {
1041
+ return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
1042
+ .location;
1043
+ }
1044
+ /**
1045
+ * Parse the evaluation from Evaluation resource.
1046
+ *
1047
+ * @param {string} evaluationName
1048
+ * A fully-qualified path representing Evaluation resource.
1049
+ * @returns {string} A string representing the evaluation.
1050
+ */
1051
+ matchEvaluationFromEvaluationName(evaluationName) {
1052
+ return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
1053
+ .evaluation;
1054
+ }
892
1055
  /**
893
1056
  * Return a fully-qualified project resource name string.
894
1057
  *
@@ -1117,6 +1280,99 @@ class SearchServiceClient {
1117
1280
  matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentName(projectLocationCollectionDataStoreBranchDocumentName) {
1118
1281
  return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match(projectLocationCollectionDataStoreBranchDocumentName).document;
1119
1282
  }
1283
+ /**
1284
+ * Return a fully-qualified projectLocationCollectionDataStoreBranchDocumentChunk resource name string.
1285
+ *
1286
+ * @param {string} project
1287
+ * @param {string} location
1288
+ * @param {string} collection
1289
+ * @param {string} data_store
1290
+ * @param {string} branch
1291
+ * @param {string} document
1292
+ * @param {string} chunk
1293
+ * @returns {string} Resource name string.
1294
+ */
1295
+ projectLocationCollectionDataStoreBranchDocumentChunkPath(project, location, collection, dataStore, branch, document, chunk) {
1296
+ return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.render({
1297
+ project: project,
1298
+ location: location,
1299
+ collection: collection,
1300
+ data_store: dataStore,
1301
+ branch: branch,
1302
+ document: document,
1303
+ chunk: chunk,
1304
+ });
1305
+ }
1306
+ /**
1307
+ * Parse the project from ProjectLocationCollectionDataStoreBranchDocumentChunk resource.
1308
+ *
1309
+ * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName
1310
+ * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource.
1311
+ * @returns {string} A string representing the project.
1312
+ */
1313
+ matchProjectFromProjectLocationCollectionDataStoreBranchDocumentChunkName(projectLocationCollectionDataStoreBranchDocumentChunkName) {
1314
+ return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match(projectLocationCollectionDataStoreBranchDocumentChunkName).project;
1315
+ }
1316
+ /**
1317
+ * Parse the location from ProjectLocationCollectionDataStoreBranchDocumentChunk resource.
1318
+ *
1319
+ * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName
1320
+ * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource.
1321
+ * @returns {string} A string representing the location.
1322
+ */
1323
+ matchLocationFromProjectLocationCollectionDataStoreBranchDocumentChunkName(projectLocationCollectionDataStoreBranchDocumentChunkName) {
1324
+ return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match(projectLocationCollectionDataStoreBranchDocumentChunkName).location;
1325
+ }
1326
+ /**
1327
+ * Parse the collection from ProjectLocationCollectionDataStoreBranchDocumentChunk resource.
1328
+ *
1329
+ * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName
1330
+ * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource.
1331
+ * @returns {string} A string representing the collection.
1332
+ */
1333
+ matchCollectionFromProjectLocationCollectionDataStoreBranchDocumentChunkName(projectLocationCollectionDataStoreBranchDocumentChunkName) {
1334
+ return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match(projectLocationCollectionDataStoreBranchDocumentChunkName).collection;
1335
+ }
1336
+ /**
1337
+ * Parse the data_store from ProjectLocationCollectionDataStoreBranchDocumentChunk resource.
1338
+ *
1339
+ * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName
1340
+ * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource.
1341
+ * @returns {string} A string representing the data_store.
1342
+ */
1343
+ matchDataStoreFromProjectLocationCollectionDataStoreBranchDocumentChunkName(projectLocationCollectionDataStoreBranchDocumentChunkName) {
1344
+ return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match(projectLocationCollectionDataStoreBranchDocumentChunkName).data_store;
1345
+ }
1346
+ /**
1347
+ * Parse the branch from ProjectLocationCollectionDataStoreBranchDocumentChunk resource.
1348
+ *
1349
+ * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName
1350
+ * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource.
1351
+ * @returns {string} A string representing the branch.
1352
+ */
1353
+ matchBranchFromProjectLocationCollectionDataStoreBranchDocumentChunkName(projectLocationCollectionDataStoreBranchDocumentChunkName) {
1354
+ return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match(projectLocationCollectionDataStoreBranchDocumentChunkName).branch;
1355
+ }
1356
+ /**
1357
+ * Parse the document from ProjectLocationCollectionDataStoreBranchDocumentChunk resource.
1358
+ *
1359
+ * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName
1360
+ * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource.
1361
+ * @returns {string} A string representing the document.
1362
+ */
1363
+ matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentChunkName(projectLocationCollectionDataStoreBranchDocumentChunkName) {
1364
+ return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match(projectLocationCollectionDataStoreBranchDocumentChunkName).document;
1365
+ }
1366
+ /**
1367
+ * Parse the chunk from ProjectLocationCollectionDataStoreBranchDocumentChunk resource.
1368
+ *
1369
+ * @param {string} projectLocationCollectionDataStoreBranchDocumentChunkName
1370
+ * A fully-qualified path representing project_location_collection_data_store_branch_document_chunk resource.
1371
+ * @returns {string} A string representing the chunk.
1372
+ */
1373
+ matchChunkFromProjectLocationCollectionDataStoreBranchDocumentChunkName(projectLocationCollectionDataStoreBranchDocumentChunkName) {
1374
+ return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate.match(projectLocationCollectionDataStoreBranchDocumentChunkName).chunk;
1375
+ }
1120
1376
  /**
1121
1377
  * Return a fully-qualified projectLocationCollectionDataStoreControl resource name string.
1122
1378
  *
@@ -2323,6 +2579,87 @@ class SearchServiceClient {
2323
2579
  matchDocumentFromProjectLocationDataStoreBranchDocumentName(projectLocationDataStoreBranchDocumentName) {
2324
2580
  return this.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match(projectLocationDataStoreBranchDocumentName).document;
2325
2581
  }
2582
+ /**
2583
+ * Return a fully-qualified projectLocationDataStoreBranchDocumentChunk resource name string.
2584
+ *
2585
+ * @param {string} project
2586
+ * @param {string} location
2587
+ * @param {string} data_store
2588
+ * @param {string} branch
2589
+ * @param {string} document
2590
+ * @param {string} chunk
2591
+ * @returns {string} Resource name string.
2592
+ */
2593
+ projectLocationDataStoreBranchDocumentChunkPath(project, location, dataStore, branch, document, chunk) {
2594
+ return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.render({
2595
+ project: project,
2596
+ location: location,
2597
+ data_store: dataStore,
2598
+ branch: branch,
2599
+ document: document,
2600
+ chunk: chunk,
2601
+ });
2602
+ }
2603
+ /**
2604
+ * Parse the project from ProjectLocationDataStoreBranchDocumentChunk resource.
2605
+ *
2606
+ * @param {string} projectLocationDataStoreBranchDocumentChunkName
2607
+ * A fully-qualified path representing project_location_data_store_branch_document_chunk resource.
2608
+ * @returns {string} A string representing the project.
2609
+ */
2610
+ matchProjectFromProjectLocationDataStoreBranchDocumentChunkName(projectLocationDataStoreBranchDocumentChunkName) {
2611
+ return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match(projectLocationDataStoreBranchDocumentChunkName).project;
2612
+ }
2613
+ /**
2614
+ * Parse the location from ProjectLocationDataStoreBranchDocumentChunk resource.
2615
+ *
2616
+ * @param {string} projectLocationDataStoreBranchDocumentChunkName
2617
+ * A fully-qualified path representing project_location_data_store_branch_document_chunk resource.
2618
+ * @returns {string} A string representing the location.
2619
+ */
2620
+ matchLocationFromProjectLocationDataStoreBranchDocumentChunkName(projectLocationDataStoreBranchDocumentChunkName) {
2621
+ return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match(projectLocationDataStoreBranchDocumentChunkName).location;
2622
+ }
2623
+ /**
2624
+ * Parse the data_store from ProjectLocationDataStoreBranchDocumentChunk resource.
2625
+ *
2626
+ * @param {string} projectLocationDataStoreBranchDocumentChunkName
2627
+ * A fully-qualified path representing project_location_data_store_branch_document_chunk resource.
2628
+ * @returns {string} A string representing the data_store.
2629
+ */
2630
+ matchDataStoreFromProjectLocationDataStoreBranchDocumentChunkName(projectLocationDataStoreBranchDocumentChunkName) {
2631
+ return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match(projectLocationDataStoreBranchDocumentChunkName).data_store;
2632
+ }
2633
+ /**
2634
+ * Parse the branch from ProjectLocationDataStoreBranchDocumentChunk resource.
2635
+ *
2636
+ * @param {string} projectLocationDataStoreBranchDocumentChunkName
2637
+ * A fully-qualified path representing project_location_data_store_branch_document_chunk resource.
2638
+ * @returns {string} A string representing the branch.
2639
+ */
2640
+ matchBranchFromProjectLocationDataStoreBranchDocumentChunkName(projectLocationDataStoreBranchDocumentChunkName) {
2641
+ return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match(projectLocationDataStoreBranchDocumentChunkName).branch;
2642
+ }
2643
+ /**
2644
+ * Parse the document from ProjectLocationDataStoreBranchDocumentChunk resource.
2645
+ *
2646
+ * @param {string} projectLocationDataStoreBranchDocumentChunkName
2647
+ * A fully-qualified path representing project_location_data_store_branch_document_chunk resource.
2648
+ * @returns {string} A string representing the document.
2649
+ */
2650
+ matchDocumentFromProjectLocationDataStoreBranchDocumentChunkName(projectLocationDataStoreBranchDocumentChunkName) {
2651
+ return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match(projectLocationDataStoreBranchDocumentChunkName).document;
2652
+ }
2653
+ /**
2654
+ * Parse the chunk from ProjectLocationDataStoreBranchDocumentChunk resource.
2655
+ *
2656
+ * @param {string} projectLocationDataStoreBranchDocumentChunkName
2657
+ * A fully-qualified path representing project_location_data_store_branch_document_chunk resource.
2658
+ * @returns {string} A string representing the chunk.
2659
+ */
2660
+ matchChunkFromProjectLocationDataStoreBranchDocumentChunkName(projectLocationDataStoreBranchDocumentChunkName) {
2661
+ return this.pathTemplates.projectLocationDataStoreBranchDocumentChunkPathTemplate.match(projectLocationDataStoreBranchDocumentChunkName).chunk;
2662
+ }
2326
2663
  /**
2327
2664
  * Return a fully-qualified projectLocationDataStoreControl resource name string.
2328
2665
  *
@@ -2881,6 +3218,112 @@ class SearchServiceClient {
2881
3218
  matchTargetSiteFromProjectLocationDataStoreSiteSearchEngineTargetSiteName(projectLocationDataStoreSiteSearchEngineTargetSiteName) {
2882
3219
  return this.pathTemplates.projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate.match(projectLocationDataStoreSiteSearchEngineTargetSiteName).target_site;
2883
3220
  }
3221
+ /**
3222
+ * Return a fully-qualified sampleQuery resource name string.
3223
+ *
3224
+ * @param {string} project
3225
+ * @param {string} location
3226
+ * @param {string} sample_query_set
3227
+ * @param {string} sample_query
3228
+ * @returns {string} Resource name string.
3229
+ */
3230
+ sampleQueryPath(project, location, sampleQuerySet, sampleQuery) {
3231
+ return this.pathTemplates.sampleQueryPathTemplate.render({
3232
+ project: project,
3233
+ location: location,
3234
+ sample_query_set: sampleQuerySet,
3235
+ sample_query: sampleQuery,
3236
+ });
3237
+ }
3238
+ /**
3239
+ * Parse the project from SampleQuery resource.
3240
+ *
3241
+ * @param {string} sampleQueryName
3242
+ * A fully-qualified path representing SampleQuery resource.
3243
+ * @returns {string} A string representing the project.
3244
+ */
3245
+ matchProjectFromSampleQueryName(sampleQueryName) {
3246
+ return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
3247
+ .project;
3248
+ }
3249
+ /**
3250
+ * Parse the location from SampleQuery resource.
3251
+ *
3252
+ * @param {string} sampleQueryName
3253
+ * A fully-qualified path representing SampleQuery resource.
3254
+ * @returns {string} A string representing the location.
3255
+ */
3256
+ matchLocationFromSampleQueryName(sampleQueryName) {
3257
+ return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
3258
+ .location;
3259
+ }
3260
+ /**
3261
+ * Parse the sample_query_set from SampleQuery resource.
3262
+ *
3263
+ * @param {string} sampleQueryName
3264
+ * A fully-qualified path representing SampleQuery resource.
3265
+ * @returns {string} A string representing the sample_query_set.
3266
+ */
3267
+ matchSampleQuerySetFromSampleQueryName(sampleQueryName) {
3268
+ return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
3269
+ .sample_query_set;
3270
+ }
3271
+ /**
3272
+ * Parse the sample_query from SampleQuery resource.
3273
+ *
3274
+ * @param {string} sampleQueryName
3275
+ * A fully-qualified path representing SampleQuery resource.
3276
+ * @returns {string} A string representing the sample_query.
3277
+ */
3278
+ matchSampleQueryFromSampleQueryName(sampleQueryName) {
3279
+ return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
3280
+ .sample_query;
3281
+ }
3282
+ /**
3283
+ * Return a fully-qualified sampleQuerySet resource name string.
3284
+ *
3285
+ * @param {string} project
3286
+ * @param {string} location
3287
+ * @param {string} sample_query_set
3288
+ * @returns {string} Resource name string.
3289
+ */
3290
+ sampleQuerySetPath(project, location, sampleQuerySet) {
3291
+ return this.pathTemplates.sampleQuerySetPathTemplate.render({
3292
+ project: project,
3293
+ location: location,
3294
+ sample_query_set: sampleQuerySet,
3295
+ });
3296
+ }
3297
+ /**
3298
+ * Parse the project from SampleQuerySet resource.
3299
+ *
3300
+ * @param {string} sampleQuerySetName
3301
+ * A fully-qualified path representing SampleQuerySet resource.
3302
+ * @returns {string} A string representing the project.
3303
+ */
3304
+ matchProjectFromSampleQuerySetName(sampleQuerySetName) {
3305
+ return this.pathTemplates.sampleQuerySetPathTemplate.match(sampleQuerySetName).project;
3306
+ }
3307
+ /**
3308
+ * Parse the location from SampleQuerySet resource.
3309
+ *
3310
+ * @param {string} sampleQuerySetName
3311
+ * A fully-qualified path representing SampleQuerySet resource.
3312
+ * @returns {string} A string representing the location.
3313
+ */
3314
+ matchLocationFromSampleQuerySetName(sampleQuerySetName) {
3315
+ return this.pathTemplates.sampleQuerySetPathTemplate.match(sampleQuerySetName).location;
3316
+ }
3317
+ /**
3318
+ * Parse the sample_query_set from SampleQuerySet resource.
3319
+ *
3320
+ * @param {string} sampleQuerySetName
3321
+ * A fully-qualified path representing SampleQuerySet resource.
3322
+ * @returns {string} A string representing the sample_query_set.
3323
+ */
3324
+ matchSampleQuerySetFromSampleQuerySetName(sampleQuerySetName) {
3325
+ return this.pathTemplates.sampleQuerySetPathTemplate.match(sampleQuerySetName).sample_query_set;
3326
+ }
2884
3327
  /**
2885
3328
  * Terminate the gRPC channel and close the client.
2886
3329
  *