@google-cloud/discoveryengine 1.5.0 → 1.6.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 (30) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/build/protos/google/cloud/discoveryengine/v1alpha/chunk.proto +1 -35
  3. package/build/protos/google/cloud/discoveryengine/v1alpha/common.proto +0 -20
  4. package/build/protos/google/cloud/discoveryengine/v1alpha/document.proto +0 -19
  5. package/build/protos/google/cloud/discoveryengine/v1alpha/document_service.proto +0 -64
  6. package/build/protos/google/cloud/discoveryengine/v1alpha/import_config.proto +21 -312
  7. package/build/protos/google/cloud/discoveryengine/v1alpha/search_service.proto +23 -153
  8. package/build/protos/google/cloud/discoveryengine/v1alpha/search_tuning_service.proto +2 -5
  9. package/build/protos/google/cloud/discoveryengine/v1alpha/serving_config_service.proto +1 -2
  10. package/build/protos/protos.d.ts +4806 -6944
  11. package/build/protos/protos.js +30876 -36494
  12. package/build/protos/protos.json +103 -604
  13. package/build/src/v1alpha/completion_service_client.js +0 -3
  14. package/build/src/v1alpha/data_store_service_client.js +0 -3
  15. package/build/src/v1alpha/document_service_client.d.ts +21 -80
  16. package/build/src/v1alpha/document_service_client.js +0 -25
  17. package/build/src/v1alpha/document_service_client_config.json +0 -5
  18. package/build/src/v1alpha/engine_service_client.js +0 -3
  19. package/build/src/v1alpha/estimate_billing_service_client.js +0 -3
  20. package/build/src/v1alpha/index.d.ts +1 -1
  21. package/build/src/v1alpha/index.js +3 -3
  22. package/build/src/v1alpha/schema_service_client.js +0 -3
  23. package/build/src/v1alpha/search_service_client.d.ts +15 -30
  24. package/build/src/v1alpha/search_service_client.js +10 -20
  25. package/build/src/v1alpha/search_tuning_service_client.js +0 -3
  26. package/build/src/v1alpha/serving_config_service_client.d.ts +1 -2
  27. package/build/src/v1alpha/serving_config_service_client.js +1 -2
  28. package/build/src/v1alpha/site_search_engine_service_client.js +0 -3
  29. package/build/src/v1alpha/user_event_service_client.js +0 -3
  30. package/package.json +1 -1
@@ -218,80 +218,6 @@ message SearchRequest {
218
218
  message BoostSpec {
219
219
  // Boost applies to documents which match a condition.
220
220
  message ConditionBoostSpec {
221
- // Specification for custom ranking based on customer specified attribute
222
- // value. It provides more controls for customized ranking than the simple
223
- // (condition, boost) combination above.
224
- message BoostControlSpec {
225
- // The control points used to define the curve. The curve defined
226
- // through these control points can only be monotonically increasing
227
- // or decreasing(constant values are acceptable).
228
- message ControlPoint {
229
- // Can be one of:
230
- // 1. The numerical field value.
231
- // 2. The duration spec for freshness:
232
- // The value must be formatted as an XSD `dayTimeDuration` value (a
233
- // restricted subset of an ISO 8601 duration value). The pattern for
234
- // this is: `[nD][T[nH][nM][nS]]`.
235
- string attribute_value = 1;
236
-
237
- // The value between -1 to 1 by which to boost the score if the
238
- // attribute_value evaluates to the value specified above.
239
- float boost_amount = 2;
240
- }
241
-
242
- // The attribute(or function) for which the custom ranking is to be
243
- // applied.
244
- enum AttributeType {
245
- // Unspecified AttributeType.
246
- ATTRIBUTE_TYPE_UNSPECIFIED = 0;
247
-
248
- // The value of the numerical field will be used to dynamically update
249
- // the boost amount. In this case, the attribute_value (the x value)
250
- // of the control point will be the actual value of the numerical
251
- // field for which the boost_amount is specified.
252
- NUMERICAL = 1;
253
-
254
- // For the freshness use case the attribute value will be the duration
255
- // between the current time and the date in the datetime field
256
- // specified. The value must be formatted as an XSD `dayTimeDuration`
257
- // value (a restricted subset of an ISO 8601 duration value). The
258
- // pattern for this is: `[nD][T[nH][nM][nS]]`.
259
- // E.g. `5D`, `3DT12H30M`, `T24H`.
260
- FRESHNESS = 2;
261
- }
262
-
263
- // The interpolation type to be applied. Default will be linear
264
- // (Piecewise Linear).
265
- enum InterpolationType {
266
- // Interpolation type is unspecified. In this case, it defaults to
267
- // Linear.
268
- INTERPOLATION_TYPE_UNSPECIFIED = 0;
269
-
270
- // Piecewise linear interpolation will be applied.
271
- LINEAR = 1;
272
- }
273
-
274
- // The name of the field whose value will be used to determine the
275
- // boost amount.
276
- string field_name = 1;
277
-
278
- // The attribute type to be used to determine the boost amount. The
279
- // attribute value can be derived from the field value of the specified
280
- // field_name. In the case of numerical it is straightforward i.e.
281
- // attribute_value = numerical_field_value. In the case of freshness
282
- // however, attribute_value = (time.now() - datetime_field_value).
283
- AttributeType attribute_type = 2;
284
-
285
- // The interpolation type to be applied to connect the control points
286
- // listed below.
287
- InterpolationType interpolation_type = 3;
288
-
289
- // The control points used to define the curve. The monotonic function
290
- // (defined through the interpolation_type above) passes through the
291
- // control points listed here.
292
- repeated ControlPoint control_points = 4;
293
- }
294
-
295
221
  // An expression which specifies a boost condition. The syntax and
296
222
  // supported fields are the same as a filter expression. See
297
223
  // [SearchRequest.filter][google.cloud.discoveryengine.v1alpha.SearchRequest.filter]
@@ -307,27 +233,21 @@ message SearchRequest {
307
233
  // Strength of the condition boost, which should be in [-1, 1]. Negative
308
234
  // boost means demotion. Default is 0.0.
309
235
  //
310
- // Setting to 1.0 gives the document a big promotion. However, it does
311
- // not necessarily mean that the boosted document will be the top result
312
- // at all times, nor that other documents will be excluded. Results
313
- // could still be shown even when none of them matches the condition.
314
- // And results that are significantly more relevant to the search query
315
- // can still trump your heavily favored but irrelevant documents.
236
+ // Setting to 1.0 gives the document a big promotion. However, it does not
237
+ // necessarily mean that the boosted document will be the top result at
238
+ // all times, nor that other documents will be excluded. Results could
239
+ // still be shown even when none of them matches the condition. And
240
+ // results that are significantly more relevant to the search query can
241
+ // still trump your heavily favored but irrelevant documents.
316
242
  //
317
243
  // Setting to -1.0 gives the document a big demotion. However, results
318
244
  // that are deeply relevant might still be shown. The document will have
319
- // an upstream battle to get a fairly high ranking, but it is not
320
- // blocked out completely.
245
+ // an upstream battle to get a fairly high ranking, but it is not blocked
246
+ // out completely.
321
247
  //
322
248
  // Setting to 0.0 means no boost applied. The boosting condition is
323
- // ignored. Only one of the (condition, boost) combination or the
324
- // boost_control_spec below are set. If both are set then the global boost
325
- // is ignored and the more fine-grained boost_control_spec is applied.
249
+ // ignored.
326
250
  float boost = 2;
327
-
328
- // Complex specification for custom ranking based on customer defined
329
- // attribute value.
330
- BoostControlSpec boost_control_spec = 3;
331
251
  }
332
252
 
333
253
  // Condition boost specifications. If a document matches multiple conditions
@@ -428,13 +348,11 @@ message SearchRequest {
428
348
  // Supported values are:
429
349
  //
430
350
  // * `stable`: string. Default value when no value is specified. Uses a
431
- // generally available, fine-tuned model. For more information, see
432
- // [Answer generation model versions and
433
- // lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models).
434
- // * `preview`: string. (Public preview) Uses a preview model. For more
435
- // information, see
436
- // [Answer generation model versions and
437
- // lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models).
351
+ // generally available, fine-tuned version of the text-bison@001
352
+ // model.
353
+ // * `preview`: string. (Public preview) Uses a fine-tuned version of
354
+ // the text-bison@002 model. This model works only for summaries in
355
+ // English.
438
356
  string version = 1;
439
357
  }
440
358
 
@@ -501,14 +419,6 @@ message SearchRequest {
501
419
  // If specified, the spec will be used to modify the model specification
502
420
  // provided to the LLM.
503
421
  ModelSpec model_spec = 7;
504
-
505
- // If true, answer will be generated from most relevant chunks from top
506
- // search results. This feature will improve summary quality.
507
- // Please note that with this feature enabled, not all top search results
508
- // will be referenced and included in the reference list, so the citation
509
- // source index only points to the search results listed in the reference
510
- // list.
511
- bool use_semantic_chunks = 8;
512
422
  }
513
423
 
514
424
  // A specification for configuring the extractive content in a search
@@ -549,9 +459,10 @@ message SearchRequest {
549
459
  int32 max_extractive_segment_count = 2;
550
460
 
551
461
  // Specifies whether to return the confidence score from the extractive
552
- // segments in each search result. This feature is available only for new
553
- // or allowlisted data stores. To allowlist your data store, please
554
- // contact your Customer Engineer. The default value is `false`.
462
+ // segments in each search result. The default value is `false`.
463
+ //
464
+ // Note: this is a priavte preview feature and only works for allowlisted
465
+ // users, please reach out to Cloud Support team if you want to use it.
555
466
  bool return_extractive_segment_score = 3;
556
467
 
557
468
  // Specifies whether to also include the adjacent from each selected
@@ -565,23 +476,6 @@ message SearchRequest {
565
476
  int32 num_next_segments = 5;
566
477
  }
567
478
 
568
- // Specifies the chunk spec to be returned from the search response.
569
- // Only available if the
570
- // [SearchRequest.ContentSearchSpec.search_result_mode][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.search_result_mode]
571
- // is set to
572
- // [CHUNKS][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS]
573
- message ChunkSpec {
574
- // The number of previous chunks to be returned of the current chunk. The
575
- // maximum allowed value is 3.
576
- // If not specified, no previous chunks will be returned.
577
- int32 num_previous_chunks = 1;
578
-
579
- // The number of next chunks to be returned of the current chunk. The
580
- // maximum allowed value is 3.
581
- // If not specified, no next chunks will be returned.
582
- int32 num_next_chunks = 2;
583
- }
584
-
585
479
  // Specifies the search result mode. If unspecified, the
586
480
  // search result mode is based on
587
481
  // [DataStore.DocumentProcessingConfig.chunking_config][]:
@@ -619,13 +513,6 @@ message SearchRequest {
619
513
  // it defaults to `CHUNKS`.
620
514
  // * Otherwise, it defaults to `DOCUMENTS`.
621
515
  SearchResultMode search_result_mode = 4;
622
-
623
- // Specifies the chunk spec to be returned from the search response.
624
- // Only available if the
625
- // [SearchRequest.ContentSearchSpec.search_result_mode][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.search_result_mode]
626
- // is set to
627
- // [CHUNKS][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS]
628
- ChunkSpec chunk_spec = 5;
629
516
  }
630
517
 
631
518
  // The specification that uses customized query embedding vector to do
@@ -673,15 +560,11 @@ message SearchRequest {
673
560
  ImageQuery image_query = 19;
674
561
 
675
562
  // Maximum number of
676
- // [Document][google.cloud.discoveryengine.v1alpha.Document]s to return. The
677
- // maximum allowed value depends on the data type. Values above the maximum
678
- // value are coerced to the maximum value.
563
+ // [Document][google.cloud.discoveryengine.v1alpha.Document]s to return. If
564
+ // unspecified, defaults to a reasonable value. The maximum allowed value is
565
+ // 100. Values above 100 are coerced to 100.
679
566
  //
680
- // * Websites with basic indexing: Default `10`, Maximum `25`.
681
- // * Websites with advanced indexing: Default `25`, Maximum `50`.
682
- // * Other: Default `50`, Maximum `100`.
683
- //
684
- // If this field is negative, an `INVALID_ARGUMENT` is returned.
567
+ // If this field is negative, an `INVALID_ARGUMENT` is returned.
685
568
  int32 page_size = 4;
686
569
 
687
570
  // A page token received from a previous
@@ -818,8 +701,7 @@ message SearchRequest {
818
701
  //
819
702
  // If
820
703
  // [SearchRequest.EmbeddingSpec.EmbeddingVector.field_path][google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path]
821
- // is not provided, it will use
822
- // [ServingConfig.EmbeddingConfig.field_path][google.cloud.discoveryengine.v1alpha.ServingConfig.embedding_config].
704
+ // is not provided, it will use [ServingConfig.EmbeddingConfig.field_path][].
823
705
  EmbeddingSpec embedding_spec = 23;
824
706
 
825
707
  // The ranking expression controls the customized ranking on retrieval
@@ -985,15 +867,6 @@ message SearchResponse {
985
867
 
986
868
  // Document reference.
987
869
  message Reference {
988
- // Chunk content.
989
- message ChunkContent {
990
- // Chunk textual content.
991
- string content = 1;
992
-
993
- // Page identifier.
994
- string page_identifier = 2;
995
- }
996
-
997
870
  // Title of the document.
998
871
  string title = 1;
999
872
 
@@ -1011,9 +884,6 @@ message SearchResponse {
1011
884
 
1012
885
  // Cloud Storage or HTTP uri for the document.
1013
886
  string uri = 3;
1014
-
1015
- // List of cited chunk contents derived from document content.
1016
- repeated ChunkContent chunk_contents = 4;
1017
887
  }
1018
888
 
1019
889
  // Summary with metadata information.
@@ -65,8 +65,8 @@ message TrainCustomModelRequest {
65
65
  // A newline delimited jsonl/ndjson file.
66
66
  //
67
67
  // For search-tuning model, each line should have the _id, title
68
- // and text. Example:
69
- // `{"_id": "doc1", title: "relevant doc", "text": "relevant text"}`
68
+ // and text. Example: {"_id": "doc1", title: "relevant doc", "text":
69
+ // "relevant text"}
70
70
  string corpus_data_path = 1;
71
71
 
72
72
  // The gcs query data which could be associated in train data.
@@ -137,9 +137,6 @@ message TrainCustomModelResponse {
137
137
  // * **in-progress**: Model training is in progress.
138
138
  // * **ready**: The model is ready for serving.
139
139
  string model_status = 3;
140
-
141
- // The metrics of the trained model.
142
- map<string, double> metrics = 4;
143
140
  }
144
141
 
145
142
  // Metadata related to the progress of the TrainCustomModel operation. This is
@@ -32,8 +32,7 @@ option objc_class_prefix = "DISCOVERYENGINE";
32
32
  option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1alpha";
33
33
  option ruby_package = "Google::Cloud::DiscoveryEngine::V1alpha";
34
34
 
35
- // Service for operations related to
36
- // [ServingConfig][google.cloud.discoveryengine.v1alpha.ServingConfig].
35
+ // Service for operations related to [ServingConfig][].
37
36
  service ServingConfigService {
38
37
  option (google.api.default_host) = "discoveryengine.googleapis.com";
39
38
  option (google.api.oauth_scopes) =