@google-cloud/discoveryengine 1.5.0 → 1.7.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 +14 -0
- package/README.md +24 -0
- package/build/protos/google/cloud/discoveryengine/v1/common.proto +13 -1
- package/build/protos/google/cloud/discoveryengine/v1/conversational_search_service.proto +5 -0
- package/build/protos/google/cloud/discoveryengine/v1/data_store.proto +17 -0
- package/build/protos/google/cloud/discoveryengine/v1/document.proto +9 -0
- package/build/protos/google/cloud/discoveryengine/v1/document_service.proto +6 -0
- package/build/protos/google/cloud/discoveryengine/v1/engine.proto +2 -2
- package/build/protos/google/cloud/discoveryengine/v1/import_config.proto +284 -22
- package/build/protos/google/cloud/discoveryengine/v1/purge_config.proto +3 -0
- package/build/protos/google/cloud/discoveryengine/v1/recommendation_service.proto +228 -0
- package/build/protos/google/cloud/discoveryengine/v1/search_service.proto +125 -21
- package/build/protos/google/cloud/discoveryengine/v1/user_event.proto +16 -11
- package/build/protos/google/cloud/discoveryengine/v1alpha/answer.proto +328 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/chunk.proto +6 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/common.proto +1 -1
- package/build/protos/google/cloud/discoveryengine/v1alpha/conversational_search_service.proto +574 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/document_processing_config.proto +3 -6
- package/build/protos/google/cloud/discoveryengine/v1alpha/engine.proto +2 -2
- package/build/protos/google/cloud/discoveryengine/v1alpha/grounded_generation_service.proto +120 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/grounding.proto +55 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/import_config.proto +7 -39
- package/build/protos/google/cloud/discoveryengine/v1alpha/project.proto +102 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/project_service.proto +171 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/schema.proto +21 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/search_service.proto +7 -3
- package/build/protos/google/cloud/discoveryengine/v1alpha/search_tuning_service.proto +4 -1
- package/build/protos/google/cloud/discoveryengine/v1alpha/session.proto +94 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/user_event.proto +1 -1
- package/build/protos/google/cloud/discoveryengine/v1beta/answer.proto +328 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/common.proto +30 -1
- package/build/protos/google/cloud/discoveryengine/v1beta/conversational_search_service.proto +559 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/document_processing_config.proto +3 -6
- package/build/protos/google/cloud/discoveryengine/v1beta/document_service.proto +6 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/engine.proto +2 -2
- package/build/protos/google/cloud/discoveryengine/v1beta/engine_service.proto +93 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/grounded_generation_service.proto +120 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/grounding.proto +55 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/import_config.proto +283 -24
- package/build/protos/google/cloud/discoveryengine/v1beta/rank_service.proto +115 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/search_service.proto +142 -22
- package/build/protos/google/cloud/discoveryengine/v1beta/search_tuning_service.proto +7 -1
- package/build/protos/google/cloud/discoveryengine/v1beta/session.proto +94 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/user_event.proto +1 -1
- package/build/protos/protos.d.ts +41126 -24558
- package/build/protos/protos.js +134286 -93661
- package/build/protos/protos.json +7598 -3744
- package/build/src/index.d.ts +4 -1
- package/build/src/index.js +4 -1
- package/build/src/v1/conversational_search_service_client.d.ts +4 -0
- package/build/src/v1/document_service_client.d.ts +47 -19
- package/build/src/v1/index.d.ts +1 -0
- package/build/src/v1/index.js +3 -1
- package/build/src/v1/recommendation_service_client.d.ts +1087 -0
- package/build/src/v1/recommendation_service_client.js +1432 -0
- package/build/src/v1/recommendation_service_client_config.json +43 -0
- package/build/src/v1/search_service_client.d.ts +27 -9
- package/build/src/v1/search_service_client.js +18 -6
- package/build/src/v1/search_service_client_config.json +5 -5
- package/build/src/v1alpha/acl_config_service_client.d.ts +330 -0
- package/build/src/v1alpha/acl_config_service_client.js +454 -0
- package/build/src/v1alpha/chunk_service_client.d.ts +330 -0
- package/build/src/v1alpha/chunk_service_client.js +454 -0
- package/build/src/v1alpha/completion_service_client.d.ts +330 -0
- package/build/src/v1alpha/completion_service_client.js +454 -0
- package/build/src/v1alpha/conversational_search_service_client.d.ts +674 -0
- package/build/src/v1alpha/conversational_search_service_client.js +724 -0
- package/build/src/v1alpha/conversational_search_service_client_config.json +35 -0
- package/build/src/v1alpha/data_store_service_client.d.ts +330 -0
- package/build/src/v1alpha/data_store_service_client.js +454 -0
- package/build/src/v1alpha/document_service_client.d.ts +330 -0
- package/build/src/v1alpha/document_service_client.js +454 -0
- package/build/src/v1alpha/engine_service_client.d.ts +330 -0
- package/build/src/v1alpha/engine_service_client.js +454 -0
- package/build/src/v1alpha/estimate_billing_service_client.d.ts +330 -0
- package/build/src/v1alpha/estimate_billing_service_client.js +454 -0
- package/build/src/v1alpha/grounded_generation_service_client.d.ts +1574 -0
- package/build/src/v1alpha/grounded_generation_service_client.js +2248 -0
- package/build/src/v1alpha/grounded_generation_service_client_config.json +43 -0
- package/build/src/v1alpha/index.d.ts +2 -0
- package/build/src/v1alpha/index.js +5 -1
- package/build/src/v1alpha/project_service_client.d.ts +1756 -0
- package/build/src/v1alpha/project_service_client.js +2500 -0
- package/build/src/v1alpha/project_service_client_config.json +38 -0
- package/build/src/v1alpha/rank_service_client.d.ts +330 -0
- package/build/src/v1alpha/rank_service_client.js +454 -0
- package/build/src/v1alpha/rank_service_client_config.json +15 -2
- package/build/src/v1alpha/recommendation_service_client.d.ts +330 -0
- package/build/src/v1alpha/recommendation_service_client.js +454 -0
- package/build/src/v1alpha/schema_service_client.d.ts +330 -0
- package/build/src/v1alpha/schema_service_client.js +454 -0
- package/build/src/v1alpha/search_service_client.d.ts +330 -0
- package/build/src/v1alpha/search_service_client.js +454 -0
- package/build/src/v1alpha/search_service_client_config.json +5 -5
- package/build/src/v1alpha/search_tuning_service_client.d.ts +330 -0
- package/build/src/v1alpha/search_tuning_service_client.js +454 -0
- package/build/src/v1alpha/serving_config_service_client.d.ts +315 -0
- package/build/src/v1alpha/serving_config_service_client.js +432 -0
- package/build/src/v1alpha/site_search_engine_service_client.d.ts +330 -0
- package/build/src/v1alpha/site_search_engine_service_client.js +454 -0
- package/build/src/v1alpha/user_event_service_client.d.ts +330 -0
- package/build/src/v1alpha/user_event_service_client.js +454 -0
- package/build/src/v1beta/completion_service_client.d.ts +315 -0
- package/build/src/v1beta/completion_service_client.js +432 -0
- package/build/src/v1beta/conversational_search_service_client.d.ts +659 -0
- package/build/src/v1beta/conversational_search_service_client.js +702 -0
- package/build/src/v1beta/conversational_search_service_client_config.json +35 -0
- package/build/src/v1beta/data_store_service_client.d.ts +315 -0
- package/build/src/v1beta/data_store_service_client.js +432 -0
- package/build/src/v1beta/document_service_client.d.ts +361 -21
- package/build/src/v1beta/document_service_client.js +432 -0
- package/build/src/v1beta/engine_service_client.d.ts +410 -0
- package/build/src/v1beta/engine_service_client.js +518 -0
- package/build/src/v1beta/engine_service_client_config.json +12 -0
- package/build/src/v1beta/grounded_generation_service_client.d.ts +1406 -0
- package/build/src/v1beta/grounded_generation_service_client.js +2014 -0
- package/build/src/v1beta/grounded_generation_service_client_config.json +43 -0
- package/build/src/v1beta/index.d.ts +2 -0
- package/build/src/v1beta/index.js +5 -1
- package/build/src/v1beta/rank_service_client.d.ts +1416 -0
- package/build/src/v1beta/rank_service_client.js +2015 -0
- package/build/src/v1beta/rank_service_client_config.json +43 -0
- package/build/src/v1beta/recommendation_service_client.d.ts +315 -0
- package/build/src/v1beta/recommendation_service_client.js +432 -0
- package/build/src/v1beta/schema_service_client.d.ts +315 -0
- package/build/src/v1beta/schema_service_client.js +432 -0
- package/build/src/v1beta/search_service_client.d.ts +342 -12
- package/build/src/v1beta/search_service_client.js +450 -8
- package/build/src/v1beta/search_service_client_config.json +5 -5
- package/build/src/v1beta/search_tuning_service_client.d.ts +315 -0
- package/build/src/v1beta/search_tuning_service_client.js +432 -0
- package/build/src/v1beta/serving_config_service_client.d.ts +315 -0
- package/build/src/v1beta/serving_config_service_client.js +432 -0
- package/build/src/v1beta/site_search_engine_service_client.d.ts +315 -0
- package/build/src/v1beta/site_search_engine_service_client.js +432 -0
- package/build/src/v1beta/user_event_service_client.d.ts +315 -0
- package/build/src/v1beta/user_event_service_client.js +432 -0
- package/package.json +1 -1
@@ -0,0 +1,115 @@
|
|
1
|
+
// Copyright 2022 Google LLC
|
2
|
+
//
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
// you may not use this file except in compliance with the License.
|
5
|
+
// You may obtain a copy of the License at
|
6
|
+
//
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
//
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
// See the License for the specific language governing permissions and
|
13
|
+
// limitations under the License.
|
14
|
+
|
15
|
+
syntax = "proto3";
|
16
|
+
|
17
|
+
package google.cloud.discoveryengine.v1beta;
|
18
|
+
|
19
|
+
import "google/api/annotations.proto";
|
20
|
+
import "google/api/client.proto";
|
21
|
+
import "google/api/field_behavior.proto";
|
22
|
+
import "google/api/resource.proto";
|
23
|
+
|
24
|
+
option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Beta";
|
25
|
+
option go_package = "cloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;discoveryenginepb";
|
26
|
+
option java_multiple_files = true;
|
27
|
+
option java_outer_classname = "RankServiceProto";
|
28
|
+
option java_package = "com.google.cloud.discoveryengine.v1beta";
|
29
|
+
option objc_class_prefix = "DISCOVERYENGINE";
|
30
|
+
option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1beta";
|
31
|
+
option ruby_package = "Google::Cloud::DiscoveryEngine::V1beta";
|
32
|
+
|
33
|
+
// Service for ranking text records.
|
34
|
+
service RankService {
|
35
|
+
option (google.api.default_host) = "discoveryengine.googleapis.com";
|
36
|
+
option (google.api.oauth_scopes) =
|
37
|
+
"https://www.googleapis.com/auth/cloud-platform";
|
38
|
+
|
39
|
+
// Ranks a list of text records based on the given input query.
|
40
|
+
rpc Rank(RankRequest) returns (RankResponse) {
|
41
|
+
option (google.api.http) = {
|
42
|
+
post: "/v1beta/{ranking_config=projects/*/locations/*/rankingConfigs/*}:rank"
|
43
|
+
body: "*"
|
44
|
+
};
|
45
|
+
}
|
46
|
+
}
|
47
|
+
|
48
|
+
// Record message for
|
49
|
+
// [RankService.Rank][google.cloud.discoveryengine.v1beta.RankService.Rank]
|
50
|
+
// method.
|
51
|
+
message RankingRecord {
|
52
|
+
// The unique ID to represent the record.
|
53
|
+
string id = 1;
|
54
|
+
|
55
|
+
// The title of the record. Empty by default.
|
56
|
+
// At least one of
|
57
|
+
// [title][google.cloud.discoveryengine.v1beta.RankingRecord.title] or
|
58
|
+
// [content][google.cloud.discoveryengine.v1beta.RankingRecord.content] should
|
59
|
+
// be set otherwise an INVALID_ARGUMENT error is thrown.
|
60
|
+
string title = 2;
|
61
|
+
|
62
|
+
// The content of the record. Empty by default.
|
63
|
+
// At least one of
|
64
|
+
// [title][google.cloud.discoveryengine.v1beta.RankingRecord.title] or
|
65
|
+
// [content][google.cloud.discoveryengine.v1beta.RankingRecord.content] should
|
66
|
+
// be set otherwise an INVALID_ARGUMENT error is thrown.
|
67
|
+
string content = 3;
|
68
|
+
|
69
|
+
// The score of this record based on the given query and selected model.
|
70
|
+
float score = 4;
|
71
|
+
}
|
72
|
+
|
73
|
+
// Request message for
|
74
|
+
// [RankService.Rank][google.cloud.discoveryengine.v1beta.RankService.Rank]
|
75
|
+
// method.
|
76
|
+
message RankRequest {
|
77
|
+
// Required. The resource name of the rank service config, such as
|
78
|
+
// `projects/{project_num}/locations/{location_id}/rankingConfigs/default_ranking_config`.
|
79
|
+
string ranking_config = 1 [
|
80
|
+
(google.api.field_behavior) = REQUIRED,
|
81
|
+
(google.api.resource_reference) = {
|
82
|
+
type: "discoveryengine.googleapis.com/RankingConfig"
|
83
|
+
}
|
84
|
+
];
|
85
|
+
|
86
|
+
// The identifier of the model to use. It is one of:
|
87
|
+
//
|
88
|
+
// * `semantic-ranker-512@latest`: Semantic ranking model with maxiumn input
|
89
|
+
// token size 512.
|
90
|
+
//
|
91
|
+
// It is set to `semantic-ranker-512@latest` by default if unspecified.
|
92
|
+
string model = 2;
|
93
|
+
|
94
|
+
// The number of results to return. If this is unset or no bigger than zero,
|
95
|
+
// returns all results.
|
96
|
+
int32 top_n = 3;
|
97
|
+
|
98
|
+
// The query to use.
|
99
|
+
string query = 4;
|
100
|
+
|
101
|
+
// Required. A list of records to rank. At most 200 records to rank.
|
102
|
+
repeated RankingRecord records = 5 [(google.api.field_behavior) = REQUIRED];
|
103
|
+
|
104
|
+
// If true, the response will contain only record ID and score. By default, it
|
105
|
+
// is false, the response will contain record details.
|
106
|
+
bool ignore_record_details_in_response = 6;
|
107
|
+
}
|
108
|
+
|
109
|
+
// Response message for
|
110
|
+
// [RankService.Rank][google.cloud.discoveryengine.v1beta.RankService.Rank]
|
111
|
+
// method.
|
112
|
+
message RankResponse {
|
113
|
+
// A list of records sorted by descending score.
|
114
|
+
repeated RankingRecord records = 5;
|
115
|
+
}
|
@@ -217,6 +217,80 @@ message SearchRequest {
|
|
217
217
|
message BoostSpec {
|
218
218
|
// Boost applies to documents which match a condition.
|
219
219
|
message ConditionBoostSpec {
|
220
|
+
// Specification for custom ranking based on customer specified attribute
|
221
|
+
// value. It provides more controls for customized ranking than the simple
|
222
|
+
// (condition, boost) combination above.
|
223
|
+
message BoostControlSpec {
|
224
|
+
// The control points used to define the curve. The curve defined
|
225
|
+
// through these control points can only be monotonically increasing
|
226
|
+
// or decreasing(constant values are acceptable).
|
227
|
+
message ControlPoint {
|
228
|
+
// Can be one of:
|
229
|
+
// 1. The numerical field value.
|
230
|
+
// 2. The duration spec for freshness:
|
231
|
+
// The value must be formatted as an XSD `dayTimeDuration` value (a
|
232
|
+
// restricted subset of an ISO 8601 duration value). The pattern for
|
233
|
+
// this is: `[nD][T[nH][nM][nS]]`.
|
234
|
+
string attribute_value = 1;
|
235
|
+
|
236
|
+
// The value between -1 to 1 by which to boost the score if the
|
237
|
+
// attribute_value evaluates to the value specified above.
|
238
|
+
float boost_amount = 2;
|
239
|
+
}
|
240
|
+
|
241
|
+
// The attribute(or function) for which the custom ranking is to be
|
242
|
+
// applied.
|
243
|
+
enum AttributeType {
|
244
|
+
// Unspecified AttributeType.
|
245
|
+
ATTRIBUTE_TYPE_UNSPECIFIED = 0;
|
246
|
+
|
247
|
+
// The value of the numerical field will be used to dynamically update
|
248
|
+
// the boost amount. In this case, the attribute_value (the x value)
|
249
|
+
// of the control point will be the actual value of the numerical
|
250
|
+
// field for which the boost_amount is specified.
|
251
|
+
NUMERICAL = 1;
|
252
|
+
|
253
|
+
// For the freshness use case the attribute value will be the duration
|
254
|
+
// between the current time and the date in the datetime field
|
255
|
+
// specified. The value must be formatted as an XSD `dayTimeDuration`
|
256
|
+
// value (a restricted subset of an ISO 8601 duration value). The
|
257
|
+
// pattern for this is: `[nD][T[nH][nM][nS]]`.
|
258
|
+
// E.g. `5D`, `3DT12H30M`, `T24H`.
|
259
|
+
FRESHNESS = 2;
|
260
|
+
}
|
261
|
+
|
262
|
+
// The interpolation type to be applied. Default will be linear
|
263
|
+
// (Piecewise Linear).
|
264
|
+
enum InterpolationType {
|
265
|
+
// Interpolation type is unspecified. In this case, it defaults to
|
266
|
+
// Linear.
|
267
|
+
INTERPOLATION_TYPE_UNSPECIFIED = 0;
|
268
|
+
|
269
|
+
// Piecewise linear interpolation will be applied.
|
270
|
+
LINEAR = 1;
|
271
|
+
}
|
272
|
+
|
273
|
+
// The name of the field whose value will be used to determine the
|
274
|
+
// boost amount.
|
275
|
+
string field_name = 1;
|
276
|
+
|
277
|
+
// The attribute type to be used to determine the boost amount. The
|
278
|
+
// attribute value can be derived from the field value of the specified
|
279
|
+
// field_name. In the case of numerical it is straightforward i.e.
|
280
|
+
// attribute_value = numerical_field_value. In the case of freshness
|
281
|
+
// however, attribute_value = (time.now() - datetime_field_value).
|
282
|
+
AttributeType attribute_type = 2;
|
283
|
+
|
284
|
+
// The interpolation type to be applied to connect the control points
|
285
|
+
// listed below.
|
286
|
+
InterpolationType interpolation_type = 3;
|
287
|
+
|
288
|
+
// The control points used to define the curve. The monotonic function
|
289
|
+
// (defined through the interpolation_type above) passes through the
|
290
|
+
// control points listed here.
|
291
|
+
repeated ControlPoint control_points = 4;
|
292
|
+
}
|
293
|
+
|
220
294
|
// An expression which specifies a boost condition. The syntax and
|
221
295
|
// supported fields are the same as a filter expression. See
|
222
296
|
// [SearchRequest.filter][google.cloud.discoveryengine.v1beta.SearchRequest.filter]
|
@@ -232,21 +306,27 @@ message SearchRequest {
|
|
232
306
|
// Strength of the condition boost, which should be in [-1, 1]. Negative
|
233
307
|
// boost means demotion. Default is 0.0.
|
234
308
|
//
|
235
|
-
// Setting to 1.0 gives the document a big promotion. However, it does
|
236
|
-
// necessarily mean that the boosted document will be the top result
|
237
|
-
// all times, nor that other documents will be excluded. Results
|
238
|
-
// still be shown even when none of them matches the condition.
|
239
|
-
// results that are significantly more relevant to the search query
|
240
|
-
// still trump your heavily favored but irrelevant documents.
|
309
|
+
// Setting to 1.0 gives the document a big promotion. However, it does
|
310
|
+
// not necessarily mean that the boosted document will be the top result
|
311
|
+
// at all times, nor that other documents will be excluded. Results
|
312
|
+
// could still be shown even when none of them matches the condition.
|
313
|
+
// And results that are significantly more relevant to the search query
|
314
|
+
// can still trump your heavily favored but irrelevant documents.
|
241
315
|
//
|
242
316
|
// Setting to -1.0 gives the document a big demotion. However, results
|
243
317
|
// that are deeply relevant might still be shown. The document will have
|
244
|
-
// an upstream battle to get a fairly high ranking, but it is not
|
245
|
-
// out completely.
|
318
|
+
// an upstream battle to get a fairly high ranking, but it is not
|
319
|
+
// blocked out completely.
|
246
320
|
//
|
247
321
|
// Setting to 0.0 means no boost applied. The boosting condition is
|
248
|
-
// ignored.
|
322
|
+
// ignored. Only one of the (condition, boost) combination or the
|
323
|
+
// boost_control_spec below are set. If both are set then the global boost
|
324
|
+
// is ignored and the more fine-grained boost_control_spec is applied.
|
249
325
|
float boost = 2;
|
326
|
+
|
327
|
+
// Complex specification for custom ranking based on customer defined
|
328
|
+
// attribute value.
|
329
|
+
BoostControlSpec boost_control_spec = 3;
|
250
330
|
}
|
251
331
|
|
252
332
|
// Condition boost specifications. If a document matches multiple conditions
|
@@ -347,11 +427,13 @@ message SearchRequest {
|
|
347
427
|
// Supported values are:
|
348
428
|
//
|
349
429
|
// * `stable`: string. Default value when no value is specified. Uses a
|
350
|
-
//
|
351
|
-
//
|
352
|
-
//
|
353
|
-
//
|
354
|
-
//
|
430
|
+
// generally available, fine-tuned model. For more information, see
|
431
|
+
// [Answer generation model versions and
|
432
|
+
// lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models).
|
433
|
+
// * `preview`: string. (Public preview) Uses a preview model. For more
|
434
|
+
// information, see
|
435
|
+
// [Answer generation model versions and
|
436
|
+
// lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models).
|
355
437
|
string version = 1;
|
356
438
|
}
|
357
439
|
|
@@ -418,6 +500,14 @@ message SearchRequest {
|
|
418
500
|
// If specified, the spec will be used to modify the model specification
|
419
501
|
// provided to the LLM.
|
420
502
|
ModelSpec model_spec = 7;
|
503
|
+
|
504
|
+
// If true, answer will be generated from most relevant chunks from top
|
505
|
+
// search results. This feature will improve summary quality.
|
506
|
+
// Note that with this feature enabled, not all top search results
|
507
|
+
// will be referenced and included in the reference list, so the citation
|
508
|
+
// source index only points to the search results listed in the reference
|
509
|
+
// list.
|
510
|
+
bool use_semantic_chunks = 8;
|
421
511
|
}
|
422
512
|
|
423
513
|
// A specification for configuring the extractive content in a search
|
@@ -458,10 +548,9 @@ message SearchRequest {
|
|
458
548
|
int32 max_extractive_segment_count = 2;
|
459
549
|
|
460
550
|
// Specifies whether to return the confidence score from the extractive
|
461
|
-
// segments in each search result.
|
462
|
-
//
|
463
|
-
//
|
464
|
-
// users, please reach out to Cloud Support team if you want to use it.
|
551
|
+
// segments in each search result. This feature is available only for new
|
552
|
+
// or allowlisted data stores. To allowlist your data store,
|
553
|
+
// contact your Customer Engineer. The default value is `false`.
|
465
554
|
bool return_extractive_segment_score = 3;
|
466
555
|
|
467
556
|
// Specifies whether to also include the adjacent from each selected
|
@@ -533,10 +622,14 @@ message SearchRequest {
|
|
533
622
|
ImageQuery image_query = 19;
|
534
623
|
|
535
624
|
// Maximum number of [Document][google.cloud.discoveryengine.v1beta.Document]s
|
536
|
-
// to return.
|
537
|
-
//
|
625
|
+
// to return. The maximum allowed value depends on the data type. Values above
|
626
|
+
// the maximum value are coerced to the maximum value.
|
538
627
|
//
|
539
|
-
//
|
628
|
+
// * Websites with basic indexing: Default `10`, Maximum `25`.
|
629
|
+
// * Websites with advanced indexing: Default `25`, Maximum `50`.
|
630
|
+
// * Other: Default `50`, Maximum `100`.
|
631
|
+
//
|
632
|
+
// If this field is negative, an `INVALID_ARGUMENT` is returned.
|
540
633
|
int32 page_size = 4;
|
541
634
|
|
542
635
|
// A page token received from a previous
|
@@ -673,7 +766,8 @@ message SearchRequest {
|
|
673
766
|
//
|
674
767
|
// If
|
675
768
|
// [SearchRequest.EmbeddingSpec.EmbeddingVector.field_path][google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path]
|
676
|
-
// is not provided, it will use
|
769
|
+
// is not provided, it will use
|
770
|
+
// [ServingConfig.EmbeddingConfig.field_path][google.cloud.discoveryengine.v1beta.ServingConfig.embedding_config].
|
677
771
|
EmbeddingSpec embedding_spec = 23;
|
678
772
|
|
679
773
|
// The ranking expression controls the customized ranking on retrieval
|
@@ -830,6 +924,15 @@ message SearchResponse {
|
|
830
924
|
|
831
925
|
// Document reference.
|
832
926
|
message Reference {
|
927
|
+
// Chunk content.
|
928
|
+
message ChunkContent {
|
929
|
+
// Chunk textual content.
|
930
|
+
string content = 1;
|
931
|
+
|
932
|
+
// Page identifier.
|
933
|
+
string page_identifier = 2;
|
934
|
+
}
|
935
|
+
|
833
936
|
// Title of the document.
|
834
937
|
string title = 1;
|
835
938
|
|
@@ -847,6 +950,9 @@ message SearchResponse {
|
|
847
950
|
|
848
951
|
// Cloud Storage or HTTP uri for the document.
|
849
952
|
string uri = 3;
|
953
|
+
|
954
|
+
// List of cited chunk contents derived from document content.
|
955
|
+
repeated ChunkContent chunk_contents = 4;
|
850
956
|
}
|
851
957
|
|
852
958
|
// Summary with metadata information.
|
@@ -914,6 +1020,16 @@ message SearchResponse {
|
|
914
1020
|
SummaryWithMetadata summary_with_metadata = 4;
|
915
1021
|
}
|
916
1022
|
|
1023
|
+
// Debug information specifically related to forward geocoding issues arising
|
1024
|
+
// from Geolocation Search.
|
1025
|
+
message GeoSearchDebugInfo {
|
1026
|
+
// The address from which forward geocoding ingestion produced issues.
|
1027
|
+
string original_address_query = 1;
|
1028
|
+
|
1029
|
+
// The error produced.
|
1030
|
+
string error_message = 2;
|
1031
|
+
}
|
1032
|
+
|
917
1033
|
// Information describing query expansion including whether expansion has
|
918
1034
|
// occurred.
|
919
1035
|
message QueryExpansionInfo {
|
@@ -978,6 +1094,10 @@ message SearchResponse {
|
|
978
1094
|
// Controls applied as part of the Control service.
|
979
1095
|
repeated string applied_controls = 10;
|
980
1096
|
|
1097
|
+
// Debug information specifically related to forward geocoding issues arising
|
1098
|
+
// from Geolocation Search.
|
1099
|
+
repeated GeoSearchDebugInfo geo_search_debug_info = 16;
|
1100
|
+
|
981
1101
|
// Query expansion information for the returned results.
|
982
1102
|
QueryExpansionInfo query_expansion_info = 14;
|
983
1103
|
}
|
@@ -134,9 +134,15 @@ message TrainCustomModelResponse {
|
|
134
134
|
//
|
135
135
|
// * **bad-data**: The training data quality is bad.
|
136
136
|
// * **no-improvement**: Tuning didn't improve performance. Won't deploy.
|
137
|
-
// * **in-progress**: Model training is in progress.
|
137
|
+
// * **in-progress**: Model training job creation is in progress.
|
138
|
+
// * **training**: Model is actively training.
|
139
|
+
// * **evaluating**: The model is evaluating trained metrics.
|
140
|
+
// * **indexing**: The model trained metrics are indexing.
|
138
141
|
// * **ready**: The model is ready for serving.
|
139
142
|
string model_status = 3;
|
143
|
+
|
144
|
+
// The metrics of the trained model.
|
145
|
+
map<string, double> metrics = 4;
|
140
146
|
}
|
141
147
|
|
142
148
|
// Metadata related to the progress of the TrainCustomModel operation. This is
|
@@ -0,0 +1,94 @@
|
|
1
|
+
// Copyright 2022 Google LLC
|
2
|
+
//
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
// you may not use this file except in compliance with the License.
|
5
|
+
// You may obtain a copy of the License at
|
6
|
+
//
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
//
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
// See the License for the specific language governing permissions and
|
13
|
+
// limitations under the License.
|
14
|
+
|
15
|
+
syntax = "proto3";
|
16
|
+
|
17
|
+
package google.cloud.discoveryengine.v1beta;
|
18
|
+
|
19
|
+
import "google/api/field_behavior.proto";
|
20
|
+
import "google/api/resource.proto";
|
21
|
+
import "google/protobuf/timestamp.proto";
|
22
|
+
|
23
|
+
option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Beta";
|
24
|
+
option go_package = "cloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;discoveryenginepb";
|
25
|
+
option java_multiple_files = true;
|
26
|
+
option java_outer_classname = "SessionProto";
|
27
|
+
option java_package = "com.google.cloud.discoveryengine.v1beta";
|
28
|
+
option objc_class_prefix = "DISCOVERYENGINE";
|
29
|
+
option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1beta";
|
30
|
+
option ruby_package = "Google::Cloud::DiscoveryEngine::V1beta";
|
31
|
+
|
32
|
+
// External session proto definition.
|
33
|
+
message Session {
|
34
|
+
option (google.api.resource) = {
|
35
|
+
type: "discoveryengine.googleapis.com/Session"
|
36
|
+
pattern: "projects/{project}/locations/{location}/dataStores/{data_store}/sessions/{session}"
|
37
|
+
pattern: "projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/sessions/{session}"
|
38
|
+
pattern: "projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}"
|
39
|
+
};
|
40
|
+
|
41
|
+
// Represents a turn, including a query from the user and a
|
42
|
+
// answer from service.
|
43
|
+
message Turn {
|
44
|
+
// The user query.
|
45
|
+
Query query = 1;
|
46
|
+
|
47
|
+
// The resource name of the answer to the user query.
|
48
|
+
string answer = 2 [(google.api.resource_reference) = {
|
49
|
+
type: "discoveryengine.googleapis.com/Answer"
|
50
|
+
}];
|
51
|
+
}
|
52
|
+
|
53
|
+
// Enumeration of the state of the session.
|
54
|
+
enum State {
|
55
|
+
// State is unspecified.
|
56
|
+
STATE_UNSPECIFIED = 0;
|
57
|
+
|
58
|
+
// The session is currently open.
|
59
|
+
IN_PROGRESS = 1;
|
60
|
+
}
|
61
|
+
|
62
|
+
// Immutable. Fully qualified name
|
63
|
+
// `project/*/locations/global/collections/{collection}/engines/{engine}/sessions/*`
|
64
|
+
string name = 1 [(google.api.field_behavior) = IMMUTABLE];
|
65
|
+
|
66
|
+
// The state of the session.
|
67
|
+
State state = 2;
|
68
|
+
|
69
|
+
// A unique identifier for tracking users.
|
70
|
+
string user_pseudo_id = 3;
|
71
|
+
|
72
|
+
// Turns.
|
73
|
+
repeated Turn turns = 4;
|
74
|
+
|
75
|
+
// Output only. The time the session started.
|
76
|
+
google.protobuf.Timestamp start_time = 5
|
77
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
78
|
+
|
79
|
+
// Output only. The time the session finished.
|
80
|
+
google.protobuf.Timestamp end_time = 6
|
81
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
82
|
+
}
|
83
|
+
|
84
|
+
// Defines a user inputed query.
|
85
|
+
message Query {
|
86
|
+
// Query content.
|
87
|
+
oneof content {
|
88
|
+
// Plain text.
|
89
|
+
string text = 2;
|
90
|
+
}
|
91
|
+
|
92
|
+
// Unique Id for the query.
|
93
|
+
string query_id = 1;
|
94
|
+
}
|
@@ -252,7 +252,7 @@ message PageInfo {
|
|
252
252
|
// The most specific category associated with a category page.
|
253
253
|
//
|
254
254
|
// To represent full path of category, use '>' sign to separate different
|
255
|
-
// hierarchies. If '>' is part of the category name,
|
255
|
+
// hierarchies. If '>' is part of the category name, replace it with
|
256
256
|
// other character(s).
|
257
257
|
//
|
258
258
|
// Category pages include special pages such as sales or promotions. For
|