@google-cloud/discoveryengine 1.3.0 → 1.3.1

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 (57) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/README.md +12 -0
  3. package/build/protos/google/cloud/discoveryengine/v1alpha/common.proto +0 -5
  4. package/build/protos/google/cloud/discoveryengine/v1alpha/conversation.proto +3 -0
  5. package/build/protos/google/cloud/discoveryengine/v1alpha/conversational_search_service.proto +39 -0
  6. package/build/protos/google/cloud/discoveryengine/v1alpha/document.proto +1 -1
  7. package/build/protos/google/cloud/discoveryengine/v1alpha/engine_service.proto +1 -1
  8. package/build/protos/google/cloud/discoveryengine/v1alpha/search_service.proto +97 -0
  9. package/build/protos/google/cloud/discoveryengine/v1alpha/search_tuning_service.proto +147 -0
  10. package/build/protos/google/cloud/discoveryengine/v1alpha/site_search_engine.proto +164 -0
  11. package/build/protos/google/cloud/discoveryengine/v1alpha/site_search_engine_service.proto +540 -0
  12. package/build/protos/protos.d.ts +4473 -550
  13. package/build/protos/protos.js +27437 -19222
  14. package/build/protos/protos.json +1060 -358
  15. package/build/src/index.js +1 -1
  16. package/build/src/v1/completion_service_client.js +1 -1
  17. package/build/src/v1/conversational_search_service_client.js +1 -1
  18. package/build/src/v1/document_service_client.js +1 -1
  19. package/build/src/v1/index.js +1 -1
  20. package/build/src/v1/schema_service_client.js +1 -1
  21. package/build/src/v1/search_service_client.js +1 -1
  22. package/build/src/v1/user_event_service_client.js +1 -1
  23. package/build/src/v1alpha/completion_service_client.d.ts +219 -0
  24. package/build/src/v1alpha/completion_service_client.js +302 -0
  25. package/build/src/v1alpha/conversational_search_service_client.d.ts +236 -0
  26. package/build/src/v1alpha/conversational_search_service_client.js +302 -0
  27. package/build/src/v1alpha/data_store_service_client.d.ts +219 -0
  28. package/build/src/v1alpha/data_store_service_client.js +310 -2
  29. package/build/src/v1alpha/document_service_client.d.ts +219 -0
  30. package/build/src/v1alpha/document_service_client.js +310 -2
  31. package/build/src/v1alpha/engine_service_client.d.ts +220 -1
  32. package/build/src/v1alpha/engine_service_client.js +310 -2
  33. package/build/src/v1alpha/index.d.ts +1 -0
  34. package/build/src/v1alpha/index.js +3 -1
  35. package/build/src/v1alpha/recommendation_service_client.d.ts +219 -0
  36. package/build/src/v1alpha/recommendation_service_client.js +302 -0
  37. package/build/src/v1alpha/schema_service_client.d.ts +219 -0
  38. package/build/src/v1alpha/schema_service_client.js +310 -2
  39. package/build/src/v1alpha/search_service_client.d.ts +258 -0
  40. package/build/src/v1alpha/search_service_client.js +328 -0
  41. package/build/src/v1alpha/search_tuning_service_client.d.ts +968 -0
  42. package/build/src/v1alpha/search_tuning_service_client.js +1452 -0
  43. package/build/src/v1alpha/search_tuning_service_client_config.json +30 -0
  44. package/build/src/v1alpha/site_search_engine_service_client.d.ts +739 -1
  45. package/build/src/v1alpha/site_search_engine_service_client.js +801 -4
  46. package/build/src/v1alpha/site_search_engine_service_client_config.json +44 -0
  47. package/build/src/v1alpha/user_event_service_client.d.ts +219 -0
  48. package/build/src/v1alpha/user_event_service_client.js +310 -2
  49. package/build/src/v1beta/completion_service_client.js +1 -1
  50. package/build/src/v1beta/conversational_search_service_client.js +1 -1
  51. package/build/src/v1beta/document_service_client.js +1 -1
  52. package/build/src/v1beta/index.js +1 -1
  53. package/build/src/v1beta/recommendation_service_client.js +1 -1
  54. package/build/src/v1beta/schema_service_client.js +1 -1
  55. package/build/src/v1beta/search_service_client.js +1 -1
  56. package/build/src/v1beta/user_event_service_client.js +1 -1
  57. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.3.1](https://github.com/googleapis/google-cloud-node/compare/discoveryengine-v1.3.0...discoveryengine-v1.3.1) (2024-01-05)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * [discoveryengine] correct long audio synthesis HTTP binding ([#4886](https://github.com/googleapis/google-cloud-node/issues/4886)) ([fb95ca7](https://github.com/googleapis/google-cloud-node/commit/fb95ca771318195714dfa47deab817ba19f5e1a4))
9
+
3
10
  ## [1.3.0](https://github.com/googleapis/google-cloud-node/compare/discoveryengine-v1.2.0...discoveryengine-v1.3.0) (2023-11-16)
4
11
 
5
12
 
package/README.md CHANGED
@@ -182,7 +182,19 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/
182
182
  | Schema_service.list_schemas | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1alpha/schema_service.list_schemas.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/v1alpha/schema_service.list_schemas.js,packages/google-cloud-discoveryengine/samples/README.md) |
183
183
  | Schema_service.update_schema | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1alpha/schema_service.update_schema.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/v1alpha/schema_service.update_schema.js,packages/google-cloud-discoveryengine/samples/README.md) |
184
184
  | Search_service.search | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1alpha/search_service.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/v1alpha/search_service.search.js,packages/google-cloud-discoveryengine/samples/README.md) |
185
+ | Search_tuning_service.train_custom_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1alpha/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/v1alpha/search_tuning_service.train_custom_model.js,packages/google-cloud-discoveryengine/samples/README.md) |
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/v1alpha/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/v1alpha/site_search_engine_service.batch_create_target_sites.js,packages/google-cloud-discoveryengine/samples/README.md) |
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/v1alpha/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/v1alpha/site_search_engine_service.batch_verify_target_sites.js,packages/google-cloud-discoveryengine/samples/README.md) |
188
+ | Site_search_engine_service.create_target_site | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1alpha/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/v1alpha/site_search_engine_service.create_target_site.js,packages/google-cloud-discoveryengine/samples/README.md) |
189
+ | Site_search_engine_service.delete_target_site | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1alpha/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/v1alpha/site_search_engine_service.delete_target_site.js,packages/google-cloud-discoveryengine/samples/README.md) |
190
+ | 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/v1alpha/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/v1alpha/site_search_engine_service.disable_advanced_site_search.js,packages/google-cloud-discoveryengine/samples/README.md) |
191
+ | 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/v1alpha/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/v1alpha/site_search_engine_service.enable_advanced_site_search.js,packages/google-cloud-discoveryengine/samples/README.md) |
192
+ | 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/v1alpha/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/v1alpha/site_search_engine_service.fetch_domain_verification_status.js,packages/google-cloud-discoveryengine/samples/README.md) |
193
+ | 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/v1alpha/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/v1alpha/site_search_engine_service.get_site_search_engine.js,packages/google-cloud-discoveryengine/samples/README.md) |
194
+ | Site_search_engine_service.get_target_site | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1alpha/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/v1alpha/site_search_engine_service.get_target_site.js,packages/google-cloud-discoveryengine/samples/README.md) |
195
+ | Site_search_engine_service.list_target_sites | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1alpha/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/v1alpha/site_search_engine_service.list_target_sites.js,packages/google-cloud-discoveryengine/samples/README.md) |
185
196
  | Site_search_engine_service.recrawl_uris | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1alpha/site_search_engine_service.recrawl_uris.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/v1alpha/site_search_engine_service.recrawl_uris.js,packages/google-cloud-discoveryengine/samples/README.md) |
197
+ | Site_search_engine_service.update_target_site | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1alpha/site_search_engine_service.update_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/v1alpha/site_search_engine_service.update_target_site.js,packages/google-cloud-discoveryengine/samples/README.md) |
186
198
  | User_event_service.collect_user_event | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1alpha/user_event_service.collect_user_event.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/v1alpha/user_event_service.collect_user_event.js,packages/google-cloud-discoveryengine/samples/README.md) |
187
199
  | User_event_service.import_user_events | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1alpha/user_event_service.import_user_events.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/v1alpha/user_event_service.import_user_events.js,packages/google-cloud-discoveryengine/samples/README.md) |
188
200
  | User_event_service.purge_user_events | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1alpha/user_event_service.purge_user_events.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/v1alpha/user_event_service.purge_user_events.js,packages/google-cloud-discoveryengine/samples/README.md) |
@@ -41,11 +41,6 @@ option (google.api.resource_definition) = {
41
41
  pattern: "projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/servingConfigs/{serving_config}"
42
42
  pattern: "projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config}"
43
43
  };
44
- option (google.api.resource_definition) = {
45
- type: "discoveryengine.googleapis.com/SiteSearchEngine"
46
- pattern: "projects/{project}/locations/{location}/dataStores/{data_store}/siteSearchEngine"
47
- pattern: "projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine"
48
- };
49
44
 
50
45
  // The industry vertical associated with the
51
46
  // [DataStore][google.cloud.discoveryengine.v1alpha.DataStore].
@@ -36,6 +36,7 @@ message Conversation {
36
36
  type: "discoveryengine.googleapis.com/Conversation"
37
37
  pattern: "projects/{project}/locations/{location}/dataStores/{data_store}/conversations/{conversation}"
38
38
  pattern: "projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/conversations/{conversation}"
39
+ pattern: "projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/conversations/{conversation}"
39
40
  };
40
41
 
41
42
  // Enumeration of the state of the conversation.
@@ -52,6 +53,8 @@ message Conversation {
52
53
 
53
54
  // Immutable. Fully qualified name
54
55
  // `project/*/locations/global/collections/{collection}/dataStore/*/conversations/*`
56
+ // or
57
+ // `project/*/locations/global/collections/{collection}/engines/*/conversations/*`.
55
58
  string name = 1 [(google.api.field_behavior) = IMMUTABLE];
56
59
 
57
60
  // The state of the Conversation.
@@ -50,6 +50,10 @@ service ConversationalSearchService {
50
50
  post: "/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/conversations/*}:converse"
51
51
  body: "*"
52
52
  }
53
+ additional_bindings {
54
+ post: "/v1alpha/{name=projects/*/locations/*/collections/*/engines/*/conversations/*}:converse"
55
+ body: "*"
56
+ }
53
57
  };
54
58
  option (google.api.method_signature) = "name,query";
55
59
  }
@@ -66,6 +70,10 @@ service ConversationalSearchService {
66
70
  post: "/v1alpha/{parent=projects/*/locations/*/collections/*/dataStores/*}/conversations"
67
71
  body: "conversation"
68
72
  }
73
+ additional_bindings {
74
+ post: "/v1alpha/{parent=projects/*/locations/*/collections/*/engines/*}/conversations"
75
+ body: "conversation"
76
+ }
69
77
  };
70
78
  option (google.api.method_signature) = "parent,conversation";
71
79
  }
@@ -81,6 +89,9 @@ service ConversationalSearchService {
81
89
  additional_bindings {
82
90
  delete: "/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/conversations/*}"
83
91
  }
92
+ additional_bindings {
93
+ delete: "/v1alpha/{name=projects/*/locations/*/collections/*/engines/*/conversations/*}"
94
+ }
84
95
  };
85
96
  option (google.api.method_signature) = "name";
86
97
  }
@@ -99,6 +110,10 @@ service ConversationalSearchService {
99
110
  patch: "/v1alpha/{conversation.name=projects/*/locations/*/collections/*/dataStores/*/conversations/*}"
100
111
  body: "conversation"
101
112
  }
113
+ additional_bindings {
114
+ patch: "/v1alpha/{conversation.name=projects/*/locations/*/collections/*/engines/*/conversations/*}"
115
+ body: "conversation"
116
+ }
102
117
  };
103
118
  option (google.api.method_signature) = "conversation,update_mask";
104
119
  }
@@ -110,6 +125,9 @@ service ConversationalSearchService {
110
125
  additional_bindings {
111
126
  get: "/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/conversations/*}"
112
127
  }
128
+ additional_bindings {
129
+ get: "/v1alpha/{name=projects/*/locations/*/collections/*/engines/*/conversations/*}"
130
+ }
113
131
  };
114
132
  option (google.api.method_signature) = "name";
115
133
  }
@@ -123,6 +141,9 @@ service ConversationalSearchService {
123
141
  additional_bindings {
124
142
  get: "/v1alpha/{parent=projects/*/locations/*/collections/*/dataStores/*}/conversations"
125
143
  }
144
+ additional_bindings {
145
+ get: "/v1alpha/{parent=projects/*/locations/*/collections/*/engines/*}/conversations"
146
+ }
126
147
  };
127
148
  option (google.api.method_signature) = "parent";
128
149
  }
@@ -184,6 +205,24 @@ message ConverseConversationRequest {
184
205
 
185
206
  // A specification for configuring the summary returned in the response.
186
207
  SearchRequest.ContentSearchSpec.SummarySpec summary_spec = 8;
208
+
209
+ // The filter syntax consists of an expression language for constructing a
210
+ // predicate from one or more fields of the documents being filtered. Filter
211
+ // expression is case-sensitive. This will be used to filter search results
212
+ // which may affect the summary response.
213
+ //
214
+ // If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
215
+ //
216
+ // Filtering in Vertex AI Search is done by mapping the LHS filter key to a
217
+ // key property defined in the Vertex AI Search backend -- this mapping is
218
+ // defined by the customer in their schema. For example a media customer might
219
+ // have a field 'name' in their schema. In this case the filter would look
220
+ // like this: filter --> name:'ANY("king kong")'
221
+ //
222
+ // For more information about filtering including syntax and filter
223
+ // operators, see
224
+ // [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
225
+ string filter = 9;
187
226
  }
188
227
 
189
228
  // Response message for
@@ -53,7 +53,7 @@ message Document {
53
53
 
54
54
  // The URI of the content. Only Cloud Storage URIs (e.g.
55
55
  // `gs://bucket-name/path/to/file`) are supported. The maximum file size
56
- // is 100 MB.
56
+ // is 2.5 MB for text-based formats, 100 MB for other formats.
57
57
  string uri = 3;
58
58
  }
59
59
 
@@ -105,7 +105,7 @@ service EngineService {
105
105
  }
106
106
 
107
107
  // Resumes the training of an existing engine. Only applicable if
108
- // [solution_type][] is
108
+ // [SolutionType][google.cloud.discoveryengine.v1alpha.SolutionType] is
109
109
  // [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_RECOMMENDATION].
110
110
  rpc ResumeEngine(ResumeEngineRequest) returns (Engine) {
111
111
  option (google.api.http) = {
@@ -321,6 +321,20 @@ message SearchRequest {
321
321
  // A specification for configuring a summary returned in a search
322
322
  // response.
323
323
  message SummarySpec {
324
+ // Specification of the prompt to use with the model.
325
+ message ModelPromptSpec {
326
+ // Text at the beginning of the prompt that instructs the assistant.
327
+ // Examples are available in the user guide.
328
+ string preamble = 1;
329
+ }
330
+
331
+ // Specification of the model.
332
+ message ModelSpec {
333
+ // The string format of the model version.
334
+ // e.g. stable, preview, etc.
335
+ string version = 1;
336
+ }
337
+
324
338
  // The number of top results to generate the summary from. If the number
325
339
  // of results returned is less than `summaryResultCount`, the summary is
326
340
  // generated from all of the results.
@@ -372,10 +386,18 @@ message SearchRequest {
372
386
  // fallback messages instead.
373
387
  bool ignore_non_summary_seeking_query = 4;
374
388
 
389
+ // If specified, the spec will be used to modify the prompt provided to
390
+ // the LLM.
391
+ ModelPromptSpec model_prompt_spec = 5;
392
+
375
393
  // Language code for Summary. Use language tags defined by
376
394
  // [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).
377
395
  // Note: This is an experimental feature.
378
396
  string language_code = 6;
397
+
398
+ // If specified, the spec will be used to modify the model specification
399
+ // provided to the LLM.
400
+ ModelSpec model_spec = 7;
379
401
  }
380
402
 
381
403
  // A specification for configuring the extractive content in a search
@@ -535,6 +557,20 @@ message SearchRequest {
535
557
  // [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
536
558
  string filter = 7;
537
559
 
560
+ // The default filter that is applied when a user performs a search without
561
+ // checking any filters on the search page.
562
+ //
563
+ // The filter applied to every search request when quality improvement such as
564
+ // query expansion is needed. In the case a query does not have a sufficient
565
+ // amount of results this filter will be used to determine whether or not to
566
+ // enable the query expansion flow. The original filter will still be used for
567
+ // the query expanded search.
568
+ // This field is strongly recommended to achieve high search quality.
569
+ //
570
+ // For more information about filter syntax, see
571
+ // [SearchRequest.filter][google.cloud.discoveryengine.v1alpha.SearchRequest.filter].
572
+ string canonical_filter = 29;
573
+
538
574
  // The order in which documents are returned. Documents can be ordered by
539
575
  // a field in an [Document][google.cloud.discoveryengine.v1alpha.Document]
540
576
  // object. Leave it unset if ordered by relevance. `order_by` expression is
@@ -743,6 +779,65 @@ message SearchResponse {
743
779
  repeated float scores = 2;
744
780
  }
745
781
 
782
+ // Citation metadata.
783
+ message CitationMetadata {
784
+ // Citations for segments.
785
+ repeated Citation citations = 1;
786
+ }
787
+
788
+ // Citation info for a segment.
789
+ message Citation {
790
+ // Index indicates the start of the segment, measured in bytes/unicode.
791
+ int64 start_index = 1;
792
+
793
+ // End of the attributed segment, exclusive.
794
+ int64 end_index = 2;
795
+
796
+ // Citation sources for the attributed segment.
797
+ repeated CitationSource sources = 3;
798
+ }
799
+
800
+ // Citation source.
801
+ message CitationSource {
802
+ // Document reference index from SummaryWithMetadata.references.
803
+ // It is 0-indexed and the value will be zero if the reference_index is
804
+ // not set explicitly.
805
+ int64 reference_index = 4;
806
+ }
807
+
808
+ // Document reference.
809
+ message Reference {
810
+ // Title of the document.
811
+ string title = 1;
812
+
813
+ // Required.
814
+ // [Document.name][google.cloud.discoveryengine.v1alpha.Document.name] of
815
+ // the document. Full resource name of the referenced document, in the
816
+ // format
817
+ // `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`.
818
+ string document = 2 [
819
+ (google.api.field_behavior) = REQUIRED,
820
+ (google.api.resource_reference) = {
821
+ type: "discoveryengine.googleapis.com/Document"
822
+ }
823
+ ];
824
+
825
+ // GCS or HTTP uri for the document.
826
+ string uri = 3;
827
+ }
828
+
829
+ // Summary with metadata information.
830
+ message SummaryWithMetadata {
831
+ // Summary text with no citation information.
832
+ string summary = 1;
833
+
834
+ // Citation metadata for given summary.
835
+ CitationMetadata citation_metadata = 2;
836
+
837
+ // Document References.
838
+ repeated Reference references = 3;
839
+ }
840
+
746
841
  // An Enum for summary-skipped reasons.
747
842
  enum SummarySkippedReason {
748
843
  // Default value. The summary skipped reason is not specified.
@@ -791,6 +886,8 @@ message SearchResponse {
791
886
  // A collection of Safety Attribute categories and their associated
792
887
  // confidence scores.
793
888
  SafetyAttributes safety_attributes = 3;
889
+
890
+ SummaryWithMetadata summary_with_metadata = 4;
794
891
  }
795
892
 
796
893
  // Debug information specifically related to forward geocoding issues arising
@@ -0,0 +1,147 @@
1
+ // Copyright 2022 Google LLC
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+
15
+ syntax = "proto3";
16
+
17
+ package google.cloud.discoveryengine.v1alpha;
18
+
19
+ import "google/api/annotations.proto";
20
+ import "google/api/client.proto";
21
+ import "google/api/field_behavior.proto";
22
+ import "google/api/resource.proto";
23
+ import "google/cloud/discoveryengine/v1alpha/import_config.proto";
24
+ import "google/longrunning/operations.proto";
25
+ import "google/protobuf/timestamp.proto";
26
+ import "google/rpc/status.proto";
27
+
28
+ option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Alpha";
29
+ option go_package = "cloud.google.com/go/discoveryengine/apiv1alpha/discoveryenginepb;discoveryenginepb";
30
+ option java_multiple_files = true;
31
+ option java_outer_classname = "SearchTuningServiceProto";
32
+ option java_package = "com.google.cloud.discoveryengine.v1alpha";
33
+ option objc_class_prefix = "DISCOVERYENGINE";
34
+ option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1alpha";
35
+ option ruby_package = "Google::Cloud::DiscoveryEngine::V1alpha";
36
+
37
+ // Service for search tuning.
38
+ service SearchTuningService {
39
+ option (google.api.default_host) = "discoveryengine.googleapis.com";
40
+ option (google.api.oauth_scopes) =
41
+ "https://www.googleapis.com/auth/cloud-platform";
42
+
43
+ // Trains a custom model.
44
+ rpc TrainCustomModel(TrainCustomModelRequest)
45
+ returns (google.longrunning.Operation) {
46
+ option (google.api.http) = {
47
+ post: "/v1alpha/{data_store=projects/*/locations/*/collections/*/dataStores/*}:trainCustomModel"
48
+ body: "*"
49
+ };
50
+ option (google.longrunning.operation_info) = {
51
+ response_type: "google.cloud.discoveryengine.v1alpha.TrainCustomModelResponse"
52
+ metadata_type: "google.cloud.discoveryengine.v1alpha.TrainCustomModelMetadata"
53
+ };
54
+ }
55
+ }
56
+
57
+ // Request message for
58
+ // [SearchTuningService.TrainCustomModel][google.cloud.discoveryengine.v1alpha.SearchTuningService.TrainCustomModel]
59
+ // method.
60
+ message TrainCustomModelRequest {
61
+ // Gcs training data input.
62
+ message GcsTrainingInput {
63
+ // The gcs corpus data which could be associated in train data.
64
+ // The data path format is gs://<bucket_to_data>/<jsonl_file_name>.
65
+ // A newline delimited jsonl/ndjson file.
66
+ // * For search-tuning model, each line should have the _id, title
67
+ // and text. Example: {"_id": "doc1", title: "relevant doc", "text":
68
+ // "relevant text"}
69
+ string corpus_data_path = 1;
70
+
71
+ // The gcs query data which could be associated in train data.
72
+ // The data path format is gs://<bucket_to_data>/<jsonl_file_name>.
73
+ // A newline delimited jsonl/ndjson file.
74
+ // * For search-tuning model, each line should have the _id
75
+ // and text. Example: {"_id": "query1", "text": "example query"}
76
+ string query_data_path = 2;
77
+
78
+ // Gcs training data path whose format should be
79
+ // gs://<bucket_to_data>/<tsv_file_name>. The file should be in tsv format.
80
+ // Each line should have the doc_id and query_id and score (number).
81
+ // * For search-tuning model, it should have the query-id corpus-id
82
+ // score as tsv file header. The score should be a number in [0, inf+). The
83
+ // larger the number is, the more relevant the pair is. Example:
84
+ // query-id\tcorpus-id\tscore
85
+ // query1\tdoc1\t1
86
+ string train_data_path = 3;
87
+
88
+ // Gcs test data. Same format as train_data_path. If not provided, a
89
+ // random 80/20 train/test split will be performed on train_data_path.
90
+ string test_data_path = 4;
91
+ }
92
+
93
+ // Model training input.
94
+ oneof training_input {
95
+ // Gcs training input.
96
+ GcsTrainingInput gcs_training_input = 2;
97
+ }
98
+
99
+ // Required. The resource name of the Data Store, such as
100
+ // `projects/*/locations/global/collections/default_collection/dataStores/default_data_store`.
101
+ // This field is used to identify the data store where to train the models.
102
+ string data_store = 1 [
103
+ (google.api.field_behavior) = REQUIRED,
104
+ (google.api.resource_reference) = {
105
+ type: "discoveryengine.googleapis.com/DataStore"
106
+ }
107
+ ];
108
+
109
+ // Model to be trained. Supported values are:
110
+ //
111
+ // * **search-tuning**: Fine tuning the search system based on data provided.
112
+ string model_type = 3;
113
+
114
+ // The desired location of errors incurred during the data ingestion and
115
+ // training.
116
+ ImportErrorConfig error_config = 4;
117
+ }
118
+
119
+ // Response of the
120
+ // [TrainCustomModelRequest][google.cloud.discoveryengine.v1alpha.TrainCustomModelRequest].
121
+ // This message is returned by the google.longrunning.Operations.response field.
122
+ message TrainCustomModelResponse {
123
+ // A sample of errors encountered while processing the data.
124
+ repeated google.rpc.Status error_samples = 1;
125
+
126
+ // Echoes the destination for the complete errors in the request if set.
127
+ ImportErrorConfig error_config = 2;
128
+
129
+ // The trained model status. Possible values are:
130
+ //
131
+ // * **bad-data**: The training data quality is bad.
132
+ // * **no-improvement**: Tuning didn't improve performance. Won't deploy.
133
+ // * **in-progress**: Model training is in progress.
134
+ // * **ready**: The model is ready for serving.
135
+ string model_status = 3;
136
+ }
137
+
138
+ // Metadata related to the progress of the TrainCustomModel operation. This is
139
+ // returned by the google.longrunning.Operation.metadata field.
140
+ message TrainCustomModelMetadata {
141
+ // Operation create time.
142
+ google.protobuf.Timestamp create_time = 1;
143
+
144
+ // Operation last update time. If the operation is done, this is also the
145
+ // finish time.
146
+ google.protobuf.Timestamp update_time = 2;
147
+ }
@@ -0,0 +1,164 @@
1
+ // Copyright 2022 Google LLC
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+
15
+ syntax = "proto3";
16
+
17
+ package google.cloud.discoveryengine.v1alpha;
18
+
19
+ import "google/api/field_behavior.proto";
20
+ import "google/api/resource.proto";
21
+ import "google/protobuf/timestamp.proto";
22
+
23
+ option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Alpha";
24
+ option go_package = "cloud.google.com/go/discoveryengine/apiv1alpha/discoveryenginepb;discoveryenginepb";
25
+ option java_multiple_files = true;
26
+ option java_outer_classname = "SiteSearchEngineProto";
27
+ option java_package = "com.google.cloud.discoveryengine.v1alpha";
28
+ option objc_class_prefix = "DISCOVERYENGINE";
29
+ option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1alpha";
30
+ option ruby_package = "Google::Cloud::DiscoveryEngine::V1alpha";
31
+
32
+ // SiteSearchEngine captures DataStore level site search persisting
33
+ // configurations. It is a singleton value per data store.
34
+ message SiteSearchEngine {
35
+ option (google.api.resource) = {
36
+ type: "discoveryengine.googleapis.com/SiteSearchEngine"
37
+ pattern: "projects/{project}/locations/{location}/dataStores/{data_store}/siteSearchEngine"
38
+ pattern: "projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine"
39
+ };
40
+
41
+ // The fully qualified resource name of the site search engine.
42
+ // Format: `projects/*/locations/*/dataStores/*/siteSearchEngine`
43
+ string name = 1;
44
+ }
45
+
46
+ // A target site for the SiteSearchEngine.
47
+ message TargetSite {
48
+ option (google.api.resource) = {
49
+ type: "discoveryengine.googleapis.com/TargetSite"
50
+ pattern: "projects/{project}/locations/{location}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}"
51
+ pattern: "projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}"
52
+ };
53
+
54
+ // Site search indexing failure reasons.
55
+ message FailureReason {
56
+ message QuotaFailure {}
57
+
58
+ oneof failure {
59
+ // Failed due to insufficient quota.
60
+ QuotaFailure quota_failure = 1;
61
+ }
62
+ }
63
+
64
+ // Possible target site types.
65
+ enum Type {
66
+ // This value is unused. In this case, server behavior defaults to
67
+ // [Type.INCLUDE][google.cloud.discoveryengine.v1alpha.TargetSite.Type.INCLUDE].
68
+ TYPE_UNSPECIFIED = 0;
69
+
70
+ // Include the target site.
71
+ INCLUDE = 1;
72
+
73
+ // Exclude the target site.
74
+ EXCLUDE = 2;
75
+ }
76
+
77
+ // Target site indexing status enumeration.
78
+ enum IndexingStatus {
79
+ // Defaults to SUCCEEDED.
80
+ INDEXING_STATUS_UNSPECIFIED = 0;
81
+
82
+ // The target site is in the update queue and will be picked up by indexing
83
+ // pipeline.
84
+ PENDING = 1;
85
+
86
+ // The target site fails to be indexed.
87
+ FAILED = 2;
88
+
89
+ // The target site has been indexed.
90
+ SUCCEEDED = 3;
91
+
92
+ // The previously indexed target site has been marked to be deleted. This is
93
+ // a transitioning state which will resulted in either:
94
+ // 1. target site deleted if unindexing is successful;
95
+ // 2. state reverts to SUCCEEDED if the unindexing fails.
96
+ DELETING = 4;
97
+ }
98
+
99
+ // Output only. The fully qualified resource name of the target site.
100
+ // `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}`
101
+ // The `target_site_id` is system-generated.
102
+ string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
103
+
104
+ // Required. Input only. The user provided URI pattern from which the
105
+ // `generated_uri_pattern` is generated.
106
+ string provided_uri_pattern = 2 [
107
+ (google.api.field_behavior) = REQUIRED,
108
+ (google.api.field_behavior) = INPUT_ONLY
109
+ ];
110
+
111
+ // The type of the target site, e.g. whether the site is to be included or
112
+ // excluded.
113
+ Type type = 3;
114
+
115
+ // Input only. If set to false, a uri_pattern is generated to include all
116
+ // pages whose address contains the provided_uri_pattern. If set to true, an
117
+ // uri_pattern is generated to try to be an exact match of the
118
+ // provided_uri_pattern or just the specific page if the provided_uri_pattern
119
+ // is a specific one. provided_uri_pattern is always normalized to
120
+ // generate the URI pattern to be used by the search engine.
121
+ bool exact_match = 6 [(google.api.field_behavior) = INPUT_ONLY];
122
+
123
+ // Output only. This is system-generated based on the provided_uri_pattern.
124
+ string generated_uri_pattern = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
125
+
126
+ // Output only. Site ownership and validity verification status.
127
+ SiteVerificationInfo site_verification_info = 7
128
+ [(google.api.field_behavior) = OUTPUT_ONLY];
129
+
130
+ // Output only. Indexing status.
131
+ IndexingStatus indexing_status = 8
132
+ [(google.api.field_behavior) = OUTPUT_ONLY];
133
+
134
+ // Output only. The target site's last updated time.
135
+ google.protobuf.Timestamp update_time = 5
136
+ [(google.api.field_behavior) = OUTPUT_ONLY];
137
+
138
+ // Output only. Failure reason.
139
+ FailureReason failure_reason = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
140
+ }
141
+
142
+ // Verification information for target sites in advanced site search.
143
+ message SiteVerificationInfo {
144
+ // Site verification state.
145
+ enum SiteVerificationState {
146
+ // Defaults to VERIFIED.
147
+ SITE_VERIFICATION_STATE_UNSPECIFIED = 0;
148
+
149
+ // Site ownership verified.
150
+ VERIFIED = 1;
151
+
152
+ // Site ownership pending verification or verification failed.
153
+ UNVERIFIED = 2;
154
+
155
+ // Site exempt from verification, e.g. a public website that opens to all.
156
+ EXEMPTED = 3;
157
+ }
158
+
159
+ // Site verification state indicating the ownership and validity.
160
+ SiteVerificationState site_verification_state = 1;
161
+
162
+ // Latest site verification time.
163
+ google.protobuf.Timestamp verify_time = 2;
164
+ }