@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,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.v1alpha;
|
18
|
+
|
19
|
+
import "google/api/annotations.proto";
|
20
|
+
import "google/api/client.proto";
|
21
|
+
import "google/api/field_behavior.proto";
|
22
|
+
import "google/api/resource.proto";
|
23
|
+
import "google/cloud/discoveryengine/v1alpha/grounding.proto";
|
24
|
+
|
25
|
+
option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Alpha";
|
26
|
+
option go_package = "cloud.google.com/go/discoveryengine/apiv1alpha/discoveryenginepb;discoveryenginepb";
|
27
|
+
option java_multiple_files = true;
|
28
|
+
option java_outer_classname = "GroundedGenerationServiceProto";
|
29
|
+
option java_package = "com.google.cloud.discoveryengine.v1alpha";
|
30
|
+
option objc_class_prefix = "DISCOVERYENGINE";
|
31
|
+
option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1alpha";
|
32
|
+
option ruby_package = "Google::Cloud::DiscoveryEngine::V1alpha";
|
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: "/v1alpha/{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.v1alpha.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.v1alpha.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.v1alpha;
|
18
|
+
|
19
|
+
import "google/api/field_behavior.proto";
|
20
|
+
import "google/api/resource.proto";
|
21
|
+
|
22
|
+
option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Alpha";
|
23
|
+
option go_package = "cloud.google.com/go/discoveryengine/apiv1alpha/discoveryenginepb;discoveryenginepb";
|
24
|
+
option java_multiple_files = true;
|
25
|
+
option java_outer_classname = "GroundingProto";
|
26
|
+
option java_package = "com.google.cloud.discoveryengine.v1alpha";
|
27
|
+
option objc_class_prefix = "DISCOVERYENGINE";
|
28
|
+
option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1alpha";
|
29
|
+
option ruby_package = "Google::Cloud::DiscoveryEngine::V1alpha";
|
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
|
+
}
|
@@ -61,11 +61,11 @@ message GcsSource {
|
|
61
61
|
// bits of SHA256(URI) encoded as a hex string.
|
62
62
|
// * `custom`: One custom data JSON per row in arbitrary format that conforms
|
63
63
|
// to the defined [Schema][google.cloud.discoveryengine.v1alpha.Schema] of
|
64
|
-
// the data store. This can only be used by
|
64
|
+
// the data store. This can only be used by the GENERIC Data Store vertical.
|
65
65
|
// * `csv`: A CSV file with header conforming to the defined
|
66
66
|
// [Schema][google.cloud.discoveryengine.v1alpha.Schema] of the
|
67
67
|
// data store. Each entry after the header is imported as a Document.
|
68
|
-
// This can only be used by
|
68
|
+
// This can only be used by the GENERIC Data Store vertical.
|
69
69
|
//
|
70
70
|
// Supported values for user even imports:
|
71
71
|
//
|
@@ -120,7 +120,7 @@ message BigQuerySource {
|
|
120
120
|
// [Document.struct_data][google.cloud.discoveryengine.v1alpha.Document.struct_data].
|
121
121
|
// * `custom`: One custom data per row in arbitrary format that conforms to
|
122
122
|
// the defined [Schema][google.cloud.discoveryengine.v1alpha.Schema] of the
|
123
|
-
// data store. This can only be used by
|
123
|
+
// data store. This can only be used by the GENERIC Data Store vertical.
|
124
124
|
string data_schema = 6;
|
125
125
|
}
|
126
126
|
|
@@ -317,12 +317,12 @@ message CloudSqlSource {
|
|
317
317
|
// limit of 2,000 characters. Can be specified if one wants to have the
|
318
318
|
// Cloud SQL export to a specific Cloud Storage directory.
|
319
319
|
//
|
320
|
-
//
|
320
|
+
// Ensure that the Cloud SQL service account has the necessary Cloud
|
321
321
|
// Storage Admin permissions to access the specified Cloud Storage directory.
|
322
322
|
string gcs_staging_dir = 5;
|
323
323
|
|
324
|
-
// Option for serverless export. Enabling this option will incur
|
325
|
-
//
|
324
|
+
// Option for serverless export. Enabling this option will incur additional
|
325
|
+
// cost. More info can be found
|
326
326
|
// [here](https://cloud.google.com/sql/pricing#serverless).
|
327
327
|
bool offload = 6;
|
328
328
|
}
|
@@ -346,7 +346,7 @@ message FirestoreSource {
|
|
346
346
|
// limit of 2,000 characters. Can be specified if one wants to have the
|
347
347
|
// Firestore export to a specific Cloud Storage directory.
|
348
348
|
//
|
349
|
-
//
|
349
|
+
// Ensure that the Firestore service account has the necessary Cloud
|
350
350
|
// Storage Admin permissions to access the specified Cloud Storage directory.
|
351
351
|
string gcs_staging_dir = 4;
|
352
352
|
}
|
@@ -664,35 +664,3 @@ message ImportSuggestionDenyListEntriesMetadata {
|
|
664
664
|
// finish time.
|
665
665
|
google.protobuf.Timestamp update_time = 2;
|
666
666
|
}
|
667
|
-
|
668
|
-
// Response of the
|
669
|
-
// [CompletionService.ImportCompletionSuggestions][google.cloud.discoveryengine.v1alpha.CompletionService.ImportCompletionSuggestions]
|
670
|
-
// method. If the long running operation is done, this message is returned by
|
671
|
-
// the google.longrunning.Operations.response field if the operation is
|
672
|
-
// successful.
|
673
|
-
message ImportCompletionSuggestionsResponse {
|
674
|
-
// A sample of errors encountered while processing the request.
|
675
|
-
repeated google.rpc.Status error_samples = 1;
|
676
|
-
|
677
|
-
// Count of
|
678
|
-
// [CompletionSuggestion][google.cloud.discoveryengine.v1alpha.CompletionSuggestion]s
|
679
|
-
// successfully imported.
|
680
|
-
int64 success_count = 2;
|
681
|
-
|
682
|
-
// Count of
|
683
|
-
// [CompletionSuggestion][google.cloud.discoveryengine.v1alpha.CompletionSuggestion]s
|
684
|
-
// that failed to be imported.
|
685
|
-
int64 failure_count = 3;
|
686
|
-
}
|
687
|
-
|
688
|
-
// Metadata related to the progress of the ImportCompletionSuggestions
|
689
|
-
// operation. This will be returned by the google.longrunning.Operation.metadata
|
690
|
-
// field.
|
691
|
-
message ImportCompletionSuggestionsMetadata {
|
692
|
-
// Operation create time.
|
693
|
-
google.protobuf.Timestamp create_time = 1;
|
694
|
-
|
695
|
-
// Operation last update time. If the operation is done, this is also the
|
696
|
-
// finish time.
|
697
|
-
google.protobuf.Timestamp update_time = 2;
|
698
|
-
}
|
@@ -0,0 +1,102 @@
|
|
1
|
+
// Copyright 2022 Google LLC
|
2
|
+
//
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
// you may not use this file except in compliance with the License.
|
5
|
+
// You may obtain a copy of the License at
|
6
|
+
//
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
//
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
// See the License for the specific language governing permissions and
|
13
|
+
// limitations under the License.
|
14
|
+
|
15
|
+
syntax = "proto3";
|
16
|
+
|
17
|
+
package google.cloud.discoveryengine.v1alpha;
|
18
|
+
|
19
|
+
import "google/api/field_behavior.proto";
|
20
|
+
import "google/api/resource.proto";
|
21
|
+
import "google/protobuf/timestamp.proto";
|
22
|
+
|
23
|
+
option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Alpha";
|
24
|
+
option go_package = "cloud.google.com/go/discoveryengine/apiv1alpha/discoveryenginepb;discoveryenginepb";
|
25
|
+
option java_multiple_files = true;
|
26
|
+
option java_outer_classname = "ProjectProto";
|
27
|
+
option java_package = "com.google.cloud.discoveryengine.v1alpha";
|
28
|
+
option objc_class_prefix = "DISCOVERYENGINE";
|
29
|
+
option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1alpha";
|
30
|
+
option ruby_package = "Google::Cloud::DiscoveryEngine::V1alpha";
|
31
|
+
|
32
|
+
// Metadata and configurations for a Google Cloud project in the service.
|
33
|
+
message Project {
|
34
|
+
option (google.api.resource) = {
|
35
|
+
type: "discoveryengine.googleapis.com/Project"
|
36
|
+
pattern: "projects/{project}"
|
37
|
+
};
|
38
|
+
|
39
|
+
// Metadata about the terms of service.
|
40
|
+
message ServiceTerms {
|
41
|
+
// The agreement states this terms of service.
|
42
|
+
enum State {
|
43
|
+
// The default value of the enum. This value is not actually used.
|
44
|
+
STATE_UNSPECIFIED = 0;
|
45
|
+
|
46
|
+
// The project has given consent to the terms of service.
|
47
|
+
TERMS_ACCEPTED = 1;
|
48
|
+
|
49
|
+
// The project is pending to review and accept the terms of service.
|
50
|
+
TERMS_PENDING = 2;
|
51
|
+
|
52
|
+
// The project has declined or revoked the agreement to terms of service.
|
53
|
+
TERMS_DECLINED = 3;
|
54
|
+
}
|
55
|
+
|
56
|
+
// The unique identifier of this terms of service.
|
57
|
+
// Available terms:
|
58
|
+
// * `GA_DATA_USE_TERMS`: [Terms for data
|
59
|
+
// use](https://cloud.google.com/retail/data-use-terms). When using this as
|
60
|
+
// `id`, the acceptable
|
61
|
+
// [version][google.cloud.discoveryengine.v1alpha.Project.ServiceTerms.version]
|
62
|
+
// to provide is `2022-11-23`.
|
63
|
+
string id = 1;
|
64
|
+
|
65
|
+
// The version string of the terms of service.
|
66
|
+
// For acceptable values, see the comments for
|
67
|
+
// [id][google.cloud.discoveryengine.v1alpha.Project.ServiceTerms.id] above.
|
68
|
+
string version = 2;
|
69
|
+
|
70
|
+
// Whether the project has accepted/rejected the service terms or it is
|
71
|
+
// still pending.
|
72
|
+
State state = 4;
|
73
|
+
|
74
|
+
// The last time when the project agreed to the terms of service.
|
75
|
+
google.protobuf.Timestamp accept_time = 5;
|
76
|
+
|
77
|
+
// The last time when the project declined or revoked the agreement to terms
|
78
|
+
// of service.
|
79
|
+
google.protobuf.Timestamp decline_time = 6;
|
80
|
+
}
|
81
|
+
|
82
|
+
// Output only. Full resource name of the project, for example
|
83
|
+
// `projects/{project_number}`.
|
84
|
+
// Note that when making requests, project number and project id are both
|
85
|
+
// acceptable, but the server will always respond in project number.
|
86
|
+
string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
|
87
|
+
|
88
|
+
// Output only. The timestamp when this project is created.
|
89
|
+
google.protobuf.Timestamp create_time = 2
|
90
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
91
|
+
|
92
|
+
// Output only. The timestamp when this project is successfully provisioned.
|
93
|
+
// Empty value means this project is still provisioning and is not ready for
|
94
|
+
// use.
|
95
|
+
google.protobuf.Timestamp provision_completion_time = 3
|
96
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
97
|
+
|
98
|
+
// Output only. A map of terms of services. The key is the `id` of
|
99
|
+
// [ServiceTerms][google.cloud.discoveryengine.v1alpha.Project.ServiceTerms].
|
100
|
+
map<string, ServiceTerms> service_terms_map = 4
|
101
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
102
|
+
}
|
@@ -0,0 +1,171 @@
|
|
1
|
+
// Copyright 2022 Google LLC
|
2
|
+
//
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
// you may not use this file except in compliance with the License.
|
5
|
+
// You may obtain a copy of the License at
|
6
|
+
//
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
//
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
// See the License for the specific language governing permissions and
|
13
|
+
// limitations under the License.
|
14
|
+
|
15
|
+
syntax = "proto3";
|
16
|
+
|
17
|
+
package google.cloud.discoveryengine.v1alpha;
|
18
|
+
|
19
|
+
import "google/api/annotations.proto";
|
20
|
+
import "google/api/client.proto";
|
21
|
+
import "google/api/field_behavior.proto";
|
22
|
+
import "google/api/resource.proto";
|
23
|
+
import "google/cloud/discoveryengine/v1alpha/project.proto";
|
24
|
+
import "google/longrunning/operations.proto";
|
25
|
+
|
26
|
+
option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Alpha";
|
27
|
+
option go_package = "cloud.google.com/go/discoveryengine/apiv1alpha/discoveryenginepb;discoveryenginepb";
|
28
|
+
option java_multiple_files = true;
|
29
|
+
option java_outer_classname = "ProjectServiceProto";
|
30
|
+
option java_package = "com.google.cloud.discoveryengine.v1alpha";
|
31
|
+
option objc_class_prefix = "DISCOVERYENGINE";
|
32
|
+
option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1alpha";
|
33
|
+
option ruby_package = "Google::Cloud::DiscoveryEngine::V1alpha";
|
34
|
+
|
35
|
+
// Service for operations on the
|
36
|
+
// [Project][google.cloud.discoveryengine.v1alpha.Project].
|
37
|
+
service ProjectService {
|
38
|
+
option (google.api.default_host) = "discoveryengine.googleapis.com";
|
39
|
+
option (google.api.oauth_scopes) =
|
40
|
+
"https://www.googleapis.com/auth/cloud-platform";
|
41
|
+
|
42
|
+
// Gets a [Project][google.cloud.discoveryengine.v1alpha.Project].
|
43
|
+
// Returns NOT_FOUND when the project is not yet created.
|
44
|
+
rpc GetProject(GetProjectRequest) returns (Project) {
|
45
|
+
option (google.api.http) = {
|
46
|
+
get: "/v1alpha/{name=projects/*}"
|
47
|
+
};
|
48
|
+
option (google.api.method_signature) = "name";
|
49
|
+
}
|
50
|
+
|
51
|
+
// Provisions the project resource. During the
|
52
|
+
// process, related systems will get prepared and initialized.
|
53
|
+
//
|
54
|
+
// Caller must read the [Terms for data
|
55
|
+
// use](https://cloud.google.com/retail/data-use-terms), and optionally
|
56
|
+
// specify in request to provide consent to that service terms.
|
57
|
+
rpc ProvisionProject(ProvisionProjectRequest)
|
58
|
+
returns (google.longrunning.Operation) {
|
59
|
+
option (google.api.http) = {
|
60
|
+
post: "/v1alpha/{name=projects/*}:provision"
|
61
|
+
body: "*"
|
62
|
+
};
|
63
|
+
option (google.api.method_signature) = "name";
|
64
|
+
option (google.longrunning.operation_info) = {
|
65
|
+
response_type: "google.cloud.discoveryengine.v1alpha.Project"
|
66
|
+
metadata_type: "google.cloud.discoveryengine.v1alpha.ProvisionProjectMetadata"
|
67
|
+
};
|
68
|
+
}
|
69
|
+
|
70
|
+
// Updates service terms for this project.
|
71
|
+
//
|
72
|
+
// This method can be used to retroactively accept the latest terms.
|
73
|
+
//
|
74
|
+
// Terms available for update:
|
75
|
+
// * [Terms for data use](https://cloud.google.com/retail/data-use-terms)
|
76
|
+
rpc ReportConsentChange(ReportConsentChangeRequest) returns (Project) {
|
77
|
+
option (google.api.http) = {
|
78
|
+
post: "/v1alpha/{project=projects/*}:reportConsentChange"
|
79
|
+
body: "*"
|
80
|
+
};
|
81
|
+
option (google.api.method_signature) =
|
82
|
+
"consent_change_action,project,service_term_id,service_term_version";
|
83
|
+
}
|
84
|
+
}
|
85
|
+
|
86
|
+
// Request message for
|
87
|
+
// [ProjectService.GetProject][google.cloud.discoveryengine.v1alpha.ProjectService.GetProject]
|
88
|
+
// method.
|
89
|
+
message GetProjectRequest {
|
90
|
+
// Required. Full resource name of a
|
91
|
+
// [Project][google.cloud.discoveryengine.v1alpha.Project], such as
|
92
|
+
// `projects/{project_id_or_number}`.
|
93
|
+
string name = 1 [
|
94
|
+
(google.api.field_behavior) = REQUIRED,
|
95
|
+
(google.api.resource_reference) = {
|
96
|
+
type: "discoveryengine.googleapis.com/Project"
|
97
|
+
}
|
98
|
+
];
|
99
|
+
}
|
100
|
+
|
101
|
+
// Request for
|
102
|
+
// [ProjectService.ProvisionProject][google.cloud.discoveryengine.v1alpha.ProjectService.ProvisionProject]
|
103
|
+
// method.
|
104
|
+
message ProvisionProjectRequest {
|
105
|
+
// Required. Full resource name of a
|
106
|
+
// [Project][google.cloud.discoveryengine.v1alpha.Project], such as
|
107
|
+
// `projects/{project_id_or_number}`.
|
108
|
+
string name = 1 [
|
109
|
+
(google.api.field_behavior) = REQUIRED,
|
110
|
+
(google.api.resource_reference) = {
|
111
|
+
type: "discoveryengine.googleapis.com/Project"
|
112
|
+
}
|
113
|
+
];
|
114
|
+
|
115
|
+
// Required. Set to `true` to specify that caller has read and would like to
|
116
|
+
// give consent to the [Terms for data
|
117
|
+
// use](https://cloud.google.com/retail/data-use-terms).
|
118
|
+
bool accept_data_use_terms = 2 [(google.api.field_behavior) = REQUIRED];
|
119
|
+
|
120
|
+
// Required. The version of the [Terms for data
|
121
|
+
// use](https://cloud.google.com/retail/data-use-terms) that caller has read
|
122
|
+
// and would like to give consent to.
|
123
|
+
//
|
124
|
+
// Acceptable version is `2022-11-23`, and this may change over time.
|
125
|
+
string data_use_terms_version = 3 [(google.api.field_behavior) = REQUIRED];
|
126
|
+
}
|
127
|
+
|
128
|
+
// Metadata associated with a project provision operation.
|
129
|
+
message ProvisionProjectMetadata {}
|
130
|
+
|
131
|
+
// Request for ReportConsentChange method.
|
132
|
+
message ReportConsentChangeRequest {
|
133
|
+
// Type of consent acknowledgement (accept / reject).
|
134
|
+
//
|
135
|
+
// At this moment, only `ACCEPT` action is supported.
|
136
|
+
enum ConsentChangeAction {
|
137
|
+
// Invalid action, user must specify accept/decline
|
138
|
+
CONSENT_CHANGE_ACTION_UNSPECIFIED = 0;
|
139
|
+
|
140
|
+
// User accepts service terms.
|
141
|
+
ACCEPT = 1;
|
142
|
+
}
|
143
|
+
|
144
|
+
// Required. Whether customer decides to accept or decline service term.
|
145
|
+
//
|
146
|
+
// At this moment, only accept action is supported.
|
147
|
+
ConsentChangeAction consent_change_action = 1
|
148
|
+
[(google.api.field_behavior) = REQUIRED];
|
149
|
+
|
150
|
+
// Required. Full resource name of a
|
151
|
+
// [Project][google.cloud.discoveryengine.v1alpha.Project], such as
|
152
|
+
// `projects/{project_id_or_number}`.
|
153
|
+
string project = 2 [
|
154
|
+
(google.api.field_behavior) = REQUIRED,
|
155
|
+
(google.api.resource_reference) = {
|
156
|
+
type: "discoveryengine.googleapis.com/Project"
|
157
|
+
}
|
158
|
+
];
|
159
|
+
|
160
|
+
// Required. The unique identifier of the terms of service to update.
|
161
|
+
// Available term ids:
|
162
|
+
// * `GA_DATA_USE_TERMS`: [Terms for data
|
163
|
+
// use](https://cloud.google.com/retail/data-use-terms). When using this
|
164
|
+
// service term id, the acceptable
|
165
|
+
// [service_term_version][google.cloud.discoveryengine.v1alpha.ReportConsentChangeRequest.service_term_version]
|
166
|
+
// to provide is `2022-11-23`.
|
167
|
+
string service_term_id = 3 [(google.api.field_behavior) = REQUIRED];
|
168
|
+
|
169
|
+
// Required. The version string of the terms of service to update.
|
170
|
+
string service_term_version = 4 [(google.api.field_behavior) = REQUIRED];
|
171
|
+
}
|
@@ -163,6 +163,18 @@ message FieldConfig {
|
|
163
163
|
FILTERABLE_DISABLED = 2;
|
164
164
|
}
|
165
165
|
|
166
|
+
// Optional source of the advanced site search field.
|
167
|
+
enum AdvancedSiteSearchDataSource {
|
168
|
+
// Value used when unset.
|
169
|
+
ADVANCED_SITE_SEARCH_DATA_SOURCE_UNSPECIFIED = 0;
|
170
|
+
|
171
|
+
// Retrieve value from meta tag.
|
172
|
+
METATAGS = 1;
|
173
|
+
|
174
|
+
// Retrieve value from page map.
|
175
|
+
PAGEMAP = 2;
|
176
|
+
}
|
177
|
+
|
166
178
|
// Required. Field path of the schema field.
|
167
179
|
// For example: `title`, `description`, `release_info.release_year`.
|
168
180
|
string field_path = 1 [(google.api.field_behavior) = REQUIRED];
|
@@ -312,4 +324,13 @@ message FieldConfig {
|
|
312
324
|
// `indexable_option` and `searchable_option` of this field cannot be
|
313
325
|
// modified.
|
314
326
|
string key_property_type = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
|
327
|
+
|
328
|
+
// If this field is set, only the corresponding source will be indexed for
|
329
|
+
// this field. Otherwise, the values from different sources are merged.
|
330
|
+
//
|
331
|
+
// Assuming a page with `<author, a>` in meta tag, and `<author, b>` in page
|
332
|
+
// map:
|
333
|
+
// if this enum is set to METATAGS, we will only index `<author, a>`;
|
334
|
+
// if this enum is not set, we will merge them and index `<author, [a, b]>`.
|
335
|
+
repeated AdvancedSiteSearchDataSource advanced_site_search_data_sources = 10;
|
315
336
|
}
|
@@ -442,7 +442,11 @@ message SearchRequest {
|
|
442
442
|
// of results returned is less than `summaryResultCount`, the summary is
|
443
443
|
// generated from all of the results.
|
444
444
|
//
|
445
|
-
// At most 10 results
|
445
|
+
// At most 10 results for documents mode, or 50 for chunks mode, can be
|
446
|
+
// used to generate a summary. The chunks mode is used when
|
447
|
+
// [SearchRequest.ContentSearchSpec.search_result_mode][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.search_result_mode]
|
448
|
+
// is set to
|
449
|
+
// [CHUNKS][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS].
|
446
450
|
int32 summary_result_count = 1;
|
447
451
|
|
448
452
|
// Specifies whether to include citations in the summary. The default
|
@@ -504,7 +508,7 @@ message SearchRequest {
|
|
504
508
|
|
505
509
|
// If true, answer will be generated from most relevant chunks from top
|
506
510
|
// search results. This feature will improve summary quality.
|
507
|
-
//
|
511
|
+
// Note that with this feature enabled, not all top search results
|
508
512
|
// will be referenced and included in the reference list, so the citation
|
509
513
|
// source index only points to the search results listed in the reference
|
510
514
|
// list.
|
@@ -550,7 +554,7 @@ message SearchRequest {
|
|
550
554
|
|
551
555
|
// Specifies whether to return the confidence score from the extractive
|
552
556
|
// segments in each search result. This feature is available only for new
|
553
|
-
// or allowlisted data stores. To allowlist your data store,
|
557
|
+
// or allowlisted data stores. To allowlist your data store,
|
554
558
|
// contact your Customer Engineer. The default value is `false`.
|
555
559
|
bool return_extractive_segment_score = 3;
|
556
560
|
|
@@ -134,7 +134,10 @@ 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;
|
140
143
|
|