@google-cloud/discoveryengine 2.0.1 → 2.1.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 (85) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/README.md +7 -2
  3. package/build/protos/google/cloud/discoveryengine/v1/answer.proto +54 -2
  4. package/build/protos/google/cloud/discoveryengine/v1/chunk.proto +2 -1
  5. package/build/protos/google/cloud/discoveryengine/v1/common.proto +35 -6
  6. package/build/protos/google/cloud/discoveryengine/v1/control.proto +113 -2
  7. package/build/protos/google/cloud/discoveryengine/v1/conversational_search_service.proto +168 -2
  8. package/build/protos/google/cloud/discoveryengine/v1/data_store.proto +23 -4
  9. package/build/protos/google/cloud/discoveryengine/v1/document.proto +7 -2
  10. package/build/protos/google/cloud/discoveryengine/v1/document_service.proto +1 -1
  11. package/build/protos/google/cloud/discoveryengine/v1/engine.proto +16 -3
  12. package/build/protos/google/cloud/discoveryengine/v1/grounded_generation_service.proto +70 -9
  13. package/build/protos/google/cloud/discoveryengine/v1/import_config.proto +20 -1
  14. package/build/protos/google/cloud/discoveryengine/v1/purge_config.proto +9 -5
  15. package/build/protos/google/cloud/discoveryengine/v1/rank_service.proto +3 -1
  16. package/build/protos/google/cloud/discoveryengine/v1/recommendation_service.proto +2 -2
  17. package/build/protos/google/cloud/discoveryengine/v1/safety.proto +107 -0
  18. package/build/protos/google/cloud/discoveryengine/v1/search_service.proto +96 -8
  19. package/build/protos/google/cloud/discoveryengine/v1/serving_config.proto +271 -0
  20. package/build/protos/google/cloud/discoveryengine/v1/serving_config_service.proto +75 -0
  21. package/build/protos/google/cloud/discoveryengine/v1/session.proto +19 -0
  22. package/build/protos/google/cloud/discoveryengine/v1/site_search_engine.proto +27 -3
  23. package/build/protos/google/cloud/discoveryengine/v1/site_search_engine_service.proto +184 -5
  24. package/build/protos/google/cloud/discoveryengine/v1/user_event.proto +34 -0
  25. package/build/protos/google/cloud/discoveryengine/v1/user_event_service.proto +16 -4
  26. package/build/protos/protos.d.ts +5356 -981
  27. package/build/protos/protos.js +32266 -20956
  28. package/build/protos/protos.json +1391 -74
  29. package/build/src/index.d.ts +4 -1
  30. package/build/src/index.js +4 -1
  31. package/build/src/v1/completion_service_client.d.ts +237 -0
  32. package/build/src/v1/completion_service_client.js +326 -0
  33. package/build/src/v1/completion_service_proto_list.json +3 -0
  34. package/build/src/v1/control_service_client.d.ts +237 -0
  35. package/build/src/v1/control_service_client.js +326 -0
  36. package/build/src/v1/control_service_proto_list.json +3 -0
  37. package/build/src/v1/conversational_search_service_client.d.ts +213 -6
  38. package/build/src/v1/conversational_search_service_client.js +265 -5
  39. package/build/src/v1/conversational_search_service_client_config.json +5 -0
  40. package/build/src/v1/conversational_search_service_proto_list.json +3 -0
  41. package/build/src/v1/data_store_service_client.d.ts +237 -0
  42. package/build/src/v1/data_store_service_client.js +326 -0
  43. package/build/src/v1/data_store_service_proto_list.json +3 -0
  44. package/build/src/v1/document_service_client.d.ts +244 -1
  45. package/build/src/v1/document_service_client.js +326 -0
  46. package/build/src/v1/document_service_proto_list.json +3 -0
  47. package/build/src/v1/engine_service_client.d.ts +237 -0
  48. package/build/src/v1/engine_service_client.js +326 -0
  49. package/build/src/v1/engine_service_proto_list.json +3 -0
  50. package/build/src/v1/gapic_metadata.json +59 -0
  51. package/build/src/v1/grounded_generation_service_client.d.ts +238 -3
  52. package/build/src/v1/grounded_generation_service_client.js +326 -0
  53. package/build/src/v1/grounded_generation_service_proto_list.json +3 -0
  54. package/build/src/v1/index.d.ts +1 -0
  55. package/build/src/v1/index.js +3 -1
  56. package/build/src/v1/project_service_client.d.ts +237 -0
  57. package/build/src/v1/project_service_client.js +326 -0
  58. package/build/src/v1/project_service_proto_list.json +3 -0
  59. package/build/src/v1/rank_service_client.d.ts +238 -1
  60. package/build/src/v1/rank_service_client.js +326 -0
  61. package/build/src/v1/rank_service_proto_list.json +3 -0
  62. package/build/src/v1/recommendation_service_client.d.ts +95 -2
  63. package/build/src/v1/recommendation_service_client.js +128 -0
  64. package/build/src/v1/recommendation_service_proto_list.json +3 -0
  65. package/build/src/v1/schema_service_client.d.ts +237 -0
  66. package/build/src/v1/schema_service_client.js +326 -0
  67. package/build/src/v1/schema_service_proto_list.json +3 -0
  68. package/build/src/v1/search_service_client.d.ts +219 -30
  69. package/build/src/v1/search_service_client.js +212 -20
  70. package/build/src/v1/search_service_proto_list.json +3 -0
  71. package/build/src/v1/search_tuning_service_client.d.ts +237 -0
  72. package/build/src/v1/search_tuning_service_client.js +326 -0
  73. package/build/src/v1/search_tuning_service_proto_list.json +3 -0
  74. package/build/src/v1/serving_config_service_client.d.ts +1851 -0
  75. package/build/src/v1/serving_config_service_client.js +2653 -0
  76. package/build/src/v1/serving_config_service_client_config.json +30 -0
  77. package/build/src/v1/serving_config_service_proto_list.json +39 -0
  78. package/build/src/v1/site_search_engine_service_client.d.ts +356 -3
  79. package/build/src/v1/site_search_engine_service_client.js +473 -0
  80. package/build/src/v1/site_search_engine_service_client_config.json +12 -0
  81. package/build/src/v1/site_search_engine_service_proto_list.json +3 -0
  82. package/build/src/v1/user_event_service_client.d.ts +258 -9
  83. package/build/src/v1/user_event_service_client.js +326 -0
  84. package/build/src/v1/user_event_service_proto_list.json +3 -0
  85. package/package.json +4 -4
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.1.0](https://github.com/googleapis/google-cloud-node/compare/discoveryengine-v2.0.1...discoveryengine-v2.1.0) (2025-05-09)
4
+
5
+
6
+ ### Features
7
+
8
+ * [discoveryengine] move serving config update API to GA ([#6211](https://github.com/googleapis/google-cloud-node/issues/6211)) ([2fcdb39](https://github.com/googleapis/google-cloud-node/commit/2fcdb39efdd799850847756f2dcf128d1262e1a0))
9
+
3
10
  ## [2.0.1](https://github.com/googleapis/google-cloud-node/compare/discoveryengine-v2.0.0...discoveryengine-v2.0.1) (2025-03-21)
4
11
 
5
12
 
package/README.md CHANGED
@@ -44,7 +44,7 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained].
44
44
  1. [Select or create a Cloud Platform project][projects].
45
45
  1. [Enable billing for your project][billing].
46
46
  1. [Enable the Discovery Engine API API][enable_api].
47
- 1. [Set up authentication with a service account][auth] so you can access the
47
+ 1. [Set up authentication][auth] so you can access the
48
48
  API from your local workstation.
49
49
 
50
50
  ### Installing the client library
@@ -146,6 +146,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/
146
146
  | Conversational_search_service.get_session | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1/conversational_search_service.get_session.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1/conversational_search_service.get_session.js,packages/google-cloud-discoveryengine/samples/README.md) |
147
147
  | Conversational_search_service.list_conversations | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1/conversational_search_service.list_conversations.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1/conversational_search_service.list_conversations.js,packages/google-cloud-discoveryengine/samples/README.md) |
148
148
  | Conversational_search_service.list_sessions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1/conversational_search_service.list_sessions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1/conversational_search_service.list_sessions.js,packages/google-cloud-discoveryengine/samples/README.md) |
149
+ | Conversational_search_service.stream_answer_query | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1/conversational_search_service.stream_answer_query.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1/conversational_search_service.stream_answer_query.js,packages/google-cloud-discoveryengine/samples/README.md) |
149
150
  | Conversational_search_service.update_conversation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1/conversational_search_service.update_conversation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1/conversational_search_service.update_conversation.js,packages/google-cloud-discoveryengine/samples/README.md) |
150
151
  | Conversational_search_service.update_session | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1/conversational_search_service.update_session.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1/conversational_search_service.update_session.js,packages/google-cloud-discoveryengine/samples/README.md) |
151
152
  | Data_store_service.create_data_store | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1/data_store_service.create_data_store.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1/data_store_service.create_data_store.js,packages/google-cloud-discoveryengine/samples/README.md) |
@@ -181,13 +182,17 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/
181
182
  | Search_service.search_lite | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1/search_service.search_lite.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1/search_service.search_lite.js,packages/google-cloud-discoveryengine/samples/README.md) |
182
183
  | Search_tuning_service.list_custom_models | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1/search_tuning_service.list_custom_models.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1/search_tuning_service.list_custom_models.js,packages/google-cloud-discoveryengine/samples/README.md) |
183
184
  | Search_tuning_service.train_custom_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1/search_tuning_service.train_custom_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1/search_tuning_service.train_custom_model.js,packages/google-cloud-discoveryengine/samples/README.md) |
185
+ | Serving_config_service.update_serving_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1/serving_config_service.update_serving_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1/serving_config_service.update_serving_config.js,packages/google-cloud-discoveryengine/samples/README.md) |
184
186
  | Site_search_engine_service.batch_create_target_sites | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1/site_search_engine_service.batch_create_target_sites.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1/site_search_engine_service.batch_create_target_sites.js,packages/google-cloud-discoveryengine/samples/README.md) |
185
187
  | Site_search_engine_service.batch_verify_target_sites | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1/site_search_engine_service.batch_verify_target_sites.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1/site_search_engine_service.batch_verify_target_sites.js,packages/google-cloud-discoveryengine/samples/README.md) |
188
+ | Site_search_engine_service.create_sitemap | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1/site_search_engine_service.create_sitemap.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1/site_search_engine_service.create_sitemap.js,packages/google-cloud-discoveryengine/samples/README.md) |
186
189
  | Site_search_engine_service.create_target_site | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1/site_search_engine_service.create_target_site.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1/site_search_engine_service.create_target_site.js,packages/google-cloud-discoveryengine/samples/README.md) |
190
+ | Site_search_engine_service.delete_sitemap | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1/site_search_engine_service.delete_sitemap.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1/site_search_engine_service.delete_sitemap.js,packages/google-cloud-discoveryengine/samples/README.md) |
187
191
  | Site_search_engine_service.delete_target_site | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1/site_search_engine_service.delete_target_site.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1/site_search_engine_service.delete_target_site.js,packages/google-cloud-discoveryengine/samples/README.md) |
188
192
  | Site_search_engine_service.disable_advanced_site_search | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1/site_search_engine_service.disable_advanced_site_search.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1/site_search_engine_service.disable_advanced_site_search.js,packages/google-cloud-discoveryengine/samples/README.md) |
189
193
  | Site_search_engine_service.enable_advanced_site_search | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1/site_search_engine_service.enable_advanced_site_search.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1/site_search_engine_service.enable_advanced_site_search.js,packages/google-cloud-discoveryengine/samples/README.md) |
190
194
  | Site_search_engine_service.fetch_domain_verification_status | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1/site_search_engine_service.fetch_domain_verification_status.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1/site_search_engine_service.fetch_domain_verification_status.js,packages/google-cloud-discoveryengine/samples/README.md) |
195
+ | Site_search_engine_service.fetch_sitemaps | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1/site_search_engine_service.fetch_sitemaps.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1/site_search_engine_service.fetch_sitemaps.js,packages/google-cloud-discoveryengine/samples/README.md) |
191
196
  | Site_search_engine_service.get_site_search_engine | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1/site_search_engine_service.get_site_search_engine.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1/site_search_engine_service.get_site_search_engine.js,packages/google-cloud-discoveryengine/samples/README.md) |
192
197
  | Site_search_engine_service.get_target_site | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1/site_search_engine_service.get_target_site.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1/site_search_engine_service.get_target_site.js,packages/google-cloud-discoveryengine/samples/README.md) |
193
198
  | Site_search_engine_service.list_target_sites | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1/site_search_engine_service.list_target_sites.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1/site_search_engine_service.list_target_sites.js,packages/google-cloud-discoveryengine/samples/README.md) |
@@ -466,4 +471,4 @@ See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE)
466
471
  [projects]: https://console.cloud.google.com/project
467
472
  [billing]: https://support.google.com/cloud/answer/6293499#enable-billing
468
473
  [enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=discoveryengine.googleapis.com
469
- [auth]: https://cloud.google.com/docs/authentication/getting-started
474
+ [auth]: https://cloud.google.com/docs/authentication/external/set-up-adc-local
@@ -18,6 +18,7 @@ package google.cloud.discoveryengine.v1;
18
18
 
19
19
  import "google/api/field_behavior.proto";
20
20
  import "google/api/resource.proto";
21
+ import "google/cloud/discoveryengine/v1/safety.proto";
21
22
  import "google/protobuf/struct.proto";
22
23
  import "google/protobuf/timestamp.proto";
23
24
 
@@ -42,10 +43,13 @@ message Answer {
42
43
  // Citation info for a segment.
43
44
  message Citation {
44
45
  // Index indicates the start of the segment, measured in bytes (UTF-8
45
- // unicode).
46
+ // unicode). If there are multi-byte characters,such as non-ASCII
47
+ // characters, the index measurement is longer than the string length.
46
48
  int64 start_index = 1;
47
49
 
48
- // End of the attributed segment, exclusive.
50
+ // End of the attributed segment, exclusive. Measured in bytes (UTF-8
51
+ // unicode). If there are multi-byte characters,such as non-ASCII
52
+ // characters, the index measurement is longer than the string length.
49
53
  int64 end_index = 2;
50
54
 
51
55
  // Citation sources for the attributed segment.
@@ -58,6 +62,33 @@ message Answer {
58
62
  string reference_id = 1;
59
63
  }
60
64
 
65
+ // Grounding support for a claim in `answer_text`.
66
+ message GroundingSupport {
67
+ // Required. Index indicates the start of the claim, measured in bytes
68
+ // (UTF-8 unicode).
69
+ int64 start_index = 1 [(google.api.field_behavior) = REQUIRED];
70
+
71
+ // Required. End of the claim, exclusive.
72
+ int64 end_index = 2 [(google.api.field_behavior) = REQUIRED];
73
+
74
+ // A score in the range of [0, 1] describing how grounded is a specific
75
+ // claim by the references.
76
+ // Higher value means that the claim is better supported by the reference
77
+ // chunks.
78
+ optional double grounding_score = 3;
79
+
80
+ // Indicates that this claim required grounding check. When the
81
+ // system decided this claim didn't require attribution/grounding check,
82
+ // this field is set to false. In that case, no grounding check was
83
+ // done for the claim and therefore `grounding_score`, `sources` is not
84
+ // returned.
85
+ optional bool grounding_check_required = 4;
86
+
87
+ // Optional. Citation sources for the claim.
88
+ repeated CitationSource sources = 5
89
+ [(google.api.field_behavior) = OPTIONAL];
90
+ }
91
+
61
92
  // Reference.
62
93
  message Reference {
63
94
  // Unstructured document information.
@@ -148,6 +179,12 @@ message Answer {
148
179
 
149
180
  // Structured search data.
150
181
  google.protobuf.Struct struct_data = 2;
182
+
183
+ // Output only. The title of the document.
184
+ string title = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
185
+
186
+ // Output only. The URI of the document.
187
+ string uri = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
151
188
  }
152
189
 
153
190
  // Search result content.
@@ -314,6 +351,9 @@ message Answer {
314
351
 
315
352
  // Answer generation has succeeded.
316
353
  SUCCEEDED = 3;
354
+
355
+ // Answer generation is currently in progress.
356
+ STREAMING = 4;
317
357
  }
318
358
 
319
359
  // An enum for answer skipped reasons.
@@ -381,9 +421,17 @@ message Answer {
381
421
  // The textual answer.
382
422
  string answer_text = 3;
383
423
 
424
+ // A score in the range of [0, 1] describing how grounded the answer is by the
425
+ // reference chunks.
426
+ optional double grounding_score = 12;
427
+
384
428
  // Citations.
385
429
  repeated Citation citations = 4;
386
430
 
431
+ // Optional. Grounding supports.
432
+ repeated GroundingSupport grounding_supports = 13
433
+ [(google.api.field_behavior) = OPTIONAL];
434
+
387
435
  // References.
388
436
  repeated Reference references = 5;
389
437
 
@@ -407,4 +455,8 @@ message Answer {
407
455
  // Output only. Answer completed timestamp.
408
456
  google.protobuf.Timestamp complete_time = 9
409
457
  [(google.api.field_behavior) = OUTPUT_ONLY];
458
+
459
+ // Optional. Safety ratings.
460
+ repeated SafetyRating safety_ratings = 14
461
+ [(google.api.field_behavior) = OPTIONAL];
410
462
  }
@@ -99,7 +99,8 @@ message Chunk {
99
99
  // Output only. Represents the relevance score based on similarity.
100
100
  // Higher score indicates higher chunk relevance.
101
101
  // The score is in range [-1.0, 1.0].
102
- // Only populated on [SearchService.SearchResponse][].
102
+ // Only populated on
103
+ // [SearchResponse][google.cloud.discoveryengine.v1.SearchResponse].
103
104
  optional double relevance_score = 8
104
105
  [(google.api.field_behavior) = OUTPUT_ONLY];
105
106
 
@@ -16,6 +16,7 @@ syntax = "proto3";
16
16
 
17
17
  package google.cloud.discoveryengine.v1;
18
18
 
19
+ import "google/api/field_behavior.proto";
19
20
  import "google/api/resource.proto";
20
21
 
21
22
  option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1";
@@ -39,12 +40,6 @@ option (google.api.resource_definition) = {
39
40
  type: "discoveryengine.googleapis.com/Location"
40
41
  pattern: "projects/{project}/locations/{location}"
41
42
  };
42
- option (google.api.resource_definition) = {
43
- type: "discoveryengine.googleapis.com/ServingConfig"
44
- pattern: "projects/{project}/locations/{location}/dataStores/{data_store}/servingConfigs/{serving_config}"
45
- pattern: "projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/servingConfigs/{serving_config}"
46
- pattern: "projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config}"
47
- };
48
43
  option (google.api.resource_definition) = {
49
44
  type: "discoveryengine.googleapis.com/GroundingConfig"
50
45
  pattern: "projects/{project}/locations/{location}/groundingConfigs/{grounding_config}"
@@ -220,4 +215,38 @@ message UserInfo {
220
215
  // [UserEvent.direct_user_request][google.cloud.discoveryengine.v1.UserEvent.direct_user_request]
221
216
  // is set.
222
217
  string user_agent = 2;
218
+
219
+ // Optional. IANA time zone, e.g. Europe/Budapest.
220
+ string time_zone = 3 [(google.api.field_behavior) = OPTIONAL];
221
+ }
222
+
223
+ // Double list.
224
+ message DoubleList {
225
+ // Double values.
226
+ repeated double values = 1;
227
+ }
228
+
229
+ // Promotion proto includes uri and other helping information to display the
230
+ // promotion.
231
+ message SearchLinkPromotion {
232
+ // Required. The title of the promotion.
233
+ // Maximum length: 160 characters.
234
+ string title = 1 [(google.api.field_behavior) = REQUIRED];
235
+
236
+ // Optional. The URL for the page the user wants to promote. Must be set for
237
+ // site search. For other verticals, this is optional.
238
+ string uri = 2 [(google.api.field_behavior) = OPTIONAL];
239
+
240
+ // Optional. The promotion thumbnail image url.
241
+ string image_uri = 3 [(google.api.field_behavior) = OPTIONAL];
242
+
243
+ // Optional. The Promotion description.
244
+ // Maximum length: 200 characters.
245
+ string description = 4 [(google.api.field_behavior) = OPTIONAL];
246
+
247
+ // Optional. The enabled promotion will be returned for any serving configs
248
+ // associated with the parent of the control this promotion is attached to.
249
+ //
250
+ // This flag is used for basic site search only.
251
+ bool enabled = 5 [(google.api.field_behavior) = OPTIONAL];
223
252
  }
@@ -95,9 +95,97 @@ message Control {
95
95
 
96
96
  // Adjusts order of products in returned list.
97
97
  message BoostAction {
98
- // Required. Strength of the boost, which should be in [-1, 1]. Negative
98
+ // Specification for custom ranking based on customer specified attribute
99
+ // value. It provides more controls for customized ranking than the simple
100
+ // (condition, boost) combination above.
101
+ message InterpolationBoostSpec {
102
+ // The control points used to define the curve. The curve defined
103
+ // through these control points can only be monotonically increasing
104
+ // or decreasing(constant values are acceptable).
105
+ message ControlPoint {
106
+ // Optional. Can be one of:
107
+ // 1. The numerical field value.
108
+ // 2. The duration spec for freshness:
109
+ // The value must be formatted as an XSD `dayTimeDuration` value (a
110
+ // restricted subset of an ISO 8601 duration value). The pattern for
111
+ // this is: `[nD][T[nH][nM][nS]]`.
112
+ string attribute_value = 1 [(google.api.field_behavior) = OPTIONAL];
113
+
114
+ // Optional. The value between -1 to 1 by which to boost the score if
115
+ // the attribute_value evaluates to the value specified above.
116
+ float boost_amount = 2 [(google.api.field_behavior) = OPTIONAL];
117
+ }
118
+
119
+ // The attribute(or function) for which the custom ranking is to be
120
+ // applied.
121
+ enum AttributeType {
122
+ // Unspecified AttributeType.
123
+ ATTRIBUTE_TYPE_UNSPECIFIED = 0;
124
+
125
+ // The value of the numerical field will be used to dynamically update
126
+ // the boost amount. In this case, the attribute_value (the x value)
127
+ // of the control point will be the actual value of the numerical
128
+ // field for which the boost_amount is specified.
129
+ NUMERICAL = 1;
130
+
131
+ // For the freshness use case the attribute value will be the duration
132
+ // between the current time and the date in the datetime field
133
+ // specified. The value must be formatted as an XSD `dayTimeDuration`
134
+ // value (a restricted subset of an ISO 8601 duration value). The
135
+ // pattern for this is: `[nD][T[nH][nM][nS]]`.
136
+ // For example, `5D`, `3DT12H30M`, `T24H`.
137
+ FRESHNESS = 2;
138
+ }
139
+
140
+ // The interpolation type to be applied. Default will be linear
141
+ // (Piecewise Linear).
142
+ enum InterpolationType {
143
+ // Interpolation type is unspecified. In this case, it defaults to
144
+ // Linear.
145
+ INTERPOLATION_TYPE_UNSPECIFIED = 0;
146
+
147
+ // Piecewise linear interpolation will be applied.
148
+ LINEAR = 1;
149
+ }
150
+
151
+ // Optional. The name of the field whose value will be used to determine
152
+ // the boost amount.
153
+ string field_name = 1 [(google.api.field_behavior) = OPTIONAL];
154
+
155
+ // Optional. The attribute type to be used to determine the boost amount.
156
+ // The attribute value can be derived from the field value of the
157
+ // specified field_name. In the case of numerical it is straightforward
158
+ // i.e. attribute_value = numerical_field_value. In the case of freshness
159
+ // however, attribute_value = (time.now() - datetime_field_value).
160
+ AttributeType attribute_type = 2 [(google.api.field_behavior) = OPTIONAL];
161
+
162
+ // Optional. The interpolation type to be applied to connect the control
163
+ // points listed below.
164
+ InterpolationType interpolation_type = 3
165
+ [(google.api.field_behavior) = OPTIONAL];
166
+
167
+ // Optional. The control points used to define the curve. The monotonic
168
+ // function (defined through the interpolation_type above) passes through
169
+ // the control points listed here.
170
+ repeated ControlPoint control_points = 4
171
+ [(google.api.field_behavior) = OPTIONAL];
172
+ }
173
+
174
+ // Constant value boost or custom ranking based boost specifications.
175
+ oneof boost_spec {
176
+ // Optional. Strength of the boost, which should be in [-1, 1]. Negative
177
+ // boost means demotion. Default is 0.0 (No-op).
178
+ float fixed_boost = 4 [(google.api.field_behavior) = OPTIONAL];
179
+
180
+ // Optional. Complex specification for custom ranking based on customer
181
+ // defined attribute value.
182
+ InterpolationBoostSpec interpolation_boost_spec = 5
183
+ [(google.api.field_behavior) = OPTIONAL];
184
+ }
185
+
186
+ // Strength of the boost, which should be in [-1, 1]. Negative
99
187
  // boost means demotion. Default is 0.0 (No-op).
100
- float boost = 1 [(google.api.field_behavior) = REQUIRED];
188
+ float boost = 1 [deprecated = true];
101
189
 
102
190
  // Required. Specifies which products to apply the boost to.
103
191
  //
@@ -164,6 +252,24 @@ message Control {
164
252
  repeated string synonyms = 1;
165
253
  }
166
254
 
255
+ // Promote certain links based on some trigger queries.
256
+ //
257
+ // Example: Promote shoe store link when searching for `shoe` keyword.
258
+ // The link can be outside of associated data store.
259
+ message PromoteAction {
260
+ // Required. Data store with which this promotion is attached to.
261
+ string data_store = 1 [
262
+ (google.api.field_behavior) = REQUIRED,
263
+ (google.api.resource_reference) = {
264
+ type: "discoveryengine.googleapis.com/DataStore"
265
+ }
266
+ ];
267
+
268
+ // Required. Promotion attached to this action.
269
+ SearchLinkPromotion search_link_promotion = 2
270
+ [(google.api.field_behavior) = REQUIRED];
271
+ }
272
+
167
273
  // Actions are restricted by Vertical and Solution
168
274
  //
169
275
  // Required.
@@ -180,6 +286,11 @@ message Control {
180
286
 
181
287
  // Treats a group of terms as synonyms of one another.
182
288
  SynonymsAction synonyms_action = 10;
289
+
290
+ // Promote certain links based on predefined trigger queries.
291
+ //
292
+ // This now only supports basic site search.
293
+ PromoteAction promote_action = 15;
183
294
  }
184
295
 
185
296
  // Immutable. Fully qualified name
@@ -22,6 +22,7 @@ import "google/api/field_behavior.proto";
22
22
  import "google/api/resource.proto";
23
23
  import "google/cloud/discoveryengine/v1/answer.proto";
24
24
  import "google/cloud/discoveryengine/v1/conversation.proto";
25
+ import "google/cloud/discoveryengine/v1/safety.proto";
25
26
  import "google/cloud/discoveryengine/v1/search_service.proto";
26
27
  import "google/cloud/discoveryengine/v1/session.proto";
27
28
  import "google/protobuf/empty.proto";
@@ -166,6 +167,29 @@ service ConversationalSearchService {
166
167
  };
167
168
  }
168
169
 
170
+ // Answer query method (streaming).
171
+ //
172
+ // It takes one
173
+ // [AnswerQueryRequest][google.cloud.discoveryengine.v1.AnswerQueryRequest]
174
+ // and returns multiple
175
+ // [AnswerQueryResponse][google.cloud.discoveryengine.v1.AnswerQueryResponse]
176
+ // messages in a stream.
177
+ rpc StreamAnswerQuery(AnswerQueryRequest)
178
+ returns (stream AnswerQueryResponse) {
179
+ option (google.api.http) = {
180
+ post: "/v1/{serving_config=projects/*/locations/*/dataStores/*/servingConfigs/*}:streamAnswer"
181
+ body: "*"
182
+ additional_bindings {
183
+ post: "/v1/{serving_config=projects/*/locations/*/collections/*/dataStores/*/servingConfigs/*}:streamAnswer"
184
+ body: "*"
185
+ }
186
+ additional_bindings {
187
+ post: "/v1/{serving_config=projects/*/locations/*/collections/*/engines/*/servingConfigs/*}:streamAnswer"
188
+ body: "*"
189
+ }
190
+ };
191
+ }
192
+
169
193
  // Gets a Answer.
170
194
  rpc GetAnswer(GetAnswerRequest) returns (Answer) {
171
195
  option (google.api.http) = {
@@ -470,10 +494,50 @@ message ListConversationsResponse {
470
494
  // method.
471
495
  message AnswerQueryRequest {
472
496
  // Safety specification.
497
+ // There are two use cases:
498
+ // 1. when only safety_spec.enable is set, the BLOCK_LOW_AND_ABOVE threshold
499
+ // will be applied for all categories.
500
+ // 2. when safety_spec.enable is set and some safety_settings are set, only
501
+ // specified safety_settings are applied.
473
502
  message SafetySpec {
503
+ // Safety settings.
504
+ message SafetySetting {
505
+ // Probability based thresholds levels for blocking.
506
+ enum HarmBlockThreshold {
507
+ // Unspecified harm block threshold.
508
+ HARM_BLOCK_THRESHOLD_UNSPECIFIED = 0;
509
+
510
+ // Block low threshold and above (i.e. block more).
511
+ BLOCK_LOW_AND_ABOVE = 1;
512
+
513
+ // Block medium threshold and above.
514
+ BLOCK_MEDIUM_AND_ABOVE = 2;
515
+
516
+ // Block only high threshold (i.e. block less).
517
+ BLOCK_ONLY_HIGH = 3;
518
+
519
+ // Block none.
520
+ BLOCK_NONE = 4;
521
+
522
+ // Turn off the safety filter.
523
+ OFF = 5;
524
+ }
525
+
526
+ // Required. Harm category.
527
+ HarmCategory category = 1 [(google.api.field_behavior) = REQUIRED];
528
+
529
+ // Required. The harm block threshold.
530
+ HarmBlockThreshold threshold = 2 [(google.api.field_behavior) = REQUIRED];
531
+ }
532
+
474
533
  // Enable the safety filtering on the answer response. It is false by
475
534
  // default.
476
535
  bool enable = 1;
536
+
537
+ // Optional. Safety settings.
538
+ // This settings are effective only when the safety_spec.enable is true.
539
+ repeated SafetySetting safety_settings = 2
540
+ [(google.api.field_behavior) = OPTIONAL];
477
541
  }
478
542
 
479
543
  // Related questions specification.
@@ -482,6 +546,33 @@ message AnswerQueryRequest {
482
546
  bool enable = 1;
483
547
  }
484
548
 
549
+ // Grounding specification.
550
+ message GroundingSpec {
551
+ // Level to filter based on answer grounding.
552
+ enum FilteringLevel {
553
+ // Default is no filter
554
+ FILTERING_LEVEL_UNSPECIFIED = 0;
555
+
556
+ // Filter answers based on a low threshold.
557
+ FILTERING_LEVEL_LOW = 1;
558
+
559
+ // Filter answers based on a high threshold.
560
+ FILTERING_LEVEL_HIGH = 2;
561
+ }
562
+
563
+ // Optional. Specifies whether to include grounding_supports in the answer.
564
+ // The default value is `false`.
565
+ //
566
+ // When this field is set to `true`, returned answer will have
567
+ // `grounding_score` and will contain GroundingSupports for each claim.
568
+ bool include_grounding_supports = 2
569
+ [(google.api.field_behavior) = OPTIONAL];
570
+
571
+ // Optional. Specifies whether to enable the filtering based on grounding
572
+ // score and at what level.
573
+ FilteringLevel filtering_level = 3 [(google.api.field_behavior) = OPTIONAL];
574
+ }
575
+
485
576
  // Answer generation specification.
486
577
  message AnswerGenerationSpec {
487
578
  // Answer Generation Model specification.
@@ -750,6 +841,27 @@ message AnswerQueryRequest {
750
841
 
751
842
  // Query rephraser specification.
752
843
  message QueryRephraserSpec {
844
+ // Query Rephraser Model specification.
845
+ message ModelSpec {
846
+ // Query rephraser types. Currently only supports single-hop
847
+ // (max_rephrase_steps = 1) model selections. For multi-hop
848
+ // (max_rephrase_steps > 1), there is only one default model.
849
+ enum ModelType {
850
+ // Unspecified model type.
851
+ MODEL_TYPE_UNSPECIFIED = 0;
852
+
853
+ // Small query rephraser model. Gemini 1.0 XS model.
854
+ SMALL = 1;
855
+
856
+ // Large query rephraser model. Gemini 1.0 Pro model.
857
+ LARGE = 2;
858
+ }
859
+
860
+ // Optional. Enabled query rephraser model type. If not set, it will use
861
+ // LARGE by default.
862
+ ModelType model_type = 1 [(google.api.field_behavior) = OPTIONAL];
863
+ }
864
+
753
865
  // Disable query rephraser.
754
866
  bool disable = 1;
755
867
 
@@ -757,6 +869,9 @@ message AnswerQueryRequest {
757
869
  // The max number is 5 steps.
758
870
  // If not set or set to < 1, it will be set to 1 by default.
759
871
  int32 max_rephrase_steps = 2;
872
+
873
+ // Optional. Query Rephraser Model specification.
874
+ ModelSpec model_spec = 3 [(google.api.field_behavior) = OPTIONAL];
760
875
  }
761
876
 
762
877
  // Query classification specification.
@@ -764,6 +879,42 @@ message AnswerQueryRequest {
764
879
 
765
880
  // Query rephraser specification.
766
881
  QueryRephraserSpec query_rephraser_spec = 2;
882
+
883
+ // Optional. Whether to disable spell correction.
884
+ // The default value is `false`.
885
+ bool disable_spell_correction = 3 [(google.api.field_behavior) = OPTIONAL];
886
+ }
887
+
888
+ // End user specification.
889
+ message EndUserSpec {
890
+ // End user metadata.
891
+ message EndUserMetaData {
892
+ // Chunk information.
893
+ message ChunkInfo {
894
+ // Document metadata contains the information of the document of
895
+ // the current chunk.
896
+ message DocumentMetadata {
897
+ // Title of the document.
898
+ string title = 1;
899
+ }
900
+
901
+ // Chunk textual content. It is limited to 8000 characters.
902
+ string content = 1;
903
+
904
+ // Metadata of the document from the current chunk.
905
+ DocumentMetadata document_metadata = 2;
906
+ }
907
+
908
+ // Search result content.
909
+ oneof content {
910
+ // Chunk information.
911
+ ChunkInfo chunk_info = 1;
912
+ }
913
+ }
914
+
915
+ // Optional. End user metadata.
916
+ repeated EndUserMetaData end_user_metadata = 1
917
+ [(google.api.field_behavior) = OPTIONAL];
767
918
  }
768
919
 
769
920
  // Required. The resource name of the Search serving config, such as
@@ -798,6 +949,9 @@ message AnswerQueryRequest {
798
949
  // Related questions specification.
799
950
  RelatedQuestionsSpec related_questions_spec = 5;
800
951
 
952
+ // Optional. Grounding specification.
953
+ GroundingSpec grounding_spec = 6 [(google.api.field_behavior) = OPTIONAL];
954
+
801
955
  // Answer generation specification.
802
956
  AnswerGenerationSpec answer_generation_spec = 7;
803
957
 
@@ -850,6 +1004,9 @@ message AnswerQueryRequest {
850
1004
  // Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
851
1005
  // for more details.
852
1006
  map<string, string> user_labels = 13;
1007
+
1008
+ // Optional. End user specification.
1009
+ EndUserSpec end_user_spec = 14 [(google.api.field_behavior) = OPTIONAL];
853
1010
  }
854
1011
 
855
1012
  // Response message for
@@ -940,6 +1097,10 @@ message GetSessionRequest {
940
1097
  type: "discoveryengine.googleapis.com/Session"
941
1098
  }
942
1099
  ];
1100
+
1101
+ // Optional. If set to true, the full session including all answer details
1102
+ // will be returned.
1103
+ bool include_answer_details = 2 [(google.api.field_behavior) = OPTIONAL];
943
1104
  }
944
1105
 
945
1106
  // Request for ListSessions method.
@@ -971,13 +1132,18 @@ message ListSessionsRequest {
971
1132
  // A comma-separated list of fields to order by, sorted in ascending order.
972
1133
  // Use "desc" after a field name for descending.
973
1134
  // Supported fields:
1135
+ //
974
1136
  // * `update_time`
975
1137
  // * `create_time`
976
1138
  // * `session_name`
1139
+ // * `is_pinned`
977
1140
  //
978
1141
  // Example:
979
- // "update_time desc"
980
- // "create_time"
1142
+ //
1143
+ // * "update_time desc"
1144
+ // * "create_time"
1145
+ // * "is_pinned desc,update_time desc": list sessions by is_pinned first, then
1146
+ // by update_time.
981
1147
  string order_by = 5;
982
1148
  }
983
1149