@google-cloud/discoveryengine 1.6.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 +7 -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 +41 -1
- package/build/protos/google/cloud/discoveryengine/v1alpha/common.proto +21 -1
- package/build/protos/google/cloud/discoveryengine/v1alpha/conversational_search_service.proto +574 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/document.proto +19 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/document_processing_config.proto +3 -6
- package/build/protos/google/cloud/discoveryengine/v1alpha/document_service.proto +64 -0
- 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 +283 -24
- 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 +158 -24
- package/build/protos/google/cloud/discoveryengine/v1alpha/search_tuning_service.proto +9 -3
- package/build/protos/google/cloud/discoveryengine/v1alpha/serving_config_service.proto +2 -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 +44799 -26093
- package/build/protos/protos.js +120465 -74222
- package/build/protos/protos.json +8911 -4556
- 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 +457 -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 +457 -0
- package/build/src/v1alpha/document_service_client.d.ts +410 -21
- package/build/src/v1alpha/document_service_client.js +479 -0
- package/build/src/v1alpha/document_service_client_config.json +5 -0
- package/build/src/v1alpha/engine_service_client.d.ts +330 -0
- package/build/src/v1alpha/engine_service_client.js +457 -0
- package/build/src/v1alpha/estimate_billing_service_client.d.ts +330 -0
- package/build/src/v1alpha/estimate_billing_service_client.js +457 -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 +3 -1
- package/build/src/v1alpha/index.js +7 -3
- 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 +457 -0
- package/build/src/v1alpha/search_service_client.d.ts +360 -15
- package/build/src/v1alpha/search_service_client.js +474 -10
- 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 +457 -0
- package/build/src/v1alpha/serving_config_service_client.d.ts +317 -1
- package/build/src/v1alpha/serving_config_service_client.js +434 -1
- package/build/src/v1alpha/site_search_engine_service_client.d.ts +330 -0
- package/build/src/v1alpha/site_search_engine_service_client.js +457 -0
- package/build/src/v1alpha/user_event_service_client.d.ts +330 -0
- package/build/src/v1alpha/user_event_service_client.js +457 -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
@@ -92,6 +92,43 @@ service EngineService {
|
|
92
92
|
};
|
93
93
|
option (google.api.method_signature) = "parent";
|
94
94
|
}
|
95
|
+
|
96
|
+
// Pauses the training of an existing engine. Only applicable if
|
97
|
+
// [SolutionType][google.cloud.discoveryengine.v1beta.SolutionType] is
|
98
|
+
// [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION].
|
99
|
+
rpc PauseEngine(PauseEngineRequest) returns (Engine) {
|
100
|
+
option (google.api.http) = {
|
101
|
+
post: "/v1beta/{name=projects/*/locations/*/collections/*/engines/*}:pause"
|
102
|
+
body: "*"
|
103
|
+
};
|
104
|
+
option (google.api.method_signature) = "name";
|
105
|
+
}
|
106
|
+
|
107
|
+
// Resumes the training of an existing engine. Only applicable if
|
108
|
+
// [SolutionType][google.cloud.discoveryengine.v1beta.SolutionType] is
|
109
|
+
// [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION].
|
110
|
+
rpc ResumeEngine(ResumeEngineRequest) returns (Engine) {
|
111
|
+
option (google.api.http) = {
|
112
|
+
post: "/v1beta/{name=projects/*/locations/*/collections/*/engines/*}:resume"
|
113
|
+
body: "*"
|
114
|
+
};
|
115
|
+
option (google.api.method_signature) = "name";
|
116
|
+
}
|
117
|
+
|
118
|
+
// Tunes an existing engine. Only applicable if
|
119
|
+
// [SolutionType][google.cloud.discoveryengine.v1beta.SolutionType] is
|
120
|
+
// [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION].
|
121
|
+
rpc TuneEngine(TuneEngineRequest) returns (google.longrunning.Operation) {
|
122
|
+
option (google.api.http) = {
|
123
|
+
post: "/v1beta/{name=projects/*/locations/*/collections/*/engines/*}:tune"
|
124
|
+
body: "*"
|
125
|
+
};
|
126
|
+
option (google.api.method_signature) = "name";
|
127
|
+
option (google.longrunning.operation_info) = {
|
128
|
+
response_type: "TuneEngineResponse"
|
129
|
+
metadata_type: "TuneEngineMetadata"
|
130
|
+
};
|
131
|
+
}
|
95
132
|
}
|
96
133
|
|
97
134
|
// Request for
|
@@ -242,3 +279,59 @@ message UpdateEngineRequest {
|
|
242
279
|
// is returned.
|
243
280
|
google.protobuf.FieldMask update_mask = 2;
|
244
281
|
}
|
282
|
+
|
283
|
+
// Request for pausing training of an engine.
|
284
|
+
message PauseEngineRequest {
|
285
|
+
// Required. The name of the engine to pause.
|
286
|
+
// Format:
|
287
|
+
// `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`
|
288
|
+
string name = 1 [
|
289
|
+
(google.api.field_behavior) = REQUIRED,
|
290
|
+
(google.api.resource_reference) = {
|
291
|
+
type: "discoveryengine.googleapis.com/Engine"
|
292
|
+
}
|
293
|
+
];
|
294
|
+
}
|
295
|
+
|
296
|
+
// Request for resuming training of an engine.
|
297
|
+
message ResumeEngineRequest {
|
298
|
+
// Required. The name of the engine to resume.
|
299
|
+
// Format:
|
300
|
+
// `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`
|
301
|
+
string name = 1 [
|
302
|
+
(google.api.field_behavior) = REQUIRED,
|
303
|
+
(google.api.resource_reference) = {
|
304
|
+
type: "discoveryengine.googleapis.com/Engine"
|
305
|
+
}
|
306
|
+
];
|
307
|
+
}
|
308
|
+
|
309
|
+
// Request to manually start a tuning process now (instead of waiting for
|
310
|
+
// the periodically scheduled tuning to happen).
|
311
|
+
message TuneEngineRequest {
|
312
|
+
// Required. The resource name of the engine to tune.
|
313
|
+
// Format:
|
314
|
+
// `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`
|
315
|
+
string name = 1 [
|
316
|
+
(google.api.field_behavior) = REQUIRED,
|
317
|
+
(google.api.resource_reference) = {
|
318
|
+
type: "discoveryengine.googleapis.com/Engine"
|
319
|
+
}
|
320
|
+
];
|
321
|
+
}
|
322
|
+
|
323
|
+
// Metadata associated with a tune operation.
|
324
|
+
message TuneEngineMetadata {
|
325
|
+
// Required. The resource name of the engine that this tune applies to.
|
326
|
+
// Format:
|
327
|
+
// `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`
|
328
|
+
string engine = 1 [
|
329
|
+
(google.api.field_behavior) = REQUIRED,
|
330
|
+
(google.api.resource_reference) = {
|
331
|
+
type: "discoveryengine.googleapis.com/Engine"
|
332
|
+
}
|
333
|
+
];
|
334
|
+
}
|
335
|
+
|
336
|
+
// Response associated with a tune operation.
|
337
|
+
message TuneEngineResponse {}
|
@@ -0,0 +1,120 @@
|
|
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
|
+
import "google/cloud/discoveryengine/v1beta/grounding.proto";
|
24
|
+
|
25
|
+
option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Beta";
|
26
|
+
option go_package = "cloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;discoveryenginepb";
|
27
|
+
option java_multiple_files = true;
|
28
|
+
option java_outer_classname = "GroundedGenerationServiceProto";
|
29
|
+
option java_package = "com.google.cloud.discoveryengine.v1beta";
|
30
|
+
option objc_class_prefix = "DISCOVERYENGINE";
|
31
|
+
option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1beta";
|
32
|
+
option ruby_package = "Google::Cloud::DiscoveryEngine::V1beta";
|
33
|
+
|
34
|
+
// Service for grounded generation.
|
35
|
+
service GroundedGenerationService {
|
36
|
+
option (google.api.default_host) = "discoveryengine.googleapis.com";
|
37
|
+
option (google.api.oauth_scopes) =
|
38
|
+
"https://www.googleapis.com/auth/cloud-platform";
|
39
|
+
|
40
|
+
// Performs a grounding check.
|
41
|
+
rpc CheckGrounding(CheckGroundingRequest) returns (CheckGroundingResponse) {
|
42
|
+
option (google.api.http) = {
|
43
|
+
post: "/v1beta/{grounding_config=projects/*/locations/*/groundingConfigs/*}:check"
|
44
|
+
body: "*"
|
45
|
+
};
|
46
|
+
}
|
47
|
+
}
|
48
|
+
|
49
|
+
// Specification for the grounding check.
|
50
|
+
message CheckGroundingSpec {
|
51
|
+
// The threshold (in [0,1]) used for determining whether a fact must be
|
52
|
+
// cited for a claim in the answer candidate. Choosing a higher threshold
|
53
|
+
// will lead to fewer but very strong citations, while choosing a lower
|
54
|
+
// threshold may lead to more but somewhat weaker citations. If unset, the
|
55
|
+
// threshold will default to 0.6.
|
56
|
+
optional double citation_threshold = 1;
|
57
|
+
}
|
58
|
+
|
59
|
+
// Request message for
|
60
|
+
// [GroundedGenerationService.CheckGrounding][google.cloud.discoveryengine.v1beta.GroundedGenerationService.CheckGrounding]
|
61
|
+
// method.
|
62
|
+
message CheckGroundingRequest {
|
63
|
+
// Required. The resource name of the grounding config, such as
|
64
|
+
// `projects/*/locations/global/groundingConfigs/default_grounding_config`.
|
65
|
+
string grounding_config = 1 [
|
66
|
+
(google.api.field_behavior) = REQUIRED,
|
67
|
+
(google.api.resource_reference) = {
|
68
|
+
type: "discoveryengine.googleapis.com/GroundingConfig"
|
69
|
+
}
|
70
|
+
];
|
71
|
+
|
72
|
+
// Answer candidate to check.
|
73
|
+
string answer_candidate = 2;
|
74
|
+
|
75
|
+
// List of facts for the grounding check.
|
76
|
+
// We support up to 200 facts.
|
77
|
+
repeated GroundingFact facts = 3;
|
78
|
+
|
79
|
+
// Configuration of the grounding check.
|
80
|
+
CheckGroundingSpec grounding_spec = 4;
|
81
|
+
}
|
82
|
+
|
83
|
+
// Response message for the
|
84
|
+
// [GroundedGenerationService.CheckGrounding][google.cloud.discoveryengine.v1beta.GroundedGenerationService.CheckGrounding]
|
85
|
+
// method.
|
86
|
+
message CheckGroundingResponse {
|
87
|
+
// Text and citation info for a claim in the answer candidate.
|
88
|
+
message Claim {
|
89
|
+
// Position indicating the start of the claim in the answer candidate,
|
90
|
+
// measured in bytes.
|
91
|
+
optional int32 start_pos = 1;
|
92
|
+
|
93
|
+
// Position indicating the end of the claim in the answer candidate,
|
94
|
+
// exclusive.
|
95
|
+
optional int32 end_pos = 2;
|
96
|
+
|
97
|
+
// Text for the claim in the answer candidate. Always provided regardless of
|
98
|
+
// whether citations or anti-citations are found.
|
99
|
+
string claim_text = 3;
|
100
|
+
|
101
|
+
// A list of indices (into 'cited_chunks') specifying the citations
|
102
|
+
// associated with the claim. For instance [1,3,4] means that
|
103
|
+
// cited_chunks[1], cited_chunks[3], cited_chunks[4] are the facts cited
|
104
|
+
// supporting for the claim. A citation to a fact indicates that the claim
|
105
|
+
// is supported by the fact.
|
106
|
+
repeated int32 citation_indices = 4;
|
107
|
+
}
|
108
|
+
|
109
|
+
// The support score for the input answer candidate.
|
110
|
+
// Higher the score, higher is the fraction of claims that are supported by
|
111
|
+
// the provided facts. This is always set when a response is returned.
|
112
|
+
optional float support_score = 1;
|
113
|
+
|
114
|
+
// List of facts cited across all claims in the answer candidate.
|
115
|
+
// These are derived from the facts supplied in the request.
|
116
|
+
repeated FactChunk cited_chunks = 3;
|
117
|
+
|
118
|
+
// Claim texts and citation info across all claims in the answer candidate.
|
119
|
+
repeated Claim claims = 4;
|
120
|
+
}
|
@@ -0,0 +1,55 @@
|
|
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
|
+
|
22
|
+
option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Beta";
|
23
|
+
option go_package = "cloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;discoveryenginepb";
|
24
|
+
option java_multiple_files = true;
|
25
|
+
option java_outer_classname = "GroundingProto";
|
26
|
+
option java_package = "com.google.cloud.discoveryengine.v1beta";
|
27
|
+
option objc_class_prefix = "DISCOVERYENGINE";
|
28
|
+
option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1beta";
|
29
|
+
option ruby_package = "Google::Cloud::DiscoveryEngine::V1beta";
|
30
|
+
|
31
|
+
// Grounding Fact.
|
32
|
+
message GroundingFact {
|
33
|
+
// Text content of the fact. Can be at most 10K characters long.
|
34
|
+
string fact_text = 1;
|
35
|
+
|
36
|
+
// Attributes associated with the fact.
|
37
|
+
// Common attributes include `source` (indicating where the fact was sourced
|
38
|
+
// from), `author` (indicating the author of the fact), and so on.
|
39
|
+
map<string, string> attributes = 2;
|
40
|
+
}
|
41
|
+
|
42
|
+
// Fact Chunk.
|
43
|
+
message FactChunk {
|
44
|
+
// Text content of the fact chunk. Can be at most 10K characters long.
|
45
|
+
string chunk_text = 1;
|
46
|
+
|
47
|
+
// Source from which this fact chunk was retrieved. If it was retrieved
|
48
|
+
// from the GroundingFacts provided in the request then this field will
|
49
|
+
// contain the index of the specific fact from which this chunk was
|
50
|
+
// retrieved.
|
51
|
+
string source = 2;
|
52
|
+
|
53
|
+
// More fine-grained information for the source reference.
|
54
|
+
map<string, string> source_metadata = 3;
|
55
|
+
}
|
@@ -21,6 +21,7 @@ import "google/api/resource.proto";
|
|
21
21
|
import "google/cloud/discoveryengine/v1beta/completion.proto";
|
22
22
|
import "google/cloud/discoveryengine/v1beta/document.proto";
|
23
23
|
import "google/cloud/discoveryengine/v1beta/user_event.proto";
|
24
|
+
import "google/protobuf/field_mask.proto";
|
24
25
|
import "google/protobuf/timestamp.proto";
|
25
26
|
import "google/rpc/status.proto";
|
26
27
|
import "google/type/date.proto";
|
@@ -60,11 +61,11 @@ message GcsSource {
|
|
60
61
|
// bits of SHA256(URI) encoded as a hex string.
|
61
62
|
// * `custom`: One custom data JSON per row in arbitrary format that conforms
|
62
63
|
// to the defined [Schema][google.cloud.discoveryengine.v1beta.Schema] of
|
63
|
-
// the data store. This can only be used by
|
64
|
+
// the data store. This can only be used by the GENERIC Data Store vertical.
|
64
65
|
// * `csv`: A CSV file with header conforming to the defined
|
65
66
|
// [Schema][google.cloud.discoveryengine.v1beta.Schema] of the
|
66
67
|
// data store. Each entry after the header is imported as a Document.
|
67
|
-
// This can only be used by
|
68
|
+
// This can only be used by the GENERIC Data Store vertical.
|
68
69
|
//
|
69
70
|
// Supported values for user even imports:
|
70
71
|
//
|
@@ -118,10 +119,237 @@ message BigQuerySource {
|
|
118
119
|
// [Document.struct_data][google.cloud.discoveryengine.v1beta.Document.struct_data].
|
119
120
|
// * `custom`: One custom data per row in arbitrary format that conforms to
|
120
121
|
// the defined [Schema][google.cloud.discoveryengine.v1beta.Schema] of the
|
121
|
-
// data store. This can only be used by
|
122
|
+
// data store. This can only be used by the GENERIC Data Store vertical.
|
122
123
|
string data_schema = 6;
|
123
124
|
}
|
124
125
|
|
126
|
+
// The Spanner source for importing data
|
127
|
+
message SpannerSource {
|
128
|
+
// The project ID that the Spanner source is in with a length limit of 128
|
129
|
+
// characters. If not specified, inherits the project ID from the parent
|
130
|
+
// request.
|
131
|
+
string project_id = 1;
|
132
|
+
|
133
|
+
// Required. The instance ID of the source Spanner table.
|
134
|
+
string instance_id = 2 [(google.api.field_behavior) = REQUIRED];
|
135
|
+
|
136
|
+
// Required. The database ID of the source Spanner table.
|
137
|
+
string database_id = 3 [(google.api.field_behavior) = REQUIRED];
|
138
|
+
|
139
|
+
// Required. The table name of the Spanner database that needs to be imported.
|
140
|
+
string table_id = 4 [(google.api.field_behavior) = REQUIRED];
|
141
|
+
|
142
|
+
// Whether to apply data boost on Spanner export. Enabling this option will
|
143
|
+
// incur additional cost. More info can be found
|
144
|
+
// [here](https://cloud.google.com/spanner/docs/databoost/databoost-overview#billing_and_quotas).
|
145
|
+
bool enable_data_boost = 5;
|
146
|
+
}
|
147
|
+
|
148
|
+
// The Bigtable Options object that contains information to support
|
149
|
+
// the import.
|
150
|
+
message BigtableOptions {
|
151
|
+
// The column family of the Bigtable.
|
152
|
+
message BigtableColumnFamily {
|
153
|
+
// The field name to use for this column family in the document. The
|
154
|
+
// name has to match the pattern `[a-zA-Z0-9][a-zA-Z0-9-_]*`. If not set,
|
155
|
+
// it is parsed from the family name with best effort. However, due to
|
156
|
+
// different naming patterns, field name collisions could happen, where
|
157
|
+
// parsing behavior is undefined.
|
158
|
+
string field_name = 1;
|
159
|
+
|
160
|
+
// The encoding mode of the values when the type is not STRING.
|
161
|
+
// Acceptable encoding values are:
|
162
|
+
//
|
163
|
+
// * `TEXT`: indicates values are alphanumeric text strings.
|
164
|
+
// * `BINARY`: indicates values are encoded using `HBase Bytes.toBytes`
|
165
|
+
// family of functions. This can be overridden for a specific column
|
166
|
+
// by listing that column in `columns` and specifying an encoding for it.
|
167
|
+
Encoding encoding = 2;
|
168
|
+
|
169
|
+
// The type of values in this column family.
|
170
|
+
// The values are expected to be encoded using `HBase Bytes.toBytes`
|
171
|
+
// function when the encoding value is set to `BINARY`.
|
172
|
+
Type type = 3;
|
173
|
+
|
174
|
+
// The list of objects that contains column level information for each
|
175
|
+
// column. If a column is not present in this list it will be ignored.
|
176
|
+
repeated BigtableColumn columns = 4;
|
177
|
+
}
|
178
|
+
|
179
|
+
// The column of the Bigtable.
|
180
|
+
message BigtableColumn {
|
181
|
+
// Required. Qualifier of the column. If it cannot be decoded with utf-8,
|
182
|
+
// use a base-64 encoded string instead.
|
183
|
+
bytes qualifier = 1 [(google.api.field_behavior) = REQUIRED];
|
184
|
+
|
185
|
+
// The field name to use for this column in the document. The name has to
|
186
|
+
// match the pattern `[a-zA-Z0-9][a-zA-Z0-9-_]*`.
|
187
|
+
// If not set, it is parsed from the qualifier bytes with best effort.
|
188
|
+
// However, due to different naming patterns, field name collisions could
|
189
|
+
// happen, where parsing behavior is undefined.
|
190
|
+
string field_name = 2;
|
191
|
+
|
192
|
+
// The encoding mode of the values when the type is not `STRING`.
|
193
|
+
// Acceptable encoding values are:
|
194
|
+
//
|
195
|
+
// * `TEXT`: indicates values are alphanumeric text strings.
|
196
|
+
// * `BINARY`: indicates values are encoded using `HBase Bytes.toBytes`
|
197
|
+
// family of functions. This can be overridden for a specific column
|
198
|
+
// by listing that column in `columns` and specifying an encoding for it.
|
199
|
+
Encoding encoding = 3;
|
200
|
+
|
201
|
+
// The type of values in this column family.
|
202
|
+
// The values are expected to be encoded using `HBase Bytes.toBytes`
|
203
|
+
// function when the encoding value is set to `BINARY`.
|
204
|
+
Type type = 4;
|
205
|
+
}
|
206
|
+
|
207
|
+
// The type of values in a Bigtable column or column family.
|
208
|
+
// The values are expected to be encoded using
|
209
|
+
// [HBase
|
210
|
+
// Bytes.toBytes](https://hbase.apache.org/apidocs/org/apache/hadoop/hbase/util/Bytes.html)
|
211
|
+
// function when the encoding value is set to `BINARY`.
|
212
|
+
enum Type {
|
213
|
+
// The type is unspecified.
|
214
|
+
TYPE_UNSPECIFIED = 0;
|
215
|
+
|
216
|
+
// String type.
|
217
|
+
STRING = 1;
|
218
|
+
|
219
|
+
// Numerical type.
|
220
|
+
NUMBER = 2;
|
221
|
+
|
222
|
+
// Integer type.
|
223
|
+
INTEGER = 3;
|
224
|
+
|
225
|
+
// Variable length integer type.
|
226
|
+
VAR_INTEGER = 4;
|
227
|
+
|
228
|
+
// BigDecimal type.
|
229
|
+
BIG_NUMERIC = 5;
|
230
|
+
|
231
|
+
// Boolean type.
|
232
|
+
BOOLEAN = 6;
|
233
|
+
|
234
|
+
// JSON type.
|
235
|
+
JSON = 7;
|
236
|
+
}
|
237
|
+
|
238
|
+
// The encoding mode of a Bigtable column or column family.
|
239
|
+
enum Encoding {
|
240
|
+
// The encoding is unspecified.
|
241
|
+
ENCODING_UNSPECIFIED = 0;
|
242
|
+
|
243
|
+
// Text encoding.
|
244
|
+
TEXT = 1;
|
245
|
+
|
246
|
+
// Binary encoding.
|
247
|
+
BINARY = 2;
|
248
|
+
}
|
249
|
+
|
250
|
+
// The field name used for saving row key value in the document. The name has
|
251
|
+
// to match the pattern `[a-zA-Z0-9][a-zA-Z0-9-_]*`.
|
252
|
+
string key_field_name = 1;
|
253
|
+
|
254
|
+
// The mapping from family names to an object that contains column families
|
255
|
+
// level information for the given column family. If a family is not present
|
256
|
+
// in this map it will be ignored.
|
257
|
+
map<string, BigtableColumnFamily> families = 2;
|
258
|
+
}
|
259
|
+
|
260
|
+
// The Cloud Bigtable source for importing data.
|
261
|
+
message BigtableSource {
|
262
|
+
// The project ID that the Bigtable source is in with a length limit of 128
|
263
|
+
// characters. If not specified, inherits the project ID from the parent
|
264
|
+
// request.
|
265
|
+
string project_id = 1;
|
266
|
+
|
267
|
+
// Required. The instance ID of the Cloud Bigtable that needs to be imported.
|
268
|
+
string instance_id = 2 [(google.api.field_behavior) = REQUIRED];
|
269
|
+
|
270
|
+
// Required. The table ID of the Cloud Bigtable that needs to be imported.
|
271
|
+
string table_id = 3 [(google.api.field_behavior) = REQUIRED];
|
272
|
+
|
273
|
+
// Required. Bigtable options that contains information needed when parsing
|
274
|
+
// data into typed structures. For example, column type annotations.
|
275
|
+
BigtableOptions bigtable_options = 4 [(google.api.field_behavior) = REQUIRED];
|
276
|
+
}
|
277
|
+
|
278
|
+
// Cloud FhirStore source import data from.
|
279
|
+
message FhirStoreSource {
|
280
|
+
// Required. The full resource name of the FHIR store to import data from, in
|
281
|
+
// the format of
|
282
|
+
// `projects/{project}/locations/{location}/datasets/{dataset}/fhirStores/{fhir_store}`.
|
283
|
+
string fhir_store = 1 [
|
284
|
+
(google.api.field_behavior) = REQUIRED,
|
285
|
+
(google.api.resource_reference) = {
|
286
|
+
type: "healthcare.googleapis.com/FhirStore"
|
287
|
+
}
|
288
|
+
];
|
289
|
+
|
290
|
+
// Intermediate Cloud Storage directory used for the import with a length
|
291
|
+
// limit of 2,000 characters. Can be specified if one wants to have the
|
292
|
+
// FhirStore export to a specific Cloud Storage directory.
|
293
|
+
string gcs_staging_dir = 2;
|
294
|
+
}
|
295
|
+
|
296
|
+
// Cloud SQL source import data from.
|
297
|
+
message CloudSqlSource {
|
298
|
+
// The project ID that the Cloud SQL source is in with a length limit of 128
|
299
|
+
// characters. If not specified, inherits the project ID from the parent
|
300
|
+
// request.
|
301
|
+
string project_id = 1;
|
302
|
+
|
303
|
+
// Required. The Cloud SQL instance to copy the data from with a length limit
|
304
|
+
// of 256 characters.
|
305
|
+
string instance_id = 2 [(google.api.field_behavior) = REQUIRED];
|
306
|
+
|
307
|
+
// Required. The Cloud SQL database to copy the data from with a length limit
|
308
|
+
// of 256 characters.
|
309
|
+
string database_id = 3 [(google.api.field_behavior) = REQUIRED];
|
310
|
+
|
311
|
+
// Required. The Cloud SQL table to copy the data from with a length limit of
|
312
|
+
// 256 characters.
|
313
|
+
string table_id = 4 [(google.api.field_behavior) = REQUIRED];
|
314
|
+
|
315
|
+
// Intermediate Cloud Storage directory used for the import with a length
|
316
|
+
// limit of 2,000 characters. Can be specified if one wants to have the
|
317
|
+
// Cloud SQL export to a specific Cloud Storage directory.
|
318
|
+
//
|
319
|
+
// Ensure that the Cloud SQL service account has the necessary Cloud
|
320
|
+
// Storage Admin permissions to access the specified Cloud Storage directory.
|
321
|
+
string gcs_staging_dir = 5;
|
322
|
+
|
323
|
+
// Option for serverless export. Enabling this option will incur additional
|
324
|
+
// cost. More info can be found
|
325
|
+
// [here](https://cloud.google.com/sql/pricing#serverless).
|
326
|
+
bool offload = 6;
|
327
|
+
}
|
328
|
+
|
329
|
+
// Firestore source import data from.
|
330
|
+
message FirestoreSource {
|
331
|
+
// The project ID that the Cloud SQL source is in with a length limit of 128
|
332
|
+
// characters. If not specified, inherits the project ID from the parent
|
333
|
+
// request.
|
334
|
+
string project_id = 1;
|
335
|
+
|
336
|
+
// Required. The Firestore database to copy the data from with a length limit
|
337
|
+
// of 256 characters.
|
338
|
+
string database_id = 2 [(google.api.field_behavior) = REQUIRED];
|
339
|
+
|
340
|
+
// Required. The Firestore collection to copy the data from with a length
|
341
|
+
// limit of 1,500 characters.
|
342
|
+
string collection_id = 3 [(google.api.field_behavior) = REQUIRED];
|
343
|
+
|
344
|
+
// Intermediate Cloud Storage directory used for the import with a length
|
345
|
+
// limit of 2,000 characters. Can be specified if one wants to have the
|
346
|
+
// Firestore export to a specific Cloud Storage directory.
|
347
|
+
//
|
348
|
+
// Ensure that the Firestore service account has the necessary Cloud
|
349
|
+
// Storage Admin permissions to access the specified Cloud Storage directory.
|
350
|
+
string gcs_staging_dir = 4;
|
351
|
+
}
|
352
|
+
|
125
353
|
// Configuration of destination for Import related errors.
|
126
354
|
message ImportErrorConfig {
|
127
355
|
// Required. Errors destination.
|
@@ -219,6 +447,9 @@ message ImportDocumentsMetadata {
|
|
219
447
|
|
220
448
|
// Count of entries that encountered errors while processing.
|
221
449
|
int64 failure_count = 4;
|
450
|
+
|
451
|
+
// Total count of entries that were processed.
|
452
|
+
int64 total_count = 5;
|
222
453
|
}
|
223
454
|
|
224
455
|
// Request message for Import methods.
|
@@ -255,6 +486,21 @@ message ImportDocumentsRequest {
|
|
255
486
|
|
256
487
|
// BigQuery input source.
|
257
488
|
BigQuerySource bigquery_source = 4;
|
489
|
+
|
490
|
+
// FhirStore input source.
|
491
|
+
FhirStoreSource fhir_store_source = 10;
|
492
|
+
|
493
|
+
// Spanner input source.
|
494
|
+
SpannerSource spanner_source = 11;
|
495
|
+
|
496
|
+
// Cloud SQL input source.
|
497
|
+
CloudSqlSource cloud_sql_source = 12;
|
498
|
+
|
499
|
+
// Firestore input source.
|
500
|
+
FirestoreSource firestore_source = 13;
|
501
|
+
|
502
|
+
// Cloud Bigtable input source.
|
503
|
+
BigtableSource bigtable_source = 15;
|
258
504
|
}
|
259
505
|
|
260
506
|
// Required. The parent branch resource name, such as
|
@@ -275,6 +521,10 @@ message ImportDocumentsRequest {
|
|
275
521
|
// [ReconciliationMode.INCREMENTAL][google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.ReconciliationMode.INCREMENTAL].
|
276
522
|
ReconciliationMode reconciliation_mode = 6;
|
277
523
|
|
524
|
+
// Indicates which fields in the provided imported documents to update. If
|
525
|
+
// not set, the default is to update all fields.
|
526
|
+
google.protobuf.FieldMask update_mask = 7;
|
527
|
+
|
278
528
|
// Whether to automatically generate IDs for the documents if absent.
|
279
529
|
//
|
280
530
|
// If set to `true`,
|
@@ -288,45 +538,54 @@ message ImportDocumentsRequest {
|
|
288
538
|
// [id_field][google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.id_field],
|
289
539
|
// otherwise, documents without IDs fail to be imported.
|
290
540
|
//
|
291
|
-
//
|
292
|
-
//
|
293
|
-
// [
|
294
|
-
// when
|
541
|
+
// Supported data sources:
|
542
|
+
//
|
543
|
+
// * [GcsSource][google.cloud.discoveryengine.v1beta.GcsSource].
|
295
544
|
// [GcsSource.data_schema][google.cloud.discoveryengine.v1beta.GcsSource.data_schema]
|
296
|
-
// or
|
545
|
+
// must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown.
|
546
|
+
// * [BigQuerySource][google.cloud.discoveryengine.v1beta.BigQuerySource].
|
297
547
|
// [BigQuerySource.data_schema][google.cloud.discoveryengine.v1beta.BigQuerySource.data_schema]
|
298
|
-
//
|
548
|
+
// must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown.
|
549
|
+
// * [SpannerSource][google.cloud.discoveryengine.v1beta.SpannerSource].
|
550
|
+
// * [CloudSqlSource][google.cloud.discoveryengine.v1beta.CloudSqlSource].
|
551
|
+
// * [FirestoreSource][google.cloud.discoveryengine.v1beta.FirestoreSource].
|
552
|
+
// * [BigtableSource][google.cloud.discoveryengine.v1beta.BigtableSource].
|
299
553
|
bool auto_generate_ids = 8;
|
300
554
|
|
301
|
-
// The field
|
302
|
-
//
|
555
|
+
// The field indicates the ID field or column to be used as unique IDs of
|
556
|
+
// the documents.
|
303
557
|
//
|
304
558
|
// For [GcsSource][google.cloud.discoveryengine.v1beta.GcsSource] it is the
|
305
559
|
// key of the JSON field. For instance, `my_id` for JSON `{"my_id":
|
306
|
-
// "some_uuid"}`. For
|
307
|
-
//
|
308
|
-
// the column name of the BigQuery table where the unique ids are stored.
|
560
|
+
// "some_uuid"}`. For others, it may be the column name of the table where the
|
561
|
+
// unique ids are stored.
|
309
562
|
//
|
310
|
-
// The values of the JSON field or the
|
563
|
+
// The values of the JSON field or the table column are used as the
|
311
564
|
// [Document.id][google.cloud.discoveryengine.v1beta.Document.id]s. The JSON
|
312
|
-
// field or the
|
565
|
+
// field or the table column must be of string type, and the values must be
|
313
566
|
// set as valid strings conform to
|
314
567
|
// [RFC-1034](https://tools.ietf.org/html/rfc1034) with 1-63 characters.
|
315
568
|
// Otherwise, documents without valid IDs fail to be imported.
|
316
569
|
//
|
317
|
-
// Only set this field when
|
318
|
-
// [GcsSource][google.cloud.discoveryengine.v1beta.GcsSource] or
|
319
|
-
// [BigQuerySource][google.cloud.discoveryengine.v1beta.BigQuerySource], and
|
320
|
-
// when
|
321
|
-
// [GcsSource.data_schema][google.cloud.discoveryengine.v1beta.GcsSource.data_schema]
|
322
|
-
// or
|
323
|
-
// [BigQuerySource.data_schema][google.cloud.discoveryengine.v1beta.BigQuerySource.data_schema]
|
324
|
-
// is `custom`. And only set this field when
|
570
|
+
// Only set this field when
|
325
571
|
// [auto_generate_ids][google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.auto_generate_ids]
|
326
572
|
// is unset or set as `false`. Otherwise, an INVALID_ARGUMENT error is thrown.
|
327
573
|
//
|
328
574
|
// If it is unset, a default value `_id` is used when importing from the
|
329
575
|
// allowed data sources.
|
576
|
+
//
|
577
|
+
// Supported data sources:
|
578
|
+
//
|
579
|
+
// * [GcsSource][google.cloud.discoveryengine.v1beta.GcsSource].
|
580
|
+
// [GcsSource.data_schema][google.cloud.discoveryengine.v1beta.GcsSource.data_schema]
|
581
|
+
// must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown.
|
582
|
+
// * [BigQuerySource][google.cloud.discoveryengine.v1beta.BigQuerySource].
|
583
|
+
// [BigQuerySource.data_schema][google.cloud.discoveryengine.v1beta.BigQuerySource.data_schema]
|
584
|
+
// must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown.
|
585
|
+
// * [SpannerSource][google.cloud.discoveryengine.v1beta.SpannerSource].
|
586
|
+
// * [CloudSqlSource][google.cloud.discoveryengine.v1beta.CloudSqlSource].
|
587
|
+
// * [FirestoreSource][google.cloud.discoveryengine.v1beta.FirestoreSource].
|
588
|
+
// * [BigtableSource][google.cloud.discoveryengine.v1beta.BigtableSource].
|
330
589
|
string id_field = 9;
|
331
590
|
}
|
332
591
|
|