@google-cloud/discoveryengine 1.4.0 → 1.4.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (107) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/README.md +13 -0
  3. package/build/protos/google/cloud/discoveryengine/v1alpha/acl_config.proto +49 -0
  4. package/build/protos/google/cloud/discoveryengine/v1alpha/acl_config_service.proto +79 -0
  5. package/build/protos/google/cloud/discoveryengine/v1alpha/chunk.proto +72 -0
  6. package/build/protos/google/cloud/discoveryengine/v1alpha/chunk_service.proto +137 -0
  7. package/build/protos/google/cloud/discoveryengine/v1alpha/common.proto +77 -4
  8. package/build/protos/google/cloud/discoveryengine/v1alpha/completion.proto +52 -0
  9. package/build/protos/google/cloud/discoveryengine/v1alpha/completion_service.proto +44 -2
  10. package/build/protos/google/cloud/discoveryengine/v1alpha/conversational_search_service.proto +6 -1
  11. package/build/protos/google/cloud/discoveryengine/v1alpha/data_store.proto +44 -0
  12. package/build/protos/google/cloud/discoveryengine/v1alpha/data_store_service.proto +80 -1
  13. package/build/protos/google/cloud/discoveryengine/v1alpha/document.proto +83 -0
  14. package/build/protos/google/cloud/discoveryengine/v1alpha/document_processing_config.proto +127 -0
  15. package/build/protos/google/cloud/discoveryengine/v1alpha/document_service.proto +6 -0
  16. package/build/protos/google/cloud/discoveryengine/v1alpha/engine.proto +13 -8
  17. package/build/protos/google/cloud/discoveryengine/v1alpha/engine_service.proto +3 -2
  18. package/build/protos/google/cloud/discoveryengine/v1alpha/estimate_billing_service.proto +130 -0
  19. package/build/protos/google/cloud/discoveryengine/v1alpha/import_config.proto +64 -0
  20. package/build/protos/google/cloud/discoveryengine/v1alpha/purge_config.proto +66 -0
  21. package/build/protos/google/cloud/discoveryengine/v1alpha/recommendation_service.proto +3 -1
  22. package/build/protos/google/cloud/discoveryengine/v1alpha/schema.proto +3 -0
  23. package/build/protos/google/cloud/discoveryengine/v1alpha/search_service.proto +74 -13
  24. package/build/protos/google/cloud/discoveryengine/v1alpha/search_tuning_service.proto +24 -20
  25. package/build/protos/google/cloud/discoveryengine/v1alpha/serving_config.proto +271 -0
  26. package/build/protos/google/cloud/discoveryengine/v1alpha/serving_config_service.proto +147 -0
  27. package/build/protos/google/cloud/discoveryengine/v1alpha/site_search_engine.proto +9 -3
  28. package/build/protos/google/cloud/discoveryengine/v1alpha/site_search_engine_service.proto +7 -4
  29. package/build/protos/google/cloud/discoveryengine/v1alpha/user_event.proto +4 -3
  30. package/build/protos/google/cloud/discoveryengine/v1beta/conversational_search_service.proto +5 -0
  31. package/build/protos/google/cloud/discoveryengine/v1beta/data_store.proto +22 -0
  32. package/build/protos/google/cloud/discoveryengine/v1beta/document.proto +9 -0
  33. package/build/protos/google/cloud/discoveryengine/v1beta/document_processing_config.proto +94 -0
  34. package/build/protos/google/cloud/discoveryengine/v1beta/purge_config.proto +3 -0
  35. package/build/protos/google/cloud/discoveryengine/v1beta/search_service.proto +19 -4
  36. package/build/protos/google/cloud/discoveryengine/v1beta/search_tuning_service.proto +151 -0
  37. package/build/protos/google/cloud/discoveryengine/v1beta/serving_config.proto +4 -3
  38. package/build/protos/google/cloud/discoveryengine/v1beta/serving_config_service.proto +6 -5
  39. package/build/protos/protos.d.ts +15133 -7787
  40. package/build/protos/protos.js +50444 -32043
  41. package/build/protos/protos.json +4132 -2305
  42. package/build/src/v1alpha/acl_config_service_client.d.ts +1233 -0
  43. package/build/src/v1alpha/acl_config_service_client.js +1765 -0
  44. package/build/src/v1alpha/acl_config_service_client_config.json +34 -0
  45. package/build/src/v1alpha/chunk_service_client.d.ts +1350 -0
  46. package/build/src/v1alpha/chunk_service_client.js +1886 -0
  47. package/build/src/v1alpha/chunk_service_client_config.json +34 -0
  48. package/build/src/v1alpha/completion_service_client.d.ts +588 -3
  49. package/build/src/v1alpha/completion_service_client.js +831 -2
  50. package/build/src/v1alpha/completion_service_client_config.json +10 -0
  51. package/build/src/v1alpha/conversational_search_service_client.d.ts +233 -1
  52. package/build/src/v1alpha/conversational_search_service_client.js +316 -0
  53. package/build/src/v1alpha/data_store_service_client.d.ts +451 -3
  54. package/build/src/v1alpha/data_store_service_client.js +562 -2
  55. package/build/src/v1alpha/data_store_service_client_config.json +8 -0
  56. package/build/src/v1alpha/document_service_client.d.ts +382 -0
  57. package/build/src/v1alpha/document_service_client.js +514 -0
  58. package/build/src/v1alpha/engine_service_client.d.ts +375 -2
  59. package/build/src/v1alpha/engine_service_client.js +514 -0
  60. package/build/src/v1alpha/estimate_billing_service_client.d.ts +1367 -0
  61. package/build/src/v1alpha/estimate_billing_service_client.js +2028 -0
  62. package/build/src/v1alpha/estimate_billing_service_client_config.json +30 -0
  63. package/build/src/v1alpha/index.d.ts +4 -0
  64. package/build/src/v1alpha/index.js +9 -1
  65. package/build/src/v1alpha/recommendation_service_client.d.ts +231 -1
  66. package/build/src/v1alpha/recommendation_service_client.js +316 -0
  67. package/build/src/v1alpha/schema_service_client.d.ts +372 -0
  68. package/build/src/v1alpha/schema_service_client.js +514 -0
  69. package/build/src/v1alpha/search_service_client.d.ts +258 -15
  70. package/build/src/v1alpha/search_service_client.js +336 -10
  71. package/build/src/v1alpha/search_tuning_service_client.d.ts +373 -1
  72. package/build/src/v1alpha/search_tuning_service_client.js +514 -0
  73. package/build/src/v1alpha/serving_config_service_client.d.ts +1369 -0
  74. package/build/src/v1alpha/serving_config_service_client.js +1935 -0
  75. package/build/src/v1alpha/serving_config_service_client_config.json +38 -0
  76. package/build/src/v1alpha/site_search_engine_service_client.d.ts +372 -0
  77. package/build/src/v1alpha/site_search_engine_service_client.js +514 -0
  78. package/build/src/v1alpha/user_event_service_client.d.ts +372 -0
  79. package/build/src/v1alpha/user_event_service_client.js +514 -0
  80. package/build/src/v1beta/completion_service_client.d.ts +75 -0
  81. package/build/src/v1beta/completion_service_client.js +104 -0
  82. package/build/src/v1beta/conversational_search_service_client.d.ts +79 -0
  83. package/build/src/v1beta/conversational_search_service_client.js +104 -0
  84. package/build/src/v1beta/data_store_service_client.d.ts +75 -0
  85. package/build/src/v1beta/data_store_service_client.js +104 -0
  86. package/build/src/v1beta/document_service_client.d.ts +75 -0
  87. package/build/src/v1beta/document_service_client.js +104 -0
  88. package/build/src/v1beta/engine_service_client.d.ts +75 -0
  89. package/build/src/v1beta/engine_service_client.js +104 -0
  90. package/build/src/v1beta/index.d.ts +1 -0
  91. package/build/src/v1beta/index.js +3 -1
  92. package/build/src/v1beta/recommendation_service_client.d.ts +75 -0
  93. package/build/src/v1beta/recommendation_service_client.js +104 -0
  94. package/build/src/v1beta/schema_service_client.d.ts +75 -0
  95. package/build/src/v1beta/schema_service_client.js +104 -0
  96. package/build/src/v1beta/search_service_client.d.ts +81 -0
  97. package/build/src/v1beta/search_service_client.js +108 -0
  98. package/build/src/v1beta/search_tuning_service_client.d.ts +1196 -0
  99. package/build/src/v1beta/search_tuning_service_client.js +1781 -0
  100. package/build/src/v1beta/search_tuning_service_client_config.json +30 -0
  101. package/build/src/v1beta/serving_config_service_client.d.ts +123 -8
  102. package/build/src/v1beta/serving_config_service_client.js +166 -5
  103. package/build/src/v1beta/site_search_engine_service_client.d.ts +75 -0
  104. package/build/src/v1beta/site_search_engine_service_client.js +104 -0
  105. package/build/src/v1beta/user_event_service_client.d.ts +75 -0
  106. package/build/src/v1beta/user_event_service_client.js +104 -0
  107. package/package.json +3 -3
@@ -84,6 +84,9 @@ message PurgeDocumentsMetadata {
84
84
 
85
85
  // Count of entries that encountered errors while processing.
86
86
  int64 failure_count = 4;
87
+
88
+ // Count of entries that were ignored as entries were not found.
89
+ int64 ignored_count = 5;
87
90
  }
88
91
 
89
92
  // Request message for
@@ -69,6 +69,19 @@ message SearchRequest {
69
69
  }
70
70
  }
71
71
 
72
+ // A struct to define data stores to filter on in a search call.
73
+ message DataStoreSpec {
74
+ // Required. Full resource name of
75
+ // [DataStore][google.cloud.discoveryengine.v1beta.DataStore], such as
76
+ // `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`.
77
+ string data_store = 1 [
78
+ (google.api.field_behavior) = REQUIRED,
79
+ (google.api.resource_reference) = {
80
+ type: "discoveryengine.googleapis.com/DataStore"
81
+ }
82
+ ];
83
+ }
84
+
72
85
  // A facet specification to perform faceted search.
73
86
  message FacetSpec {
74
87
  // Specifies how a facet is computed.
@@ -212,9 +225,8 @@ message SearchRequest {
212
225
  // Examples:
213
226
  //
214
227
  // * To boost documents with document ID "doc_1" or "doc_2", and
215
- // color
216
- // "Red" or "Blue":
217
- // * (id: ANY("doc_1", "doc_2")) AND (color: ANY("Red","Blue"))
228
+ // color "Red" or "Blue":
229
+ // `(document_id: ANY("doc_1", "doc_2")) AND (color: ANY("Red", "Blue"))`
218
230
  string condition = 1;
219
231
 
220
232
  // Strength of the condition boost, which should be in [-1, 1]. Negative
@@ -347,7 +359,7 @@ message SearchRequest {
347
359
  // of results returned is less than `summaryResultCount`, the summary is
348
360
  // generated from all of the results.
349
361
  //
350
- // At most five results can be used to generate a summary.
362
+ // At most 10 results can be used to generate a summary.
351
363
  int32 summary_result_count = 1;
352
364
 
353
365
  // Specifies whether to include citations in the summary. The default
@@ -547,6 +559,9 @@ message SearchRequest {
547
559
  // If this field is negative, an `INVALID_ARGUMENT` is returned.
548
560
  int32 offset = 6;
549
561
 
562
+ // A list of data store specs to apply on a search call.
563
+ repeated DataStoreSpec data_store_specs = 32;
564
+
550
565
  // The filter syntax consists of an expression language for constructing a
551
566
  // predicate from one or more fields of the documents being filtered. Filter
552
567
  // expression is case-sensitive.
@@ -0,0 +1,151 @@
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.v1beta;
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/v1beta/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.V1Beta";
29
+ option go_package = "cloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;discoveryenginepb";
30
+ option java_multiple_files = true;
31
+ option java_outer_classname = "SearchTuningServiceProto";
32
+ option java_package = "com.google.cloud.discoveryengine.v1beta";
33
+ option objc_class_prefix = "DISCOVERYENGINE";
34
+ option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1beta";
35
+ option ruby_package = "Google::Cloud::DiscoveryEngine::V1beta";
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: "/v1beta/{data_store=projects/*/locations/*/collections/*/dataStores/*}:trainCustomModel"
48
+ body: "*"
49
+ };
50
+ option (google.longrunning.operation_info) = {
51
+ response_type: "google.cloud.discoveryengine.v1beta.TrainCustomModelResponse"
52
+ metadata_type: "google.cloud.discoveryengine.v1beta.TrainCustomModelMetadata"
53
+ };
54
+ }
55
+ }
56
+
57
+ // Request message for
58
+ // [SearchTuningService.TrainCustomModel][google.cloud.discoveryengine.v1beta.SearchTuningService.TrainCustomModel]
59
+ // method.
60
+ message TrainCustomModelRequest {
61
+ // Cloud Storage training data input.
62
+ message GcsTrainingInput {
63
+ // The Cloud Storage 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
+ //
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"}`
70
+ string corpus_data_path = 1;
71
+
72
+ // The gcs query data which could be associated in train data.
73
+ // The data path format is `gs://<bucket_to_data>/<jsonl_file_name>`.
74
+ // A newline delimited jsonl/ndjson file.
75
+ //
76
+ // For search-tuning model, each line should have the _id
77
+ // and text. Example: {"_id": "query1", "text": "example query"}
78
+ string query_data_path = 2;
79
+
80
+ // Cloud Storage training data path whose format should be
81
+ // `gs://<bucket_to_data>/<tsv_file_name>`. The file should be in tsv
82
+ // format. Each line should have the doc_id and query_id and score (number).
83
+ //
84
+ // For search-tuning model, it should have the query-id corpus-id
85
+ // score as tsv file header. The score should be a number in `[0, inf+)`.
86
+ // The larger the number is, the more relevant the pair is. Example:
87
+ //
88
+ // * `query-id\tcorpus-id\tscore`
89
+ // * `query1\tdoc1\t1`
90
+ string train_data_path = 3;
91
+
92
+ // Cloud Storage test data. Same format as train_data_path. If not provided,
93
+ // a random 80/20 train/test split will be performed on train_data_path.
94
+ string test_data_path = 4;
95
+ }
96
+
97
+ // Model training input.
98
+ oneof training_input {
99
+ // Cloud Storage training input.
100
+ GcsTrainingInput gcs_training_input = 2;
101
+ }
102
+
103
+ // Required. The resource name of the Data Store, such as
104
+ // `projects/*/locations/global/collections/default_collection/dataStores/default_data_store`.
105
+ // This field is used to identify the data store where to train the models.
106
+ string data_store = 1 [
107
+ (google.api.field_behavior) = REQUIRED,
108
+ (google.api.resource_reference) = {
109
+ type: "discoveryengine.googleapis.com/DataStore"
110
+ }
111
+ ];
112
+
113
+ // Model to be trained. Supported values are:
114
+ //
115
+ // * **search-tuning**: Fine tuning the search system based on data provided.
116
+ string model_type = 3;
117
+
118
+ // The desired location of errors incurred during the data ingestion and
119
+ // training.
120
+ ImportErrorConfig error_config = 4;
121
+ }
122
+
123
+ // Response of the
124
+ // [TrainCustomModelRequest][google.cloud.discoveryengine.v1beta.TrainCustomModelRequest].
125
+ // This message is returned by the google.longrunning.Operations.response field.
126
+ message TrainCustomModelResponse {
127
+ // A sample of errors encountered while processing the data.
128
+ repeated google.rpc.Status error_samples = 1;
129
+
130
+ // Echoes the destination for the complete errors in the request if set.
131
+ ImportErrorConfig error_config = 2;
132
+
133
+ // The trained model status. Possible values are:
134
+ //
135
+ // * **bad-data**: The training data quality is bad.
136
+ // * **no-improvement**: Tuning didn't improve performance. Won't deploy.
137
+ // * **in-progress**: Model training is in progress.
138
+ // * **ready**: The model is ready for serving.
139
+ string model_status = 3;
140
+ }
141
+
142
+ // Metadata related to the progress of the TrainCustomModel operation. This is
143
+ // returned by the google.longrunning.Operation.metadata field.
144
+ message TrainCustomModelMetadata {
145
+ // Operation create time.
146
+ google.protobuf.Timestamp create_time = 1;
147
+
148
+ // Operation last update time. If the operation is done, this is also the
149
+ // finish time.
150
+ google.protobuf.Timestamp update_time = 2;
151
+ }
@@ -109,7 +109,7 @@ message ServingConfig {
109
109
  }
110
110
 
111
111
  // Immutable. Fully qualified name
112
- // `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/servingConfigs/{serving_config_id}`
112
+ // `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}/servingConfigs/{serving_config_id}`
113
113
  string name = 1 [(google.api.field_behavior) = IMMUTABLE];
114
114
 
115
115
  // Required. The human readable serving config display name. Used in Discovery
@@ -165,8 +165,9 @@ message ServingConfig {
165
165
  // The ranking expression controls the customized ranking on retrieval
166
166
  // documents. To leverage this, document embedding is required. The ranking
167
167
  // expression setting in ServingConfig applies to all search requests served
168
- // by the serving config. However, if [SearchRequest.ranking_expression][] is
169
- // specified, it overrides the ServingConfig ranking expression.
168
+ // by the serving config. However, if
169
+ // [SearchRequest.ranking_expression][google.cloud.discoveryengine.v1beta.SearchRequest.ranking_expression]
170
+ // is specified, it overrides the ServingConfig ranking expression.
170
171
  //
171
172
  // The ranking expression is a single function or multiple functions that are
172
173
  // joined by "+".
@@ -32,7 +32,8 @@ option objc_class_prefix = "DISCOVERYENGINE";
32
32
  option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1beta";
33
33
  option ruby_package = "Google::Cloud::DiscoveryEngine::V1beta";
34
34
 
35
- // Service for modifying ServingConfig.
35
+ // Service for operations related to
36
+ // [ServingConfig][google.cloud.discoveryengine.v1beta.ServingConfig].
36
37
  service ServingConfigService {
37
38
  option (google.api.default_host) = "discoveryengine.googleapis.com";
38
39
  option (google.api.oauth_scopes) =
@@ -107,7 +108,7 @@ message UpdateServingConfigRequest {
107
108
  // Request for GetServingConfig method.
108
109
  message GetServingConfigRequest {
109
110
  // Required. The resource name of the ServingConfig to get. Format:
110
- // `projects/{project_number}/locations/{location}/collections/{collection}/dataStores/{data_store}/servingConfigs/{serving_config_id}`
111
+ // `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config_id}`
111
112
  string name = 1 [
112
113
  (google.api.field_behavior) = REQUIRED,
113
114
  (google.api.resource_reference) = {
@@ -118,12 +119,12 @@ message GetServingConfigRequest {
118
119
 
119
120
  // Request for ListServingConfigs method.
120
121
  message ListServingConfigsRequest {
121
- // Required. The dataStore resource name. Format:
122
- // `projects/{project_number}/locations/{location}/collections/{collection}/dataStores/{data_store}`
122
+ // Required. Full resource name of the parent resource. Format:
123
+ // `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}`
123
124
  string parent = 1 [
124
125
  (google.api.field_behavior) = REQUIRED,
125
126
  (google.api.resource_reference) = {
126
- type: "discoveryengine.googleapis.com/DataStore"
127
+ child_type: "discoveryengine.googleapis.com/ServingConfig"
127
128
  }
128
129
  ];
129
130