@google-cloud/discoveryengine 1.12.0 → 1.14.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 (121) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +10 -0
  3. package/build/protos/google/cloud/discoveryengine/v1/answer.proto +49 -5
  4. package/build/protos/google/cloud/discoveryengine/v1/control.proto +6 -4
  5. package/build/protos/google/cloud/discoveryengine/v1/conversational_search_service.proto +9 -9
  6. package/build/protos/google/cloud/discoveryengine/v1/custom_tuning_model.proto +96 -0
  7. package/build/protos/google/cloud/discoveryengine/v1/data_store_service.proto +10 -0
  8. package/build/protos/google/cloud/discoveryengine/v1/document.proto +20 -0
  9. package/build/protos/google/cloud/discoveryengine/v1/document_processing_config.proto +2 -0
  10. package/build/protos/google/cloud/discoveryengine/v1/document_service.proto +110 -0
  11. package/build/protos/google/cloud/discoveryengine/v1/grounded_generation_service.proto +2 -1
  12. package/build/protos/google/cloud/discoveryengine/v1/import_config.proto +13 -7
  13. package/build/protos/google/cloud/discoveryengine/v1/purge_config.proto +117 -0
  14. package/build/protos/google/cloud/discoveryengine/v1/recommendation_service.proto +2 -1
  15. package/build/protos/google/cloud/discoveryengine/v1/search_service.proto +40 -16
  16. package/build/protos/google/cloud/discoveryengine/v1/search_tuning_service.proto +196 -0
  17. package/build/protos/google/cloud/discoveryengine/v1/user_event.proto +4 -0
  18. package/build/protos/google/cloud/discoveryengine/v1/user_event_service.proto +21 -0
  19. package/build/protos/google/cloud/discoveryengine/v1alpha/acl_config_service.proto +1 -1
  20. package/build/protos/google/cloud/discoveryengine/v1alpha/answer.proto +61 -2
  21. package/build/protos/google/cloud/discoveryengine/v1alpha/chunk.proto +1 -1
  22. package/build/protos/google/cloud/discoveryengine/v1alpha/completion.proto +31 -0
  23. package/build/protos/google/cloud/discoveryengine/v1alpha/completion_service.proto +38 -0
  24. package/build/protos/google/cloud/discoveryengine/v1alpha/control.proto +1 -1
  25. package/build/protos/google/cloud/discoveryengine/v1alpha/conversational_search_service.proto +28 -9
  26. package/build/protos/google/cloud/discoveryengine/v1alpha/custom_tuning_model.proto +10 -1
  27. package/build/protos/google/cloud/discoveryengine/v1alpha/data_store.proto +71 -0
  28. package/build/protos/google/cloud/discoveryengine/v1alpha/data_store_service.proto +11 -1
  29. package/build/protos/google/cloud/discoveryengine/v1alpha/document.proto +24 -1
  30. package/build/protos/google/cloud/discoveryengine/v1alpha/document_processing_config.proto +6 -2
  31. package/build/protos/google/cloud/discoveryengine/v1alpha/document_service.proto +108 -1
  32. package/build/protos/google/cloud/discoveryengine/v1alpha/grounded_generation_service.proto +2 -1
  33. package/build/protos/google/cloud/discoveryengine/v1alpha/import_config.proto +119 -5
  34. package/build/protos/google/cloud/discoveryengine/v1alpha/purge_config.proto +58 -1
  35. package/build/protos/google/cloud/discoveryengine/v1alpha/schema.proto +5 -0
  36. package/build/protos/google/cloud/discoveryengine/v1alpha/search_service.proto +428 -12
  37. package/build/protos/google/cloud/discoveryengine/v1alpha/serving_config.proto +14 -5
  38. package/build/protos/google/cloud/discoveryengine/v1alpha/site_search_engine_service.proto +126 -0
  39. package/build/protos/google/cloud/discoveryengine/v1alpha/user_event.proto +4 -0
  40. package/build/protos/google/cloud/discoveryengine/v1alpha/user_event_service.proto +3 -0
  41. package/build/protos/google/cloud/discoveryengine/v1beta/answer.proto +47 -2
  42. package/build/protos/google/cloud/discoveryengine/v1beta/control.proto +1 -1
  43. package/build/protos/google/cloud/discoveryengine/v1beta/conversational_search_service.proto +3 -0
  44. package/build/protos/google/cloud/discoveryengine/v1beta/custom_tuning_model.proto +3 -0
  45. package/build/protos/google/cloud/discoveryengine/v1beta/document.proto +20 -0
  46. package/build/protos/google/cloud/discoveryengine/v1beta/document_processing_config.proto +2 -0
  47. package/build/protos/google/cloud/discoveryengine/v1beta/document_service.proto +114 -0
  48. package/build/protos/google/cloud/discoveryengine/v1beta/grounded_generation_service.proto +2 -1
  49. package/build/protos/google/cloud/discoveryengine/v1beta/import_config.proto +13 -7
  50. package/build/protos/google/cloud/discoveryengine/v1beta/purge_config.proto +44 -0
  51. package/build/protos/google/cloud/discoveryengine/v1beta/search_service.proto +101 -6
  52. package/build/protos/google/cloud/discoveryengine/v1beta/user_event.proto +4 -0
  53. package/build/protos/protos.d.ts +24137 -16126
  54. package/build/protos/protos.js +78286 -58223
  55. package/build/protos/protos.json +1954 -105
  56. package/build/src/index.d.ts +4 -1
  57. package/build/src/index.js +4 -1
  58. package/build/src/v1/completion_service_client.d.ts +93 -0
  59. package/build/src/v1/completion_service_client.js +134 -0
  60. package/build/src/v1/control_service_client.d.ts +93 -0
  61. package/build/src/v1/control_service_client.js +128 -0
  62. package/build/src/v1/conversational_search_service_client.d.ts +93 -0
  63. package/build/src/v1/conversational_search_service_client.js +128 -0
  64. package/build/src/v1/data_store_service_client.d.ts +102 -0
  65. package/build/src/v1/data_store_service_client.js +134 -0
  66. package/build/src/v1/document_service_client.d.ts +131 -0
  67. package/build/src/v1/document_service_client.js +156 -0
  68. package/build/src/v1/document_service_client_config.json +5 -0
  69. package/build/src/v1/engine_service_client.d.ts +93 -0
  70. package/build/src/v1/engine_service_client.js +134 -0
  71. package/build/src/v1/grounded_generation_service_client.d.ts +93 -0
  72. package/build/src/v1/grounded_generation_service_client.js +128 -0
  73. package/build/src/v1/index.d.ts +1 -0
  74. package/build/src/v1/index.js +3 -1
  75. package/build/src/v1/project_service_client.d.ts +93 -0
  76. package/build/src/v1/project_service_client.js +134 -0
  77. package/build/src/v1/rank_service_client.d.ts +93 -0
  78. package/build/src/v1/rank_service_client.js +128 -0
  79. package/build/src/v1/recommendation_service_client.d.ts +95 -1
  80. package/build/src/v1/recommendation_service_client.js +128 -0
  81. package/build/src/v1/schema_service_client.d.ts +93 -0
  82. package/build/src/v1/schema_service_client.js +134 -0
  83. package/build/src/v1/search_service_client.d.ts +111 -9
  84. package/build/src/v1/search_service_client.js +140 -6
  85. package/build/src/v1/search_tuning_service_client.d.ts +1776 -0
  86. package/build/src/v1/search_tuning_service_client.js +2589 -0
  87. package/build/src/v1/search_tuning_service_client_config.json +34 -0
  88. package/build/src/v1/site_search_engine_service_client.d.ts +93 -0
  89. package/build/src/v1/site_search_engine_service_client.js +134 -0
  90. package/build/src/v1/user_event_service_client.d.ts +168 -0
  91. package/build/src/v1/user_event_service_client.js +176 -0
  92. package/build/src/v1/user_event_service_client_config.json +5 -0
  93. package/build/src/v1alpha/acl_config_service_client.d.ts +1 -1
  94. package/build/src/v1alpha/completion_service_client.d.ts +91 -0
  95. package/build/src/v1alpha/completion_service_client.js +90 -0
  96. package/build/src/v1alpha/completion_service_client_config.json +10 -0
  97. package/build/src/v1alpha/conversational_search_service_client.d.ts +18 -0
  98. package/build/src/v1alpha/data_store_service_client.d.ts +12 -3
  99. package/build/src/v1alpha/data_store_service_client.js +8 -2
  100. package/build/src/v1alpha/document_service_client.d.ts +33 -0
  101. package/build/src/v1alpha/document_service_client.js +28 -0
  102. package/build/src/v1alpha/document_service_client_config.json +5 -0
  103. package/build/src/v1alpha/engine_service_client.js +6 -0
  104. package/build/src/v1alpha/estimate_billing_service_client.js +6 -0
  105. package/build/src/v1alpha/evaluation_service_client.js +6 -0
  106. package/build/src/v1alpha/project_service_client.js +6 -0
  107. package/build/src/v1alpha/sample_query_service_client.js +6 -0
  108. package/build/src/v1alpha/schema_service_client.js +6 -0
  109. package/build/src/v1alpha/search_service_client.d.ts +219 -21
  110. package/build/src/v1alpha/search_service_client.js +146 -14
  111. package/build/src/v1alpha/search_tuning_service_client.js +6 -0
  112. package/build/src/v1alpha/site_search_engine_service_client.d.ts +101 -0
  113. package/build/src/v1alpha/site_search_engine_service_client.js +70 -0
  114. package/build/src/v1alpha/site_search_engine_service_client_config.json +8 -0
  115. package/build/src/v1alpha/user_event_service_client.js +6 -0
  116. package/build/src/v1beta/document_service_client.d.ts +38 -0
  117. package/build/src/v1beta/document_service_client.js +22 -0
  118. package/build/src/v1beta/document_service_client_config.json +5 -0
  119. package/build/src/v1beta/search_service_client.d.ts +36 -9
  120. package/build/src/v1beta/search_service_client.js +24 -6
  121. package/package.json +2 -2
@@ -498,6 +498,14 @@ message SearchRequest {
498
498
  // fallback messages instead.
499
499
  bool ignore_non_summary_seeking_query = 4;
500
500
 
501
+ // Specifies whether to filter out queries that have low relevance. The
502
+ // default value is `false`.
503
+ //
504
+ // If this field is set to `false`, all search results are used regardless
505
+ // of relevance to generate answers. If set to `true`, only queries with
506
+ // high relevance search results will generate answers.
507
+ bool ignore_low_relevant_content = 9;
508
+
501
509
  // If specified, the spec will be used to modify the prompt provided to
502
510
  // the LLM.
503
511
  ModelPromptSpec model_prompt_spec = 5;
@@ -737,6 +745,27 @@ message SearchRequest {
737
745
  optional int32 search_result_persistence_count = 2;
738
746
  }
739
747
 
748
+ // The relevance threshold of the search results. The higher relevance
749
+ // threshold is, the higher relevant results are shown and the less number of
750
+ // results are returned.
751
+ enum RelevanceThreshold {
752
+ // Default value. In this case, server behavior defaults to Google defined
753
+ // threshold.
754
+ RELEVANCE_THRESHOLD_UNSPECIFIED = 0;
755
+
756
+ // Lowest relevance threshold.
757
+ LOWEST = 1;
758
+
759
+ // Low relevance threshold.
760
+ LOW = 2;
761
+
762
+ // Medium relevance threshold.
763
+ MEDIUM = 3;
764
+
765
+ // High relevance threshold.
766
+ HIGH = 4;
767
+ }
768
+
740
769
  // Required. The resource name of the Search serving config, such as
741
770
  // `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`,
742
771
  // or
@@ -838,9 +867,12 @@ message SearchRequest {
838
867
  // object. Leave it unset if ordered by relevance. `order_by` expression is
839
868
  // case-sensitive.
840
869
  //
841
- // For more information on ordering for retail search, see
842
- // [Ordering](https://cloud.google.com/retail/docs/filter-and-order#order)
843
- //
870
+ // For more information on ordering the website search results, see
871
+ // [Order web search
872
+ // results](https://cloud.google.com/generative-ai-app-builder/docs/order-web-search-results).
873
+ // For more information on ordering the healthcare search results, see
874
+ // [Order healthcare search
875
+ // results](https://cloud.google.com/generative-ai-app-builder/docs/order-hc-results).
844
876
  // If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
845
877
  string order_by = 8;
846
878
 
@@ -1025,6 +1057,13 @@ message SearchRequest {
1025
1057
  //
1026
1058
  // Can be used only when `session` is set.
1027
1059
  SessionSpec session_spec = 42;
1060
+
1061
+ // The relevance threshold of the search results.
1062
+ //
1063
+ // Default to Google defined threshold, leveraging a balance of
1064
+ // precision and recall to deliver both highly accurate results and
1065
+ // comprehensive coverage of relevant information.
1066
+ RelevanceThreshold relevance_threshold = 44;
1028
1067
  }
1029
1068
 
1030
1069
  // Response message for
@@ -1191,14 +1230,14 @@ message SearchResponse {
1191
1230
 
1192
1231
  // The adversarial query ignored case.
1193
1232
  //
1194
- // Only populated when
1233
+ // Only used when
1195
1234
  // [SummarySpec.ignore_adversarial_query][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ignore_adversarial_query]
1196
1235
  // is set to `true`.
1197
1236
  ADVERSARIAL_QUERY_IGNORED = 1;
1198
1237
 
1199
1238
  // The non-summary seeking query ignored case.
1200
1239
  //
1201
- // Only populated when
1240
+ // Only used when
1202
1241
  // [SummarySpec.ignore_non_summary_seeking_query][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ignore_non_summary_seeking_query]
1203
1242
  // is set to `true`.
1204
1243
  NON_SUMMARY_SEEKING_QUERY_IGNORED = 2;
@@ -1226,6 +1265,20 @@ message SearchResponse {
1226
1265
  // Google skips the summary if there is no relevant content in the
1227
1266
  // retrieved search results.
1228
1267
  NO_RELEVANT_CONTENT = 6;
1268
+
1269
+ // The jail-breaking query ignored case.
1270
+ //
1271
+ // For example, "Reply in the tone of a competing company's CEO".
1272
+ // Only used when
1273
+ // [SearchRequest.ContentSearchSpec.SummarySpec.ignore_jail_breaking_query]
1274
+ // is set to `true`.
1275
+ JAIL_BREAKING_QUERY_IGNORED = 7;
1276
+
1277
+ // The customer policy violation case.
1278
+ //
1279
+ // Google skips the summary if there is a customer policy violation
1280
+ // detected. The policy is defined by the customer.
1281
+ CUSTOMER_POLICY_VIOLATION = 8;
1229
1282
  }
1230
1283
 
1231
1284
  // The summary content.
@@ -1280,6 +1333,9 @@ message SearchResponse {
1280
1333
  // Values of the string field. The record will only be returned if the
1281
1334
  // field value matches one of the values specified here.
1282
1335
  repeated string values = 2;
1336
+
1337
+ // Identifies the keywords within the search query that match a filter.
1338
+ string query_segment = 3;
1283
1339
  }
1284
1340
 
1285
1341
  // Constraint expression of a number field. Example: price < 100.
@@ -1314,6 +1370,9 @@ message SearchResponse {
1314
1370
 
1315
1371
  // The value specified in the numerical constraint.
1316
1372
  double value = 3;
1373
+
1374
+ // Identifies the keywords within the search query that match a filter.
1375
+ string query_segment = 4;
1317
1376
  }
1318
1377
 
1319
1378
  // Constraint of a geolocation field.
@@ -1327,6 +1386,12 @@ message SearchResponse {
1327
1386
  // used to filter the results.
1328
1387
  string address = 2;
1329
1388
 
1389
+ // The latitude of the geolocation inferred from the input query.
1390
+ double latitude = 4;
1391
+
1392
+ // The longitude of the geolocation inferred from the input query.
1393
+ double longitude = 5;
1394
+
1330
1395
  // The radius in meters around the address. The record is returned if
1331
1396
  // the location of the geolocation field is within the radius.
1332
1397
  float radius_in_meters = 3;
@@ -1402,6 +1467,31 @@ message SearchResponse {
1402
1467
  string query_id = 2;
1403
1468
  }
1404
1469
 
1470
+ // OneBoxResult is a holder for all results of specific type that we want
1471
+ // to display in UI differently.
1472
+ message OneBoxResult {
1473
+ // The type of One Box result.
1474
+ enum OneBoxType {
1475
+ // Default value. Should not be used.
1476
+ ONE_BOX_TYPE_UNSPECIFIED = 0;
1477
+
1478
+ // One Box result contains people results.
1479
+ PEOPLE = 1;
1480
+
1481
+ // One Box result contains organization results.
1482
+ ORGANIZATION = 2;
1483
+
1484
+ // One Box result contains slack results.
1485
+ SLACK = 3;
1486
+ }
1487
+
1488
+ // The type of One Box result.
1489
+ OneBoxType one_box_type = 1;
1490
+
1491
+ // The search results for this One Box.
1492
+ repeated SearchResult search_results = 2;
1493
+ }
1494
+
1405
1495
  // A list of matched documents. The order represents the ranking.
1406
1496
  repeated SearchResult results = 1;
1407
1497
 
@@ -1422,7 +1512,8 @@ message SearchResponse {
1422
1512
  // A unique search token. This should be included in the
1423
1513
  // [UserEvent][google.cloud.discoveryengine.v1beta.UserEvent] logs resulting
1424
1514
  // from this search, which enables accurate attribution of search model
1425
- // performance.
1515
+ // performance. This also helps to identify a request during the customer
1516
+ // support scenarios.
1426
1517
  string attribution_token = 4;
1427
1518
 
1428
1519
  // The URI of a customer-defined redirect page. If redirect action is
@@ -1468,4 +1559,8 @@ message SearchResponse {
1468
1559
  // [SearchRequest.session][google.cloud.discoveryengine.v1beta.SearchRequest.session]
1469
1560
  // is provided. See its description for more details.
1470
1561
  SessionInfo session_info = 19;
1562
+
1563
+ // A list of One Box results. There can be multiple One Box results of
1564
+ // different types.
1565
+ repeated OneBoxResult one_box_results = 20;
1471
1566
  }
@@ -456,6 +456,10 @@ message DocumentInfo {
456
456
  // The promotion IDs associated with this Document.
457
457
  // Currently, this field is restricted to at most one ID.
458
458
  repeated string promotion_ids = 4;
459
+
460
+ // Output only. Whether the referenced Document can be found in the data
461
+ // store.
462
+ bool joined = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
459
463
  }
460
464
 
461
465
  // Detailed panel information associated with a user event.