@google-cloud/discoveryengine 1.0.0 → 1.1.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 +13 -0
- package/README.md +7 -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/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 +10140 -6536
- package/build/protos/protos.js +26499 -17277
- package/build/protos/protos.json +2311 -1440
- package/build/src/index.d.ts +4 -1
- package/build/src/index.js +4 -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/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 +3 -3
@@ -66,7 +66,7 @@ message UserEvent {
|
|
66
66
|
// quality.
|
67
67
|
//
|
68
68
|
// The field must be a UTF-8 encoded string with a length limit of 128
|
69
|
-
// characters. Otherwise, an INVALID_ARGUMENT error is returned.
|
69
|
+
// characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
|
70
70
|
//
|
71
71
|
// The field should not contain PII or user-data. We recommend to use Google
|
72
72
|
// Analytics [Client
|
@@ -119,20 +119,17 @@ message UserEvent {
|
|
119
119
|
//
|
120
120
|
// The value must be one of:
|
121
121
|
//
|
122
|
-
// * [
|
122
|
+
// * [RecommendResponse.attribution_token][] for events that are the result of
|
123
123
|
// [RecommendationService.Recommend][].
|
124
124
|
// * [SearchResponse.attribution_token][google.cloud.discoveryengine.v1.SearchResponse.attribution_token] for events that are the result of
|
125
125
|
// [SearchService.Search][google.cloud.discoveryengine.v1.SearchService.Search].
|
126
|
-
// * [CompleteQueryResponse.attribution_token][] for events that are the
|
127
|
-
// result of
|
128
|
-
// [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1.CompletionService.CompleteQuery].
|
129
126
|
//
|
130
127
|
// This token enables us to accurately attribute page view or conversion
|
131
128
|
// completion back to the event and the particular predict response containing
|
132
129
|
// this clicked/purchased product. If user clicks on product K in the
|
133
|
-
// recommendation results, pass [
|
134
|
-
// parameter to product K's page. When recording events on product K's
|
135
|
-
// log the [
|
130
|
+
// recommendation results, pass [RecommendResponse.attribution_token][] as a
|
131
|
+
// URL parameter to product K's page. When recording events on product K's
|
132
|
+
// page, log the [RecommendResponse.attribution_token][] to this field.
|
136
133
|
string attribution_token = 8;
|
137
134
|
|
138
135
|
// The filter syntax consists of an expression language for constructing a
|
@@ -140,8 +137,9 @@ message UserEvent {
|
|
140
137
|
//
|
141
138
|
// One example is for `search` events, the associated
|
142
139
|
// [SearchRequest][google.cloud.discoveryengine.v1.SearchRequest] may contain
|
143
|
-
// a filter expression in
|
144
|
-
//
|
140
|
+
// a filter expression in
|
141
|
+
// [SearchRequest.filter][google.cloud.discoveryengine.v1.SearchRequest.filter]
|
142
|
+
// conforming to https://google.aip.dev/160#filtering.
|
145
143
|
//
|
146
144
|
// Similarly, for `view-item-list` events that are generated from a
|
147
145
|
// [RecommendationService.RecommendRequest][], this field may be populated
|
@@ -149,10 +147,11 @@ message UserEvent {
|
|
149
147
|
// to https://google.aip.dev/160#filtering.
|
150
148
|
//
|
151
149
|
// The value must be a UTF-8 encoded string with a length limit of 1,000
|
152
|
-
// characters. Otherwise, an INVALID_ARGUMENT error is returned.
|
150
|
+
// characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
|
153
151
|
string filter = 9;
|
154
152
|
|
155
|
-
// List of
|
153
|
+
// List of [Document][google.cloud.discoveryengine.v1.Document]s associated
|
154
|
+
// with this user event.
|
156
155
|
//
|
157
156
|
// This field is optional except for the following event types:
|
158
157
|
//
|
@@ -174,12 +173,14 @@ message UserEvent {
|
|
174
173
|
// Panel metadata associated with this user event.
|
175
174
|
PanelInfo panel = 11;
|
176
175
|
|
177
|
-
// Search
|
176
|
+
// [SearchService.Search][google.cloud.discoveryengine.v1.SearchService.Search]
|
177
|
+
// details related to the event.
|
178
178
|
//
|
179
179
|
// This field should be set for `search` event.
|
180
180
|
SearchInfo search_info = 12;
|
181
181
|
|
182
|
-
// CompleteQuery
|
182
|
+
// [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1.CompletionService.CompleteQuery]
|
183
|
+
// details related to the event.
|
183
184
|
//
|
184
185
|
// This field should be set for `search` event when autocomplete function is
|
185
186
|
// enabled and the user clicks a suggestion for search.
|
@@ -219,7 +220,7 @@ message UserEvent {
|
|
219
220
|
// * For number attributes, at most 400 values are allowed.
|
220
221
|
//
|
221
222
|
// For product recommendations, an example of extra user information is
|
222
|
-
// `
|
223
|
+
// `traffic_channel`, which is how a user arrives at the site. Users can
|
223
224
|
// arrive
|
224
225
|
// at the site by coming to the site directly, coming through Google
|
225
226
|
// search, or in other ways.
|
@@ -235,7 +236,7 @@ message PageInfo {
|
|
235
236
|
//
|
236
237
|
// This should be kept the same for all user events triggered from the same
|
237
238
|
// pageview. For example, an item detail page view could trigger multiple
|
238
|
-
// events as the user is browsing the page. The `
|
239
|
+
// events as the user is browsing the page. The `pageview_id` property should
|
239
240
|
// be kept the same for all these events so that they can be grouped together
|
240
241
|
// properly.
|
241
242
|
//
|
@@ -251,10 +252,10 @@ message PageInfo {
|
|
251
252
|
//
|
252
253
|
// Category pages include special pages such as sales or promotions. For
|
253
254
|
// instance, a special sale page may have the category hierarchy:
|
254
|
-
// "pageCategory" : "Sales > 2017 Black Friday Deals"
|
255
|
+
// `"pageCategory" : "Sales > 2017 Black Friday Deals"`.
|
255
256
|
//
|
256
257
|
// Required for `view-category-page` events. Other event types should not set
|
257
|
-
// this field. Otherwise, an INVALID_ARGUMENT error is returned.
|
258
|
+
// this field. Otherwise, an `INVALID_ARGUMENT` error is returned.
|
258
259
|
string page_category = 2;
|
259
260
|
|
260
261
|
// Complete URL (window.location.href) of the user's current page.
|
@@ -281,24 +282,26 @@ message SearchInfo {
|
|
281
282
|
// for definition.
|
282
283
|
//
|
283
284
|
// The value must be a UTF-8 encoded string with a length limit of 5,000
|
284
|
-
// characters. Otherwise, an INVALID_ARGUMENT error is returned.
|
285
|
+
// characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
|
285
286
|
//
|
286
287
|
// At least one of
|
287
288
|
// [search_query][google.cloud.discoveryengine.v1.SearchInfo.search_query] or
|
288
289
|
// [PageInfo.page_category][google.cloud.discoveryengine.v1.PageInfo.page_category]
|
289
290
|
// is required for `search` events. Other event types should not set this
|
290
|
-
// field. Otherwise, an INVALID_ARGUMENT error is returned.
|
291
|
+
// field. Otherwise, an `INVALID_ARGUMENT` error is returned.
|
291
292
|
string search_query = 1;
|
292
293
|
|
293
294
|
// The order in which products are returned, if applicable.
|
294
295
|
//
|
295
|
-
// See
|
296
|
+
// See
|
297
|
+
// [SearchRequest.order_by][google.cloud.discoveryengine.v1.SearchRequest.order_by]
|
298
|
+
// for definition and syntax.
|
296
299
|
//
|
297
300
|
// The value must be a UTF-8 encoded string with a length limit of 1,000
|
298
|
-
// characters. Otherwise, an INVALID_ARGUMENT error is returned.
|
301
|
+
// characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
|
299
302
|
//
|
300
303
|
// This can only be set for `search` events. Other event types should not set
|
301
|
-
// this field. Otherwise, an INVALID_ARGUMENT error is returned.
|
304
|
+
// this field. Otherwise, an `INVALID_ARGUMENT` error is returned.
|
302
305
|
string order_by = 2;
|
303
306
|
|
304
307
|
// An integer that specifies the current offset for pagination (the 0-indexed
|
@@ -308,20 +311,22 @@ message SearchInfo {
|
|
308
311
|
// [SearchRequest.offset][google.cloud.discoveryengine.v1.SearchRequest.offset]
|
309
312
|
// for definition.
|
310
313
|
//
|
311
|
-
// If this field is negative, an INVALID_ARGUMENT is returned.
|
314
|
+
// If this field is negative, an `INVALID_ARGUMENT` is returned.
|
312
315
|
//
|
313
316
|
// This can only be set for `search` events. Other event types should not set
|
314
|
-
// this field. Otherwise, an INVALID_ARGUMENT error is returned.
|
317
|
+
// this field. Otherwise, an `INVALID_ARGUMENT` error is returned.
|
315
318
|
optional int32 offset = 3;
|
316
319
|
}
|
317
320
|
|
318
321
|
// Detailed completion information including completion attribution token and
|
319
322
|
// clicked completion info.
|
320
323
|
message CompletionInfo {
|
321
|
-
// End user selected
|
324
|
+
// End user selected
|
325
|
+
// [CompleteQueryResponse.QuerySuggestion.suggestion][google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion.suggestion].
|
322
326
|
string selected_suggestion = 1;
|
323
327
|
|
324
|
-
// End user selected
|
328
|
+
// End user selected
|
329
|
+
// [CompleteQueryResponse.QuerySuggestion.suggestion][google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion.suggestion]
|
325
330
|
// position, starting from 0.
|
326
331
|
int32 selected_position = 2;
|
327
332
|
}
|
@@ -389,17 +394,19 @@ message DocumentInfo {
|
|
389
394
|
// `{location}`, `{collection_id}`, `{data_store_id}`, and
|
390
395
|
// `{branch_id}` are used when annotating with the stored Document.
|
391
396
|
oneof document_descriptor {
|
392
|
-
//
|
393
|
-
string id = 1
|
397
|
+
// The [Document][google.cloud.discoveryengine.v1.Document] resource ID.
|
398
|
+
string id = 1;
|
394
399
|
|
395
|
-
//
|
400
|
+
// The [Document][google.cloud.discoveryengine.v1.Document] resource full
|
401
|
+
// name, of the form:
|
396
402
|
// `projects/{project_id}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/branches/{branch_id}/documents/{document_id}`
|
397
|
-
string name = 2 [
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
+
string name = 2 [(google.api.resource_reference) = {
|
404
|
+
type: "discoveryengine.googleapis.com/Document"
|
405
|
+
}];
|
406
|
+
|
407
|
+
// The [Document][google.cloud.discoveryengine.v1.Document] URI - only
|
408
|
+
// allowed for website data stores.
|
409
|
+
string uri = 6;
|
403
410
|
}
|
404
411
|
|
405
412
|
// Quantity of the Document associated with the user event. Defaults to 1.
|
@@ -443,11 +450,13 @@ message PanelInfo {
|
|
443
450
|
message MediaInfo {
|
444
451
|
// The media progress time in seconds, if applicable.
|
445
452
|
// For example, if the end user has finished 90 seconds of a playback video,
|
446
|
-
// then
|
447
|
-
//
|
453
|
+
// then
|
454
|
+
// [MediaInfo.media_progress_duration.seconds][google.protobuf.Duration.seconds]
|
455
|
+
// should be set to 90.
|
448
456
|
google.protobuf.Duration media_progress_duration = 1;
|
449
457
|
|
450
|
-
// Media progress should be computed using only the
|
458
|
+
// Media progress should be computed using only the
|
459
|
+
// [media_progress_duration][google.cloud.discoveryengine.v1.MediaInfo.media_progress_duration]
|
451
460
|
// relative to the media total length.
|
452
461
|
//
|
453
462
|
// This value must be between `[0, 1.0]` inclusive.
|
@@ -53,7 +53,7 @@ service UserEventService {
|
|
53
53
|
}
|
54
54
|
|
55
55
|
// Writes a single user event from the browser. This uses a GET request to
|
56
|
-
// due to browser restriction of POST-ing to a
|
56
|
+
// due to browser restriction of POST-ing to a third-party domain.
|
57
57
|
//
|
58
58
|
// This method is used only by the Discovery Engine API JavaScript pixel and
|
59
59
|
// Google Tag Manager. Users should not call this method directly.
|
@@ -122,7 +122,7 @@ message CollectUserEventRequest {
|
|
122
122
|
|
123
123
|
// The URL including cgi-parameters but excluding the hash fragment with a
|
124
124
|
// length limit of 5,000 characters. This is often more useful than the
|
125
|
-
// referer URL, because many browsers only send the domain for
|
125
|
+
// referer URL, because many browsers only send the domain for third-party
|
126
126
|
// requests.
|
127
127
|
optional string uri = 3;
|
128
128
|
|
@@ -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.
|