@google-cloud/discoveryengine 1.9.0 → 1.10.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 +2 -0
- package/build/protos/google/cloud/discoveryengine/v1/answer.proto +13 -0
- package/build/protos/google/cloud/discoveryengine/v1/chunk.proto +119 -0
- package/build/protos/google/cloud/discoveryengine/v1/common.proto +0 -5
- package/build/protos/google/cloud/discoveryengine/v1/completion.proto +31 -0
- package/build/protos/google/cloud/discoveryengine/v1/completion_service.proto +38 -0
- package/build/protos/google/cloud/discoveryengine/v1/conversational_search_service.proto +35 -0
- package/build/protos/google/cloud/discoveryengine/v1/document.proto +1 -1
- package/build/protos/google/cloud/discoveryengine/v1/document_processing_config.proto +37 -2
- package/build/protos/google/cloud/discoveryengine/v1/import_config.proto +108 -0
- package/build/protos/google/cloud/discoveryengine/v1/purge_config.proto +38 -0
- package/build/protos/google/cloud/discoveryengine/v1/search_service.proto +200 -4
- package/build/protos/google/cloud/discoveryengine/v1/user_event_service.proto +3 -0
- package/build/protos/protos.d.ts +3851 -1527
- package/build/protos/protos.js +14056 -8213
- package/build/protos/protos.json +548 -8
- package/build/src/v1/completion_service_client.d.ts +220 -0
- package/build/src/v1/completion_service_client.js +260 -0
- package/build/src/v1/completion_service_client_config.json +10 -0
- package/build/src/v1/control_service_client.d.ts +129 -1
- package/build/src/v1/control_service_client.js +176 -0
- package/build/src/v1/conversational_search_service_client.d.ts +147 -1
- package/build/src/v1/conversational_search_service_client.js +176 -0
- package/build/src/v1/data_store_service_client.d.ts +129 -1
- package/build/src/v1/data_store_service_client.js +176 -0
- package/build/src/v1/document_service_client.d.ts +131 -1
- package/build/src/v1/document_service_client.js +176 -0
- package/build/src/v1/engine_service_client.d.ts +129 -1
- package/build/src/v1/engine_service_client.js +176 -0
- package/build/src/v1/grounded_generation_service_client.d.ts +129 -0
- package/build/src/v1/grounded_generation_service_client.js +176 -0
- package/build/src/v1/project_service_client.d.ts +129 -0
- package/build/src/v1/project_service_client.js +176 -0
- package/build/src/v1/rank_service_client.d.ts +129 -0
- package/build/src/v1/rank_service_client.js +176 -0
- package/build/src/v1/recommendation_service_client.d.ts +129 -0
- package/build/src/v1/recommendation_service_client.js +176 -0
- package/build/src/v1/schema_service_client.d.ts +129 -1
- package/build/src/v1/schema_service_client.js +176 -0
- package/build/src/v1/search_service_client.d.ts +252 -1
- package/build/src/v1/search_service_client.js +258 -0
- package/build/src/v1/site_search_engine_service_client.d.ts +129 -1
- package/build/src/v1/site_search_engine_service_client.js +176 -0
- package/build/src/v1/user_event_service_client.d.ts +129 -0
- package/build/src/v1/user_event_service_client.js +176 -0
- package/build/src/v1alpha/chunk_service_client.d.ts +0 -1
- package/build/src/v1alpha/control_service_client.d.ts +0 -1
- package/build/src/v1alpha/conversational_search_service_client.d.ts +0 -1
- package/build/src/v1alpha/data_store_service_client.d.ts +0 -1
- package/build/src/v1alpha/document_service_client.d.ts +0 -1
- package/build/src/v1alpha/engine_service_client.d.ts +0 -1
- package/build/src/v1alpha/schema_service_client.d.ts +0 -1
- package/build/src/v1alpha/search_service_client.d.ts +0 -1
- package/build/src/v1alpha/serving_config_service_client.d.ts +0 -1
- package/build/src/v1alpha/site_search_engine_service_client.d.ts +0 -1
- package/build/src/v1beta/control_service_client.d.ts +0 -1
- package/build/src/v1beta/conversational_search_service_client.d.ts +0 -1
- package/build/src/v1beta/data_store_service_client.d.ts +0 -1
- package/build/src/v1beta/document_service_client.d.ts +0 -1
- package/build/src/v1beta/engine_service_client.d.ts +0 -1
- package/build/src/v1beta/schema_service_client.d.ts +0 -1
- package/build/src/v1beta/search_service_client.d.ts +0 -1
- package/build/src/v1beta/serving_config_service_client.d.ts +0 -1
- package/build/src/v1beta/site_search_engine_service_client.d.ts +0 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,12 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [1.10.0](https://github.com/googleapis/google-cloud-node/compare/discoveryengine-v1.9.0...discoveryengine-v1.10.0) (2024-07-10)
|
4
|
+
|
5
|
+
|
6
|
+
### Features
|
7
|
+
|
8
|
+
* [discoveryengine] add Chunk resource in the search response ([#5526](https://github.com/googleapis/google-cloud-node/issues/5526)) ([b0dc1b2](https://github.com/googleapis/google-cloud-node/commit/b0dc1b2ef66334394613c6e92a4c5b0ebb8e0faf))
|
9
|
+
|
3
10
|
## [1.9.0](https://github.com/googleapis/google-cloud-node/compare/discoveryengine-v1.8.0...discoveryengine-v1.9.0) (2024-06-03)
|
4
11
|
|
5
12
|
|
package/README.md
CHANGED
@@ -126,7 +126,9 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/
|
|
126
126
|
| Sample | Source Code | Try it |
|
127
127
|
| --------------------------- | --------------------------------- | ------ |
|
128
128
|
| Completion_service.complete_query | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1/completion_service.complete_query.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1/completion_service.complete_query.js,packages/google-cloud-discoveryengine/samples/README.md) |
|
129
|
+
| Completion_service.import_completion_suggestions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1/completion_service.import_completion_suggestions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1/completion_service.import_completion_suggestions.js,packages/google-cloud-discoveryengine/samples/README.md) |
|
129
130
|
| Completion_service.import_suggestion_deny_list_entries | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1/completion_service.import_suggestion_deny_list_entries.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1/completion_service.import_suggestion_deny_list_entries.js,packages/google-cloud-discoveryengine/samples/README.md) |
|
131
|
+
| Completion_service.purge_completion_suggestions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1/completion_service.purge_completion_suggestions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1/completion_service.purge_completion_suggestions.js,packages/google-cloud-discoveryengine/samples/README.md) |
|
130
132
|
| Completion_service.purge_suggestion_deny_list_entries | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1/completion_service.purge_suggestion_deny_list_entries.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1/completion_service.purge_suggestion_deny_list_entries.js,packages/google-cloud-discoveryengine/samples/README.md) |
|
131
133
|
| Control_service.create_control | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1/control_service.create_control.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1/control_service.create_control.js,packages/google-cloud-discoveryengine/samples/README.md) |
|
132
134
|
| Control_service.delete_control | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1/control_service.delete_control.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1/control_service.delete_control.js,packages/google-cloud-discoveryengine/samples/README.md) |
|
@@ -188,6 +188,13 @@ message Answer {
|
|
188
188
|
// If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on,
|
189
189
|
// populate chunk info.
|
190
190
|
repeated ChunkInfo chunk_info = 5;
|
191
|
+
|
192
|
+
// Data representation.
|
193
|
+
// The structured JSON data for the document.
|
194
|
+
// It's populated from the struct data from the Document (code
|
195
|
+
// pointer: http://shortn/_objzAfIiHq), or the Chunk in search result
|
196
|
+
// (code pointer: http://shortn/_Ipo6KFFGBL).
|
197
|
+
google.protobuf.Struct struct_data = 6;
|
191
198
|
}
|
192
199
|
|
193
200
|
// Search results observed by the search action, it can be snippets info
|
@@ -296,6 +303,12 @@ message Answer {
|
|
296
303
|
// Google skips the answer if there is a potential policy violation
|
297
304
|
// detected. This includes content that may be violent or toxic.
|
298
305
|
POTENTIAL_POLICY_VIOLATION = 4;
|
306
|
+
|
307
|
+
// The no relevant content case.
|
308
|
+
//
|
309
|
+
// Google skips the answer if there is no relevant content in the
|
310
|
+
// retrieved search results.
|
311
|
+
NO_RELEVANT_CONTENT = 5;
|
299
312
|
}
|
300
313
|
|
301
314
|
// Immutable. Fully qualified name
|
@@ -0,0 +1,119 @@
|
|
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/struct.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 = "ChunkProto";
|
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
|
+
// Chunk captures all raw metadata information of items to be recommended or
|
33
|
+
// searched in the chunk mode.
|
34
|
+
message Chunk {
|
35
|
+
option (google.api.resource) = {
|
36
|
+
type: "discoveryengine.googleapis.com/Chunk"
|
37
|
+
pattern: "projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}"
|
38
|
+
pattern: "projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}"
|
39
|
+
};
|
40
|
+
|
41
|
+
// Document metadata contains the information of the document of the current
|
42
|
+
// chunk.
|
43
|
+
message DocumentMetadata {
|
44
|
+
// Uri of the document.
|
45
|
+
string uri = 1;
|
46
|
+
|
47
|
+
// Title of the document.
|
48
|
+
string title = 2;
|
49
|
+
|
50
|
+
// Data representation.
|
51
|
+
// The structured JSON data for the document. It should conform to the
|
52
|
+
// registered [Schema][google.cloud.discoveryengine.v1.Schema] or an
|
53
|
+
// `INVALID_ARGUMENT` error is thrown.
|
54
|
+
google.protobuf.Struct struct_data = 3;
|
55
|
+
}
|
56
|
+
|
57
|
+
// Page span of the chunk.
|
58
|
+
message PageSpan {
|
59
|
+
// The start page of the chunk.
|
60
|
+
int32 page_start = 1;
|
61
|
+
|
62
|
+
// The end page of the chunk.
|
63
|
+
int32 page_end = 2;
|
64
|
+
}
|
65
|
+
|
66
|
+
// Metadata of the current chunk. This field is only populated on
|
67
|
+
// [SearchService.Search][google.cloud.discoveryengine.v1.SearchService.Search]
|
68
|
+
// API.
|
69
|
+
message ChunkMetadata {
|
70
|
+
// The previous chunks of the current chunk. The number is controlled by
|
71
|
+
// [SearchRequest.ContentSearchSpec.ChunkSpec.num_previous_chunks][google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ChunkSpec.num_previous_chunks].
|
72
|
+
// This field is only populated on
|
73
|
+
// [SearchService.Search][google.cloud.discoveryengine.v1.SearchService.Search]
|
74
|
+
// API.
|
75
|
+
repeated Chunk previous_chunks = 1;
|
76
|
+
|
77
|
+
// The next chunks of the current chunk. The number is controlled by
|
78
|
+
// [SearchRequest.ContentSearchSpec.ChunkSpec.num_next_chunks][google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ChunkSpec.num_next_chunks].
|
79
|
+
// This field is only populated on
|
80
|
+
// [SearchService.Search][google.cloud.discoveryengine.v1.SearchService.Search]
|
81
|
+
// API.
|
82
|
+
repeated Chunk next_chunks = 2;
|
83
|
+
}
|
84
|
+
|
85
|
+
// The full resource name of the chunk.
|
86
|
+
// Format:
|
87
|
+
// `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}/chunks/{chunk_id}`.
|
88
|
+
//
|
89
|
+
// This field must be a UTF-8 encoded string with a length limit of 1024
|
90
|
+
// characters.
|
91
|
+
string name = 1;
|
92
|
+
|
93
|
+
// Unique chunk ID of the current chunk.
|
94
|
+
string id = 2;
|
95
|
+
|
96
|
+
// Content is a string from a document (parsed content).
|
97
|
+
string content = 3;
|
98
|
+
|
99
|
+
// Output only. Represents the relevance score based on similarity.
|
100
|
+
// Higher score indicates higher chunk relevance.
|
101
|
+
// The score is in range [-1.0, 1.0].
|
102
|
+
// Only populated on [SearchService.SearchResponse][].
|
103
|
+
optional double relevance_score = 8
|
104
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
105
|
+
|
106
|
+
// Metadata of the document from the current chunk.
|
107
|
+
DocumentMetadata document_metadata = 5;
|
108
|
+
|
109
|
+
// Output only. This field is OUTPUT_ONLY.
|
110
|
+
// It contains derived data that are not in the original input document.
|
111
|
+
google.protobuf.Struct derived_struct_data = 4
|
112
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
113
|
+
|
114
|
+
// Page span of the chunk.
|
115
|
+
PageSpan page_span = 6;
|
116
|
+
|
117
|
+
// Output only. Metadata of the current chunk.
|
118
|
+
ChunkMetadata chunk_metadata = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
|
119
|
+
}
|
@@ -57,11 +57,6 @@ option (google.api.resource_definition) = {
|
|
57
57
|
type: "healthcare.googleapis.com/FhirStore"
|
58
58
|
pattern: "projects/{project}/locations/{location}/datasets/{dataset}/fhirStores/{fhir_store}"
|
59
59
|
};
|
60
|
-
option (google.api.resource_definition) = {
|
61
|
-
type: "discoveryengine.googleapis.com/Chunk"
|
62
|
-
pattern: "projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}"
|
63
|
-
pattern: "projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}"
|
64
|
-
};
|
65
60
|
|
66
61
|
// The industry vertical associated with the
|
67
62
|
// [DataStore][google.cloud.discoveryengine.v1.DataStore].
|
@@ -50,3 +50,34 @@ message SuggestionDenyListEntry {
|
|
50
50
|
// exact phrase, or block any suggestions containing this phrase.
|
51
51
|
MatchOperator match_operator = 2 [(google.api.field_behavior) = REQUIRED];
|
52
52
|
}
|
53
|
+
|
54
|
+
// Autocomplete suggestions that are imported from Customer.
|
55
|
+
message CompletionSuggestion {
|
56
|
+
// Ranking metrics of this suggestion.
|
57
|
+
oneof ranking_info {
|
58
|
+
// Global score of this suggestion. Control how this suggestion would be
|
59
|
+
// scored / ranked.
|
60
|
+
double global_score = 2;
|
61
|
+
|
62
|
+
// Frequency of this suggestion. Will be used to rank suggestions when score
|
63
|
+
// is not available.
|
64
|
+
int64 frequency = 3;
|
65
|
+
}
|
66
|
+
|
67
|
+
// Required. The suggestion text.
|
68
|
+
string suggestion = 1 [(google.api.field_behavior) = REQUIRED];
|
69
|
+
|
70
|
+
// BCP-47 language code of this suggestion.
|
71
|
+
string language_code = 4;
|
72
|
+
|
73
|
+
// If two suggestions have the same groupId, they will not be
|
74
|
+
// returned together. Instead the one ranked higher will be returned. This can
|
75
|
+
// be used to deduplicate semantically identical suggestions.
|
76
|
+
string group_id = 5;
|
77
|
+
|
78
|
+
// The score of this suggestion within its group.
|
79
|
+
double group_score = 6;
|
80
|
+
|
81
|
+
// Alternative matching phrases for this suggestion.
|
82
|
+
repeated string alternative_phrases = 7;
|
83
|
+
}
|
@@ -86,6 +86,44 @@ service CompletionService {
|
|
86
86
|
metadata_type: "google.cloud.discoveryengine.v1.PurgeSuggestionDenyListEntriesMetadata"
|
87
87
|
};
|
88
88
|
}
|
89
|
+
|
90
|
+
// Imports
|
91
|
+
// [CompletionSuggestion][google.cloud.discoveryengine.v1.CompletionSuggestion]s
|
92
|
+
// for a DataStore.
|
93
|
+
rpc ImportCompletionSuggestions(ImportCompletionSuggestionsRequest)
|
94
|
+
returns (google.longrunning.Operation) {
|
95
|
+
option (google.api.http) = {
|
96
|
+
post: "/v1/{parent=projects/*/locations/*/collections/*/dataStores/*}/completionSuggestions:import"
|
97
|
+
body: "*"
|
98
|
+
additional_bindings {
|
99
|
+
post: "/v1/{parent=projects/*/locations/*/dataStores/*}/completionSuggestions:import"
|
100
|
+
body: "*"
|
101
|
+
}
|
102
|
+
};
|
103
|
+
option (google.longrunning.operation_info) = {
|
104
|
+
response_type: "google.cloud.discoveryengine.v1.ImportCompletionSuggestionsResponse"
|
105
|
+
metadata_type: "google.cloud.discoveryengine.v1.ImportCompletionSuggestionsMetadata"
|
106
|
+
};
|
107
|
+
}
|
108
|
+
|
109
|
+
// Permanently deletes all
|
110
|
+
// [CompletionSuggestion][google.cloud.discoveryengine.v1.CompletionSuggestion]s
|
111
|
+
// for a DataStore.
|
112
|
+
rpc PurgeCompletionSuggestions(PurgeCompletionSuggestionsRequest)
|
113
|
+
returns (google.longrunning.Operation) {
|
114
|
+
option (google.api.http) = {
|
115
|
+
post: "/v1/{parent=projects/*/locations/*/collections/*/dataStores/*}/completionSuggestions:purge"
|
116
|
+
body: "*"
|
117
|
+
additional_bindings {
|
118
|
+
post: "/v1/{parent=projects/*/locations/*/dataStores/*}/completionSuggestions:purge"
|
119
|
+
body: "*"
|
120
|
+
}
|
121
|
+
};
|
122
|
+
option (google.longrunning.operation_info) = {
|
123
|
+
response_type: "google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsResponse"
|
124
|
+
metadata_type: "google.cloud.discoveryengine.v1.PurgeCompletionSuggestionsMetadata"
|
125
|
+
};
|
126
|
+
}
|
89
127
|
}
|
90
128
|
|
91
129
|
// Request message for
|
@@ -583,6 +583,17 @@ message AnswerQueryRequest {
|
|
583
583
|
// If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
|
584
584
|
string order_by = 4;
|
585
585
|
|
586
|
+
// Specifies the search result mode. If unspecified, the
|
587
|
+
// search result mode is based on
|
588
|
+
// [DataStore.DocumentProcessingConfig.chunking_config][]:
|
589
|
+
// * If [DataStore.DocumentProcessingConfig.chunking_config][] is
|
590
|
+
// specified,
|
591
|
+
// it defaults to `CHUNKS`.
|
592
|
+
// * Otherwise, it defaults to `DOCUMENTS`.
|
593
|
+
// See [parse and chunk
|
594
|
+
// documents](https://cloud.google.com/generative-ai-app-builder/docs/parse-chunk-documents)
|
595
|
+
SearchRequest.ContentSearchSpec.SearchResultMode search_result_mode = 5;
|
596
|
+
|
586
597
|
// Specs defining dataStores to filter on in a search call and
|
587
598
|
// configurations for those dataStores. This is only considered for
|
588
599
|
// engines with multiple dataStores use case. For single dataStore within
|
@@ -706,6 +717,11 @@ message AnswerQueryRequest {
|
|
706
717
|
message QueryRephraserSpec {
|
707
718
|
// Disable query rephraser.
|
708
719
|
bool disable = 1;
|
720
|
+
|
721
|
+
// Max rephrase steps.
|
722
|
+
// The max number is 5 steps.
|
723
|
+
// If not set or set to < 1, it will be set to 1 by default.
|
724
|
+
int32 max_rephrase_steps = 2;
|
709
725
|
}
|
710
726
|
|
711
727
|
// Query classification specification.
|
@@ -777,6 +793,25 @@ message AnswerQueryRequest {
|
|
777
793
|
// The field must be a UTF-8 encoded string with a length limit of 128
|
778
794
|
// characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
|
779
795
|
string user_pseudo_id = 12;
|
796
|
+
|
797
|
+
// The user labels applied to a resource must meet the following requirements:
|
798
|
+
//
|
799
|
+
// * Each resource can have multiple labels, up to a maximum of 64.
|
800
|
+
// * Each label must be a key-value pair.
|
801
|
+
// * Keys have a minimum length of 1 character and a maximum length of 63
|
802
|
+
// characters and cannot be empty. Values can be empty and have a maximum
|
803
|
+
// length of 63 characters.
|
804
|
+
// * Keys and values can contain only lowercase letters, numeric characters,
|
805
|
+
// underscores, and dashes. All characters must use UTF-8 encoding, and
|
806
|
+
// international characters are allowed.
|
807
|
+
// * The key portion of a label must be unique. However, you can use the same
|
808
|
+
// key with multiple resources.
|
809
|
+
// * Keys must start with a lowercase letter or international character.
|
810
|
+
//
|
811
|
+
// See [Google Cloud
|
812
|
+
// Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
|
813
|
+
// for more details.
|
814
|
+
map<string, string> user_labels = 13;
|
780
815
|
}
|
781
816
|
|
782
817
|
// Response message for
|
@@ -54,7 +54,7 @@ message Document {
|
|
54
54
|
|
55
55
|
// The URI of the content. Only Cloud Storage URIs (e.g.
|
56
56
|
// `gs://bucket-name/path/to/file`) are supported. The maximum file size
|
57
|
-
// is 2.5 MB for text-based formats,
|
57
|
+
// is 2.5 MB for text-based formats, 200 MB for other formats.
|
58
58
|
string uri = 3;
|
59
59
|
}
|
60
60
|
|
@@ -41,6 +41,30 @@ message DocumentProcessingConfig {
|
|
41
41
|
pattern: "projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/documentProcessingConfig"
|
42
42
|
};
|
43
43
|
|
44
|
+
// Configuration for chunking config.
|
45
|
+
message ChunkingConfig {
|
46
|
+
// Configuration for the layout based chunking.
|
47
|
+
message LayoutBasedChunkingConfig {
|
48
|
+
// The token size limit for each chunk.
|
49
|
+
//
|
50
|
+
// Supported values: 100-500 (inclusive).
|
51
|
+
// Default value: 500.
|
52
|
+
int32 chunk_size = 1;
|
53
|
+
|
54
|
+
// Whether to include appending different levels of headings to chunks
|
55
|
+
// from the middle of the document to prevent context loss.
|
56
|
+
//
|
57
|
+
// Default value: False.
|
58
|
+
bool include_ancestor_headings = 2;
|
59
|
+
}
|
60
|
+
|
61
|
+
// Additional configs that defines the behavior of the chunking.
|
62
|
+
oneof chunk_mode {
|
63
|
+
// Configuration for the layout based chunking.
|
64
|
+
LayoutBasedChunkingConfig layout_based_chunking_config = 1;
|
65
|
+
}
|
66
|
+
}
|
67
|
+
|
44
68
|
// Related configurations applied to a specific type of document parser.
|
45
69
|
message ParsingConfig {
|
46
70
|
// The digital parsing configurations for documents.
|
@@ -57,6 +81,9 @@ message DocumentProcessingConfig {
|
|
57
81
|
bool use_native_text = 2;
|
58
82
|
}
|
59
83
|
|
84
|
+
// The layout parsing configurations for documents.
|
85
|
+
message LayoutParsingConfig {}
|
86
|
+
|
60
87
|
// Configs for document processing types.
|
61
88
|
oneof type_dedicated_config {
|
62
89
|
// Configurations applied to digital parser.
|
@@ -65,6 +92,9 @@ message DocumentProcessingConfig {
|
|
65
92
|
// Configurations applied to OCR parser. Currently it only applies to
|
66
93
|
// PDFs.
|
67
94
|
OcrParsingConfig ocr_parsing_config = 2;
|
95
|
+
|
96
|
+
// Configurations applied to layout parser.
|
97
|
+
LayoutParsingConfig layout_parsing_config = 3;
|
68
98
|
}
|
69
99
|
}
|
70
100
|
|
@@ -73,6 +103,9 @@ message DocumentProcessingConfig {
|
|
73
103
|
// `projects/*/locations/*/collections/*/dataStores/*/documentProcessingConfig`.
|
74
104
|
string name = 1;
|
75
105
|
|
106
|
+
// Whether chunking mode is enabled.
|
107
|
+
ChunkingConfig chunking_config = 3;
|
108
|
+
|
76
109
|
// Configurations for default Document parser.
|
77
110
|
// If not specified, we will configure it as default DigitalParsingConfig, and
|
78
111
|
// the default parsing config will be applied to all file types for Document
|
@@ -85,8 +118,10 @@ message DocumentProcessingConfig {
|
|
85
118
|
// * `pdf`: Override parsing config for PDF files, either digital parsing, ocr
|
86
119
|
// parsing or layout parsing is supported.
|
87
120
|
// * `html`: Override parsing config for HTML files, only digital parsing and
|
88
|
-
//
|
121
|
+
// layout parsing are supported.
|
89
122
|
// * `docx`: Override parsing config for DOCX files, only digital parsing and
|
90
|
-
//
|
123
|
+
// layout parsing are supported.
|
124
|
+
// * `pptx`: Override parsing config for PPTX files, only digital parsing and
|
125
|
+
// layout parsing are supported.
|
91
126
|
map<string, ParsingConfig> parsing_config_overrides = 5;
|
92
127
|
}
|
@@ -325,6 +325,38 @@ message CloudSqlSource {
|
|
325
325
|
bool offload = 6;
|
326
326
|
}
|
327
327
|
|
328
|
+
// AlloyDB source import data from.
|
329
|
+
message AlloyDbSource {
|
330
|
+
// The project ID that the AlloyDB source is in
|
331
|
+
// with a length limit of 128 characters. If not specified, inherits the
|
332
|
+
// project ID from the parent request.
|
333
|
+
string project_id = 1;
|
334
|
+
|
335
|
+
// Required. The AlloyDB location to copy the data from with a length limit of
|
336
|
+
// 256 characters.
|
337
|
+
string location_id = 2 [(google.api.field_behavior) = REQUIRED];
|
338
|
+
|
339
|
+
// Required. The AlloyDB cluster to copy the data from with a length limit of
|
340
|
+
// 256 characters.
|
341
|
+
string cluster_id = 3 [(google.api.field_behavior) = REQUIRED];
|
342
|
+
|
343
|
+
// Required. The AlloyDB database to copy the data from with a length limit of
|
344
|
+
// 256 characters.
|
345
|
+
string database_id = 4 [(google.api.field_behavior) = REQUIRED];
|
346
|
+
|
347
|
+
// Required. The AlloyDB table to copy the data from with a length limit of
|
348
|
+
// 256 characters.
|
349
|
+
string table_id = 5 [(google.api.field_behavior) = REQUIRED];
|
350
|
+
|
351
|
+
// Intermediate Cloud Storage directory used for the import with a length
|
352
|
+
// limit of 2,000 characters. Can be specified if one wants to have the
|
353
|
+
// AlloyDB export to a specific Cloud Storage directory.
|
354
|
+
//
|
355
|
+
// Ensure that the AlloyDB service account has the necessary Cloud
|
356
|
+
// Storage Admin permissions to access the specified Cloud Storage directory.
|
357
|
+
string gcs_staging_dir = 6;
|
358
|
+
}
|
359
|
+
|
328
360
|
// Firestore source import data from.
|
329
361
|
message FirestoreSource {
|
330
362
|
// The project ID that the Cloud SQL source is in with a length limit of 128
|
@@ -498,6 +530,9 @@ message ImportDocumentsRequest {
|
|
498
530
|
// Firestore input source.
|
499
531
|
FirestoreSource firestore_source = 13;
|
500
532
|
|
533
|
+
// AlloyDB input source.
|
534
|
+
AlloyDbSource alloy_db_source = 14;
|
535
|
+
|
501
536
|
// Cloud Bigtable input source.
|
502
537
|
BigtableSource bigtable_source = 15;
|
503
538
|
}
|
@@ -662,3 +697,76 @@ message ImportSuggestionDenyListEntriesMetadata {
|
|
662
697
|
// finish time.
|
663
698
|
google.protobuf.Timestamp update_time = 2;
|
664
699
|
}
|
700
|
+
|
701
|
+
// Request message for
|
702
|
+
// [CompletionService.ImportCompletionSuggestions][google.cloud.discoveryengine.v1.CompletionService.ImportCompletionSuggestions]
|
703
|
+
// method.
|
704
|
+
message ImportCompletionSuggestionsRequest {
|
705
|
+
// The inline source for CompletionSuggestions.
|
706
|
+
message InlineSource {
|
707
|
+
// Required. A list of all denylist entries to import. Max of 1000 items.
|
708
|
+
repeated CompletionSuggestion suggestions = 1
|
709
|
+
[(google.api.field_behavior) = REQUIRED];
|
710
|
+
}
|
711
|
+
|
712
|
+
// The source of the autocomplete suggestions.
|
713
|
+
oneof source {
|
714
|
+
// The Inline source for suggestion entries.
|
715
|
+
InlineSource inline_source = 2;
|
716
|
+
|
717
|
+
// Cloud Storage location for the input content.
|
718
|
+
GcsSource gcs_source = 3;
|
719
|
+
|
720
|
+
// BigQuery input source.
|
721
|
+
BigQuerySource bigquery_source = 4;
|
722
|
+
}
|
723
|
+
|
724
|
+
// Required. The parent data store resource name for which to import customer
|
725
|
+
// autocomplete suggestions.
|
726
|
+
//
|
727
|
+
// Follows pattern `projects/*/locations/*/collections/*/dataStores/*`
|
728
|
+
string parent = 1 [
|
729
|
+
(google.api.field_behavior) = REQUIRED,
|
730
|
+
(google.api.resource_reference) = {
|
731
|
+
type: "discoveryengine.googleapis.com/DataStore"
|
732
|
+
}
|
733
|
+
];
|
734
|
+
|
735
|
+
// The desired location of errors incurred during the Import.
|
736
|
+
ImportErrorConfig error_config = 5;
|
737
|
+
}
|
738
|
+
|
739
|
+
// Response of the
|
740
|
+
// [CompletionService.ImportCompletionSuggestions][google.cloud.discoveryengine.v1.CompletionService.ImportCompletionSuggestions]
|
741
|
+
// method. If the long running operation is done, this message is returned by
|
742
|
+
// the google.longrunning.Operations.response field if the operation is
|
743
|
+
// successful.
|
744
|
+
message ImportCompletionSuggestionsResponse {
|
745
|
+
// A sample of errors encountered while processing the request.
|
746
|
+
repeated google.rpc.Status error_samples = 1;
|
747
|
+
|
748
|
+
// The desired location of errors incurred during the Import.
|
749
|
+
ImportErrorConfig error_config = 2;
|
750
|
+
}
|
751
|
+
|
752
|
+
// Metadata related to the progress of the ImportCompletionSuggestions
|
753
|
+
// operation. This will be returned by the google.longrunning.Operation.metadata
|
754
|
+
// field.
|
755
|
+
message ImportCompletionSuggestionsMetadata {
|
756
|
+
// Operation create time.
|
757
|
+
google.protobuf.Timestamp create_time = 1;
|
758
|
+
|
759
|
+
// Operation last update time. If the operation is done, this is also the
|
760
|
+
// finish time.
|
761
|
+
google.protobuf.Timestamp update_time = 2;
|
762
|
+
|
763
|
+
// Count of
|
764
|
+
// [CompletionSuggestion][google.cloud.discoveryengine.v1.CompletionSuggestion]s
|
765
|
+
// successfully imported.
|
766
|
+
int64 success_count = 3;
|
767
|
+
|
768
|
+
// Count of
|
769
|
+
// [CompletionSuggestion][google.cloud.discoveryengine.v1.CompletionSuggestion]s
|
770
|
+
// that failed to be imported.
|
771
|
+
int64 failure_count = 4;
|
772
|
+
}
|
@@ -125,3 +125,41 @@ message PurgeSuggestionDenyListEntriesMetadata {
|
|
125
125
|
// finish time.
|
126
126
|
google.protobuf.Timestamp update_time = 2;
|
127
127
|
}
|
128
|
+
|
129
|
+
// Request message for
|
130
|
+
// [CompletionService.PurgeCompletionSuggestions][google.cloud.discoveryengine.v1.CompletionService.PurgeCompletionSuggestions]
|
131
|
+
// method.
|
132
|
+
message PurgeCompletionSuggestionsRequest {
|
133
|
+
// Required. The parent data store resource name for which to purge completion
|
134
|
+
// suggestions. Follows pattern
|
135
|
+
// projects/*/locations/*/collections/*/dataStores/*.
|
136
|
+
string parent = 1 [
|
137
|
+
(google.api.field_behavior) = REQUIRED,
|
138
|
+
(google.api.resource_reference) = {
|
139
|
+
type: "discoveryengine.googleapis.com/DataStore"
|
140
|
+
}
|
141
|
+
];
|
142
|
+
}
|
143
|
+
|
144
|
+
// Response message for
|
145
|
+
// [CompletionService.PurgeCompletionSuggestions][google.cloud.discoveryengine.v1.CompletionService.PurgeCompletionSuggestions]
|
146
|
+
// method.
|
147
|
+
message PurgeCompletionSuggestionsResponse {
|
148
|
+
// Whether the completion suggestions were successfully purged.
|
149
|
+
bool purge_succeeded = 1;
|
150
|
+
|
151
|
+
// A sample of errors encountered while processing the request.
|
152
|
+
repeated google.rpc.Status error_samples = 2;
|
153
|
+
}
|
154
|
+
|
155
|
+
// Metadata related to the progress of the PurgeCompletionSuggestions
|
156
|
+
// operation. This is returned by the google.longrunning.Operation.metadata
|
157
|
+
// field.
|
158
|
+
message PurgeCompletionSuggestionsMetadata {
|
159
|
+
// Operation create time.
|
160
|
+
google.protobuf.Timestamp create_time = 1;
|
161
|
+
|
162
|
+
// Operation last update time. If the operation is done, this is also the
|
163
|
+
// finish time.
|
164
|
+
google.protobuf.Timestamp update_time = 2;
|
165
|
+
}
|