@google-cloud/discoveryengine 1.13.0 → 1.14.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.
- package/CHANGELOG.md +7 -0
- package/README.md +6 -0
- package/build/protos/google/cloud/discoveryengine/v1/answer.proto +49 -5
- package/build/protos/google/cloud/discoveryengine/v1/control.proto +6 -4
- package/build/protos/google/cloud/discoveryengine/v1/conversational_search_service.proto +9 -9
- package/build/protos/google/cloud/discoveryengine/v1/custom_tuning_model.proto +96 -0
- package/build/protos/google/cloud/discoveryengine/v1/data_store_service.proto +10 -0
- package/build/protos/google/cloud/discoveryengine/v1/document.proto +20 -0
- package/build/protos/google/cloud/discoveryengine/v1/document_processing_config.proto +2 -0
- package/build/protos/google/cloud/discoveryengine/v1/document_service.proto +110 -0
- package/build/protos/google/cloud/discoveryengine/v1/grounded_generation_service.proto +2 -1
- package/build/protos/google/cloud/discoveryengine/v1/import_config.proto +13 -7
- package/build/protos/google/cloud/discoveryengine/v1/purge_config.proto +117 -0
- package/build/protos/google/cloud/discoveryengine/v1/recommendation_service.proto +2 -1
- package/build/protos/google/cloud/discoveryengine/v1/search_service.proto +40 -16
- package/build/protos/google/cloud/discoveryengine/v1/search_tuning_service.proto +196 -0
- package/build/protos/google/cloud/discoveryengine/v1/user_event.proto +4 -0
- package/build/protos/google/cloud/discoveryengine/v1/user_event_service.proto +21 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/acl_config_service.proto +1 -1
- package/build/protos/google/cloud/discoveryengine/v1alpha/answer.proto +6 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/control.proto +1 -1
- package/build/protos/google/cloud/discoveryengine/v1alpha/custom_tuning_model.proto +3 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/data_store.proto +48 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/document.proto +20 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/document_service.proto +107 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/grounded_generation_service.proto +2 -1
- package/build/protos/google/cloud/discoveryengine/v1alpha/import_config.proto +7 -7
- package/build/protos/google/cloud/discoveryengine/v1alpha/purge_config.proto +1 -1
- package/build/protos/google/cloud/discoveryengine/v1alpha/search_service.proto +21 -1
- package/build/protos/google/cloud/discoveryengine/v1alpha/user_event.proto +4 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/answer.proto +47 -2
- package/build/protos/google/cloud/discoveryengine/v1beta/control.proto +1 -1
- package/build/protos/google/cloud/discoveryengine/v1beta/conversational_search_service.proto +3 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/custom_tuning_model.proto +3 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/document.proto +20 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/document_processing_config.proto +2 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/document_service.proto +114 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/grounded_generation_service.proto +2 -1
- package/build/protos/google/cloud/discoveryengine/v1beta/import_config.proto +13 -7
- package/build/protos/google/cloud/discoveryengine/v1beta/purge_config.proto +44 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/search_service.proto +101 -6
- package/build/protos/google/cloud/discoveryengine/v1beta/user_event.proto +4 -0
- package/build/protos/protos.d.ts +7369 -2842
- package/build/protos/protos.js +13311 -2062
- package/build/protos/protos.json +1096 -45
- package/build/src/index.d.ts +4 -1
- package/build/src/index.js +4 -1
- package/build/src/v1/completion_service_client.d.ts +93 -0
- package/build/src/v1/completion_service_client.js +134 -0
- package/build/src/v1/control_service_client.d.ts +93 -0
- package/build/src/v1/control_service_client.js +128 -0
- package/build/src/v1/conversational_search_service_client.d.ts +93 -0
- package/build/src/v1/conversational_search_service_client.js +128 -0
- package/build/src/v1/data_store_service_client.d.ts +102 -0
- package/build/src/v1/data_store_service_client.js +134 -0
- package/build/src/v1/document_service_client.d.ts +131 -0
- package/build/src/v1/document_service_client.js +156 -0
- package/build/src/v1/document_service_client_config.json +5 -0
- package/build/src/v1/engine_service_client.d.ts +93 -0
- package/build/src/v1/engine_service_client.js +134 -0
- package/build/src/v1/grounded_generation_service_client.d.ts +93 -0
- package/build/src/v1/grounded_generation_service_client.js +128 -0
- package/build/src/v1/index.d.ts +1 -0
- package/build/src/v1/index.js +3 -1
- package/build/src/v1/project_service_client.d.ts +93 -0
- package/build/src/v1/project_service_client.js +134 -0
- package/build/src/v1/rank_service_client.d.ts +93 -0
- package/build/src/v1/rank_service_client.js +128 -0
- package/build/src/v1/recommendation_service_client.d.ts +95 -1
- package/build/src/v1/recommendation_service_client.js +128 -0
- package/build/src/v1/schema_service_client.d.ts +93 -0
- package/build/src/v1/schema_service_client.js +134 -0
- package/build/src/v1/search_service_client.d.ts +111 -9
- package/build/src/v1/search_service_client.js +140 -6
- package/build/src/v1/search_tuning_service_client.d.ts +1776 -0
- package/build/src/v1/search_tuning_service_client.js +2589 -0
- package/build/src/v1/search_tuning_service_client_config.json +34 -0
- package/build/src/v1/site_search_engine_service_client.d.ts +93 -0
- package/build/src/v1/site_search_engine_service_client.js +134 -0
- package/build/src/v1/user_event_service_client.d.ts +168 -0
- package/build/src/v1/user_event_service_client.js +176 -0
- package/build/src/v1/user_event_service_client_config.json +5 -0
- package/build/src/v1alpha/acl_config_service_client.d.ts +1 -1
- package/build/src/v1alpha/document_service_client.d.ts +29 -0
- package/build/src/v1alpha/document_service_client.js +22 -0
- package/build/src/v1alpha/document_service_client_config.json +5 -0
- package/build/src/v1beta/document_service_client.d.ts +38 -0
- package/build/src/v1beta/document_service_client.js +22 -0
- package/build/src/v1beta/document_service_client_config.json +5 -0
- package/build/src/v1beta/search_service_client.d.ts +36 -9
- package/build/src/v1beta/search_service_client.js +24 -6
- package/package.json +1 -1
@@ -18,6 +18,7 @@ package google.cloud.discoveryengine.v1;
|
|
18
18
|
|
19
19
|
import "google/api/field_behavior.proto";
|
20
20
|
import "google/api/resource.proto";
|
21
|
+
import "google/cloud/discoveryengine/v1/import_config.proto";
|
21
22
|
import "google/protobuf/timestamp.proto";
|
22
23
|
import "google/rpc/status.proto";
|
23
24
|
|
@@ -30,10 +31,123 @@ option objc_class_prefix = "DISCOVERYENGINE";
|
|
30
31
|
option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1";
|
31
32
|
option ruby_package = "Google::Cloud::DiscoveryEngine::V1";
|
32
33
|
|
34
|
+
// Request message for PurgeUserEvents method.
|
35
|
+
message PurgeUserEventsRequest {
|
36
|
+
// Required. The resource name of the catalog under which the events are
|
37
|
+
// created. The format is
|
38
|
+
// `projects/{project}/locations/global/collections/{collection}/dataStores/{dataStore}`
|
39
|
+
string parent = 1 [
|
40
|
+
(google.api.field_behavior) = REQUIRED,
|
41
|
+
(google.api.resource_reference) = {
|
42
|
+
type: "discoveryengine.googleapis.com/DataStore"
|
43
|
+
}
|
44
|
+
];
|
45
|
+
|
46
|
+
// Required. The filter string to specify the events to be deleted with a
|
47
|
+
// length limit of 5,000 characters. The eligible fields for filtering are:
|
48
|
+
//
|
49
|
+
// * `eventType`: Double quoted
|
50
|
+
// [UserEvent.event_type][google.cloud.discoveryengine.v1.UserEvent.event_type]
|
51
|
+
// string.
|
52
|
+
// * `eventTime`: in ISO 8601 "zulu" format.
|
53
|
+
// * `userPseudoId`: Double quoted string. Specifying this will delete all
|
54
|
+
// events associated with a visitor.
|
55
|
+
// * `userId`: Double quoted string. Specifying this will delete all events
|
56
|
+
// associated with a user.
|
57
|
+
//
|
58
|
+
// Examples:
|
59
|
+
//
|
60
|
+
// * Deleting all events in a time range:
|
61
|
+
// `eventTime > "2012-04-23T18:25:43.511Z"
|
62
|
+
// eventTime < "2012-04-23T18:30:43.511Z"`
|
63
|
+
// * Deleting specific eventType:
|
64
|
+
// `eventType = "search"`
|
65
|
+
// * Deleting all events for a specific visitor:
|
66
|
+
// `userPseudoId = "visitor1024"`
|
67
|
+
// * Deleting all events inside a DataStore:
|
68
|
+
// `*`
|
69
|
+
//
|
70
|
+
// The filtering fields are assumed to have an implicit AND.
|
71
|
+
string filter = 2 [(google.api.field_behavior) = REQUIRED];
|
72
|
+
|
73
|
+
// The `force` field is currently not supported. Purge user event requests
|
74
|
+
// will permanently delete all purgeable events. Once the development is
|
75
|
+
// complete:
|
76
|
+
// If `force` is set to false, the method will return the expected
|
77
|
+
// purge count without deleting any user events. This field will default to
|
78
|
+
// false if not included in the request.
|
79
|
+
bool force = 3;
|
80
|
+
}
|
81
|
+
|
82
|
+
// Response of the PurgeUserEventsRequest. If the long running operation is
|
83
|
+
// successfully done, then this message is returned by the
|
84
|
+
// google.longrunning.Operations.response field.
|
85
|
+
message PurgeUserEventsResponse {
|
86
|
+
// The total count of events purged as a result of the operation.
|
87
|
+
int64 purge_count = 1;
|
88
|
+
}
|
89
|
+
|
90
|
+
// Metadata related to the progress of the PurgeUserEvents operation.
|
91
|
+
// This will be returned by the google.longrunning.Operation.metadata field.
|
92
|
+
message PurgeUserEventsMetadata {
|
93
|
+
// Operation create time.
|
94
|
+
google.protobuf.Timestamp create_time = 1;
|
95
|
+
|
96
|
+
// Operation last update time. If the operation is done, this is also the
|
97
|
+
// finish time.
|
98
|
+
google.protobuf.Timestamp update_time = 2;
|
99
|
+
|
100
|
+
// Count of entries that were deleted successfully.
|
101
|
+
int64 success_count = 3;
|
102
|
+
|
103
|
+
// Count of entries that encountered errors while processing.
|
104
|
+
int64 failure_count = 4;
|
105
|
+
}
|
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
|
+
|
33
119
|
// Request message for
|
34
120
|
// [DocumentService.PurgeDocuments][google.cloud.discoveryengine.v1.DocumentService.PurgeDocuments]
|
35
121
|
// method.
|
36
122
|
message PurgeDocumentsRequest {
|
123
|
+
// The inline source for the input config for
|
124
|
+
// [DocumentService.PurgeDocuments][google.cloud.discoveryengine.v1.DocumentService.PurgeDocuments]
|
125
|
+
// method.
|
126
|
+
message InlineSource {
|
127
|
+
// Required. A list of full resource name of documents to purge. In the
|
128
|
+
// format
|
129
|
+
// `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`.
|
130
|
+
// Recommended max of 100 items.
|
131
|
+
repeated string documents = 1 [
|
132
|
+
(google.api.field_behavior) = REQUIRED,
|
133
|
+
(google.api.resource_reference) = {
|
134
|
+
type: "discoveryengine.googleapis.com/Document"
|
135
|
+
}
|
136
|
+
];
|
137
|
+
}
|
138
|
+
|
139
|
+
// The desired input source for the purging documents based on document IDs.
|
140
|
+
oneof source {
|
141
|
+
// Cloud Storage location for the input content.
|
142
|
+
// Supported `data_schema`:
|
143
|
+
// * `document_id`: One valid
|
144
|
+
// [Document.id][google.cloud.discoveryengine.v1.Document.id] per line.
|
145
|
+
GcsSource gcs_source = 5;
|
146
|
+
|
147
|
+
// Inline source for the input content for purge.
|
148
|
+
InlineSource inline_source = 6;
|
149
|
+
}
|
150
|
+
|
37
151
|
// Required. The parent resource name, such as
|
38
152
|
// `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.
|
39
153
|
string parent = 1 [
|
@@ -48,6 +162,9 @@ message PurgeDocumentsRequest {
|
|
48
162
|
// `*` (all items).
|
49
163
|
string filter = 2 [(google.api.field_behavior) = REQUIRED];
|
50
164
|
|
165
|
+
// The desired location of errors incurred during the purge.
|
166
|
+
PurgeErrorConfig error_config = 7;
|
167
|
+
|
51
168
|
// Actually performs the purge. If `force` is set to false, return the
|
52
169
|
// expected purge count without deleting any documents.
|
53
170
|
bool force = 3;
|
@@ -58,7 +58,8 @@ service RecommendationService {
|
|
58
58
|
|
59
59
|
// Request message for Recommend method.
|
60
60
|
message RecommendRequest {
|
61
|
-
// Required. Full resource name of a
|
61
|
+
// Required. Full resource name of a
|
62
|
+
// [ServingConfig][google.cloud.discoveryengine.v1.ServingConfig]:
|
62
63
|
// `projects/*/locations/global/collections/*/engines/*/servingConfigs/*`, or
|
63
64
|
// `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*`
|
64
65
|
//
|
@@ -420,6 +420,14 @@ message SearchRequest {
|
|
420
420
|
// fallback messages instead.
|
421
421
|
bool ignore_non_summary_seeking_query = 4;
|
422
422
|
|
423
|
+
// Specifies whether to filter out queries that have low relevance. The
|
424
|
+
// default value is `false`.
|
425
|
+
//
|
426
|
+
// If this field is set to `false`, all search results are used regardless
|
427
|
+
// of relevance to generate answers. If set to `true`, only queries with
|
428
|
+
// high relevance search results will generate answers.
|
429
|
+
bool ignore_low_relevant_content = 9;
|
430
|
+
|
423
431
|
// If specified, the spec will be used to modify the prompt provided to
|
424
432
|
// the LLM.
|
425
433
|
ModelPromptSpec model_prompt_spec = 5;
|
@@ -514,11 +522,7 @@ message SearchRequest {
|
|
514
522
|
}
|
515
523
|
|
516
524
|
// Specifies the search result mode. If unspecified, the
|
517
|
-
// search result mode
|
518
|
-
// [DataStore.DocumentProcessingConfig.chunking_config][]:
|
519
|
-
// * If [DataStore.DocumentProcessingConfig.chunking_config][] is specified,
|
520
|
-
// it defaults to `CHUNKS`.
|
521
|
-
// * Otherwise, it defaults to `DOCUMENTS`.
|
525
|
+
// search result mode defaults to `DOCUMENTS`.
|
522
526
|
enum SearchResultMode {
|
523
527
|
// Default value.
|
524
528
|
SEARCH_RESULT_MODE_UNSPECIFIED = 0;
|
@@ -544,11 +548,7 @@ message SearchRequest {
|
|
544
548
|
ExtractiveContentSpec extractive_content_spec = 3;
|
545
549
|
|
546
550
|
// Specifies the search result mode. If unspecified, the
|
547
|
-
// search result mode
|
548
|
-
// [DataStore.DocumentProcessingConfig.chunking_config][]:
|
549
|
-
// * If [DataStore.DocumentProcessingConfig.chunking_config][] is specified,
|
550
|
-
// it defaults to `CHUNKS`.
|
551
|
-
// * Otherwise, it defaults to `DOCUMENTS`.
|
551
|
+
// search result mode defaults to `DOCUMENTS`.
|
552
552
|
SearchResultMode search_result_mode = 4;
|
553
553
|
|
554
554
|
// Specifies the chunk spec to be returned from the search response.
|
@@ -724,9 +724,12 @@ message SearchRequest {
|
|
724
724
|
// Leave it unset if ordered by relevance. `order_by` expression is
|
725
725
|
// case-sensitive.
|
726
726
|
//
|
727
|
-
// For more information on ordering
|
728
|
-
// [
|
729
|
-
//
|
727
|
+
// For more information on ordering the website search results, see
|
728
|
+
// [Order web search
|
729
|
+
// results](https://cloud.google.com/generative-ai-app-builder/docs/order-web-search-results).
|
730
|
+
// For more information on ordering the healthcare search results, see
|
731
|
+
// [Order healthcare search
|
732
|
+
// results](https://cloud.google.com/generative-ai-app-builder/docs/order-hc-results).
|
730
733
|
// If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
|
731
734
|
string order_by = 8;
|
732
735
|
|
@@ -1003,14 +1006,14 @@ message SearchResponse {
|
|
1003
1006
|
|
1004
1007
|
// The adversarial query ignored case.
|
1005
1008
|
//
|
1006
|
-
// Only
|
1009
|
+
// Only used when
|
1007
1010
|
// [SummarySpec.ignore_adversarial_query][google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SummarySpec.ignore_adversarial_query]
|
1008
1011
|
// is set to `true`.
|
1009
1012
|
ADVERSARIAL_QUERY_IGNORED = 1;
|
1010
1013
|
|
1011
1014
|
// The non-summary seeking query ignored case.
|
1012
1015
|
//
|
1013
|
-
// Only
|
1016
|
+
// Only used when
|
1014
1017
|
// [SummarySpec.ignore_non_summary_seeking_query][google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SummarySpec.ignore_non_summary_seeking_query]
|
1015
1018
|
// is set to `true`.
|
1016
1019
|
NON_SUMMARY_SEEKING_QUERY_IGNORED = 2;
|
@@ -1032,6 +1035,26 @@ message SearchResponse {
|
|
1032
1035
|
//
|
1033
1036
|
// Google skips the summary if the LLM addon is not enabled.
|
1034
1037
|
LLM_ADDON_NOT_ENABLED = 5;
|
1038
|
+
|
1039
|
+
// The no relevant content case.
|
1040
|
+
//
|
1041
|
+
// Google skips the summary if there is no relevant content in the
|
1042
|
+
// retrieved search results.
|
1043
|
+
NO_RELEVANT_CONTENT = 6;
|
1044
|
+
|
1045
|
+
// The jail-breaking query ignored case.
|
1046
|
+
//
|
1047
|
+
// For example, "Reply in the tone of a competing company's CEO".
|
1048
|
+
// Only used when
|
1049
|
+
// [SearchRequest.ContentSearchSpec.SummarySpec.ignore_jail_breaking_query]
|
1050
|
+
// is set to `true`.
|
1051
|
+
JAIL_BREAKING_QUERY_IGNORED = 7;
|
1052
|
+
|
1053
|
+
// The customer policy violation case.
|
1054
|
+
//
|
1055
|
+
// Google skips the summary if there is a customer policy violation
|
1056
|
+
// detected. The policy is defined by the customer.
|
1057
|
+
CUSTOMER_POLICY_VIOLATION = 8;
|
1035
1058
|
}
|
1036
1059
|
|
1037
1060
|
// The summary content.
|
@@ -1095,7 +1118,8 @@ message SearchResponse {
|
|
1095
1118
|
// A unique search token. This should be included in the
|
1096
1119
|
// [UserEvent][google.cloud.discoveryengine.v1.UserEvent] logs resulting from
|
1097
1120
|
// this search, which enables accurate attribution of search model
|
1098
|
-
// performance.
|
1121
|
+
// performance. This also helps to identify a request during the customer
|
1122
|
+
// support scenarios.
|
1099
1123
|
string attribution_token = 4;
|
1100
1124
|
|
1101
1125
|
// The URI of a customer-defined redirect page. If redirect action is
|
@@ -0,0 +1,196 @@
|
|
1
|
+
// Copyright 2024 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.v1;
|
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/v1/custom_tuning_model.proto";
|
24
|
+
import "google/cloud/discoveryengine/v1/import_config.proto";
|
25
|
+
import "google/longrunning/operations.proto";
|
26
|
+
import "google/protobuf/timestamp.proto";
|
27
|
+
import "google/rpc/status.proto";
|
28
|
+
|
29
|
+
option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1";
|
30
|
+
option go_package = "cloud.google.com/go/discoveryengine/apiv1/discoveryenginepb;discoveryenginepb";
|
31
|
+
option java_multiple_files = true;
|
32
|
+
option java_outer_classname = "SearchTuningServiceProto";
|
33
|
+
option java_package = "com.google.cloud.discoveryengine.v1";
|
34
|
+
option objc_class_prefix = "DISCOVERYENGINE";
|
35
|
+
option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1";
|
36
|
+
option ruby_package = "Google::Cloud::DiscoveryEngine::V1";
|
37
|
+
|
38
|
+
// Service for search tuning.
|
39
|
+
service SearchTuningService {
|
40
|
+
option (google.api.default_host) = "discoveryengine.googleapis.com";
|
41
|
+
option (google.api.oauth_scopes) =
|
42
|
+
"https://www.googleapis.com/auth/cloud-platform";
|
43
|
+
|
44
|
+
// Trains a custom model.
|
45
|
+
rpc TrainCustomModel(TrainCustomModelRequest)
|
46
|
+
returns (google.longrunning.Operation) {
|
47
|
+
option (google.api.http) = {
|
48
|
+
post: "/v1/{data_store=projects/*/locations/*/collections/*/dataStores/*}:trainCustomModel"
|
49
|
+
body: "*"
|
50
|
+
};
|
51
|
+
option (google.longrunning.operation_info) = {
|
52
|
+
response_type: "google.cloud.discoveryengine.v1.TrainCustomModelResponse"
|
53
|
+
metadata_type: "google.cloud.discoveryengine.v1.TrainCustomModelMetadata"
|
54
|
+
};
|
55
|
+
}
|
56
|
+
|
57
|
+
// Gets a list of all the custom models.
|
58
|
+
rpc ListCustomModels(ListCustomModelsRequest)
|
59
|
+
returns (ListCustomModelsResponse) {
|
60
|
+
option (google.api.http) = {
|
61
|
+
get: "/v1/{data_store=projects/*/locations/*/collections/*/dataStores/*}/customModels"
|
62
|
+
};
|
63
|
+
}
|
64
|
+
}
|
65
|
+
|
66
|
+
// Request message for
|
67
|
+
// [SearchTuningService.ListCustomModels][google.cloud.discoveryengine.v1.SearchTuningService.ListCustomModels]
|
68
|
+
// method.
|
69
|
+
message ListCustomModelsRequest {
|
70
|
+
// Required. The resource name of the parent Data Store, such as
|
71
|
+
// `projects/*/locations/global/collections/default_collection/dataStores/default_data_store`.
|
72
|
+
// This field is used to identify the data store where to fetch the models
|
73
|
+
// from.
|
74
|
+
string data_store = 1 [
|
75
|
+
(google.api.field_behavior) = REQUIRED,
|
76
|
+
(google.api.resource_reference) = {
|
77
|
+
type: "discoveryengine.googleapis.com/DataStore"
|
78
|
+
}
|
79
|
+
];
|
80
|
+
}
|
81
|
+
|
82
|
+
// Response message for
|
83
|
+
// [SearchTuningService.ListCustomModels][google.cloud.discoveryengine.v1.SearchTuningService.ListCustomModels]
|
84
|
+
// method.
|
85
|
+
message ListCustomModelsResponse {
|
86
|
+
// List of custom tuning models.
|
87
|
+
repeated CustomTuningModel models = 1;
|
88
|
+
}
|
89
|
+
|
90
|
+
// Request message for
|
91
|
+
// [SearchTuningService.TrainCustomModel][google.cloud.discoveryengine.v1.SearchTuningService.TrainCustomModel]
|
92
|
+
// method.
|
93
|
+
message TrainCustomModelRequest {
|
94
|
+
// Cloud Storage training data input.
|
95
|
+
message GcsTrainingInput {
|
96
|
+
// The Cloud Storage corpus data which could be associated in train data.
|
97
|
+
// The data path format is `gs://<bucket_to_data>/<jsonl_file_name>`.
|
98
|
+
// A newline delimited jsonl/ndjson file.
|
99
|
+
//
|
100
|
+
// For search-tuning model, each line should have the _id, title
|
101
|
+
// and text. Example:
|
102
|
+
// `{"_id": "doc1", title: "relevant doc", "text": "relevant text"}`
|
103
|
+
string corpus_data_path = 1;
|
104
|
+
|
105
|
+
// The gcs query data which could be associated in train data.
|
106
|
+
// The data path format is `gs://<bucket_to_data>/<jsonl_file_name>`.
|
107
|
+
// A newline delimited jsonl/ndjson file.
|
108
|
+
//
|
109
|
+
// For search-tuning model, each line should have the _id
|
110
|
+
// and text. Example: {"_id": "query1", "text": "example query"}
|
111
|
+
string query_data_path = 2;
|
112
|
+
|
113
|
+
// Cloud Storage training data path whose format should be
|
114
|
+
// `gs://<bucket_to_data>/<tsv_file_name>`. The file should be in tsv
|
115
|
+
// format. Each line should have the doc_id and query_id and score (number).
|
116
|
+
//
|
117
|
+
// For search-tuning model, it should have the query-id corpus-id
|
118
|
+
// score as tsv file header. The score should be a number in `[0, inf+)`.
|
119
|
+
// The larger the number is, the more relevant the pair is. Example:
|
120
|
+
//
|
121
|
+
// * `query-id\tcorpus-id\tscore`
|
122
|
+
// * `query1\tdoc1\t1`
|
123
|
+
string train_data_path = 3;
|
124
|
+
|
125
|
+
// Cloud Storage test data. Same format as train_data_path. If not provided,
|
126
|
+
// a random 80/20 train/test split will be performed on train_data_path.
|
127
|
+
string test_data_path = 4;
|
128
|
+
}
|
129
|
+
|
130
|
+
// Model training input.
|
131
|
+
oneof training_input {
|
132
|
+
// Cloud Storage training input.
|
133
|
+
GcsTrainingInput gcs_training_input = 2;
|
134
|
+
}
|
135
|
+
|
136
|
+
// Required. The resource name of the Data Store, such as
|
137
|
+
// `projects/*/locations/global/collections/default_collection/dataStores/default_data_store`.
|
138
|
+
// This field is used to identify the data store where to train the models.
|
139
|
+
string data_store = 1 [
|
140
|
+
(google.api.field_behavior) = REQUIRED,
|
141
|
+
(google.api.resource_reference) = {
|
142
|
+
type: "discoveryengine.googleapis.com/DataStore"
|
143
|
+
}
|
144
|
+
];
|
145
|
+
|
146
|
+
// Model to be trained. Supported values are:
|
147
|
+
//
|
148
|
+
// * **search-tuning**: Fine tuning the search system based on data provided.
|
149
|
+
string model_type = 3;
|
150
|
+
|
151
|
+
// The desired location of errors incurred during the data ingestion and
|
152
|
+
// training.
|
153
|
+
ImportErrorConfig error_config = 4;
|
154
|
+
|
155
|
+
// If not provided, a UUID will be generated.
|
156
|
+
string model_id = 5;
|
157
|
+
}
|
158
|
+
|
159
|
+
// Response of the
|
160
|
+
// [TrainCustomModelRequest][google.cloud.discoveryengine.v1.TrainCustomModelRequest].
|
161
|
+
// This message is returned by the google.longrunning.Operations.response field.
|
162
|
+
message TrainCustomModelResponse {
|
163
|
+
// A sample of errors encountered while processing the data.
|
164
|
+
repeated google.rpc.Status error_samples = 1;
|
165
|
+
|
166
|
+
// Echoes the destination for the complete errors in the request if set.
|
167
|
+
ImportErrorConfig error_config = 2;
|
168
|
+
|
169
|
+
// The trained model status. Possible values are:
|
170
|
+
//
|
171
|
+
// * **bad-data**: The training data quality is bad.
|
172
|
+
// * **no-improvement**: Tuning didn't improve performance. Won't deploy.
|
173
|
+
// * **in-progress**: Model training job creation is in progress.
|
174
|
+
// * **training**: Model is actively training.
|
175
|
+
// * **evaluating**: The model is evaluating trained metrics.
|
176
|
+
// * **indexing**: The model trained metrics are indexing.
|
177
|
+
// * **ready**: The model is ready for serving.
|
178
|
+
string model_status = 3;
|
179
|
+
|
180
|
+
// The metrics of the trained model.
|
181
|
+
map<string, double> metrics = 4;
|
182
|
+
|
183
|
+
// Fully qualified name of the CustomTuningModel.
|
184
|
+
string model_name = 5;
|
185
|
+
}
|
186
|
+
|
187
|
+
// Metadata related to the progress of the TrainCustomModel operation. This is
|
188
|
+
// returned by the google.longrunning.Operation.metadata field.
|
189
|
+
message TrainCustomModelMetadata {
|
190
|
+
// Operation create time.
|
191
|
+
google.protobuf.Timestamp create_time = 1;
|
192
|
+
|
193
|
+
// Operation last update time. If the operation is done, this is also the
|
194
|
+
// finish time.
|
195
|
+
google.protobuf.Timestamp update_time = 2;
|
196
|
+
}
|
@@ -453,6 +453,10 @@ message DocumentInfo {
|
|
453
453
|
// The promotion IDs associated with this Document.
|
454
454
|
// Currently, this field is restricted to at most one ID.
|
455
455
|
repeated string promotion_ids = 4;
|
456
|
+
|
457
|
+
// Output only. Whether the referenced Document can be found in the data
|
458
|
+
// store.
|
459
|
+
bool joined = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
|
456
460
|
}
|
457
461
|
|
458
462
|
// Detailed panel information associated with a user event.
|
@@ -22,6 +22,7 @@ import "google/api/field_behavior.proto";
|
|
22
22
|
import "google/api/httpbody.proto";
|
23
23
|
import "google/api/resource.proto";
|
24
24
|
import "google/cloud/discoveryengine/v1/import_config.proto";
|
25
|
+
import "google/cloud/discoveryengine/v1/purge_config.proto";
|
25
26
|
import "google/cloud/discoveryengine/v1/user_event.proto";
|
26
27
|
import "google/longrunning/operations.proto";
|
27
28
|
|
@@ -73,6 +74,26 @@ service UserEventService {
|
|
73
74
|
};
|
74
75
|
}
|
75
76
|
|
77
|
+
// Deletes permanently all user events specified by the filter provided.
|
78
|
+
// Depending on the number of events specified by the filter, this operation
|
79
|
+
// could take hours or days to complete. To test a filter, use the list
|
80
|
+
// command first.
|
81
|
+
rpc PurgeUserEvents(PurgeUserEventsRequest)
|
82
|
+
returns (google.longrunning.Operation) {
|
83
|
+
option (google.api.http) = {
|
84
|
+
post: "/v1/{parent=projects/*/locations/*/dataStores/*}/userEvents:purge"
|
85
|
+
body: "*"
|
86
|
+
additional_bindings {
|
87
|
+
post: "/v1/{parent=projects/*/locations/*/collections/*/dataStores/*}/userEvents:purge"
|
88
|
+
body: "*"
|
89
|
+
}
|
90
|
+
};
|
91
|
+
option (google.longrunning.operation_info) = {
|
92
|
+
response_type: "google.cloud.discoveryengine.v1.PurgeUserEventsResponse"
|
93
|
+
metadata_type: "google.cloud.discoveryengine.v1.PurgeUserEventsMetadata"
|
94
|
+
};
|
95
|
+
}
|
96
|
+
|
76
97
|
// Bulk import of user events. Request processing might be
|
77
98
|
// synchronous. Events that already exist are skipped.
|
78
99
|
// Use this method for backfilling historical user events.
|
@@ -37,7 +37,7 @@ service AclConfigService {
|
|
37
37
|
option (google.api.oauth_scopes) =
|
38
38
|
"https://www.googleapis.com/auth/cloud-platform";
|
39
39
|
|
40
|
-
// Default
|
40
|
+
// Default ACL configuration for use in a location of a customer's project.
|
41
41
|
// Updates will only reflect to new data stores. Existing data stores will
|
42
42
|
// still use the old value.
|
43
43
|
rpc UpdateAclConfig(UpdateAclConfigRequest) returns (AclConfig) {
|
@@ -349,6 +349,12 @@ message Answer {
|
|
349
349
|
// Google skips the answer if the query is classified as a jail-breaking
|
350
350
|
// query.
|
351
351
|
JAIL_BREAKING_QUERY_IGNORED = 6;
|
352
|
+
|
353
|
+
// The customer policy violation case.
|
354
|
+
//
|
355
|
+
// Google skips the summary if there is a customer policy violation
|
356
|
+
// detected. The policy is defined by the customer.
|
357
|
+
CUSTOMER_POLICY_VIOLATION = 7;
|
352
358
|
}
|
353
359
|
|
354
360
|
// Immutable. Fully qualified name
|
@@ -184,7 +184,7 @@ message Control {
|
|
184
184
|
string display_name = 2 [(google.api.field_behavior) = REQUIRED];
|
185
185
|
|
186
186
|
// Output only. List of all
|
187
|
-
// [ServingConfig][google.cloud.discoveryengine.v1alpha.ServingConfig]
|
187
|
+
// [ServingConfig][google.cloud.discoveryengine.v1alpha.ServingConfig] IDs
|
188
188
|
// this control is attached to. May take up to 10 minutes to update after
|
189
189
|
// changes.
|
190
190
|
repeated string associated_serving_config_ids = 3
|
@@ -59,6 +59,9 @@ message CustomTuningModel {
|
|
59
59
|
|
60
60
|
// The model training finished successfully but metrics did not improve.
|
61
61
|
NO_IMPROVEMENT = 6;
|
62
|
+
|
63
|
+
// Input data validation failed. Model training didn't start.
|
64
|
+
INPUT_VALIDATION_FAILED = 7;
|
62
65
|
}
|
63
66
|
|
64
67
|
// Required. The fully qualified resource name of the model.
|
@@ -55,6 +55,11 @@ message DataStore {
|
|
55
55
|
|
56
56
|
// The data store is used for public website search.
|
57
57
|
PUBLIC_WEBSITE = 3;
|
58
|
+
|
59
|
+
// The data store is used for workspace search. Details of workspace
|
60
|
+
// data store are specified in the
|
61
|
+
// [WorkspaceConfig][google.cloud.discoveryengine.v1alpha.WorkspaceConfig].
|
62
|
+
GOOGLE_WORKSPACE = 4;
|
58
63
|
}
|
59
64
|
|
60
65
|
// Immutable. The full resource name of the data store.
|
@@ -123,6 +128,13 @@ message DataStore {
|
|
123
128
|
// non-`PUBLIC_WEBSITE` content config.
|
124
129
|
bool acl_enabled = 24 [(google.api.field_behavior) = IMMUTABLE];
|
125
130
|
|
131
|
+
// Config to store data store type configuration for workspace data. This
|
132
|
+
// must be set when
|
133
|
+
// [DataStore.content_config][google.cloud.discoveryengine.v1alpha.DataStore.content_config]
|
134
|
+
// is set as
|
135
|
+
// [DataStore.ContentConfig.GOOGLE_WORKSPACE][google.cloud.discoveryengine.v1alpha.DataStore.ContentConfig.GOOGLE_WORKSPACE].
|
136
|
+
WorkspaceConfig workspace_config = 25;
|
137
|
+
|
126
138
|
// Configuration for Document understanding and enrichment.
|
127
139
|
DocumentProcessingConfig document_processing_config = 27;
|
128
140
|
|
@@ -163,3 +175,39 @@ message LanguageInfo {
|
|
163
175
|
// E.g.: `en-US` -> `US`, `zh-Hans-HK` -> `HK`, `en` -> ``.
|
164
176
|
string region = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
|
165
177
|
}
|
178
|
+
|
179
|
+
// Config to store data store type configuration for workspace data
|
180
|
+
message WorkspaceConfig {
|
181
|
+
// Specifies the type of Workspace App supported by this DataStore
|
182
|
+
enum Type {
|
183
|
+
// Defaults to an unspecified Workspace type.
|
184
|
+
TYPE_UNSPECIFIED = 0;
|
185
|
+
|
186
|
+
// Workspace Data Store contains Drive data
|
187
|
+
GOOGLE_DRIVE = 1;
|
188
|
+
|
189
|
+
// Workspace Data Store contains Mail data
|
190
|
+
GOOGLE_MAIL = 2;
|
191
|
+
|
192
|
+
// Workspace Data Store contains Sites data
|
193
|
+
GOOGLE_SITES = 3;
|
194
|
+
|
195
|
+
// Workspace Data Store contains Calendar data
|
196
|
+
GOOGLE_CALENDAR = 4;
|
197
|
+
|
198
|
+
// Workspace Data Store contains Chat data
|
199
|
+
GOOGLE_CHAT = 5;
|
200
|
+
|
201
|
+
// Workspace Data Store contains Groups data
|
202
|
+
GOOGLE_GROUPS = 6;
|
203
|
+
|
204
|
+
// Workspace Data Store contains Keep data
|
205
|
+
GOOGLE_KEEP = 7;
|
206
|
+
}
|
207
|
+
|
208
|
+
// The Google Workspace data source.
|
209
|
+
Type type = 1;
|
210
|
+
|
211
|
+
// Obfuscated Dasher customer ID.
|
212
|
+
string dasher_customer_id = 2;
|
213
|
+
}
|
@@ -21,6 +21,7 @@ import "google/api/resource.proto";
|
|
21
21
|
import "google/cloud/discoveryengine/v1alpha/common.proto";
|
22
22
|
import "google/protobuf/struct.proto";
|
23
23
|
import "google/protobuf/timestamp.proto";
|
24
|
+
import "google/rpc/status.proto";
|
24
25
|
|
25
26
|
option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Alpha";
|
26
27
|
option go_package = "cloud.google.com/go/discoveryengine/apiv1alpha/discoveryenginepb;discoveryenginepb";
|
@@ -144,6 +145,17 @@ message Document {
|
|
144
145
|
repeated AccessRestriction readers = 1;
|
145
146
|
}
|
146
147
|
|
148
|
+
// Index status of the document.
|
149
|
+
message IndexStatus {
|
150
|
+
// The time when the document was indexed.
|
151
|
+
// If this field is populated, it means the document has been indexed.
|
152
|
+
google.protobuf.Timestamp index_time = 1;
|
153
|
+
|
154
|
+
// A sample of errors encountered while indexing the document.
|
155
|
+
// If this field is populated, the document is not indexed due to errors.
|
156
|
+
repeated google.rpc.Status error_samples = 2;
|
157
|
+
}
|
158
|
+
|
147
159
|
// Data representation. One of
|
148
160
|
// [struct_data][google.cloud.discoveryengine.v1alpha.Document.struct_data] or
|
149
161
|
// [json_data][google.cloud.discoveryengine.v1alpha.Document.json_data] should
|
@@ -204,6 +216,14 @@ message Document {
|
|
204
216
|
// document has never been indexed.
|
205
217
|
google.protobuf.Timestamp index_time = 13
|
206
218
|
[(google.api.field_behavior) = OUTPUT_ONLY];
|
219
|
+
|
220
|
+
// Output only. The index status of the document.
|
221
|
+
//
|
222
|
+
// * If document is indexed successfully, the index_time field is populated.
|
223
|
+
// * Otherwise, if document is not indexed due to errors, the error_samples
|
224
|
+
// field is populated.
|
225
|
+
// * Otherwise, index_status is unset.
|
226
|
+
IndexStatus index_status = 15 [(google.api.field_behavior) = OUTPUT_ONLY];
|
207
227
|
}
|
208
228
|
|
209
229
|
// Document captures all raw metadata information of items to be recommended or
|