Skip to content

Commit 4fd031d

Browse files
Google APIscopybara-github
authored andcommitted
feat: add data store, engine, serving config and site search engine services
feat: support search summarization with citations and references feat: add suggestion deny list import/purge APIs feat: add engine support for multi-turn search and search APIs docs: keep the API doc up-to-date with recent changes PiperOrigin-RevId: 605344453
1 parent 0646ddd commit 4fd031d

21 files changed

Lines changed: 2695 additions & 59 deletions

google/cloud/discoveryengine/v1beta/BUILD.bazel

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,26 @@ proto_library(
2222
name = "discoveryengine_proto",
2323
srcs = [
2424
"common.proto",
25+
"completion.proto",
2526
"completion_service.proto",
2627
"conversation.proto",
2728
"conversational_search_service.proto",
29+
"data_store.proto",
30+
"data_store_service.proto",
2831
"document.proto",
2932
"document_service.proto",
33+
"engine.proto",
34+
"engine_service.proto",
3035
"import_config.proto",
3136
"purge_config.proto",
3237
"recommendation_service.proto",
3338
"schema.proto",
3439
"schema_service.proto",
3540
"search_service.proto",
41+
"serving_config.proto",
42+
"serving_config_service.proto",
43+
"site_search_engine.proto",
44+
"site_search_engine_service.proto",
3645
"user_event.proto",
3746
"user_event_service.proto",
3847
],
@@ -108,14 +117,22 @@ java_gapic_test(
108117
"com.google.cloud.discoveryengine.v1beta.CompletionServiceClientTest",
109118
"com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceClientHttpJsonTest",
110119
"com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceClientTest",
120+
"com.google.cloud.discoveryengine.v1beta.DataStoreServiceClientHttpJsonTest",
121+
"com.google.cloud.discoveryengine.v1beta.DataStoreServiceClientTest",
111122
"com.google.cloud.discoveryengine.v1beta.DocumentServiceClientHttpJsonTest",
112123
"com.google.cloud.discoveryengine.v1beta.DocumentServiceClientTest",
124+
"com.google.cloud.discoveryengine.v1beta.EngineServiceClientHttpJsonTest",
125+
"com.google.cloud.discoveryengine.v1beta.EngineServiceClientTest",
113126
"com.google.cloud.discoveryengine.v1beta.RecommendationServiceClientHttpJsonTest",
114127
"com.google.cloud.discoveryengine.v1beta.RecommendationServiceClientTest",
115128
"com.google.cloud.discoveryengine.v1beta.SchemaServiceClientHttpJsonTest",
116129
"com.google.cloud.discoveryengine.v1beta.SchemaServiceClientTest",
117130
"com.google.cloud.discoveryengine.v1beta.SearchServiceClientHttpJsonTest",
118131
"com.google.cloud.discoveryengine.v1beta.SearchServiceClientTest",
132+
"com.google.cloud.discoveryengine.v1beta.ServingConfigServiceClientHttpJsonTest",
133+
"com.google.cloud.discoveryengine.v1beta.ServingConfigServiceClientTest",
134+
"com.google.cloud.discoveryengine.v1beta.SiteSearchEngineServiceClientHttpJsonTest",
135+
"com.google.cloud.discoveryengine.v1beta.SiteSearchEngineServiceClientTest",
119136
"com.google.cloud.discoveryengine.v1beta.UserEventServiceClientHttpJsonTest",
120137
"com.google.cloud.discoveryengine.v1beta.UserEventServiceClientTest",
121138
],

google/cloud/discoveryengine/v1beta/common.proto

Lines changed: 59 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,61 @@ option (google.api.resource_definition) = {
3232
pattern: "projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}"
3333
};
3434
option (google.api.resource_definition) = {
35-
type: "discoveryengine.googleapis.com/DataStore"
36-
pattern: "projects/{project}/locations/{location}/dataStores/{data_store}"
37-
pattern: "projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}"
38-
};
39-
option (google.api.resource_definition) = {
40-
type: "discoveryengine.googleapis.com/ServingConfig"
41-
pattern: "projects/{project}/locations/{location}/dataStores/{data_store}/servingConfigs/{serving_config}"
42-
pattern: "projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/servingConfigs/{serving_config}"
35+
type: "discoveryengine.googleapis.com/Collection"
36+
pattern: "projects/{project}/locations/{location}/collections/{collection}"
4337
};
4438

39+
// The industry vertical associated with the
40+
// [DataStore][google.cloud.discoveryengine.v1beta.DataStore].
41+
enum IndustryVertical {
42+
// Value used when unset.
43+
INDUSTRY_VERTICAL_UNSPECIFIED = 0;
44+
45+
// The generic vertical for documents that are not specific to any industry
46+
// vertical.
47+
GENERIC = 1;
48+
49+
// The media industry vertical.
50+
MEDIA = 2;
51+
}
52+
53+
// The type of solution.
54+
enum SolutionType {
55+
// Default value.
56+
SOLUTION_TYPE_UNSPECIFIED = 0;
57+
58+
// Used for Recommendations AI.
59+
SOLUTION_TYPE_RECOMMENDATION = 1;
60+
61+
// Used for Discovery Search.
62+
SOLUTION_TYPE_SEARCH = 2;
63+
64+
// Used for use cases related to the Generative AI agent.
65+
SOLUTION_TYPE_CHAT = 3;
66+
}
67+
68+
// Tiers of search features. Different tiers might have different
69+
// pricing. To learn more, please check the pricing documentation.
70+
enum SearchTier {
71+
// Default value when the enum is unspecified. This is invalid to use.
72+
SEARCH_TIER_UNSPECIFIED = 0;
73+
74+
// Standard tier.
75+
SEARCH_TIER_STANDARD = 1;
76+
77+
// Enterprise tier.
78+
SEARCH_TIER_ENTERPRISE = 2;
79+
}
80+
81+
// Add-on that provides additional functionality for search.
82+
enum SearchAddOn {
83+
// Default value when the enum is unspecified. This is invalid to use.
84+
SEARCH_ADD_ON_UNSPECIFIED = 0;
85+
86+
// Large language model add-on.
87+
SEARCH_ADD_ON_LLM = 1;
88+
}
89+
4590
// A floating point interval.
4691
message Interval {
4792
// The lower bound of the interval. If neither of the min fields are
@@ -127,6 +172,12 @@ message UserInfo {
127172
string user_agent = 2;
128173
}
129174

175+
// Defines embedding config, used for bring your own embeddings feature.
176+
message EmbeddingConfig {
177+
// Full field path in the schema mapped as embedding field.
178+
string field_path = 1;
179+
}
180+
130181
// Double list.
131182
message DoubleList {
132183
// Double values.
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
// Copyright 2022 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
syntax = "proto3";
16+
17+
package google.cloud.discoveryengine.v1beta;
18+
19+
import "google/api/field_behavior.proto";
20+
21+
option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Beta";
22+
option go_package = "cloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;discoveryenginepb";
23+
option java_multiple_files = true;
24+
option java_outer_classname = "CompletionProto";
25+
option java_package = "com.google.cloud.discoveryengine.v1beta";
26+
option objc_class_prefix = "DISCOVERYENGINE";
27+
option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1beta";
28+
option ruby_package = "Google::Cloud::DiscoveryEngine::V1beta";
29+
30+
// Suggestion deny list entry identifying the phrase to block from suggestions
31+
// and the applied operation for the phrase.
32+
message SuggestionDenyListEntry {
33+
// Operator for matching with the generated suggestions.
34+
enum MatchOperator {
35+
// Default value. Should not be used
36+
MATCH_OPERATOR_UNSPECIFIED = 0;
37+
38+
// If the suggestion is an exact match to the block_phrase, then block it.
39+
EXACT_MATCH = 1;
40+
41+
// If the suggestion contains the block_phrase, then block it.
42+
CONTAINS = 2;
43+
}
44+
45+
// Required. Phrase to block from suggestions served. Can be maximum 125
46+
// characters.
47+
string block_phrase = 1 [(google.api.field_behavior) = REQUIRED];
48+
49+
// Required. The match operator to apply for this phrase. Whether to block the
50+
// exact phrase, or block any suggestions containing this phrase.
51+
MatchOperator match_operator = 2 [(google.api.field_behavior) = REQUIRED];
52+
}

google/cloud/discoveryengine/v1beta/completion_service.proto

Lines changed: 51 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ import "google/api/annotations.proto";
2020
import "google/api/client.proto";
2121
import "google/api/field_behavior.proto";
2222
import "google/api/resource.proto";
23+
import "google/cloud/discoveryengine/v1beta/import_config.proto";
24+
import "google/cloud/discoveryengine/v1beta/purge_config.proto";
25+
import "google/longrunning/operations.proto";
2326

2427
option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Beta";
2528
option go_package = "cloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;discoveryenginepb";
@@ -45,6 +48,44 @@ service CompletionService {
4548
}
4649
};
4750
}
51+
52+
// Imports all
53+
// [SuggestionDenyListEntry][google.cloud.discoveryengine.v1beta.SuggestionDenyListEntry]
54+
// for a DataStore.
55+
rpc ImportSuggestionDenyListEntries(ImportSuggestionDenyListEntriesRequest)
56+
returns (google.longrunning.Operation) {
57+
option (google.api.http) = {
58+
post: "/v1beta/{parent=projects/*/locations/*/collections/*/dataStores/*}/suggestionDenyListEntries:import"
59+
body: "*"
60+
additional_bindings {
61+
post: "/v1beta/{parent=projects/*/locations/*/dataStores/*}/suggestionDenyListEntries:import"
62+
body: "*"
63+
}
64+
};
65+
option (google.longrunning.operation_info) = {
66+
response_type: "google.cloud.discoveryengine.v1beta.ImportSuggestionDenyListEntriesResponse"
67+
metadata_type: "google.cloud.discoveryengine.v1beta.ImportSuggestionDenyListEntriesMetadata"
68+
};
69+
}
70+
71+
// Permanently deletes all
72+
// [SuggestionDenyListEntry][google.cloud.discoveryengine.v1beta.SuggestionDenyListEntry]
73+
// for a DataStore.
74+
rpc PurgeSuggestionDenyListEntries(PurgeSuggestionDenyListEntriesRequest)
75+
returns (google.longrunning.Operation) {
76+
option (google.api.http) = {
77+
post: "/v1beta/{parent=projects/*/locations/*/collections/*/dataStores/*}/suggestionDenyListEntries:purge"
78+
body: "*"
79+
additional_bindings {
80+
post: "/v1beta/{parent=projects/*/locations/*/dataStores/**}/suggestionDenyListEntries:purge"
81+
body: "*"
82+
}
83+
};
84+
option (google.longrunning.operation_info) = {
85+
response_type: "google.cloud.discoveryengine.v1beta.PurgeSuggestionDenyListEntriesResponse"
86+
metadata_type: "google.cloud.discoveryengine.v1beta.PurgeSuggestionDenyListEntriesMetadata"
87+
};
88+
}
4889
}
4990

5091
// Request message for
@@ -65,8 +106,9 @@ message CompleteQueryRequest {
65106
// 128 characters.
66107
string query = 2 [(google.api.field_behavior) = REQUIRED];
67108

68-
// Selects data model of query suggestions for serving. Currently supported
69-
// values:
109+
// Specifies the autocomplete data model. This overrides any model specified
110+
// in the Configuration > Autocomplete section of the Cloud console. Currently
111+
// supported values:
70112
//
71113
// * `document` - Using suggestions generated from user-imported documents.
72114
// * `search-history` - Using suggestions generated from the past history of
@@ -80,8 +122,7 @@ message CompleteQueryRequest {
80122
// Default values:
81123
//
82124
// * `document` is the default model for regular dataStores.
83-
// * `search-history` is the default model for
84-
// [IndustryVertical.SITE_SEARCH][] dataStores.
125+
// * `search-history` is the default model for site search dataStores.
85126
string query_model = 3;
86127

87128
// A unique identifier for tracking visitors. For example, this could be
@@ -115,6 +156,12 @@ message CompleteQueryResponse {
115156
message QuerySuggestion {
116157
// The suggestion for the query.
117158
string suggestion = 1;
159+
160+
// The unique document field paths that serve as the source of this
161+
// suggestion if it was generated from completable fields.
162+
//
163+
// This field is only populated for the document-completable model.
164+
repeated string completable_field_paths = 2;
118165
}
119166

120167
// Results of the matched query suggestions. The result list is ordered and

google/cloud/discoveryengine/v1beta/conversation.proto

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ message Conversation {
3636
type: "discoveryengine.googleapis.com/Conversation"
3737
pattern: "projects/{project}/locations/{location}/dataStores/{data_store}/conversations/{conversation}"
3838
pattern: "projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/conversations/{conversation}"
39+
pattern: "projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/conversations/{conversation}"
3940
};
4041

4142
// Enumeration of the state of the conversation.
@@ -52,6 +53,8 @@ message Conversation {
5253

5354
// Immutable. Fully qualified name
5455
// `project/*/locations/global/collections/{collection}/dataStore/*/conversations/*`
56+
// or
57+
// `project/*/locations/global/collections/{collection}/engines/*/conversations/*`.
5558
string name = 1 [(google.api.field_behavior) = IMMUTABLE];
5659

5760
// The state of the Conversation.

google/cloud/discoveryengine/v1beta/conversational_search_service.proto

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ service ConversationalSearchService {
5050
post: "/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/conversations/*}:converse"
5151
body: "*"
5252
}
53+
additional_bindings {
54+
post: "/v1beta/{name=projects/*/locations/*/collections/*/engines/*/conversations/*}:converse"
55+
body: "*"
56+
}
5357
};
5458
option (google.api.method_signature) = "name,query";
5559
}
@@ -66,6 +70,10 @@ service ConversationalSearchService {
6670
post: "/v1beta/{parent=projects/*/locations/*/collections/*/dataStores/*}/conversations"
6771
body: "conversation"
6872
}
73+
additional_bindings {
74+
post: "/v1beta/{parent=projects/*/locations/*/collections/*/engines/*}/conversations"
75+
body: "conversation"
76+
}
6977
};
7078
option (google.api.method_signature) = "parent,conversation";
7179
}
@@ -81,6 +89,9 @@ service ConversationalSearchService {
8189
additional_bindings {
8290
delete: "/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/conversations/*}"
8391
}
92+
additional_bindings {
93+
delete: "/v1beta/{name=projects/*/locations/*/collections/*/engines/*/conversations/*}"
94+
}
8495
};
8596
option (google.api.method_signature) = "name";
8697
}
@@ -99,6 +110,10 @@ service ConversationalSearchService {
99110
patch: "/v1beta/{conversation.name=projects/*/locations/*/collections/*/dataStores/*/conversations/*}"
100111
body: "conversation"
101112
}
113+
additional_bindings {
114+
patch: "/v1beta/{conversation.name=projects/*/locations/*/collections/*/engines/*/conversations/*}"
115+
body: "conversation"
116+
}
102117
};
103118
option (google.api.method_signature) = "conversation,update_mask";
104119
}
@@ -110,6 +125,9 @@ service ConversationalSearchService {
110125
additional_bindings {
111126
get: "/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/conversations/*}"
112127
}
128+
additional_bindings {
129+
get: "/v1beta/{name=projects/*/locations/*/collections/*/engines/*/conversations/*}"
130+
}
113131
};
114132
option (google.api.method_signature) = "name";
115133
}
@@ -123,6 +141,9 @@ service ConversationalSearchService {
123141
additional_bindings {
124142
get: "/v1beta/{parent=projects/*/locations/*/collections/*/dataStores/*}/conversations"
125143
}
144+
additional_bindings {
145+
get: "/v1beta/{parent=projects/*/locations/*/collections/*/engines/*}/conversations"
146+
}
126147
};
127148
option (google.api.method_signature) = "parent";
128149
}
@@ -184,6 +205,24 @@ message ConverseConversationRequest {
184205

185206
// A specification for configuring the summary returned in the response.
186207
SearchRequest.ContentSearchSpec.SummarySpec summary_spec = 8;
208+
209+
// The filter syntax consists of an expression language for constructing a
210+
// predicate from one or more fields of the documents being filtered. Filter
211+
// expression is case-sensitive. This will be used to filter search results
212+
// which may affect the summary response.
213+
//
214+
// If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
215+
//
216+
// Filtering in Vertex AI Search is done by mapping the LHS filter key to a
217+
// key property defined in the Vertex AI Search backend -- this mapping is
218+
// defined by the customer in their schema. For example a media customer might
219+
// have a field 'name' in their schema. In this case the filter would look
220+
// like this: filter --> name:'ANY("king kong")'
221+
//
222+
// For more information about filtering including syntax and filter
223+
// operators, see
224+
// [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
225+
string filter = 9;
187226
}
188227

189228
// Response message for
@@ -227,7 +266,7 @@ message UpdateConversationRequest {
227266
// [Conversation][google.cloud.discoveryengine.v1beta.Conversation] to update.
228267
// The following are NOT supported:
229268
//
230-
// * [conversation.name][]
269+
// * [Conversation.name][google.cloud.discoveryengine.v1beta.Conversation.name]
231270
//
232271
// If not set or empty, all supported fields are updated.
233272
google.protobuf.FieldMask update_mask = 2;

0 commit comments

Comments
 (0)