@google-cloud/discoveryengine 1.2.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 (63) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +25 -0
  3. package/build/protos/google/cloud/discoveryengine/v1alpha/common.proto +38 -8
  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/data_store.proto +98 -0
  7. package/build/protos/google/cloud/discoveryengine/v1alpha/data_store_service.proto +307 -0
  8. package/build/protos/google/cloud/discoveryengine/v1alpha/document.proto +1 -1
  9. package/build/protos/google/cloud/discoveryengine/v1alpha/engine.proto +370 -0
  10. package/build/protos/google/cloud/discoveryengine/v1alpha/engine_service.proto +336 -0
  11. package/build/protos/google/cloud/discoveryengine/v1alpha/recommendation_service.proto +9 -3
  12. package/build/protos/google/cloud/discoveryengine/v1alpha/search_service.proto +123 -3
  13. package/build/protos/google/cloud/discoveryengine/v1alpha/search_tuning_service.proto +147 -0
  14. package/build/protos/google/cloud/discoveryengine/v1alpha/site_search_engine.proto +164 -0
  15. package/build/protos/google/cloud/discoveryengine/v1alpha/site_search_engine_service.proto +540 -0
  16. package/build/protos/protos.d.ts +10923 -3222
  17. package/build/protos/protos.js +29891 -12914
  18. package/build/protos/protos.json +2367 -668
  19. package/build/src/index.js +1 -1
  20. package/build/src/v1/completion_service_client.js +1 -1
  21. package/build/src/v1/conversational_search_service_client.js +1 -1
  22. package/build/src/v1/document_service_client.js +1 -1
  23. package/build/src/v1/index.js +1 -1
  24. package/build/src/v1/schema_service_client.js +1 -1
  25. package/build/src/v1/search_service_client.js +1 -1
  26. package/build/src/v1/user_event_service_client.js +1 -1
  27. package/build/src/v1alpha/completion_service_client.d.ts +261 -0
  28. package/build/src/v1alpha/completion_service_client.js +360 -0
  29. package/build/src/v1alpha/conversational_search_service_client.d.ts +278 -0
  30. package/build/src/v1alpha/conversational_search_service_client.js +360 -0
  31. package/build/src/v1alpha/data_store_service_client.d.ts +1279 -0
  32. package/build/src/v1alpha/data_store_service_client.js +1739 -0
  33. package/build/src/v1alpha/data_store_service_client_config.json +46 -0
  34. package/build/src/v1alpha/document_service_client.d.ts +336 -0
  35. package/build/src/v1alpha/document_service_client.js +472 -2
  36. package/build/src/v1alpha/engine_service_client.d.ts +1298 -0
  37. package/build/src/v1alpha/engine_service_client.js +1789 -0
  38. package/build/src/v1alpha/engine_service_client_config.json +58 -0
  39. package/build/src/v1alpha/index.d.ts +3 -0
  40. package/build/src/v1alpha/index.js +7 -1
  41. package/build/src/v1alpha/recommendation_service_client.d.ts +345 -3
  42. package/build/src/v1alpha/recommendation_service_client.js +464 -0
  43. package/build/src/v1alpha/schema_service_client.d.ts +261 -0
  44. package/build/src/v1alpha/schema_service_client.js +368 -2
  45. package/build/src/v1alpha/search_service_client.d.ts +453 -9
  46. package/build/src/v1alpha/search_service_client.js +542 -6
  47. package/build/src/v1alpha/search_tuning_service_client.d.ts +968 -0
  48. package/build/src/v1alpha/search_tuning_service_client.js +1452 -0
  49. package/build/src/v1alpha/search_tuning_service_client_config.json +30 -0
  50. package/build/src/v1alpha/site_search_engine_service_client.d.ts +856 -1
  51. package/build/src/v1alpha/site_search_engine_service_client.js +993 -34
  52. package/build/src/v1alpha/site_search_engine_service_client_config.json +44 -0
  53. package/build/src/v1alpha/user_event_service_client.d.ts +261 -0
  54. package/build/src/v1alpha/user_event_service_client.js +368 -2
  55. package/build/src/v1beta/completion_service_client.js +1 -1
  56. package/build/src/v1beta/conversational_search_service_client.js +1 -1
  57. package/build/src/v1beta/document_service_client.js +1 -1
  58. package/build/src/v1beta/index.js +1 -1
  59. package/build/src/v1beta/recommendation_service_client.js +1 -1
  60. package/build/src/v1beta/schema_service_client.js +1 -1
  61. package/build/src/v1beta/search_service_client.js +1 -1
  62. package/build/src/v1beta/user_event_service_client.js +1 -1
  63. package/package.json +4 -4
@@ -0,0 +1,336 @@
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/engine.proto";
24
+ import "google/longrunning/operations.proto";
25
+ import "google/protobuf/empty.proto";
26
+ import "google/protobuf/field_mask.proto";
27
+ import "google/protobuf/timestamp.proto";
28
+
29
+ option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Alpha";
30
+ option go_package = "cloud.google.com/go/discoveryengine/apiv1alpha/discoveryenginepb;discoveryenginepb";
31
+ option java_multiple_files = true;
32
+ option java_outer_classname = "EngineServiceProto";
33
+ option java_package = "com.google.cloud.discoveryengine.v1alpha";
34
+ option objc_class_prefix = "DISCOVERYENGINE";
35
+ option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1alpha";
36
+ option ruby_package = "Google::Cloud::DiscoveryEngine::V1alpha";
37
+
38
+ // Service for managing [Engine][google.cloud.discoveryengine.v1alpha.Engine]
39
+ // configuration.
40
+ service EngineService {
41
+ option (google.api.default_host) = "discoveryengine.googleapis.com";
42
+ option (google.api.oauth_scopes) =
43
+ "https://www.googleapis.com/auth/cloud-platform";
44
+
45
+ // Creates a [Engine][google.cloud.discoveryengine.v1alpha.Engine].
46
+ rpc CreateEngine(CreateEngineRequest) returns (google.longrunning.Operation) {
47
+ option (google.api.http) = {
48
+ post: "/v1alpha/{parent=projects/*/locations/*/collections/*}/engines"
49
+ body: "engine"
50
+ };
51
+ option (google.api.method_signature) = "parent,engine,engine_id";
52
+ option (google.longrunning.operation_info) = {
53
+ response_type: "google.cloud.discoveryengine.v1alpha.Engine"
54
+ metadata_type: "google.cloud.discoveryengine.v1alpha.CreateEngineMetadata"
55
+ };
56
+ }
57
+
58
+ // Deletes a [Engine][google.cloud.discoveryengine.v1alpha.Engine].
59
+ rpc DeleteEngine(DeleteEngineRequest) returns (google.longrunning.Operation) {
60
+ option (google.api.http) = {
61
+ delete: "/v1alpha/{name=projects/*/locations/*/collections/*/engines/*}"
62
+ };
63
+ option (google.api.method_signature) = "name";
64
+ option (google.longrunning.operation_info) = {
65
+ response_type: "google.protobuf.Empty"
66
+ metadata_type: "google.cloud.discoveryengine.v1alpha.DeleteEngineMetadata"
67
+ };
68
+ }
69
+
70
+ // Updates an [Engine][google.cloud.discoveryengine.v1alpha.Engine]
71
+ rpc UpdateEngine(UpdateEngineRequest) returns (Engine) {
72
+ option (google.api.http) = {
73
+ patch: "/v1alpha/{engine.name=projects/*/locations/*/collections/*/engines/*}"
74
+ body: "engine"
75
+ };
76
+ option (google.api.method_signature) = "engine,update_mask";
77
+ }
78
+
79
+ // Gets a [Engine][google.cloud.discoveryengine.v1alpha.Engine].
80
+ rpc GetEngine(GetEngineRequest) returns (Engine) {
81
+ option (google.api.http) = {
82
+ get: "/v1alpha/{name=projects/*/locations/*/collections/*/engines/*}"
83
+ };
84
+ option (google.api.method_signature) = "name";
85
+ }
86
+
87
+ // Lists all the [Engine][google.cloud.discoveryengine.v1alpha.Engine]s
88
+ // associated with the project.
89
+ rpc ListEngines(ListEnginesRequest) returns (ListEnginesResponse) {
90
+ option (google.api.http) = {
91
+ get: "/v1alpha/{parent=projects/*/locations/*/collections/*}/engines"
92
+ };
93
+ option (google.api.method_signature) = "parent";
94
+ }
95
+
96
+ // Pauses the training of an existing engine. Only applicable if
97
+ // [solution_type][] is
98
+ // [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_RECOMMENDATION].
99
+ rpc PauseEngine(PauseEngineRequest) returns (Engine) {
100
+ option (google.api.http) = {
101
+ post: "/v1alpha/{name=projects/*/locations/*/collections/*/engines/*}:pause"
102
+ body: "*"
103
+ };
104
+ option (google.api.method_signature) = "name";
105
+ }
106
+
107
+ // Resumes the training of an existing engine. Only applicable if
108
+ // [SolutionType][google.cloud.discoveryengine.v1alpha.SolutionType] is
109
+ // [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_RECOMMENDATION].
110
+ rpc ResumeEngine(ResumeEngineRequest) returns (Engine) {
111
+ option (google.api.http) = {
112
+ post: "/v1alpha/{name=projects/*/locations/*/collections/*/engines/*}:resume"
113
+ body: "*"
114
+ };
115
+ option (google.api.method_signature) = "name";
116
+ }
117
+
118
+ // Tunes an existing engine. Only applicable if [solution_type][] is
119
+ // [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_RECOMMENDATION].
120
+ rpc TuneEngine(TuneEngineRequest) returns (google.longrunning.Operation) {
121
+ option (google.api.http) = {
122
+ post: "/v1alpha/{name=projects/*/locations/*/collections/*/engines/*}:tune"
123
+ body: "*"
124
+ };
125
+ option (google.api.method_signature) = "name";
126
+ option (google.longrunning.operation_info) = {
127
+ response_type: "TuneEngineResponse"
128
+ metadata_type: "TuneEngineMetadata"
129
+ };
130
+ }
131
+ }
132
+
133
+ // Request for
134
+ // [EngineService.CreateEngine][google.cloud.discoveryengine.v1alpha.EngineService.CreateEngine]
135
+ // method.
136
+ message CreateEngineRequest {
137
+ // Required. The parent resource name, such as
138
+ // `projects/{project}/locations/{location}/collections/{collection}`.
139
+ string parent = 1 [
140
+ (google.api.field_behavior) = REQUIRED,
141
+ (google.api.resource_reference) = {
142
+ type: "discoveryengine.googleapis.com/Collection"
143
+ }
144
+ ];
145
+
146
+ // Required. The [Engine][google.cloud.discoveryengine.v1alpha.Engine] to
147
+ // create.
148
+ Engine engine = 2 [(google.api.field_behavior) = REQUIRED];
149
+
150
+ // Required. The ID to use for the
151
+ // [Engine][google.cloud.discoveryengine.v1alpha.Engine], which will become
152
+ // the final component of the
153
+ // [Engine][google.cloud.discoveryengine.v1alpha.Engine]'s resource name.
154
+ //
155
+ // This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034)
156
+ // standard with a length limit of 63 characters. Otherwise, an
157
+ // INVALID_ARGUMENT error is returned.
158
+ string engine_id = 3 [(google.api.field_behavior) = REQUIRED];
159
+ }
160
+
161
+ // Metadata related to the progress of the
162
+ // [EngineService.CreateEngine][google.cloud.discoveryengine.v1alpha.EngineService.CreateEngine]
163
+ // operation. This will be returned by the google.longrunning.Operation.metadata
164
+ // field.
165
+ message CreateEngineMetadata {
166
+ // Operation create time.
167
+ google.protobuf.Timestamp create_time = 1;
168
+
169
+ // Operation last update time. If the operation is done, this is also the
170
+ // finish time.
171
+ google.protobuf.Timestamp update_time = 2;
172
+ }
173
+
174
+ // Request message for
175
+ // [EngineService.DeleteEngine][google.cloud.discoveryengine.v1alpha.EngineService.DeleteEngine]
176
+ // method.
177
+ message DeleteEngineRequest {
178
+ // Required. Full resource name of
179
+ // [Engine][google.cloud.discoveryengine.v1alpha.Engine], such as
180
+ // `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`.
181
+ //
182
+ // If the caller does not have permission to delete the
183
+ // [Engine][google.cloud.discoveryengine.v1alpha.Engine], regardless of
184
+ // whether or not it exists, a PERMISSION_DENIED error is returned.
185
+ //
186
+ // If the [Engine][google.cloud.discoveryengine.v1alpha.Engine] to delete does
187
+ // not exist, a NOT_FOUND error is returned.
188
+ string name = 1 [
189
+ (google.api.field_behavior) = REQUIRED,
190
+ (google.api.resource_reference) = {
191
+ type: "discoveryengine.googleapis.com/Engine"
192
+ }
193
+ ];
194
+ }
195
+
196
+ // Metadata related to the progress of the
197
+ // [EngineService.DeleteEngine][google.cloud.discoveryengine.v1alpha.EngineService.DeleteEngine]
198
+ // operation. This will be returned by the google.longrunning.Operation.metadata
199
+ // field.
200
+ message DeleteEngineMetadata {
201
+ // Operation create time.
202
+ google.protobuf.Timestamp create_time = 1;
203
+
204
+ // Operation last update time. If the operation is done, this is also the
205
+ // finish time.
206
+ google.protobuf.Timestamp update_time = 2;
207
+ }
208
+
209
+ // Request message for
210
+ // [EngineService.GetEngine][google.cloud.discoveryengine.v1alpha.EngineService.GetEngine]
211
+ // method.
212
+ message GetEngineRequest {
213
+ // Required. Full resource name of
214
+ // [Engine][google.cloud.discoveryengine.v1alpha.Engine], such as
215
+ // `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`.
216
+ string name = 1 [
217
+ (google.api.field_behavior) = REQUIRED,
218
+ (google.api.resource_reference) = {
219
+ type: "discoveryengine.googleapis.com/Engine"
220
+ }
221
+ ];
222
+ }
223
+
224
+ // Request message for
225
+ // [EngineService.ListEngines][google.cloud.discoveryengine.v1alpha.EngineService.ListEngines]
226
+ // method.
227
+ message ListEnginesRequest {
228
+ // Required. The parent resource name, such as
229
+ // `projects/{project}/locations/{location}/collections/{collection_id}`.
230
+ string parent = 1 [
231
+ (google.api.field_behavior) = REQUIRED,
232
+ (google.api.resource_reference) = {
233
+ type: "discoveryengine.googleapis.com/Collection"
234
+ }
235
+ ];
236
+
237
+ // Optional. Not supported.
238
+ int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
239
+
240
+ // Optional. Not supported.
241
+ string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
242
+
243
+ // Optional. Filter by solution type. For example:
244
+ // solution_type=SOLUTION_TYPE_SEARCH
245
+ string filter = 4 [(google.api.field_behavior) = OPTIONAL];
246
+ }
247
+
248
+ // Response message for
249
+ // [EngineService.ListEngines][google.cloud.discoveryengine.v1alpha.EngineService.ListEngines]
250
+ // method.
251
+ message ListEnginesResponse {
252
+ // All the customer's [Engine][google.cloud.discoveryengine.v1alpha.Engine]s.
253
+ repeated Engine engines = 1;
254
+
255
+ // Not supported.
256
+ string next_page_token = 2;
257
+ }
258
+
259
+ // Request message for
260
+ // [EngineService.UpdateEngine][google.cloud.discoveryengine.v1alpha.EngineService.UpdateEngine]
261
+ // method.
262
+ message UpdateEngineRequest {
263
+ // Required. The [Engine][google.cloud.discoveryengine.v1alpha.Engine] to
264
+ // update.
265
+ //
266
+ // If the caller does not have permission to update the
267
+ // [Engine][google.cloud.discoveryengine.v1alpha.Engine], regardless of
268
+ // whether or not it exists, a PERMISSION_DENIED error is returned.
269
+ //
270
+ // If the [Engine][google.cloud.discoveryengine.v1alpha.Engine] to update does
271
+ // not exist, a NOT_FOUND error is returned.
272
+ Engine engine = 1 [(google.api.field_behavior) = REQUIRED];
273
+
274
+ // Indicates which fields in the provided
275
+ // [Engine][google.cloud.discoveryengine.v1alpha.Engine] to update.
276
+ //
277
+ // If an unsupported or unknown field is provided, an INVALID_ARGUMENT error
278
+ // is returned.
279
+ google.protobuf.FieldMask update_mask = 2;
280
+ }
281
+
282
+ // Request for pausing training of an engine.
283
+ message PauseEngineRequest {
284
+ // Required. The name of the engine to pause.
285
+ // Format:
286
+ // `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`
287
+ string name = 1 [
288
+ (google.api.field_behavior) = REQUIRED,
289
+ (google.api.resource_reference) = {
290
+ type: "discoveryengine.googleapis.com/Engine"
291
+ }
292
+ ];
293
+ }
294
+
295
+ // Request for resuming training of an engine.
296
+ message ResumeEngineRequest {
297
+ // Required. The name of the engine to resume.
298
+ // Format:
299
+ // `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`
300
+ string name = 1 [
301
+ (google.api.field_behavior) = REQUIRED,
302
+ (google.api.resource_reference) = {
303
+ type: "discoveryengine.googleapis.com/Engine"
304
+ }
305
+ ];
306
+ }
307
+
308
+ // Request to manually start a tuning process now (instead of waiting for
309
+ // the periodically scheduled tuning to happen).
310
+ message TuneEngineRequest {
311
+ // Required. The resource name of the engine to tune.
312
+ // Format:
313
+ // `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`
314
+ string name = 1 [
315
+ (google.api.field_behavior) = REQUIRED,
316
+ (google.api.resource_reference) = {
317
+ type: "discoveryengine.googleapis.com/Engine"
318
+ }
319
+ ];
320
+ }
321
+
322
+ // Metadata associated with a tune operation.
323
+ message TuneEngineMetadata {
324
+ // Required. The resource name of the engine that this tune applies to.
325
+ // Format:
326
+ // `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`
327
+ string engine = 1 [
328
+ (google.api.field_behavior) = REQUIRED,
329
+ (google.api.resource_reference) = {
330
+ type: "discoveryengine.googleapis.com/Engine"
331
+ }
332
+ ];
333
+ }
334
+
335
+ // Response associated with a tune operation.
336
+ message TuneEngineResponse {}
@@ -58,11 +58,17 @@ service RecommendationService {
58
58
 
59
59
  // Request message for Recommend method.
60
60
  message RecommendRequest {
61
- // Required. Full resource name of the format:
61
+ // Required. Full resource name of a
62
+ // [ServingConfig][google.cloud.discoveryengine.v1alpha.ServingConfig]:
63
+ // `projects/*/locations/global/collections/*/engines/*/servingConfigs/*`, or
62
64
  // `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*`
63
65
  //
64
- // Before you can request recommendations from your model, you must create at
65
- // least one serving config for it.
66
+ // One default serving config is created along with your recommendation engine
67
+ // creation. The engine ID will be used as the ID of the default serving
68
+ // config. For example, for Engine
69
+ // `projects/*/locations/global/collections/*/engines/my-engine`, you can use
70
+ // `projects/*/locations/global/collections/*/engines/my-engine/servingConfigs/my-engine`
71
+ // for your [Recommend][] requests.
66
72
  string serving_config = 1 [
67
73
  (google.api.field_behavior) = REQUIRED,
68
74
  (google.api.resource_reference) = {
@@ -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
@@ -463,6 +485,8 @@ message SearchRequest {
463
485
  }
464
486
 
465
487
  // Required. The resource name of the Search serving config, such as
488
+ // `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`,
489
+ // or
466
490
  // `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`.
467
491
  // This field is used to identify the serving configuration name, set
468
492
  // of models used to make the search.
@@ -521,12 +545,37 @@ message SearchRequest {
521
545
  // expression is case-sensitive.
522
546
  //
523
547
  // If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
548
+ //
549
+ // Filtering in Vertex AI Search is done by mapping the LHS filter key to a
550
+ // key property defined in the Vertex AI Search backend -- this mapping is
551
+ // defined by the customer in their schema. For example a media customer might
552
+ // have a field 'name' in their schema. In this case the filter would look
553
+ // like this: filter --> name:'ANY("king kong")'
554
+ //
555
+ // For more information about filtering including syntax and filter
556
+ // operators, see
557
+ // [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
524
558
  string filter = 7;
525
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
+
526
574
  // The order in which documents are returned. Documents can be ordered by
527
575
  // a field in an [Document][google.cloud.discoveryengine.v1alpha.Document]
528
576
  // object. Leave it unset if ordered by relevance. `order_by` expression is
529
- // case-sensitive.
577
+ // case-sensitive. For more information on ordering, see
578
+ // [Ordering](https://cloud.google.com/retail/docs/filter-and-order#order)
530
579
  //
531
580
  // If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
532
581
  string order_by = 8;
@@ -544,6 +593,8 @@ message SearchRequest {
544
593
  repeated FacetSpec facet_specs = 9;
545
594
 
546
595
  // Boost specification to boost certain documents.
596
+ // For more information on boosting, see
597
+ // [Boosting](https://cloud.google.com/retail/docs/boosting#boost)
547
598
  BoostSpec boost_spec = 10;
548
599
 
549
600
  // Additional search parameters.
@@ -552,9 +603,17 @@ message SearchRequest {
552
603
  //
553
604
  // * `user_country_code`: string. Default empty. If set to non-empty, results
554
605
  // are restricted or boosted based on the location provided.
606
+ // Example:
607
+ // user_country_code: "au"
608
+ //
609
+ // For available codes see [Country
610
+ // Codes](https://developers.google.com/custom-search/docs/json_api_reference#countryCodes)
611
+ //
555
612
  // * `search_type`: double. Default empty. Enables non-webpage searching
556
- // depending on the value. The only valid non-default value is 1,
557
- // which enables image searching.
613
+ // depending on the value. The only valid non-default value is 1,
614
+ // which enables image searching.
615
+ // Example:
616
+ // search_type: 1
558
617
  map<string, google.protobuf.Value> params = 11;
559
618
 
560
619
  // The query expansion specification that specifies the conditions under which
@@ -720,6 +779,65 @@ message SearchResponse {
720
779
  repeated float scores = 2;
721
780
  }
722
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
+
723
841
  // An Enum for summary-skipped reasons.
724
842
  enum SummarySkippedReason {
725
843
  // Default value. The summary skipped reason is not specified.
@@ -768,6 +886,8 @@ message SearchResponse {
768
886
  // A collection of Safety Attribute categories and their associated
769
887
  // confidence scores.
770
888
  SafetyAttributes safety_attributes = 3;
889
+
890
+ SummaryWithMetadata summary_with_metadata = 4;
771
891
  }
772
892
 
773
893
  // Debug information specifically related to forward geocoding issues arising