@google-cloud/discoveryengine 1.0.0 → 1.2.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 +20 -0
- package/README.md +33 -1
- package/build/protos/google/cloud/discoveryengine/v1/common.proto +30 -2
- package/build/protos/google/cloud/discoveryengine/v1/completion_service.proto +15 -2
- package/build/protos/google/cloud/discoveryengine/v1/conversation.proto +114 -0
- package/build/protos/google/cloud/discoveryengine/v1/conversational_search_service.proto +303 -0
- package/build/protos/google/cloud/discoveryengine/v1/document.proto +8 -5
- package/build/protos/google/cloud/discoveryengine/v1/document_service.proto +4 -3
- package/build/protos/google/cloud/discoveryengine/v1/import_config.proto +27 -23
- package/build/protos/google/cloud/discoveryengine/v1/schema.proto +1 -1
- package/build/protos/google/cloud/discoveryengine/v1/search_service.proto +428 -20
- package/build/protos/google/cloud/discoveryengine/v1/user_event.proto +48 -39
- package/build/protos/google/cloud/discoveryengine/v1/user_event_service.proto +2 -2
- package/build/protos/google/cloud/discoveryengine/v1alpha/common.proto +155 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/completion_service.proto +134 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/conversation.proto +138 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/conversational_search_service.proto +306 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/document.proto +121 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/document_service.proto +318 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/import_config.proto +343 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/purge_config.proto +159 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/recommendation_service.proto +221 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/schema.proto +312 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/schema_service.proto +260 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/search_service.proto +851 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/site_search_engine_service.proto +152 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/user_event.proto +475 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/user_event_service.proto +154 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/common.proto +6 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/conversation.proto +9 -2
- package/build/protos/google/cloud/discoveryengine/v1beta/conversational_search_service.proto +25 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/search_service.proto +115 -3
- package/build/protos/google/cloud/discoveryengine/v1beta/user_event.proto +4 -0
- package/build/protos/protos.d.ts +22864 -6680
- package/build/protos/protos.js +57205 -16191
- package/build/protos/protos.json +5548 -1224
- package/build/src/index.d.ts +6 -1
- package/build/src/index.js +7 -1
- package/build/src/v1/completion_service_client.d.ts +156 -6
- package/build/src/v1/completion_service_client.js +188 -4
- package/build/src/v1/conversational_search_service_client.d.ts +947 -0
- package/build/src/v1/conversational_search_service_client.js +1205 -0
- package/build/src/v1/conversational_search_service_client_config.json +68 -0
- package/build/src/v1/document_service_client.d.ts +165 -18
- package/build/src/v1/document_service_client.js +215 -11
- package/build/src/v1/index.d.ts +1 -0
- package/build/src/v1/index.js +3 -1
- package/build/src/v1/schema_service_client.d.ts +148 -4
- package/build/src/v1/schema_service_client.js +207 -5
- package/build/src/v1/search_service_client.d.ts +238 -28
- package/build/src/v1/search_service_client.js +248 -20
- package/build/src/v1/user_event_service_client.d.ts +153 -9
- package/build/src/v1/user_event_service_client.js +207 -5
- package/build/src/v1alpha/completion_service_client.d.ts +603 -0
- package/build/src/v1alpha/completion_service_client.js +843 -0
- package/build/src/v1alpha/completion_service_client_config.json +43 -0
- package/build/src/v1alpha/conversational_search_service_client.d.ts +998 -0
- package/build/src/v1alpha/conversational_search_service_client.js +1275 -0
- package/build/src/v1alpha/conversational_search_service_client_config.json +68 -0
- package/build/src/v1alpha/document_service_client.d.ts +1140 -0
- package/build/src/v1alpha/document_service_client.js +1393 -0
- package/build/src/v1alpha/document_service_client_config.json +82 -0
- package/build/src/v1alpha/index.d.ts +8 -0
- package/build/src/v1alpha/index.js +37 -0
- package/build/src/v1alpha/recommendation_service_client.d.ts +735 -0
- package/build/src/v1alpha/recommendation_service_client.js +938 -0
- package/build/src/v1alpha/recommendation_service_client_config.json +43 -0
- package/build/src/v1alpha/schema_service_client.d.ts +935 -0
- package/build/src/v1alpha/schema_service_client.js +1327 -0
- package/build/src/v1alpha/schema_service_client_config.json +63 -0
- package/build/src/v1alpha/search_service_client.d.ts +1208 -0
- package/build/src/v1alpha/search_service_client.js +1432 -0
- package/build/src/v1alpha/search_service_client_config.json +43 -0
- package/build/src/v1alpha/site_search_engine_service_client.d.ts +704 -0
- package/build/src/v1alpha/site_search_engine_service_client.js +1087 -0
- package/build/src/v1alpha/site_search_engine_service_client_config.json +30 -0
- package/build/src/v1alpha/user_event_service_client.d.ts +853 -0
- package/build/src/v1alpha/user_event_service_client.js +1174 -0
- package/build/src/v1alpha/user_event_service_client_config.json +67 -0
- package/build/src/v1beta/completion_service_client.d.ts +55 -4
- package/build/src/v1beta/completion_service_client.js +60 -4
- package/build/src/v1beta/conversational_search_service_client.d.ts +75 -4
- package/build/src/v1beta/conversational_search_service_client.js +60 -4
- package/build/src/v1beta/document_service_client.d.ts +55 -4
- package/build/src/v1beta/document_service_client.js +61 -5
- package/build/src/v1beta/recommendation_service_client.d.ts +55 -4
- package/build/src/v1beta/recommendation_service_client.js +60 -4
- package/build/src/v1beta/schema_service_client.d.ts +55 -4
- package/build/src/v1beta/schema_service_client.js +61 -5
- package/build/src/v1beta/search_service_client.d.ts +142 -4
- package/build/src/v1beta/search_service_client.js +118 -4
- package/build/src/v1beta/user_event_service_client.d.ts +55 -4
- package/build/src/v1beta/user_event_service_client.js +61 -5
- package/package.json +5 -5
|
@@ -0,0 +1,154 @@
|
|
|
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/annotations.proto";
|
|
20
|
+
import "google/api/client.proto";
|
|
21
|
+
import "google/api/field_behavior.proto";
|
|
22
|
+
import "google/api/httpbody.proto";
|
|
23
|
+
import "google/api/resource.proto";
|
|
24
|
+
import "google/cloud/discoveryengine/v1alpha/import_config.proto";
|
|
25
|
+
import "google/cloud/discoveryengine/v1alpha/purge_config.proto";
|
|
26
|
+
import "google/cloud/discoveryengine/v1alpha/user_event.proto";
|
|
27
|
+
import "google/longrunning/operations.proto";
|
|
28
|
+
|
|
29
|
+
option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Alpha";
|
|
30
|
+
option go_package = "cloud.google.com/go/discoveryengine/apiv1alpha/discoveryenginepb;discoveryenginepb";
|
|
31
|
+
option java_multiple_files = true;
|
|
32
|
+
option java_outer_classname = "UserEventServiceProto";
|
|
33
|
+
option java_package = "com.google.cloud.discoveryengine.v1alpha";
|
|
34
|
+
option objc_class_prefix = "DISCOVERYENGINE";
|
|
35
|
+
option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1alpha";
|
|
36
|
+
option ruby_package = "Google::Cloud::DiscoveryEngine::V1alpha";
|
|
37
|
+
|
|
38
|
+
// Service for ingesting end user actions on a website to Discovery Engine API.
|
|
39
|
+
service UserEventService {
|
|
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
|
+
// Writes a single user event.
|
|
45
|
+
rpc WriteUserEvent(WriteUserEventRequest) returns (UserEvent) {
|
|
46
|
+
option (google.api.http) = {
|
|
47
|
+
post: "/v1alpha/{parent=projects/*/locations/*/dataStores/*}/userEvents:write"
|
|
48
|
+
body: "user_event"
|
|
49
|
+
additional_bindings {
|
|
50
|
+
post: "/v1alpha/{parent=projects/*/locations/*/collections/*/dataStores/*}/userEvents:write"
|
|
51
|
+
body: "user_event"
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// Writes a single user event from the browser. This uses a GET request to
|
|
57
|
+
// due to browser restriction of POST-ing to a third-party domain.
|
|
58
|
+
//
|
|
59
|
+
// This method is used only by the Discovery Engine API JavaScript pixel and
|
|
60
|
+
// Google Tag Manager. Users should not call this method directly.
|
|
61
|
+
rpc CollectUserEvent(CollectUserEventRequest) returns (google.api.HttpBody) {
|
|
62
|
+
option (google.api.http) = {
|
|
63
|
+
get: "/v1alpha/{parent=projects/*/locations/*/dataStores/*}/userEvents:collect"
|
|
64
|
+
additional_bindings {
|
|
65
|
+
get: "/v1alpha/{parent=projects/*/locations/*/collections/*/dataStores/*}/userEvents:collect"
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// Deletes permanently all user events specified by the filter provided.
|
|
71
|
+
// Depending on the number of events specified by the filter, this operation
|
|
72
|
+
// could take hours or days to complete. To test a filter, use the list
|
|
73
|
+
// command first.
|
|
74
|
+
rpc PurgeUserEvents(PurgeUserEventsRequest)
|
|
75
|
+
returns (google.longrunning.Operation) {
|
|
76
|
+
option (google.api.http) = {
|
|
77
|
+
post: "/v1alpha/{parent=projects/*/locations/*/dataStores/*}/userEvents:purge"
|
|
78
|
+
body: "*"
|
|
79
|
+
additional_bindings {
|
|
80
|
+
post: "/v1alpha/{parent=projects/*/locations/*/collections/*/dataStores/*}/userEvents:purge"
|
|
81
|
+
body: "*"
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
option (google.longrunning.operation_info) = {
|
|
85
|
+
response_type: "google.cloud.discoveryengine.v1alpha.PurgeUserEventsResponse"
|
|
86
|
+
metadata_type: "google.cloud.discoveryengine.v1alpha.PurgeUserEventsMetadata"
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
// Bulk import of User events. Request processing might be
|
|
91
|
+
// synchronous. Events that already exist are skipped.
|
|
92
|
+
// Use this method for backfilling historical user events.
|
|
93
|
+
//
|
|
94
|
+
// Operation.response is of type ImportResponse. Note that it is
|
|
95
|
+
// possible for a subset of the items to be successfully inserted.
|
|
96
|
+
// Operation.metadata is of type ImportMetadata.
|
|
97
|
+
rpc ImportUserEvents(ImportUserEventsRequest)
|
|
98
|
+
returns (google.longrunning.Operation) {
|
|
99
|
+
option (google.api.http) = {
|
|
100
|
+
post: "/v1alpha/{parent=projects/*/locations/*/dataStores/*}/userEvents:import"
|
|
101
|
+
body: "*"
|
|
102
|
+
additional_bindings {
|
|
103
|
+
post: "/v1alpha/{parent=projects/*/locations/*/collections/*/dataStores/*}/userEvents:import"
|
|
104
|
+
body: "*"
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
option (google.longrunning.operation_info) = {
|
|
108
|
+
response_type: "google.cloud.discoveryengine.v1alpha.ImportUserEventsResponse"
|
|
109
|
+
metadata_type: "google.cloud.discoveryengine.v1alpha.ImportUserEventsMetadata"
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
// Request message for WriteUserEvent method.
|
|
115
|
+
message WriteUserEventRequest {
|
|
116
|
+
// Required. The parent DataStore resource name, such as
|
|
117
|
+
// `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.
|
|
118
|
+
string parent = 1 [
|
|
119
|
+
(google.api.field_behavior) = REQUIRED,
|
|
120
|
+
(google.api.resource_reference) = {
|
|
121
|
+
type: "discoveryengine.googleapis.com/DataStore"
|
|
122
|
+
}
|
|
123
|
+
];
|
|
124
|
+
|
|
125
|
+
// Required. User event to write.
|
|
126
|
+
optional UserEvent user_event = 2 [(google.api.field_behavior) = REQUIRED];
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
// Request message for CollectUserEvent method.
|
|
130
|
+
message CollectUserEventRequest {
|
|
131
|
+
// Required. The parent DataStore resource name, such as
|
|
132
|
+
// `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.
|
|
133
|
+
string parent = 1 [
|
|
134
|
+
(google.api.field_behavior) = REQUIRED,
|
|
135
|
+
(google.api.resource_reference) = {
|
|
136
|
+
type: "discoveryengine.googleapis.com/DataStore"
|
|
137
|
+
}
|
|
138
|
+
];
|
|
139
|
+
|
|
140
|
+
// Required. URL encoded UserEvent proto with a length limit of 2,000,000
|
|
141
|
+
// characters.
|
|
142
|
+
string user_event = 2 [(google.api.field_behavior) = REQUIRED];
|
|
143
|
+
|
|
144
|
+
// The URL including cgi-parameters but excluding the hash fragment with a
|
|
145
|
+
// length limit of 5,000 characters. This is often more useful than the
|
|
146
|
+
// referer URL, because many browsers only send the domain for third-party
|
|
147
|
+
// requests.
|
|
148
|
+
optional string uri = 3;
|
|
149
|
+
|
|
150
|
+
// The event timestamp in milliseconds. This prevents browser caching of
|
|
151
|
+
// otherwise identical get requests. The name is abbreviated to reduce the
|
|
152
|
+
// payload bytes.
|
|
153
|
+
optional int64 ets = 4;
|
|
154
|
+
}
|
|
@@ -18,6 +18,7 @@ package google.cloud.discoveryengine.v1beta;
|
|
|
18
18
|
|
|
19
19
|
import "google/api/field_behavior.proto";
|
|
20
20
|
import "google/api/resource.proto";
|
|
21
|
+
import "google/cloud/discoveryengine/v1beta/search_service.proto";
|
|
21
22
|
import "google/protobuf/timestamp.proto";
|
|
22
23
|
|
|
23
24
|
option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Beta";
|
|
@@ -75,6 +76,8 @@ message Conversation {
|
|
|
75
76
|
message Reply {
|
|
76
77
|
// Defines reference in reply.
|
|
77
78
|
message Reference {
|
|
79
|
+
option deprecated = true;
|
|
80
|
+
|
|
78
81
|
// URI link reference.
|
|
79
82
|
string uri = 1;
|
|
80
83
|
|
|
@@ -88,11 +91,15 @@ message Reply {
|
|
|
88
91
|
int32 end = 4;
|
|
89
92
|
}
|
|
90
93
|
|
|
94
|
+
// DEPRECATED: use `summary` instead.
|
|
91
95
|
// Text reply.
|
|
92
|
-
string reply = 1;
|
|
96
|
+
string reply = 1 [deprecated = true];
|
|
93
97
|
|
|
94
98
|
// References in the reply.
|
|
95
|
-
repeated Reference references = 2;
|
|
99
|
+
repeated Reference references = 2 [deprecated = true];
|
|
100
|
+
|
|
101
|
+
// Summary based on search results.
|
|
102
|
+
SearchResponse.Summary summary = 3;
|
|
96
103
|
}
|
|
97
104
|
|
|
98
105
|
// Defines context of the conversation
|
package/build/protos/google/cloud/discoveryengine/v1beta/conversational_search_service.proto
CHANGED
|
@@ -162,6 +162,28 @@ message ConverseConversationRequest {
|
|
|
162
162
|
|
|
163
163
|
// Whether to turn on safe search.
|
|
164
164
|
bool safe_search = 6;
|
|
165
|
+
|
|
166
|
+
// The user labels applied to a resource must meet the following requirements:
|
|
167
|
+
//
|
|
168
|
+
// * Each resource can have multiple labels, up to a maximum of 64.
|
|
169
|
+
// * Each label must be a key-value pair.
|
|
170
|
+
// * Keys have a minimum length of 1 character and a maximum length of 63
|
|
171
|
+
// characters and cannot be empty. Values can be empty and have a maximum
|
|
172
|
+
// length of 63 characters.
|
|
173
|
+
// * Keys and values can contain only lowercase letters, numeric characters,
|
|
174
|
+
// underscores, and dashes. All characters must use UTF-8 encoding, and
|
|
175
|
+
// international characters are allowed.
|
|
176
|
+
// * The key portion of a label must be unique. However, you can use the same
|
|
177
|
+
// key with multiple resources.
|
|
178
|
+
// * Keys must start with a lowercase letter or international character.
|
|
179
|
+
//
|
|
180
|
+
// See [Google Cloud
|
|
181
|
+
// Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
|
|
182
|
+
// for more details.
|
|
183
|
+
map<string, string> user_labels = 7;
|
|
184
|
+
|
|
185
|
+
// A specification for configuring the summary returned in the response.
|
|
186
|
+
SearchRequest.ContentSearchSpec.SummarySpec summary_spec = 8;
|
|
165
187
|
}
|
|
166
188
|
|
|
167
189
|
// Response message for
|
|
@@ -174,6 +196,9 @@ message ConverseConversationResponse {
|
|
|
174
196
|
// Updated conversation including the answer.
|
|
175
197
|
Conversation conversation = 2;
|
|
176
198
|
|
|
199
|
+
// Suggested related questions.
|
|
200
|
+
repeated string related_questions = 6;
|
|
201
|
+
|
|
177
202
|
// Search Results.
|
|
178
203
|
repeated SearchResponse.SearchResult search_results = 3;
|
|
179
204
|
}
|
|
@@ -262,6 +262,11 @@ message SearchRequest {
|
|
|
262
262
|
// The condition under which query expansion should occur. Default to
|
|
263
263
|
// [Condition.DISABLED][google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec.Condition.DISABLED].
|
|
264
264
|
Condition condition = 1;
|
|
265
|
+
|
|
266
|
+
// Whether to pin unexpanded results. If this field is set to true,
|
|
267
|
+
// unexpanded products are always at the top of the search results, followed
|
|
268
|
+
// by the expanded results.
|
|
269
|
+
bool pin_unexpanded_results = 2;
|
|
265
270
|
}
|
|
266
271
|
|
|
267
272
|
// The specification for query spell correction.
|
|
@@ -362,6 +367,10 @@ message SearchRequest {
|
|
|
362
367
|
// generating summaries for non-summary seeking queries and return
|
|
363
368
|
// fallback messages instead.
|
|
364
369
|
bool ignore_non_summary_seeking_query = 4;
|
|
370
|
+
|
|
371
|
+
// Language code for Summary. Use language tags defined by
|
|
372
|
+
// [BCP47][https://www.rfc-editor.org/rfc/bcp/bcp47.txt].
|
|
373
|
+
string language_code = 6;
|
|
365
374
|
}
|
|
366
375
|
|
|
367
376
|
// A specification for configuring the extractive content in a search
|
|
@@ -399,10 +408,21 @@ message SearchRequest {
|
|
|
399
408
|
// If the number of matching segments is less than
|
|
400
409
|
// `max_extractive_segment_count`, return all of the segments. Otherwise,
|
|
401
410
|
// return the `max_extractive_segment_count`.
|
|
402
|
-
//
|
|
403
|
-
// Currently one segment is returned for each
|
|
404
|
-
// [SearchResult][google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult].
|
|
405
411
|
int32 max_extractive_segment_count = 2;
|
|
412
|
+
|
|
413
|
+
// Specifies whether to return the confidence score from the extractive
|
|
414
|
+
// segments in each search result. The default value is `false`.
|
|
415
|
+
bool return_extractive_segment_score = 3;
|
|
416
|
+
|
|
417
|
+
// Specifies whether to also include the adjacent from each selected
|
|
418
|
+
// segments.
|
|
419
|
+
// Return at most `num_previous_segments` segments before each selected
|
|
420
|
+
// segments.
|
|
421
|
+
int32 num_previous_segments = 4;
|
|
422
|
+
|
|
423
|
+
// Return at most `num_next_segments` segments after each selected
|
|
424
|
+
// segments.
|
|
425
|
+
int32 num_next_segments = 5;
|
|
406
426
|
}
|
|
407
427
|
|
|
408
428
|
// If `snippetSpec` is not specified, snippets are not included in the
|
|
@@ -418,6 +438,22 @@ message SearchRequest {
|
|
|
418
438
|
ExtractiveContentSpec extractive_content_spec = 3;
|
|
419
439
|
}
|
|
420
440
|
|
|
441
|
+
// The specification that uses customized query embedding vector to do
|
|
442
|
+
// semantic document retrieval.
|
|
443
|
+
message EmbeddingSpec {
|
|
444
|
+
// Embedding vector.
|
|
445
|
+
message EmbeddingVector {
|
|
446
|
+
// Embedding field path in schema.
|
|
447
|
+
string field_path = 1;
|
|
448
|
+
|
|
449
|
+
// Query embedding vector.
|
|
450
|
+
repeated float vector = 2;
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
// The embedding vector used for retrieval. Limit to 1.
|
|
454
|
+
repeated EmbeddingVector embedding_vectors = 1;
|
|
455
|
+
}
|
|
456
|
+
|
|
421
457
|
// Required. The resource name of the Search serving config, such as
|
|
422
458
|
// `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`.
|
|
423
459
|
// This field is used to identify the serving configuration name, set
|
|
@@ -539,6 +575,37 @@ message SearchRequest {
|
|
|
539
575
|
// A specification for configuring the behavior of content search.
|
|
540
576
|
ContentSearchSpec content_search_spec = 24;
|
|
541
577
|
|
|
578
|
+
// Uses the provided embedding to do additional semantic document retrieval.
|
|
579
|
+
// The retrieval is based on the dot product of
|
|
580
|
+
// [SearchRequest.embedding_spec.embedding_vectors.vector][] and the document
|
|
581
|
+
// embedding that is provided in
|
|
582
|
+
// [SearchRequest.embedding_spec.embedding_vectors.field_path][].
|
|
583
|
+
//
|
|
584
|
+
// If [SearchRequest.embedding_spec.embedding_vectors.field_path][] is not
|
|
585
|
+
// provided, it will use [ServingConfig.embedding_config.field_paths][].
|
|
586
|
+
EmbeddingSpec embedding_spec = 23;
|
|
587
|
+
|
|
588
|
+
// The ranking expression controls the customized ranking on retrieval
|
|
589
|
+
// documents. This overrides [ServingConfig.ranking_expression][].
|
|
590
|
+
// The ranking expression is a single function or multiple functions that are
|
|
591
|
+
// joint by "+".
|
|
592
|
+
// * ranking_expression = function, { " + ", function };
|
|
593
|
+
// Supported functions:
|
|
594
|
+
// * double * relevance_score
|
|
595
|
+
// * double * dotProduct(embedding_field_path)
|
|
596
|
+
// Function variables:
|
|
597
|
+
// `relevance_score`: pre-defined keywords, used for measure relevance
|
|
598
|
+
// between query and document.
|
|
599
|
+
// `embedding_field_path`: the document embedding field
|
|
600
|
+
// used with query embedding vector.
|
|
601
|
+
// `dotProduct`: embedding function between embedding_field_path and query
|
|
602
|
+
// embedding vector.
|
|
603
|
+
//
|
|
604
|
+
// Example ranking expression:
|
|
605
|
+
// If document has an embedding field doc_embedding, the ranking expression
|
|
606
|
+
// could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`.
|
|
607
|
+
string ranking_expression = 26;
|
|
608
|
+
|
|
542
609
|
// Whether to turn on safe search. This is only supported for
|
|
543
610
|
// website search.
|
|
544
611
|
bool safe_search = 20;
|
|
@@ -576,6 +643,9 @@ message SearchResponse {
|
|
|
576
643
|
// The document data snippet in the search response. Only fields that are
|
|
577
644
|
// marked as retrievable are populated.
|
|
578
645
|
Document document = 2;
|
|
646
|
+
|
|
647
|
+
// Google provided available scores.
|
|
648
|
+
map<string, DoubleList> model_scores = 4;
|
|
579
649
|
}
|
|
580
650
|
|
|
581
651
|
// A facet result.
|
|
@@ -629,6 +699,17 @@ message SearchResponse {
|
|
|
629
699
|
|
|
630
700
|
// Summary of the top N search result specified by the summary spec.
|
|
631
701
|
message Summary {
|
|
702
|
+
// Safety Attribute categories and their associated confidence scores.
|
|
703
|
+
message SafetyAttributes {
|
|
704
|
+
// The display names of Safety Attribute categories associated with the
|
|
705
|
+
// generated content. Order matches the Scores.
|
|
706
|
+
repeated string categories = 1;
|
|
707
|
+
|
|
708
|
+
// The confidence scores of the each category, higher
|
|
709
|
+
// value means higher confidence. Order matches the Categories.
|
|
710
|
+
repeated float scores = 2;
|
|
711
|
+
}
|
|
712
|
+
|
|
632
713
|
// An Enum for summary-skipped reasons.
|
|
633
714
|
enum SummarySkippedReason {
|
|
634
715
|
// Default value. The summary skipped reason is not specified.
|
|
@@ -654,6 +735,17 @@ message SearchResponse {
|
|
|
654
735
|
// For example, the data store contains facts about company A but the
|
|
655
736
|
// user query is asking questions about company B.
|
|
656
737
|
OUT_OF_DOMAIN_QUERY_IGNORED = 3;
|
|
738
|
+
|
|
739
|
+
// The potential policy violation case.
|
|
740
|
+
//
|
|
741
|
+
// Google skips the summary if there is a potential policy violation
|
|
742
|
+
// detected. This includes content that may be violent or toxic.
|
|
743
|
+
POTENTIAL_POLICY_VIOLATION = 4;
|
|
744
|
+
|
|
745
|
+
// The LLM addon not enabled case.
|
|
746
|
+
//
|
|
747
|
+
// Google skips the summary if the LLM addon is not enabled.
|
|
748
|
+
LLM_ADDON_NOT_ENABLED = 5;
|
|
657
749
|
}
|
|
658
750
|
|
|
659
751
|
// The summary content.
|
|
@@ -662,6 +754,23 @@ message SearchResponse {
|
|
|
662
754
|
// Additional summary-skipped reasons. This provides the reason for ignored
|
|
663
755
|
// cases. If nothing is skipped, this field is not set.
|
|
664
756
|
repeated SummarySkippedReason summary_skipped_reasons = 2;
|
|
757
|
+
|
|
758
|
+
// A collection of Safety Attribute categories and their associated
|
|
759
|
+
// confidence scores.
|
|
760
|
+
SafetyAttributes safety_attributes = 3;
|
|
761
|
+
}
|
|
762
|
+
|
|
763
|
+
// Information describing query expansion including whether expansion has
|
|
764
|
+
// occurred.
|
|
765
|
+
message QueryExpansionInfo {
|
|
766
|
+
// Bool describing whether query expansion has occurred.
|
|
767
|
+
bool expanded_query = 1;
|
|
768
|
+
|
|
769
|
+
// Number of pinned results. This field will only be set when expansion
|
|
770
|
+
// happens and
|
|
771
|
+
// [SearchRequest.QueryExpansionSpec.pin_unexpanded_results][google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec.pin_unexpanded_results]
|
|
772
|
+
// is set to true.
|
|
773
|
+
int64 pinned_result_count = 2;
|
|
665
774
|
}
|
|
666
775
|
|
|
667
776
|
// A list of matched documents. The order represents the ranking.
|
|
@@ -714,4 +823,7 @@ message SearchResponse {
|
|
|
714
823
|
|
|
715
824
|
// Controls applied as part of the Control service.
|
|
716
825
|
repeated string applied_controls = 10;
|
|
826
|
+
|
|
827
|
+
// Query expansion information for the returned results.
|
|
828
|
+
QueryExpansionInfo query_expansion_info = 14;
|
|
717
829
|
}
|
|
@@ -410,6 +410,10 @@ message DocumentInfo {
|
|
|
410
410
|
string name = 2 [(google.api.resource_reference) = {
|
|
411
411
|
type: "discoveryengine.googleapis.com/Document"
|
|
412
412
|
}];
|
|
413
|
+
|
|
414
|
+
// The [Document][google.cloud.discoveryengine.v1beta.Document] URI - only
|
|
415
|
+
// allowed for website data stores.
|
|
416
|
+
string uri = 6;
|
|
413
417
|
}
|
|
414
418
|
|
|
415
419
|
// Quantity of the Document associated with the user event. Defaults to 1.
|