@google-cloud/discoveryengine 1.3.1 → 1.4.1
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +14 -0
- package/README.md +64 -0
- package/build/protos/google/cloud/discoveryengine/v1/common.proto +54 -3
- package/build/protos/google/cloud/discoveryengine/v1/completion.proto +52 -0
- package/build/protos/google/cloud/discoveryengine/v1/completion_service.proto +51 -4
- package/build/protos/google/cloud/discoveryengine/v1/conversation.proto +3 -0
- package/build/protos/google/cloud/discoveryengine/v1/conversational_search_service.proto +40 -1
- package/build/protos/google/cloud/discoveryengine/v1/data_store.proto +98 -0
- package/build/protos/google/cloud/discoveryengine/v1/data_store_service.proto +304 -0
- package/build/protos/google/cloud/discoveryengine/v1/document.proto +1 -1
- package/build/protos/google/cloud/discoveryengine/v1/engine.proto +215 -0
- package/build/protos/google/cloud/discoveryengine/v1/engine_service.proto +242 -0
- package/build/protos/google/cloud/discoveryengine/v1/import_config.proto +64 -0
- package/build/protos/google/cloud/discoveryengine/v1/purge_config.proto +38 -0
- package/build/protos/google/cloud/discoveryengine/v1/search_service.proto +137 -4
- package/build/protos/google/cloud/discoveryengine/v1/site_search_engine.proto +170 -0
- package/build/protos/google/cloud/discoveryengine/v1/site_search_engine_service.proto +691 -0
- package/build/protos/google/cloud/discoveryengine/v1/user_event.proto +3 -3
- 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/common.proto +59 -8
- package/build/protos/google/cloud/discoveryengine/v1beta/completion.proto +52 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/completion_service.proto +51 -4
- package/build/protos/google/cloud/discoveryengine/v1beta/conversation.proto +3 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/conversational_search_service.proto +45 -1
- package/build/protos/google/cloud/discoveryengine/v1beta/data_store.proto +120 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/data_store_service.proto +306 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/document.proto +10 -1
- package/build/protos/google/cloud/discoveryengine/v1beta/document_processing_config.proto +94 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/engine.proto +220 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/engine_service.proto +244 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/import_config.proto +64 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/purge_config.proto +41 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/recommendation_service.proto +26 -3
- package/build/protos/google/cloud/discoveryengine/v1beta/search_service.proto +169 -15
- package/build/protos/google/cloud/discoveryengine/v1beta/search_tuning_service.proto +151 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/serving_config.proto +265 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/serving_config_service.proto +148 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/site_search_engine.proto +170 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/site_search_engine_service.proto +695 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/user_event.proto +4 -3
- package/build/protos/protos.d.ts +48530 -23682
- package/build/protos/protos.js +122429 -63306
- package/build/protos/protos.json +13438 -7286
- package/build/src/index.d.ts +10 -1
- package/build/src/index.js +10 -1
- package/build/src/v1/completion_service_client.d.ts +489 -7
- package/build/src/v1/completion_service_client.js +715 -11
- package/build/src/v1/completion_service_client_config.json +10 -0
- package/build/src/v1/conversational_search_service_client.d.ts +341 -3
- package/build/src/v1/conversational_search_service_client.js +466 -9
- package/build/src/v1/data_store_service_client.d.ts +1286 -0
- package/build/src/v1/data_store_service_client.js +1768 -0
- package/build/src/v1/data_store_service_client_config.json +46 -0
- package/build/src/v1/document_service_client.d.ts +347 -2
- package/build/src/v1/document_service_client.js +506 -9
- package/build/src/v1/engine_service_client.d.ts +1211 -0
- package/build/src/v1/engine_service_client.js +1731 -0
- package/build/src/v1/engine_service_client_config.json +46 -0
- package/build/src/v1/index.d.ts +3 -0
- package/build/src/v1/index.js +7 -1
- package/build/src/v1/schema_service_client.d.ts +272 -2
- package/build/src/v1/schema_service_client.js +402 -9
- package/build/src/v1/search_service_client.d.ts +515 -11
- package/build/src/v1/search_service_client.js +648 -15
- package/build/src/v1/site_search_engine_service_client.d.ts +1564 -0
- package/build/src/v1/site_search_engine_service_client.js +2075 -0
- package/build/src/v1/site_search_engine_service_client_config.json +74 -0
- package/build/src/v1/user_event_service_client.d.ts +272 -2
- package/build/src/v1/user_event_service_client.js +402 -9
- 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 +599 -5
- package/build/src/v1alpha/completion_service_client.js +868 -12
- package/build/src/v1alpha/completion_service_client_config.json +10 -0
- package/build/src/v1alpha/conversational_search_service_client.d.ts +244 -3
- package/build/src/v1alpha/conversational_search_service_client.js +353 -10
- package/build/src/v1alpha/data_store_service_client.d.ts +462 -5
- package/build/src/v1alpha/data_store_service_client.js +599 -12
- package/build/src/v1alpha/data_store_service_client_config.json +8 -0
- package/build/src/v1alpha/document_service_client.d.ts +393 -2
- package/build/src/v1alpha/document_service_client.js +551 -10
- package/build/src/v1alpha/engine_service_client.d.ts +386 -4
- package/build/src/v1alpha/engine_service_client.js +551 -10
- 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 +10 -2
- package/build/src/v1alpha/recommendation_service_client.d.ts +242 -3
- package/build/src/v1alpha/recommendation_service_client.js +353 -10
- package/build/src/v1alpha/schema_service_client.d.ts +383 -2
- package/build/src/v1alpha/schema_service_client.js +551 -10
- package/build/src/v1alpha/search_service_client.d.ts +269 -17
- package/build/src/v1alpha/search_service_client.js +373 -20
- package/build/src/v1alpha/search_tuning_service_client.d.ts +384 -3
- package/build/src/v1alpha/search_tuning_service_client.js +551 -10
- 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 +383 -2
- package/build/src/v1alpha/site_search_engine_service_client.js +551 -10
- package/build/src/v1alpha/user_event_service_client.d.ts +383 -2
- package/build/src/v1alpha/user_event_service_client.js +551 -10
- package/build/src/v1beta/completion_service_client.d.ts +708 -7
- package/build/src/v1beta/completion_service_client.js +1015 -11
- package/build/src/v1beta/completion_service_client_config.json +10 -0
- package/build/src/v1beta/conversational_search_service_client.d.ts +420 -3
- package/build/src/v1beta/conversational_search_service_client.js +570 -9
- package/build/src/v1beta/data_store_service_client.d.ts +1508 -0
- package/build/src/v1beta/data_store_service_client.js +2070 -0
- package/build/src/v1beta/data_store_service_client_config.json +46 -0
- package/build/src/v1beta/document_service_client.d.ts +566 -2
- package/build/src/v1beta/document_service_client.js +810 -11
- package/build/src/v1beta/engine_service_client.d.ts +1432 -0
- package/build/src/v1beta/engine_service_client.js +2032 -0
- package/build/src/v1beta/engine_service_client_config.json +46 -0
- package/build/src/v1beta/index.d.ts +5 -0
- package/build/src/v1beta/index.js +11 -1
- package/build/src/v1beta/recommendation_service_client.d.ts +495 -5
- package/build/src/v1beta/recommendation_service_client.js +674 -9
- package/build/src/v1beta/schema_service_client.d.ts +491 -2
- package/build/src/v1beta/schema_service_client.js +706 -11
- package/build/src/v1beta/search_service_client.d.ts +620 -29
- package/build/src/v1beta/search_service_client.js +772 -27
- 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 +1217 -0
- package/build/src/v1beta/serving_config_service_client.js +1724 -0
- package/build/src/v1beta/serving_config_service_client_config.json +38 -0
- package/build/src/v1beta/site_search_engine_service_client.d.ts +1787 -0
- package/build/src/v1beta/site_search_engine_service_client.js +2375 -0
- package/build/src/v1beta/site_search_engine_service_client_config.json +74 -0
- package/build/src/v1beta/user_event_service_client.d.ts +491 -2
- package/build/src/v1beta/user_event_service_client.js +706 -11
- package/package.json +3 -3
@@ -18,7 +18,9 @@ package google.cloud.discoveryengine.v1alpha;
|
|
18
18
|
|
19
19
|
import "google/api/field_behavior.proto";
|
20
20
|
import "google/api/resource.proto";
|
21
|
+
import "google/cloud/discoveryengine/v1alpha/import_config.proto";
|
21
22
|
import "google/protobuf/timestamp.proto";
|
23
|
+
import "google/rpc/status.proto";
|
22
24
|
|
23
25
|
option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Alpha";
|
24
26
|
option go_package = "cloud.google.com/go/discoveryengine/apiv1alpha/discoveryenginepb;discoveryenginepb";
|
@@ -102,10 +104,31 @@ message PurgeUserEventsMetadata {
|
|
102
104
|
int64 failure_count = 4;
|
103
105
|
}
|
104
106
|
|
107
|
+
// Configuration of destination for Purge related errors.
|
108
|
+
message PurgeErrorConfig {
|
109
|
+
// Required. Errors destination.
|
110
|
+
oneof destination {
|
111
|
+
// Cloud Storage prefix for purge errors. This must be an empty,
|
112
|
+
// existing Cloud Storage directory. Purge errors are written to
|
113
|
+
// sharded files in this directory, one per line, as a JSON-encoded
|
114
|
+
// `google.rpc.Status` message.
|
115
|
+
string gcs_prefix = 1;
|
116
|
+
}
|
117
|
+
}
|
118
|
+
|
105
119
|
// Request message for
|
106
120
|
// [DocumentService.PurgeDocuments][google.cloud.discoveryengine.v1alpha.DocumentService.PurgeDocuments]
|
107
121
|
// method.
|
108
122
|
message PurgeDocumentsRequest {
|
123
|
+
// The desired input source for the purging documents based on document ids.
|
124
|
+
oneof source {
|
125
|
+
// Cloud Storage location for the input content.
|
126
|
+
// Supported `data_schema`:
|
127
|
+
// * `document_id`: One valid
|
128
|
+
// [Document.id][google.cloud.discoveryengine.v1alpha.Document.id] per line.
|
129
|
+
GcsSource gcs_source = 5;
|
130
|
+
}
|
131
|
+
|
109
132
|
// Required. The parent resource name, such as
|
110
133
|
// `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.
|
111
134
|
string parent = 1 [
|
@@ -120,6 +143,9 @@ message PurgeDocumentsRequest {
|
|
120
143
|
// `*` (all items).
|
121
144
|
string filter = 2 [(google.api.field_behavior) = REQUIRED];
|
122
145
|
|
146
|
+
// The desired location of errors incurred during the purge.
|
147
|
+
PurgeErrorConfig error_config = 7;
|
148
|
+
|
123
149
|
// Actually performs the purge. If `force` is set to false, return the
|
124
150
|
// expected purge count without deleting any documents.
|
125
151
|
bool force = 3;
|
@@ -156,4 +182,44 @@ message PurgeDocumentsMetadata {
|
|
156
182
|
|
157
183
|
// Count of entries that encountered errors while processing.
|
158
184
|
int64 failure_count = 4;
|
185
|
+
|
186
|
+
// Count of entries that were ignored as entries were not found.
|
187
|
+
int64 ignored_count = 5;
|
188
|
+
}
|
189
|
+
|
190
|
+
// Request message for
|
191
|
+
// [CompletionService.PurgeSuggestionDenyListEntries][google.cloud.discoveryengine.v1alpha.CompletionService.PurgeSuggestionDenyListEntries]
|
192
|
+
// method.
|
193
|
+
message PurgeSuggestionDenyListEntriesRequest {
|
194
|
+
// Required. The parent data store resource name for which to import denylist
|
195
|
+
// entries. Follows pattern projects/*/locations/*/collections/*/dataStores/*.
|
196
|
+
string parent = 1 [
|
197
|
+
(google.api.field_behavior) = REQUIRED,
|
198
|
+
(google.api.resource_reference) = {
|
199
|
+
type: "discoveryengine.googleapis.com/DataStore"
|
200
|
+
}
|
201
|
+
];
|
202
|
+
}
|
203
|
+
|
204
|
+
// Response message for
|
205
|
+
// [CompletionService.PurgeSuggestionDenyListEntries][google.cloud.discoveryengine.v1alpha.CompletionService.PurgeSuggestionDenyListEntries]
|
206
|
+
// method.
|
207
|
+
message PurgeSuggestionDenyListEntriesResponse {
|
208
|
+
// Number of suggestion deny list entries purged.
|
209
|
+
int64 purge_count = 1;
|
210
|
+
|
211
|
+
// A sample of errors encountered while processing the request.
|
212
|
+
repeated google.rpc.Status error_samples = 2;
|
213
|
+
}
|
214
|
+
|
215
|
+
// Metadata related to the progress of the PurgeSuggestionDenyListEntries
|
216
|
+
// operation. This is returned by the google.longrunning.Operation.metadata
|
217
|
+
// field.
|
218
|
+
message PurgeSuggestionDenyListEntriesMetadata {
|
219
|
+
// Operation create time.
|
220
|
+
google.protobuf.Timestamp create_time = 1;
|
221
|
+
|
222
|
+
// Operation last update time. If the operation is done, this is also the
|
223
|
+
// finish time.
|
224
|
+
google.protobuf.Timestamp update_time = 2;
|
159
225
|
}
|
@@ -68,7 +68,9 @@ message RecommendRequest {
|
|
68
68
|
// config. For example, for Engine
|
69
69
|
// `projects/*/locations/global/collections/*/engines/my-engine`, you can use
|
70
70
|
// `projects/*/locations/global/collections/*/engines/my-engine/servingConfigs/my-engine`
|
71
|
-
// for your
|
71
|
+
// for your
|
72
|
+
// [RecommendationService.Recommend][google.cloud.discoveryengine.v1alpha.RecommendationService.Recommend]
|
73
|
+
// requests.
|
72
74
|
string serving_config = 1 [
|
73
75
|
(google.api.field_behavior) = REQUIRED,
|
74
76
|
(google.api.resource_reference) = {
|
@@ -20,6 +20,7 @@ import "google/api/annotations.proto";
|
|
20
20
|
import "google/api/client.proto";
|
21
21
|
import "google/api/field_behavior.proto";
|
22
22
|
import "google/api/resource.proto";
|
23
|
+
import "google/cloud/discoveryengine/v1alpha/chunk.proto";
|
23
24
|
import "google/cloud/discoveryengine/v1alpha/common.proto";
|
24
25
|
import "google/cloud/discoveryengine/v1alpha/document.proto";
|
25
26
|
import "google/protobuf/struct.proto";
|
@@ -69,6 +70,19 @@ message SearchRequest {
|
|
69
70
|
}
|
70
71
|
}
|
71
72
|
|
73
|
+
// A struct to define data stores to filter on in a search call.
|
74
|
+
message DataStoreSpec {
|
75
|
+
// Required. Full resource name of
|
76
|
+
// [DataStore][google.cloud.discoveryengine.v1alpha.DataStore], such as
|
77
|
+
// `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`.
|
78
|
+
string data_store = 1 [
|
79
|
+
(google.api.field_behavior) = REQUIRED,
|
80
|
+
(google.api.resource_reference) = {
|
81
|
+
type: "discoveryengine.googleapis.com/DataStore"
|
82
|
+
}
|
83
|
+
];
|
84
|
+
}
|
85
|
+
|
72
86
|
// A facet specification to perform faceted search.
|
73
87
|
message FacetSpec {
|
74
88
|
// Specifies how a facet is computed.
|
@@ -212,9 +226,8 @@ message SearchRequest {
|
|
212
226
|
// Examples:
|
213
227
|
//
|
214
228
|
// * 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"))
|
229
|
+
// color "Red" or "Blue":
|
230
|
+
// `(document_id: ANY("doc_1", "doc_2")) AND (color: ANY("Red", "Blue"))`
|
218
231
|
string condition = 1;
|
219
232
|
|
220
233
|
// Strength of the condition boost, which should be in [-1, 1]. Negative
|
@@ -330,8 +343,16 @@ message SearchRequest {
|
|
330
343
|
|
331
344
|
// Specification of the model.
|
332
345
|
message ModelSpec {
|
333
|
-
// The
|
334
|
-
//
|
346
|
+
// The model version used to generate the summary.
|
347
|
+
//
|
348
|
+
// Supported values are:
|
349
|
+
//
|
350
|
+
// * `stable`: string. Default value when no value is specified. Uses a
|
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.
|
335
356
|
string version = 1;
|
336
357
|
}
|
337
358
|
|
@@ -339,7 +360,7 @@ message SearchRequest {
|
|
339
360
|
// of results returned is less than `summaryResultCount`, the summary is
|
340
361
|
// generated from all of the results.
|
341
362
|
//
|
342
|
-
// At most
|
363
|
+
// At most 10 results can be used to generate a summary.
|
343
364
|
int32 summary_result_count = 1;
|
344
365
|
|
345
366
|
// Specifies whether to include citations in the summary. The default
|
@@ -414,7 +435,7 @@ message SearchRequest {
|
|
414
435
|
// `max_extractive_answer_count`, return all of the answers. Otherwise,
|
415
436
|
// return the `max_extractive_answer_count`.
|
416
437
|
//
|
417
|
-
// At most
|
438
|
+
// At most five answers are returned for each
|
418
439
|
// [SearchResult][google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult].
|
419
440
|
int32 max_extractive_answer_count = 1;
|
420
441
|
|
@@ -455,6 +476,24 @@ message SearchRequest {
|
|
455
476
|
int32 num_next_segments = 5;
|
456
477
|
}
|
457
478
|
|
479
|
+
// Specifies the search result mode. If unspecified, the
|
480
|
+
// search result mode is based on
|
481
|
+
// [DataStore.DocumentProcessingConfig.chunking_config][]:
|
482
|
+
// * If [DataStore.DocumentProcessingConfig.chunking_config][] is specified,
|
483
|
+
// it defaults to `CHUNKS`.
|
484
|
+
// * Otherwise, it defaults to `DOCUMENTS`.
|
485
|
+
enum SearchResultMode {
|
486
|
+
// Default value.
|
487
|
+
SEARCH_RESULT_MODE_UNSPECIFIED = 0;
|
488
|
+
|
489
|
+
// Returns documents in the search result.
|
490
|
+
DOCUMENTS = 1;
|
491
|
+
|
492
|
+
// Returns chunks in the search result. Only available if the
|
493
|
+
// [DataStore.DocumentProcessingConfig.chunking_config][] is specified.
|
494
|
+
CHUNKS = 2;
|
495
|
+
}
|
496
|
+
|
458
497
|
// If `snippetSpec` is not specified, snippets are not included in the
|
459
498
|
// search response.
|
460
499
|
SnippetSpec snippet_spec = 1;
|
@@ -466,6 +505,14 @@ message SearchRequest {
|
|
466
505
|
// If there is no extractive_content_spec provided, there will be no
|
467
506
|
// extractive answer in the search response.
|
468
507
|
ExtractiveContentSpec extractive_content_spec = 3;
|
508
|
+
|
509
|
+
// Specifies the search result mode. If unspecified, the
|
510
|
+
// search result mode is based on
|
511
|
+
// [DataStore.DocumentProcessingConfig.chunking_config][]:
|
512
|
+
// * If [DataStore.DocumentProcessingConfig.chunking_config][] is specified,
|
513
|
+
// it defaults to `CHUNKS`.
|
514
|
+
// * Otherwise, it defaults to `DOCUMENTS`.
|
515
|
+
SearchResultMode search_result_mode = 4;
|
469
516
|
}
|
470
517
|
|
471
518
|
// The specification that uses customized query embedding vector to do
|
@@ -540,6 +587,9 @@ message SearchRequest {
|
|
540
587
|
// If this field is negative, an `INVALID_ARGUMENT` is returned.
|
541
588
|
int32 offset = 6;
|
542
589
|
|
590
|
+
// A list of data store specs to apply on a search call.
|
591
|
+
repeated DataStoreSpec data_store_specs = 32;
|
592
|
+
|
543
593
|
// The filter syntax consists of an expression language for constructing a
|
544
594
|
// predicate from one or more fields of the documents being filtered. Filter
|
545
595
|
// expression is case-sensitive.
|
@@ -645,12 +695,13 @@ message SearchRequest {
|
|
645
695
|
|
646
696
|
// Uses the provided embedding to do additional semantic document retrieval.
|
647
697
|
// The retrieval is based on the dot product of
|
648
|
-
// [SearchRequest.
|
649
|
-
// embedding that is provided in
|
650
|
-
// [SearchRequest.
|
698
|
+
// [SearchRequest.EmbeddingSpec.EmbeddingVector.vector][google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector.vector]
|
699
|
+
// and the document embedding that is provided in
|
700
|
+
// [SearchRequest.EmbeddingSpec.EmbeddingVector.field_path][google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path].
|
651
701
|
//
|
652
|
-
// If
|
653
|
-
//
|
702
|
+
// If
|
703
|
+
// [SearchRequest.EmbeddingSpec.EmbeddingVector.field_path][google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path]
|
704
|
+
// is not provided, it will use [ServingConfig.EmbeddingConfig.field_path][].
|
654
705
|
EmbeddingSpec embedding_spec = 23;
|
655
706
|
|
656
707
|
// The ranking expression controls the customized ranking on retrieval
|
@@ -697,6 +748,9 @@ message SearchRequest {
|
|
697
748
|
// Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
|
698
749
|
// for more details.
|
699
750
|
map<string, string> user_labels = 22;
|
751
|
+
|
752
|
+
// Custom fine tuning configs.
|
753
|
+
CustomFineTuningSpec custom_fine_tuning_spec = 34;
|
700
754
|
}
|
701
755
|
|
702
756
|
// Response message for
|
@@ -713,6 +767,12 @@ message SearchResponse {
|
|
713
767
|
// marked as retrievable are populated.
|
714
768
|
Document document = 2;
|
715
769
|
|
770
|
+
// The chunk data in the search response if the
|
771
|
+
// [SearchRequest.ContentSearchSpec.search_result_mode][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.search_result_mode]
|
772
|
+
// is set to
|
773
|
+
// [CHUNKS][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS].
|
774
|
+
Chunk chunk = 18;
|
775
|
+
|
716
776
|
// Google provided available scores.
|
717
777
|
map<string, DoubleList> model_scores = 4;
|
718
778
|
}
|
@@ -822,7 +882,7 @@ message SearchResponse {
|
|
822
882
|
}
|
823
883
|
];
|
824
884
|
|
825
|
-
//
|
885
|
+
// Cloud Storage or HTTP uri for the document.
|
826
886
|
string uri = 3;
|
827
887
|
}
|
828
888
|
|
@@ -887,6 +947,7 @@ message SearchResponse {
|
|
887
947
|
// confidence scores.
|
888
948
|
SafetyAttributes safety_attributes = 3;
|
889
949
|
|
950
|
+
// Summary with metadata information.
|
890
951
|
SummaryWithMetadata summary_with_metadata = 4;
|
891
952
|
}
|
892
953
|
|
@@ -58,41 +58,45 @@ service SearchTuningService {
|
|
58
58
|
// [SearchTuningService.TrainCustomModel][google.cloud.discoveryengine.v1alpha.SearchTuningService.TrainCustomModel]
|
59
59
|
// method.
|
60
60
|
message TrainCustomModelRequest {
|
61
|
-
//
|
61
|
+
// Cloud Storage training data input.
|
62
62
|
message GcsTrainingInput {
|
63
|
-
// The
|
64
|
-
// The data path format is gs://<bucket_to_data>/<jsonl_file_name
|
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
65
|
// A newline delimited jsonl/ndjson file.
|
66
|
-
//
|
67
|
-
//
|
68
|
-
//
|
66
|
+
//
|
67
|
+
// For search-tuning model, each line should have the _id, title
|
68
|
+
// and text. Example: {"_id": "doc1", title: "relevant doc", "text":
|
69
|
+
// "relevant text"}
|
69
70
|
string corpus_data_path = 1;
|
70
71
|
|
71
72
|
// 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
|
+
// The data path format is `gs://<bucket_to_data>/<jsonl_file_name>`.
|
73
74
|
// A newline delimited jsonl/ndjson file.
|
74
|
-
//
|
75
|
-
//
|
75
|
+
//
|
76
|
+
// For search-tuning model, each line should have the _id
|
77
|
+
// and text. Example: {"_id": "query1", "text": "example query"}
|
76
78
|
string query_data_path = 2;
|
77
79
|
|
78
|
-
//
|
79
|
-
// gs://<bucket_to_data>/<tsv_file_name
|
80
|
-
// Each line should have the doc_id and query_id and score (number).
|
81
|
-
//
|
82
|
-
//
|
83
|
-
//
|
84
|
-
//
|
85
|
-
//
|
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`
|
86
90
|
string train_data_path = 3;
|
87
91
|
|
88
|
-
//
|
89
|
-
// random 80/20 train/test split will be performed on train_data_path.
|
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.
|
90
94
|
string test_data_path = 4;
|
91
95
|
}
|
92
96
|
|
93
97
|
// Model training input.
|
94
98
|
oneof training_input {
|
95
|
-
//
|
99
|
+
// Cloud Storage training input.
|
96
100
|
GcsTrainingInput gcs_training_input = 2;
|
97
101
|
}
|
98
102
|
|
@@ -0,0 +1,271 @@
|
|
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/cloud/discoveryengine/v1alpha/common.proto";
|
22
|
+
import "google/cloud/discoveryengine/v1alpha/search_service.proto";
|
23
|
+
import "google/protobuf/timestamp.proto";
|
24
|
+
|
25
|
+
option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Alpha";
|
26
|
+
option go_package = "cloud.google.com/go/discoveryengine/apiv1alpha/discoveryenginepb;discoveryenginepb";
|
27
|
+
option java_multiple_files = true;
|
28
|
+
option java_outer_classname = "ServingConfigProto";
|
29
|
+
option java_package = "com.google.cloud.discoveryengine.v1alpha";
|
30
|
+
option objc_class_prefix = "DISCOVERYENGINE";
|
31
|
+
option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1alpha";
|
32
|
+
option ruby_package = "Google::Cloud::DiscoveryEngine::V1alpha";
|
33
|
+
|
34
|
+
// Configures metadata that is used to generate serving time results (e.g.
|
35
|
+
// search results or recommendation predictions).
|
36
|
+
// The ServingConfig is passed in the search and predict request and generates
|
37
|
+
// results.
|
38
|
+
message ServingConfig {
|
39
|
+
option (google.api.resource) = {
|
40
|
+
type: "discoveryengine.googleapis.com/ServingConfig"
|
41
|
+
pattern: "projects/{project}/locations/{location}/dataStores/{data_store}/servingConfigs/{serving_config}"
|
42
|
+
pattern: "projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/servingConfigs/{serving_config}"
|
43
|
+
pattern: "projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config}"
|
44
|
+
};
|
45
|
+
|
46
|
+
// Specifies the configurations needed for Media Discovery. Currently we
|
47
|
+
// support:
|
48
|
+
//
|
49
|
+
// * `demote_content_watched`: Threshold for watched content demotion.
|
50
|
+
// Customers can specify if using watched content demotion or use viewed
|
51
|
+
// detail page. Using the content watched demotion, customers need to specify
|
52
|
+
// the watched minutes or percentage exceeds the threshold, the content will
|
53
|
+
// be demoted in the recommendation result.
|
54
|
+
// * `promote_fresh_content`: cutoff days for fresh content promotion.
|
55
|
+
// Customers can specify if using content freshness promotion. If the content
|
56
|
+
// was published within the cutoff days, the content will be promoted in the
|
57
|
+
// recommendation result.
|
58
|
+
// Can only be set if
|
59
|
+
// [SolutionType][google.cloud.discoveryengine.v1alpha.SolutionType] is
|
60
|
+
// [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_RECOMMENDATION].
|
61
|
+
message MediaConfig {
|
62
|
+
// Specify the threshold for demoting watched content, the threshold can be
|
63
|
+
// either percentage or minutes value.
|
64
|
+
// This must be set for `media-complete` event type.
|
65
|
+
oneof demote_content_watched {
|
66
|
+
// Specifies the content watched percentage threshold for demotion.
|
67
|
+
// Threshold value must be between [0, 1.0] inclusive.
|
68
|
+
float content_watched_percentage_threshold = 2;
|
69
|
+
|
70
|
+
// Specifies the content watched minutes threshold for demotion.
|
71
|
+
float content_watched_seconds_threshold = 5;
|
72
|
+
}
|
73
|
+
|
74
|
+
// Specifies the event type used for demoting recommendation result.
|
75
|
+
// Currently supported values:
|
76
|
+
//
|
77
|
+
// * `view-item`: Item viewed.
|
78
|
+
// * `media-play`: Start/resume watching a video, playing a song, etc.
|
79
|
+
// * `media-complete`: Finished or stopped midway through a video, song,
|
80
|
+
// etc.
|
81
|
+
//
|
82
|
+
// If unset, watch history demotion will not be applied. Content freshness
|
83
|
+
// demotion will still be applied.
|
84
|
+
string demotion_event_type = 1;
|
85
|
+
|
86
|
+
// Specifies the content freshness used for recommendation result.
|
87
|
+
// Contents will be demoted if contents were published for more than content
|
88
|
+
// freshness cutoff days.
|
89
|
+
int32 content_freshness_cutoff_days = 4;
|
90
|
+
}
|
91
|
+
|
92
|
+
// Specifies the configurations needed for Generic Discovery.Currently we
|
93
|
+
// support:
|
94
|
+
//
|
95
|
+
// * `content_search_spec`: configuration for generic content search.
|
96
|
+
message GenericConfig {
|
97
|
+
// Specifies the expected behavior of content search.
|
98
|
+
// Only valid for content-search enabled data store.
|
99
|
+
SearchRequest.ContentSearchSpec content_search_spec = 1;
|
100
|
+
}
|
101
|
+
|
102
|
+
// Industry vertical specific config.
|
103
|
+
oneof vertical_config {
|
104
|
+
// The MediaConfig of the serving configuration.
|
105
|
+
MediaConfig media_config = 7;
|
106
|
+
|
107
|
+
// The GenericConfig of the serving configuration.
|
108
|
+
GenericConfig generic_config = 10;
|
109
|
+
}
|
110
|
+
|
111
|
+
// Immutable. Fully qualified name
|
112
|
+
// `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}/servingConfigs/{serving_config_id}`
|
113
|
+
string name = 1 [(google.api.field_behavior) = IMMUTABLE];
|
114
|
+
|
115
|
+
// Required. The human readable serving config display name. Used in Discovery
|
116
|
+
// UI.
|
117
|
+
//
|
118
|
+
// This field must be a UTF-8 encoded string with a length limit of 128
|
119
|
+
// characters. Otherwise, an INVALID_ARGUMENT error is returned.
|
120
|
+
string display_name = 2 [(google.api.field_behavior) = REQUIRED];
|
121
|
+
|
122
|
+
// Required. Immutable. Specifies the solution type that a serving config can
|
123
|
+
// be associated with.
|
124
|
+
SolutionType solution_type = 3 [
|
125
|
+
(google.api.field_behavior) = REQUIRED,
|
126
|
+
(google.api.field_behavior) = IMMUTABLE
|
127
|
+
];
|
128
|
+
|
129
|
+
// The id of the model to use at serving time.
|
130
|
+
// Currently only RecommendationModels are supported.
|
131
|
+
// Can be changed but only to a compatible model (e.g.
|
132
|
+
// others-you-may-like CTR to others-you-may-like CVR).
|
133
|
+
//
|
134
|
+
// Required when
|
135
|
+
// [SolutionType][google.cloud.discoveryengine.v1alpha.SolutionType] is
|
136
|
+
// [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_RECOMMENDATION].
|
137
|
+
string model_id = 4;
|
138
|
+
|
139
|
+
// How much diversity to use in recommendation model results e.g.
|
140
|
+
// `medium-diversity` or `high-diversity`. Currently supported values:
|
141
|
+
//
|
142
|
+
// * `no-diversity`
|
143
|
+
// * `low-diversity`
|
144
|
+
// * `medium-diversity`
|
145
|
+
// * `high-diversity`
|
146
|
+
// * `auto-diversity`
|
147
|
+
//
|
148
|
+
// If not specified, we choose default based on recommendation model
|
149
|
+
// type. Default value: `no-diversity`.
|
150
|
+
//
|
151
|
+
// Can only be set if
|
152
|
+
// [SolutionType][google.cloud.discoveryengine.v1alpha.SolutionType] is
|
153
|
+
// [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_RECOMMENDATION].
|
154
|
+
string diversity_level = 5;
|
155
|
+
|
156
|
+
// Bring your own embedding config. The config is used for search semantic
|
157
|
+
// retrieval. The retrieval is based on the dot product of
|
158
|
+
// [SearchRequest.EmbeddingSpec.EmbeddingVector.vector][google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector.vector]
|
159
|
+
// and the document embeddings that are provided by this EmbeddingConfig. If
|
160
|
+
// [SearchRequest.EmbeddingSpec.EmbeddingVector.vector][google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector.vector]
|
161
|
+
// is provided, it overrides this
|
162
|
+
// [ServingConfig.embedding_config][google.cloud.discoveryengine.v1alpha.ServingConfig.embedding_config].
|
163
|
+
EmbeddingConfig embedding_config = 20;
|
164
|
+
|
165
|
+
// The ranking expression controls the customized ranking on retrieval
|
166
|
+
// documents. To leverage this, document embedding is required. The ranking
|
167
|
+
// expression setting in ServingConfig applies to all search requests served
|
168
|
+
// by the serving config. However, if
|
169
|
+
// [SearchRequest.ranking_expression][google.cloud.discoveryengine.v1alpha.SearchRequest.ranking_expression]
|
170
|
+
// is specified, it overrides the ServingConfig ranking expression.
|
171
|
+
//
|
172
|
+
// The ranking expression is a single function or multiple functions that are
|
173
|
+
// joined by "+".
|
174
|
+
// * ranking_expression = function, { " + ", function };
|
175
|
+
// Supported functions:
|
176
|
+
// * double * relevance_score
|
177
|
+
// * double * dotProduct(embedding_field_path)
|
178
|
+
// Function variables:
|
179
|
+
// relevance_score: pre-defined keywords, used for measure relevance between
|
180
|
+
// query and document.
|
181
|
+
// embedding_field_path: the document embedding field
|
182
|
+
// used with query embedding vector.
|
183
|
+
// dotProduct: embedding function between embedding_field_path and query
|
184
|
+
// embedding vector.
|
185
|
+
//
|
186
|
+
// Example ranking expression:
|
187
|
+
// If document has an embedding field doc_embedding, the ranking expression
|
188
|
+
// could be 0.5 * relevance_score + 0.3 * dotProduct(doc_embedding).
|
189
|
+
string ranking_expression = 21;
|
190
|
+
|
191
|
+
// Guided search configs.
|
192
|
+
GuidedSearchSpec guided_search_spec = 22;
|
193
|
+
|
194
|
+
// Custom fine tuning configs.
|
195
|
+
CustomFineTuningSpec custom_fine_tuning_spec = 24;
|
196
|
+
|
197
|
+
// Output only. ServingConfig created timestamp.
|
198
|
+
google.protobuf.Timestamp create_time = 8
|
199
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
200
|
+
|
201
|
+
// Output only. ServingConfig updated timestamp.
|
202
|
+
google.protobuf.Timestamp update_time = 9
|
203
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
204
|
+
|
205
|
+
// Filter controls to use in serving path.
|
206
|
+
// All triggered filter controls will be applied.
|
207
|
+
// Filter controls must be in the same data store as the serving config.
|
208
|
+
// Maximum of 20 filter controls.
|
209
|
+
repeated string filter_control_ids = 11;
|
210
|
+
|
211
|
+
// Boost controls to use in serving path.
|
212
|
+
// All triggered boost controls will be applied.
|
213
|
+
// Boost controls must be in the same data store as the serving config.
|
214
|
+
// Maximum of 20 boost controls.
|
215
|
+
repeated string boost_control_ids = 12;
|
216
|
+
|
217
|
+
// IDs of the redirect controls. Only the first triggered redirect
|
218
|
+
// action is applied, even if multiple apply. Maximum number of
|
219
|
+
// specifications is 100.
|
220
|
+
//
|
221
|
+
// Can only be set if
|
222
|
+
// [SolutionType][google.cloud.discoveryengine.v1alpha.SolutionType] is
|
223
|
+
// [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_SEARCH].
|
224
|
+
repeated string redirect_control_ids = 14;
|
225
|
+
|
226
|
+
// Condition synonyms specifications. If multiple synonyms conditions
|
227
|
+
// match, all matching synonyms controls in the list will execute.
|
228
|
+
// Maximum number of specifications is 100.
|
229
|
+
//
|
230
|
+
// Can only be set if
|
231
|
+
// [SolutionType][google.cloud.discoveryengine.v1alpha.SolutionType] is
|
232
|
+
// [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_SEARCH].
|
233
|
+
repeated string synonyms_control_ids = 15;
|
234
|
+
|
235
|
+
// Condition oneway synonyms specifications. If multiple oneway synonyms
|
236
|
+
// conditions match, all matching oneway synonyms controls in the list
|
237
|
+
// will execute. Maximum number of specifications is 100.
|
238
|
+
//
|
239
|
+
// Can only be set if
|
240
|
+
// [SolutionType][google.cloud.discoveryengine.v1alpha.SolutionType] is
|
241
|
+
// [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_SEARCH].
|
242
|
+
repeated string oneway_synonyms_control_ids = 16;
|
243
|
+
|
244
|
+
// Condition do not associate specifications. If multiple do not
|
245
|
+
// associate conditions match, all matching do not associate controls in
|
246
|
+
// the list will execute.
|
247
|
+
// Order does not matter.
|
248
|
+
// Maximum number of specifications is 100.
|
249
|
+
//
|
250
|
+
// Can only be set if
|
251
|
+
// [SolutionType][google.cloud.discoveryengine.v1alpha.SolutionType] is
|
252
|
+
// [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_SEARCH].
|
253
|
+
repeated string dissociate_control_ids = 17;
|
254
|
+
|
255
|
+
// Condition replacement specifications.
|
256
|
+
// Applied according to the order in the list.
|
257
|
+
// A previously replaced term can not be re-replaced.
|
258
|
+
// Maximum number of specifications is 100.
|
259
|
+
//
|
260
|
+
// Can only be set if
|
261
|
+
// [SolutionType][google.cloud.discoveryengine.v1alpha.SolutionType] is
|
262
|
+
// [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_SEARCH].
|
263
|
+
repeated string replacement_control_ids = 18;
|
264
|
+
|
265
|
+
// Condition ignore specifications. If multiple ignore
|
266
|
+
// conditions match, all matching ignore controls in the list will
|
267
|
+
// execute.
|
268
|
+
// Order does not matter.
|
269
|
+
// Maximum number of specifications is 100.
|
270
|
+
repeated string ignore_control_ids = 19;
|
271
|
+
}
|