@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.
- package/CHANGELOG.md +7 -0
- package/README.md +13 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/acl_config.proto +49 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/acl_config_service.proto +79 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/chunk.proto +72 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/chunk_service.proto +137 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/common.proto +77 -4
- package/build/protos/google/cloud/discoveryengine/v1alpha/completion.proto +52 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/completion_service.proto +44 -2
- package/build/protos/google/cloud/discoveryengine/v1alpha/conversational_search_service.proto +6 -1
- package/build/protos/google/cloud/discoveryengine/v1alpha/data_store.proto +44 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/data_store_service.proto +80 -1
- package/build/protos/google/cloud/discoveryengine/v1alpha/document.proto +83 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/document_processing_config.proto +127 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/document_service.proto +6 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/engine.proto +13 -8
- package/build/protos/google/cloud/discoveryengine/v1alpha/engine_service.proto +3 -2
- package/build/protos/google/cloud/discoveryengine/v1alpha/estimate_billing_service.proto +130 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/import_config.proto +64 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/purge_config.proto +66 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/recommendation_service.proto +3 -1
- package/build/protos/google/cloud/discoveryengine/v1alpha/schema.proto +3 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/search_service.proto +74 -13
- package/build/protos/google/cloud/discoveryengine/v1alpha/search_tuning_service.proto +24 -20
- package/build/protos/google/cloud/discoveryengine/v1alpha/serving_config.proto +271 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/serving_config_service.proto +147 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/site_search_engine.proto +9 -3
- package/build/protos/google/cloud/discoveryengine/v1alpha/site_search_engine_service.proto +7 -4
- package/build/protos/google/cloud/discoveryengine/v1alpha/user_event.proto +4 -3
- package/build/protos/google/cloud/discoveryengine/v1beta/conversational_search_service.proto +5 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/data_store.proto +22 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/document.proto +9 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/document_processing_config.proto +94 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/purge_config.proto +3 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/search_service.proto +19 -4
- package/build/protos/google/cloud/discoveryengine/v1beta/search_tuning_service.proto +151 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/serving_config.proto +4 -3
- package/build/protos/google/cloud/discoveryengine/v1beta/serving_config_service.proto +6 -5
- package/build/protos/protos.d.ts +15133 -7787
- package/build/protos/protos.js +50444 -32043
- package/build/protos/protos.json +4132 -2305
- package/build/src/v1alpha/acl_config_service_client.d.ts +1233 -0
- package/build/src/v1alpha/acl_config_service_client.js +1765 -0
- package/build/src/v1alpha/acl_config_service_client_config.json +34 -0
- package/build/src/v1alpha/chunk_service_client.d.ts +1350 -0
- package/build/src/v1alpha/chunk_service_client.js +1886 -0
- package/build/src/v1alpha/chunk_service_client_config.json +34 -0
- package/build/src/v1alpha/completion_service_client.d.ts +588 -3
- package/build/src/v1alpha/completion_service_client.js +831 -2
- package/build/src/v1alpha/completion_service_client_config.json +10 -0
- package/build/src/v1alpha/conversational_search_service_client.d.ts +233 -1
- package/build/src/v1alpha/conversational_search_service_client.js +316 -0
- package/build/src/v1alpha/data_store_service_client.d.ts +451 -3
- package/build/src/v1alpha/data_store_service_client.js +562 -2
- package/build/src/v1alpha/data_store_service_client_config.json +8 -0
- package/build/src/v1alpha/document_service_client.d.ts +382 -0
- package/build/src/v1alpha/document_service_client.js +514 -0
- package/build/src/v1alpha/engine_service_client.d.ts +375 -2
- package/build/src/v1alpha/engine_service_client.js +514 -0
- package/build/src/v1alpha/estimate_billing_service_client.d.ts +1367 -0
- package/build/src/v1alpha/estimate_billing_service_client.js +2028 -0
- package/build/src/v1alpha/estimate_billing_service_client_config.json +30 -0
- package/build/src/v1alpha/index.d.ts +4 -0
- package/build/src/v1alpha/index.js +9 -1
- package/build/src/v1alpha/recommendation_service_client.d.ts +231 -1
- package/build/src/v1alpha/recommendation_service_client.js +316 -0
- package/build/src/v1alpha/schema_service_client.d.ts +372 -0
- package/build/src/v1alpha/schema_service_client.js +514 -0
- package/build/src/v1alpha/search_service_client.d.ts +258 -15
- package/build/src/v1alpha/search_service_client.js +336 -10
- package/build/src/v1alpha/search_tuning_service_client.d.ts +373 -1
- package/build/src/v1alpha/search_tuning_service_client.js +514 -0
- package/build/src/v1alpha/serving_config_service_client.d.ts +1369 -0
- package/build/src/v1alpha/serving_config_service_client.js +1935 -0
- package/build/src/v1alpha/serving_config_service_client_config.json +38 -0
- package/build/src/v1alpha/site_search_engine_service_client.d.ts +372 -0
- package/build/src/v1alpha/site_search_engine_service_client.js +514 -0
- package/build/src/v1alpha/user_event_service_client.d.ts +372 -0
- package/build/src/v1alpha/user_event_service_client.js +514 -0
- package/build/src/v1beta/completion_service_client.d.ts +75 -0
- package/build/src/v1beta/completion_service_client.js +104 -0
- package/build/src/v1beta/conversational_search_service_client.d.ts +79 -0
- package/build/src/v1beta/conversational_search_service_client.js +104 -0
- package/build/src/v1beta/data_store_service_client.d.ts +75 -0
- package/build/src/v1beta/data_store_service_client.js +104 -0
- package/build/src/v1beta/document_service_client.d.ts +75 -0
- package/build/src/v1beta/document_service_client.js +104 -0
- package/build/src/v1beta/engine_service_client.d.ts +75 -0
- package/build/src/v1beta/engine_service_client.js +104 -0
- package/build/src/v1beta/index.d.ts +1 -0
- package/build/src/v1beta/index.js +3 -1
- package/build/src/v1beta/recommendation_service_client.d.ts +75 -0
- package/build/src/v1beta/recommendation_service_client.js +104 -0
- package/build/src/v1beta/schema_service_client.d.ts +75 -0
- package/build/src/v1beta/schema_service_client.js +104 -0
- package/build/src/v1beta/search_service_client.d.ts +81 -0
- package/build/src/v1beta/search_service_client.js +108 -0
- package/build/src/v1beta/search_tuning_service_client.d.ts +1196 -0
- package/build/src/v1beta/search_tuning_service_client.js +1781 -0
- package/build/src/v1beta/search_tuning_service_client_config.json +30 -0
- package/build/src/v1beta/serving_config_service_client.d.ts +123 -8
- package/build/src/v1beta/serving_config_service_client.js +166 -5
- package/build/src/v1beta/site_search_engine_service_client.d.ts +75 -0
- package/build/src/v1beta/site_search_engine_service_client.js +104 -0
- package/build/src/v1beta/user_event_service_client.d.ts +75 -0
- package/build/src/v1beta/user_event_service_client.js +104 -0
- 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
|
-
//
|
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
|
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}/
|
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
|
169
|
-
//
|
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
|
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}/
|
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.
|
122
|
-
// `projects/{project_number}/locations/{location}/collections/{collection}/
|
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
|
-
|
127
|
+
child_type: "discoveryengine.googleapis.com/ServingConfig"
|
127
128
|
}
|
128
129
|
];
|
129
130
|
|