@google-cloud/discoveryengine 1.8.0 → 1.9.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 +8 -0
- package/README.md +33 -4
- package/build/protos/google/cloud/discoveryengine/v1/answer.proto +337 -0
- package/build/protos/google/cloud/discoveryengine/v1/common.proto +33 -0
- package/build/protos/google/cloud/discoveryengine/v1/control.proto +214 -0
- package/build/protos/google/cloud/discoveryengine/v1/control_service.proto +236 -0
- package/build/protos/google/cloud/discoveryengine/v1/conversation.proto +2 -2
- package/build/protos/google/cloud/discoveryengine/v1/conversational_search_service.proto +569 -0
- package/build/protos/google/cloud/discoveryengine/v1/data_store.proto +4 -0
- package/build/protos/google/cloud/discoveryengine/v1/data_store_service.proto +2 -2
- package/build/protos/google/cloud/discoveryengine/v1/document_processing_config.proto +92 -0
- package/build/protos/google/cloud/discoveryengine/v1/document_service.proto +6 -6
- package/build/protos/google/cloud/discoveryengine/v1/engine.proto +4 -4
- package/build/protos/google/cloud/discoveryengine/v1/grounded_generation_service.proto +149 -0
- package/build/protos/google/cloud/discoveryengine/v1/grounding.proto +58 -0
- package/build/protos/google/cloud/discoveryengine/v1/import_config.proto +4 -4
- package/build/protos/google/cloud/discoveryengine/v1/project.proto +103 -0
- package/build/protos/google/cloud/discoveryengine/v1/project_service.proto +90 -0
- package/build/protos/google/cloud/discoveryengine/v1/rank_service.proto +131 -0
- package/build/protos/google/cloud/discoveryengine/v1/recommendation_service.proto +20 -19
- package/build/protos/google/cloud/discoveryengine/v1/schema_service.proto +5 -5
- package/build/protos/google/cloud/discoveryengine/v1/search_service.proto +23 -18
- package/build/protos/google/cloud/discoveryengine/v1/session.proto +97 -0
- package/build/protos/google/cloud/discoveryengine/v1/site_search_engine.proto +3 -0
- package/build/protos/google/cloud/discoveryengine/v1/user_event.proto +28 -3
- package/build/protos/google/cloud/discoveryengine/v1/user_event_service.proto +18 -2
- package/build/protos/google/cloud/discoveryengine/v1alpha/answer.proto +9 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/chunk.proto +7 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/common.proto +16 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/control.proto +217 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/control_service.proto +236 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/conversation.proto +2 -2
- package/build/protos/google/cloud/discoveryengine/v1alpha/conversational_search_service.proto +19 -3
- package/build/protos/google/cloud/discoveryengine/v1alpha/custom_tuning_model.proto +87 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/data_store_service.proto +2 -2
- package/build/protos/google/cloud/discoveryengine/v1alpha/document_processing_config.proto +1 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/document_service.proto +12 -9
- package/build/protos/google/cloud/discoveryengine/v1alpha/engine.proto +4 -4
- package/build/protos/google/cloud/discoveryengine/v1alpha/grounded_generation_service.proto +30 -1
- package/build/protos/google/cloud/discoveryengine/v1alpha/grounding.proto +3 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/import_config.proto +4 -4
- package/build/protos/google/cloud/discoveryengine/v1alpha/project.proto +1 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/project_service.proto +2 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/rank_service.proto +19 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/recommendation_service.proto +20 -19
- package/build/protos/google/cloud/discoveryengine/v1alpha/schema.proto +37 -2
- package/build/protos/google/cloud/discoveryengine/v1alpha/schema_service.proto +6 -6
- package/build/protos/google/cloud/discoveryengine/v1alpha/search_service.proto +28 -31
- package/build/protos/google/cloud/discoveryengine/v1alpha/search_tuning_service.proto +39 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/session.proto +3 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/site_search_engine.proto +3 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/user_event.proto +29 -3
- package/build/protos/google/cloud/discoveryengine/v1alpha/user_event_service.proto +18 -2
- package/build/protos/google/cloud/discoveryengine/v1beta/answer.proto +10 -1
- package/build/protos/google/cloud/discoveryengine/v1beta/common.proto +16 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/control.proto +216 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/control_service.proto +236 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/conversation.proto +2 -2
- package/build/protos/google/cloud/discoveryengine/v1beta/conversational_search_service.proto +19 -3
- package/build/protos/google/cloud/discoveryengine/v1beta/custom_tuning_model.proto +87 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/data_store_service.proto +2 -2
- package/build/protos/google/cloud/discoveryengine/v1beta/document_processing_config.proto +1 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/document_service.proto +7 -8
- package/build/protos/google/cloud/discoveryengine/v1beta/engine.proto +4 -4
- package/build/protos/google/cloud/discoveryengine/v1beta/grounded_generation_service.proto +30 -1
- package/build/protos/google/cloud/discoveryengine/v1beta/grounding.proto +3 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/import_config.proto +4 -4
- package/build/protos/google/cloud/discoveryengine/v1beta/project.proto +103 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/project_service.proto +90 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/rank_service.proto +19 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/recommendation_service.proto +20 -19
- package/build/protos/google/cloud/discoveryengine/v1beta/schema_service.proto +5 -5
- package/build/protos/google/cloud/discoveryengine/v1beta/search_service.proto +30 -24
- package/build/protos/google/cloud/discoveryengine/v1beta/search_tuning_service.proto +39 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/session.proto +4 -1
- package/build/protos/google/cloud/discoveryengine/v1beta/site_search_engine.proto +3 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/user_event.proto +28 -3
- package/build/protos/google/cloud/discoveryengine/v1beta/user_event_service.proto +18 -2
- package/build/protos/protos.d.ts +52350 -38733
- package/build/protos/protos.js +136479 -103212
- package/build/protos/protos.json +9460 -5916
- package/build/src/index.d.ts +13 -1
- package/build/src/index.js +13 -1
- package/build/src/v1/completion_service_client.d.ts +549 -0
- package/build/src/v1/completion_service_client.js +771 -0
- package/build/src/v1/control_service_client.d.ts +1623 -0
- package/build/src/v1/control_service_client.js +2218 -0
- package/build/src/v1/control_service_client_config.json +63 -0
- package/build/src/v1/conversational_search_service_client.d.ts +893 -0
- package/build/src/v1/conversational_search_service_client.js +1040 -14
- package/build/src/v1/conversational_search_service_client_config.json +35 -0
- package/build/src/v1/data_store_service_client.d.ts +555 -6
- package/build/src/v1/data_store_service_client.js +775 -4
- package/build/src/v1/document_service_client.d.ts +557 -8
- package/build/src/v1/document_service_client.js +773 -2
- package/build/src/v1/engine_service_client.d.ts +549 -0
- package/build/src/v1/engine_service_client.js +771 -0
- package/build/src/v1/grounded_generation_service_client.d.ts +1439 -0
- package/build/src/v1/grounded_generation_service_client.js +2036 -0
- package/build/src/v1/grounded_generation_service_client_config.json +43 -0
- package/build/src/v1/index.d.ts +4 -0
- package/build/src/v1/index.js +9 -1
- package/build/src/v1/project_service_client.d.ts +1533 -0
- package/build/src/v1/project_service_client.js +2255 -0
- package/build/src/v1/project_service_client_config.json +43 -0
- package/build/src/v1/rank_service_client.d.ts +1449 -0
- package/build/src/v1/rank_service_client.js +2037 -0
- package/build/src/v1/rank_service_client_config.json +43 -0
- package/build/src/v1/recommendation_service_client.d.ts +568 -18
- package/build/src/v1/recommendation_service_client.js +756 -0
- package/build/src/v1/schema_service_client.d.ts +558 -9
- package/build/src/v1/schema_service_client.js +775 -4
- package/build/src/v1/search_service_client.d.ts +579 -21
- package/build/src/v1/search_service_client.js +776 -14
- package/build/src/v1/site_search_engine_service_client.d.ts +549 -0
- package/build/src/v1/site_search_engine_service_client.js +771 -0
- package/build/src/v1/user_event_service_client.d.ts +562 -2
- package/build/src/v1/user_event_service_client.js +771 -0
- package/build/src/v1alpha/acl_config_service_client.d.ts +237 -0
- package/build/src/v1alpha/acl_config_service_client.js +326 -0
- package/build/src/v1alpha/chunk_service_client.d.ts +237 -0
- package/build/src/v1alpha/chunk_service_client.js +326 -0
- package/build/src/v1alpha/completion_service_client.d.ts +237 -0
- package/build/src/v1alpha/completion_service_client.js +340 -0
- package/build/src/v1alpha/control_service_client.d.ts +2013 -0
- package/build/src/v1alpha/control_service_client.js +2757 -0
- package/build/src/v1alpha/control_service_client_config.json +63 -0
- package/build/src/v1alpha/conversational_search_service_client.d.ts +239 -2
- package/build/src/v1alpha/conversational_search_service_client.js +326 -0
- package/build/src/v1alpha/data_store_service_client.d.ts +243 -6
- package/build/src/v1alpha/data_store_service_client.js +344 -4
- package/build/src/v1alpha/document_service_client.d.ts +246 -9
- package/build/src/v1alpha/document_service_client.js +342 -2
- package/build/src/v1alpha/engine_service_client.d.ts +237 -0
- package/build/src/v1alpha/engine_service_client.js +340 -0
- package/build/src/v1alpha/estimate_billing_service_client.d.ts +237 -0
- package/build/src/v1alpha/estimate_billing_service_client.js +340 -0
- package/build/src/v1alpha/grounded_generation_service_client.d.ts +256 -1
- package/build/src/v1alpha/grounded_generation_service_client.js +326 -0
- package/build/src/v1alpha/index.d.ts +1 -0
- package/build/src/v1alpha/index.js +3 -1
- package/build/src/v1alpha/project_service_client.d.ts +239 -0
- package/build/src/v1alpha/project_service_client.js +340 -0
- package/build/src/v1alpha/project_service_client_config.json +21 -6
- package/build/src/v1alpha/rank_service_client.d.ts +255 -0
- package/build/src/v1alpha/rank_service_client.js +326 -0
- package/build/src/v1alpha/recommendation_service_client.d.ts +256 -18
- package/build/src/v1alpha/recommendation_service_client.js +326 -0
- package/build/src/v1alpha/schema_service_client.d.ts +247 -10
- package/build/src/v1alpha/schema_service_client.js +344 -4
- package/build/src/v1alpha/search_service_client.d.ts +267 -21
- package/build/src/v1alpha/search_service_client.js +346 -14
- package/build/src/v1alpha/search_tuning_service_client.d.ts +265 -0
- package/build/src/v1alpha/search_tuning_service_client.js +365 -1
- package/build/src/v1alpha/search_tuning_service_client_config.json +4 -0
- package/build/src/v1alpha/serving_config_service_client.d.ts +237 -0
- package/build/src/v1alpha/serving_config_service_client.js +326 -0
- package/build/src/v1alpha/site_search_engine_service_client.d.ts +237 -0
- package/build/src/v1alpha/site_search_engine_service_client.js +340 -0
- package/build/src/v1alpha/user_event_service_client.d.ts +250 -2
- package/build/src/v1alpha/user_event_service_client.js +340 -0
- package/build/src/v1beta/completion_service_client.d.ts +252 -0
- package/build/src/v1beta/completion_service_client.js +359 -0
- package/build/src/v1beta/control_service_client.d.ts +1860 -0
- package/build/src/v1beta/control_service_client.js +2545 -0
- package/build/src/v1beta/control_service_client_config.json +63 -0
- package/build/src/v1beta/conversational_search_service_client.d.ts +254 -2
- package/build/src/v1beta/conversational_search_service_client.js +348 -0
- package/build/src/v1beta/data_store_service_client.d.ts +258 -6
- package/build/src/v1beta/data_store_service_client.js +363 -4
- package/build/src/v1beta/document_service_client.d.ts +261 -10
- package/build/src/v1beta/document_service_client.js +361 -2
- package/build/src/v1beta/engine_service_client.d.ts +252 -0
- package/build/src/v1beta/engine_service_client.js +359 -0
- package/build/src/v1beta/grounded_generation_service_client.d.ts +271 -1
- package/build/src/v1beta/grounded_generation_service_client.js +348 -0
- package/build/src/v1beta/index.d.ts +2 -0
- package/build/src/v1beta/index.js +5 -1
- package/build/src/v1beta/project_service_client.d.ts +1770 -0
- package/build/src/v1beta/project_service_client.js +2576 -0
- package/build/src/v1beta/project_service_client_config.json +43 -0
- package/build/src/v1beta/rank_service_client.d.ts +270 -0
- package/build/src/v1beta/rank_service_client.js +348 -0
- package/build/src/v1beta/recommendation_service_client.d.ts +271 -18
- package/build/src/v1beta/recommendation_service_client.js +348 -0
- package/build/src/v1beta/schema_service_client.d.ts +261 -9
- package/build/src/v1beta/schema_service_client.js +363 -4
- package/build/src/v1beta/search_service_client.d.ts +282 -21
- package/build/src/v1beta/search_service_client.js +368 -14
- package/build/src/v1beta/search_tuning_service_client.d.ts +280 -0
- package/build/src/v1beta/search_tuning_service_client.js +384 -1
- package/build/src/v1beta/search_tuning_service_client_config.json +4 -0
- package/build/src/v1beta/serving_config_service_client.d.ts +237 -0
- package/build/src/v1beta/serving_config_service_client.js +326 -0
- package/build/src/v1beta/site_search_engine_service_client.d.ts +252 -0
- package/build/src/v1beta/site_search_engine_service_client.js +359 -0
- package/build/src/v1beta/user_event_service_client.d.ts +265 -2
- package/build/src/v1beta/user_event_service_client.js +359 -0
- package/package.json +2 -2
@@ -0,0 +1,92 @@
|
|
1
|
+
// Copyright 2024 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.v1;
|
18
|
+
|
19
|
+
import "google/api/field_behavior.proto";
|
20
|
+
import "google/api/resource.proto";
|
21
|
+
|
22
|
+
option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1";
|
23
|
+
option go_package = "cloud.google.com/go/discoveryengine/apiv1/discoveryenginepb;discoveryenginepb";
|
24
|
+
option java_multiple_files = true;
|
25
|
+
option java_outer_classname = "DocumentProcessingConfigProto";
|
26
|
+
option java_package = "com.google.cloud.discoveryengine.v1";
|
27
|
+
option objc_class_prefix = "DISCOVERYENGINE";
|
28
|
+
option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1";
|
29
|
+
option ruby_package = "Google::Cloud::DiscoveryEngine::V1";
|
30
|
+
|
31
|
+
// A singleton resource of
|
32
|
+
// [DataStore][google.cloud.discoveryengine.v1.DataStore]. It's empty when
|
33
|
+
// [DataStore][google.cloud.discoveryengine.v1.DataStore] is created, which
|
34
|
+
// defaults to digital parser. The first call to
|
35
|
+
// [DataStoreService.UpdateDocumentProcessingConfig][] method will initialize
|
36
|
+
// the config.
|
37
|
+
message DocumentProcessingConfig {
|
38
|
+
option (google.api.resource) = {
|
39
|
+
type: "discoveryengine.googleapis.com/DocumentProcessingConfig"
|
40
|
+
pattern: "projects/{project}/locations/{location}/dataStores/{data_store}/documentProcessingConfig"
|
41
|
+
pattern: "projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/documentProcessingConfig"
|
42
|
+
};
|
43
|
+
|
44
|
+
// Related configurations applied to a specific type of document parser.
|
45
|
+
message ParsingConfig {
|
46
|
+
// The digital parsing configurations for documents.
|
47
|
+
message DigitalParsingConfig {}
|
48
|
+
|
49
|
+
// The OCR parsing configurations for documents.
|
50
|
+
message OcrParsingConfig {
|
51
|
+
// [DEPRECATED] This field is deprecated. To use the additional enhanced
|
52
|
+
// document elements processing, please switch to `layout_parsing_config`.
|
53
|
+
repeated string enhanced_document_elements = 1 [deprecated = true];
|
54
|
+
|
55
|
+
// If true, will use native text instead of OCR text on pages containing
|
56
|
+
// native text.
|
57
|
+
bool use_native_text = 2;
|
58
|
+
}
|
59
|
+
|
60
|
+
// Configs for document processing types.
|
61
|
+
oneof type_dedicated_config {
|
62
|
+
// Configurations applied to digital parser.
|
63
|
+
DigitalParsingConfig digital_parsing_config = 1;
|
64
|
+
|
65
|
+
// Configurations applied to OCR parser. Currently it only applies to
|
66
|
+
// PDFs.
|
67
|
+
OcrParsingConfig ocr_parsing_config = 2;
|
68
|
+
}
|
69
|
+
}
|
70
|
+
|
71
|
+
// The full resource name of the Document Processing Config.
|
72
|
+
// Format:
|
73
|
+
// `projects/*/locations/*/collections/*/dataStores/*/documentProcessingConfig`.
|
74
|
+
string name = 1;
|
75
|
+
|
76
|
+
// Configurations for default Document parser.
|
77
|
+
// If not specified, we will configure it as default DigitalParsingConfig, and
|
78
|
+
// the default parsing config will be applied to all file types for Document
|
79
|
+
// parsing.
|
80
|
+
ParsingConfig default_parsing_config = 4;
|
81
|
+
|
82
|
+
// Map from file type to override the default parsing configuration based on
|
83
|
+
// the file type. Supported keys:
|
84
|
+
//
|
85
|
+
// * `pdf`: Override parsing config for PDF files, either digital parsing, ocr
|
86
|
+
// parsing or layout parsing is supported.
|
87
|
+
// * `html`: Override parsing config for HTML files, only digital parsing and
|
88
|
+
// or layout parsing are supported.
|
89
|
+
// * `docx`: Override parsing config for DOCX files, only digital parsing and
|
90
|
+
// or layout parsing are supported.
|
91
|
+
map<string, ParsingConfig> parsing_config_overrides = 5;
|
92
|
+
}
|
@@ -104,7 +104,7 @@ service DocumentService {
|
|
104
104
|
|
105
105
|
// Bulk import of multiple
|
106
106
|
// [Document][google.cloud.discoveryengine.v1.Document]s. Request processing
|
107
|
-
// may be synchronous. Non-existing items
|
107
|
+
// may be synchronous. Non-existing items are created.
|
108
108
|
//
|
109
109
|
// Note: It is possible for a subset of the
|
110
110
|
// [Document][google.cloud.discoveryengine.v1.Document]s to be successfully
|
@@ -202,7 +202,7 @@ message ListDocumentsRequest {
|
|
202
202
|
|
203
203
|
// Maximum number of [Document][google.cloud.discoveryengine.v1.Document]s to
|
204
204
|
// return. If unspecified, defaults to 100. The maximum allowed value is 1000.
|
205
|
-
// Values above 1000
|
205
|
+
// Values above 1000 are set to 1000.
|
206
206
|
//
|
207
207
|
// If this field is negative, an `INVALID_ARGUMENT` error is returned.
|
208
208
|
int32 page_size = 2;
|
@@ -252,7 +252,7 @@ message CreateDocumentRequest {
|
|
252
252
|
Document document = 2 [(google.api.field_behavior) = REQUIRED];
|
253
253
|
|
254
254
|
// Required. The ID to use for the
|
255
|
-
// [Document][google.cloud.discoveryengine.v1.Document], which
|
255
|
+
// [Document][google.cloud.discoveryengine.v1.Document], which becomes the
|
256
256
|
// final component of the
|
257
257
|
// [Document.name][google.cloud.discoveryengine.v1.Document.name].
|
258
258
|
//
|
@@ -287,13 +287,13 @@ message UpdateDocumentRequest {
|
|
287
287
|
// is not set, a `NOT_FOUND` error is returned.
|
288
288
|
Document document = 1 [(google.api.field_behavior) = REQUIRED];
|
289
289
|
|
290
|
-
// If set to true
|
290
|
+
// If set to `true` and the
|
291
291
|
// [Document][google.cloud.discoveryengine.v1.Document] is not found, a new
|
292
|
-
// [Document][google.cloud.discoveryengine.v1.Document]
|
292
|
+
// [Document][google.cloud.discoveryengine.v1.Document] is be created.
|
293
293
|
bool allow_missing = 2;
|
294
294
|
|
295
295
|
// Indicates which fields in the provided imported 'document' to update. If
|
296
|
-
// not set,
|
296
|
+
// not set, by default updates all fields.
|
297
297
|
google.protobuf.FieldMask update_mask = 3;
|
298
298
|
}
|
299
299
|
|
@@ -118,9 +118,9 @@ message Engine {
|
|
118
118
|
|
119
119
|
// Common configurations for an Engine.
|
120
120
|
message CommonConfig {
|
121
|
-
//
|
122
|
-
//
|
123
|
-
string company_name = 1
|
121
|
+
// The name of the company, business or entity that is associated with the
|
122
|
+
// engine. Setting this may help improve LLM related features.
|
123
|
+
string company_name = 1;
|
124
124
|
}
|
125
125
|
|
126
126
|
// Additional information of a Chat Engine.
|
@@ -207,7 +207,7 @@ message Engine {
|
|
207
207
|
// The restriction of the Engine industry vertical is based on
|
208
208
|
// [DataStore][google.cloud.discoveryengine.v1.DataStore]: If unspecified,
|
209
209
|
// default to `GENERIC`. Vertical on Engine has to match vertical of the
|
210
|
-
// DataStore
|
210
|
+
// DataStore linked to the engine.
|
211
211
|
IndustryVertical industry_vertical = 16;
|
212
212
|
|
213
213
|
// Common config spec that specifies the metadata of the engine.
|
@@ -0,0 +1,149 @@
|
|
1
|
+
// Copyright 2024 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.v1;
|
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/v1/grounding.proto";
|
24
|
+
|
25
|
+
option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1";
|
26
|
+
option go_package = "cloud.google.com/go/discoveryengine/apiv1/discoveryenginepb;discoveryenginepb";
|
27
|
+
option java_multiple_files = true;
|
28
|
+
option java_outer_classname = "GroundedGenerationServiceProto";
|
29
|
+
option java_package = "com.google.cloud.discoveryengine.v1";
|
30
|
+
option objc_class_prefix = "DISCOVERYENGINE";
|
31
|
+
option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1";
|
32
|
+
option ruby_package = "Google::Cloud::DiscoveryEngine::V1";
|
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: "/v1/{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.v1.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. Can have a maximum length of 1024 characters.
|
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
|
+
// The user labels applied to a resource must meet the following requirements:
|
83
|
+
//
|
84
|
+
// * Each resource can have multiple labels, up to a maximum of 64.
|
85
|
+
// * Each label must be a key-value pair.
|
86
|
+
// * Keys have a minimum length of 1 character and a maximum length of 63
|
87
|
+
// characters and cannot be empty. Values can be empty and have a maximum
|
88
|
+
// length of 63 characters.
|
89
|
+
// * Keys and values can contain only lowercase letters, numeric characters,
|
90
|
+
// underscores, and dashes. All characters must use UTF-8 encoding, and
|
91
|
+
// international characters are allowed.
|
92
|
+
// * The key portion of a label must be unique. However, you can use the same
|
93
|
+
// key with multiple resources.
|
94
|
+
// * Keys must start with a lowercase letter or international character.
|
95
|
+
//
|
96
|
+
// See [Google Cloud
|
97
|
+
// Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
|
98
|
+
// for more details.
|
99
|
+
map<string, string> user_labels = 5;
|
100
|
+
}
|
101
|
+
|
102
|
+
// Response message for the
|
103
|
+
// [GroundedGenerationService.CheckGrounding][google.cloud.discoveryengine.v1.GroundedGenerationService.CheckGrounding]
|
104
|
+
// method.
|
105
|
+
message CheckGroundingResponse {
|
106
|
+
// Text and citation info for a claim in the answer candidate.
|
107
|
+
message Claim {
|
108
|
+
// Position indicating the start of the claim in the answer candidate,
|
109
|
+
// measured in bytes.
|
110
|
+
optional int32 start_pos = 1;
|
111
|
+
|
112
|
+
// Position indicating the end of the claim in the answer candidate,
|
113
|
+
// exclusive.
|
114
|
+
optional int32 end_pos = 2;
|
115
|
+
|
116
|
+
// Text for the claim in the answer candidate. Always provided regardless of
|
117
|
+
// whether citations or anti-citations are found.
|
118
|
+
string claim_text = 3;
|
119
|
+
|
120
|
+
// A list of indices (into 'cited_chunks') specifying the citations
|
121
|
+
// associated with the claim. For instance [1,3,4] means that
|
122
|
+
// cited_chunks[1], cited_chunks[3], cited_chunks[4] are the facts cited
|
123
|
+
// supporting for the claim. A citation to a fact indicates that the claim
|
124
|
+
// is supported by the fact.
|
125
|
+
repeated int32 citation_indices = 4;
|
126
|
+
|
127
|
+
// Indicates that this claim required grounding check. When the system
|
128
|
+
// decided this claim doesn't require attribution/grounding check, this
|
129
|
+
// field will be set to false. In that case, no grounding check was done for
|
130
|
+
// the claim and therefore
|
131
|
+
// [citation_indices][google.cloud.discoveryengine.v1.CheckGroundingResponse.Claim.citation_indices],
|
132
|
+
// and
|
133
|
+
// [anti_citation_indices][google.cloud.discoveryengine.v1.CheckGroundingResponse.Claim.anti_citation_indices]
|
134
|
+
// should not be returned.
|
135
|
+
optional bool grounding_check_required = 6;
|
136
|
+
}
|
137
|
+
|
138
|
+
// The support score for the input answer candidate.
|
139
|
+
// Higher the score, higher is the fraction of claims that are supported by
|
140
|
+
// the provided facts. This is always set when a response is returned.
|
141
|
+
optional float support_score = 1;
|
142
|
+
|
143
|
+
// List of facts cited across all claims in the answer candidate.
|
144
|
+
// These are derived from the facts supplied in the request.
|
145
|
+
repeated FactChunk cited_chunks = 3;
|
146
|
+
|
147
|
+
// Claim texts and citation info across all claims in the answer candidate.
|
148
|
+
repeated Claim claims = 4;
|
149
|
+
}
|
@@ -0,0 +1,58 @@
|
|
1
|
+
// Copyright 2024 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.v1;
|
18
|
+
|
19
|
+
import "google/api/field_behavior.proto";
|
20
|
+
import "google/api/resource.proto";
|
21
|
+
|
22
|
+
option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1";
|
23
|
+
option go_package = "cloud.google.com/go/discoveryengine/apiv1/discoveryenginepb;discoveryenginepb";
|
24
|
+
option java_multiple_files = true;
|
25
|
+
option java_outer_classname = "GroundingProto";
|
26
|
+
option java_package = "com.google.cloud.discoveryengine.v1";
|
27
|
+
option objc_class_prefix = "DISCOVERYENGINE";
|
28
|
+
option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1";
|
29
|
+
option ruby_package = "Google::Cloud::DiscoveryEngine::V1";
|
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
|
+
// The index of this chunk. Currently, only used for the streaming mode.
|
54
|
+
int32 index = 4;
|
55
|
+
|
56
|
+
// More fine-grained information for the source reference.
|
57
|
+
map<string, string> source_metadata = 3;
|
58
|
+
}
|
@@ -37,7 +37,7 @@ option ruby_package = "Google::Cloud::DiscoveryEngine::V1";
|
|
37
37
|
|
38
38
|
// Cloud Storage location for input content.
|
39
39
|
message GcsSource {
|
40
|
-
// Required. Cloud Storage URIs to input files. URI can be up to
|
40
|
+
// Required. Cloud Storage URIs to input files. Each URI can be up to
|
41
41
|
// 2000 characters long. URIs can match the full object path (for example,
|
42
42
|
// `gs://bucket/directory/object.json`) or a pattern matching one or more
|
43
43
|
// files, such as `gs://bucket/directory/*.json`.
|
@@ -66,7 +66,7 @@ message GcsSource {
|
|
66
66
|
// data store. Each entry after the header is imported as a Document.
|
67
67
|
// This can only be used by the GENERIC Data Store vertical.
|
68
68
|
//
|
69
|
-
// Supported values for user
|
69
|
+
// Supported values for user event imports:
|
70
70
|
//
|
71
71
|
// * `user_event` (default): One JSON
|
72
72
|
// [UserEvent][google.cloud.discoveryengine.v1.UserEvent] per line.
|
@@ -336,8 +336,8 @@ message FirestoreSource {
|
|
336
336
|
// of 256 characters.
|
337
337
|
string database_id = 2 [(google.api.field_behavior) = REQUIRED];
|
338
338
|
|
339
|
-
// Required. The Firestore collection to copy the data from with a
|
340
|
-
// limit of 1,500 characters.
|
339
|
+
// Required. The Firestore collection (or entity) to copy the data from with a
|
340
|
+
// length limit of 1,500 characters.
|
341
341
|
string collection_id = 3 [(google.api.field_behavior) = REQUIRED];
|
342
342
|
|
343
343
|
// Intermediate Cloud Storage directory used for the import with a length
|
@@ -0,0 +1,103 @@
|
|
1
|
+
// Copyright 2024 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.v1;
|
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.V1";
|
24
|
+
option go_package = "cloud.google.com/go/discoveryengine/apiv1/discoveryenginepb;discoveryenginepb";
|
25
|
+
option java_multiple_files = true;
|
26
|
+
option java_outer_classname = "ProjectProto";
|
27
|
+
option java_package = "com.google.cloud.discoveryengine.v1";
|
28
|
+
option objc_class_prefix = "DISCOVERYENGINE";
|
29
|
+
option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1";
|
30
|
+
option ruby_package = "Google::Cloud::DiscoveryEngine::V1";
|
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
|
+
//
|
59
|
+
// * `GA_DATA_USE_TERMS`: [Terms for data
|
60
|
+
// use](https://cloud.google.com/retail/data-use-terms). When using this as
|
61
|
+
// `id`, the acceptable
|
62
|
+
// [version][google.cloud.discoveryengine.v1.Project.ServiceTerms.version]
|
63
|
+
// to provide is `2022-11-23`.
|
64
|
+
string id = 1;
|
65
|
+
|
66
|
+
// The version string of the terms of service.
|
67
|
+
// For acceptable values, see the comments for
|
68
|
+
// [id][google.cloud.discoveryengine.v1.Project.ServiceTerms.id] above.
|
69
|
+
string version = 2;
|
70
|
+
|
71
|
+
// Whether the project has accepted/rejected the service terms or it is
|
72
|
+
// still pending.
|
73
|
+
State state = 4;
|
74
|
+
|
75
|
+
// The last time when the project agreed to the terms of service.
|
76
|
+
google.protobuf.Timestamp accept_time = 5;
|
77
|
+
|
78
|
+
// The last time when the project declined or revoked the agreement to terms
|
79
|
+
// of service.
|
80
|
+
google.protobuf.Timestamp decline_time = 6;
|
81
|
+
}
|
82
|
+
|
83
|
+
// Output only. Full resource name of the project, for example
|
84
|
+
// `projects/{project_number}`.
|
85
|
+
// Note that when making requests, project number and project id are both
|
86
|
+
// acceptable, but the server will always respond in project number.
|
87
|
+
string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
|
88
|
+
|
89
|
+
// Output only. The timestamp when this project is created.
|
90
|
+
google.protobuf.Timestamp create_time = 2
|
91
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
92
|
+
|
93
|
+
// Output only. The timestamp when this project is successfully provisioned.
|
94
|
+
// Empty value means this project is still provisioning and is not ready for
|
95
|
+
// use.
|
96
|
+
google.protobuf.Timestamp provision_completion_time = 3
|
97
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
98
|
+
|
99
|
+
// Output only. A map of terms of services. The key is the `id` of
|
100
|
+
// [ServiceTerms][google.cloud.discoveryengine.v1.Project.ServiceTerms].
|
101
|
+
map<string, ServiceTerms> service_terms_map = 4
|
102
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
103
|
+
}
|
@@ -0,0 +1,90 @@
|
|
1
|
+
// Copyright 2024 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.v1;
|
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/v1/project.proto";
|
24
|
+
import "google/longrunning/operations.proto";
|
25
|
+
|
26
|
+
option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1";
|
27
|
+
option go_package = "cloud.google.com/go/discoveryengine/apiv1/discoveryenginepb;discoveryenginepb";
|
28
|
+
option java_multiple_files = true;
|
29
|
+
option java_outer_classname = "ProjectServiceProto";
|
30
|
+
option java_package = "com.google.cloud.discoveryengine.v1";
|
31
|
+
option objc_class_prefix = "DISCOVERYENGINE";
|
32
|
+
option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1";
|
33
|
+
option ruby_package = "Google::Cloud::DiscoveryEngine::V1";
|
34
|
+
|
35
|
+
// Service for operations on the
|
36
|
+
// [Project][google.cloud.discoveryengine.v1.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
|
+
// Provisions the project resource. During the
|
43
|
+
// process, related systems will get prepared and initialized.
|
44
|
+
//
|
45
|
+
// Caller must read the [Terms for data
|
46
|
+
// use](https://cloud.google.com/retail/data-use-terms), and optionally
|
47
|
+
// specify in request to provide consent to that service terms.
|
48
|
+
rpc ProvisionProject(ProvisionProjectRequest)
|
49
|
+
returns (google.longrunning.Operation) {
|
50
|
+
option (google.api.http) = {
|
51
|
+
post: "/v1/{name=projects/*}:provision"
|
52
|
+
body: "*"
|
53
|
+
};
|
54
|
+
option (google.api.method_signature) = "name";
|
55
|
+
option (google.longrunning.operation_info) = {
|
56
|
+
response_type: "google.cloud.discoveryengine.v1.Project"
|
57
|
+
metadata_type: "google.cloud.discoveryengine.v1.ProvisionProjectMetadata"
|
58
|
+
};
|
59
|
+
}
|
60
|
+
}
|
61
|
+
|
62
|
+
// Request for
|
63
|
+
// [ProjectService.ProvisionProject][google.cloud.discoveryengine.v1.ProjectService.ProvisionProject]
|
64
|
+
// method.
|
65
|
+
message ProvisionProjectRequest {
|
66
|
+
// Required. Full resource name of a
|
67
|
+
// [Project][google.cloud.discoveryengine.v1.Project], such as
|
68
|
+
// `projects/{project_id_or_number}`.
|
69
|
+
string name = 1 [
|
70
|
+
(google.api.field_behavior) = REQUIRED,
|
71
|
+
(google.api.resource_reference) = {
|
72
|
+
type: "discoveryengine.googleapis.com/Project"
|
73
|
+
}
|
74
|
+
];
|
75
|
+
|
76
|
+
// Required. Set to `true` to specify that caller has read and would like to
|
77
|
+
// give consent to the [Terms for data
|
78
|
+
// use](https://cloud.google.com/retail/data-use-terms).
|
79
|
+
bool accept_data_use_terms = 2 [(google.api.field_behavior) = REQUIRED];
|
80
|
+
|
81
|
+
// Required. The version of the [Terms for data
|
82
|
+
// use](https://cloud.google.com/retail/data-use-terms) that caller has read
|
83
|
+
// and would like to give consent to.
|
84
|
+
//
|
85
|
+
// Acceptable version is `2022-11-23`, and this may change over time.
|
86
|
+
string data_use_terms_version = 3 [(google.api.field_behavior) = REQUIRED];
|
87
|
+
}
|
88
|
+
|
89
|
+
// Metadata associated with a project provision operation.
|
90
|
+
message ProvisionProjectMetadata {}
|