@google-cloud/discoveryengine 1.5.0 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/README.md +24 -0
- package/build/protos/google/cloud/discoveryengine/v1/common.proto +13 -1
- package/build/protos/google/cloud/discoveryengine/v1/conversational_search_service.proto +5 -0
- package/build/protos/google/cloud/discoveryengine/v1/data_store.proto +17 -0
- package/build/protos/google/cloud/discoveryengine/v1/document.proto +9 -0
- package/build/protos/google/cloud/discoveryengine/v1/document_service.proto +6 -0
- package/build/protos/google/cloud/discoveryengine/v1/engine.proto +2 -2
- package/build/protos/google/cloud/discoveryengine/v1/import_config.proto +284 -22
- package/build/protos/google/cloud/discoveryengine/v1/purge_config.proto +3 -0
- package/build/protos/google/cloud/discoveryengine/v1/recommendation_service.proto +228 -0
- package/build/protos/google/cloud/discoveryengine/v1/search_service.proto +125 -21
- package/build/protos/google/cloud/discoveryengine/v1/user_event.proto +16 -11
- package/build/protos/google/cloud/discoveryengine/v1alpha/answer.proto +328 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/chunk.proto +6 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/common.proto +1 -1
- package/build/protos/google/cloud/discoveryengine/v1alpha/conversational_search_service.proto +574 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/document_processing_config.proto +3 -6
- package/build/protos/google/cloud/discoveryengine/v1alpha/engine.proto +2 -2
- package/build/protos/google/cloud/discoveryengine/v1alpha/grounded_generation_service.proto +120 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/grounding.proto +55 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/import_config.proto +7 -39
- package/build/protos/google/cloud/discoveryengine/v1alpha/project.proto +102 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/project_service.proto +171 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/schema.proto +21 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/search_service.proto +7 -3
- package/build/protos/google/cloud/discoveryengine/v1alpha/search_tuning_service.proto +4 -1
- package/build/protos/google/cloud/discoveryengine/v1alpha/session.proto +94 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/user_event.proto +1 -1
- package/build/protos/google/cloud/discoveryengine/v1beta/answer.proto +328 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/common.proto +30 -1
- package/build/protos/google/cloud/discoveryengine/v1beta/conversational_search_service.proto +559 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/document_processing_config.proto +3 -6
- package/build/protos/google/cloud/discoveryengine/v1beta/document_service.proto +6 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/engine.proto +2 -2
- package/build/protos/google/cloud/discoveryengine/v1beta/engine_service.proto +93 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/grounded_generation_service.proto +120 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/grounding.proto +55 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/import_config.proto +283 -24
- package/build/protos/google/cloud/discoveryengine/v1beta/rank_service.proto +115 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/search_service.proto +142 -22
- package/build/protos/google/cloud/discoveryengine/v1beta/search_tuning_service.proto +7 -1
- package/build/protos/google/cloud/discoveryengine/v1beta/session.proto +94 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/user_event.proto +1 -1
- package/build/protos/protos.d.ts +41126 -24558
- package/build/protos/protos.js +134286 -93661
- package/build/protos/protos.json +7598 -3744
- package/build/src/index.d.ts +4 -1
- package/build/src/index.js +4 -1
- package/build/src/v1/conversational_search_service_client.d.ts +4 -0
- package/build/src/v1/document_service_client.d.ts +47 -19
- package/build/src/v1/index.d.ts +1 -0
- package/build/src/v1/index.js +3 -1
- package/build/src/v1/recommendation_service_client.d.ts +1087 -0
- package/build/src/v1/recommendation_service_client.js +1432 -0
- package/build/src/v1/recommendation_service_client_config.json +43 -0
- package/build/src/v1/search_service_client.d.ts +27 -9
- package/build/src/v1/search_service_client.js +18 -6
- package/build/src/v1/search_service_client_config.json +5 -5
- package/build/src/v1alpha/acl_config_service_client.d.ts +330 -0
- package/build/src/v1alpha/acl_config_service_client.js +454 -0
- package/build/src/v1alpha/chunk_service_client.d.ts +330 -0
- package/build/src/v1alpha/chunk_service_client.js +454 -0
- package/build/src/v1alpha/completion_service_client.d.ts +330 -0
- package/build/src/v1alpha/completion_service_client.js +454 -0
- package/build/src/v1alpha/conversational_search_service_client.d.ts +674 -0
- package/build/src/v1alpha/conversational_search_service_client.js +724 -0
- package/build/src/v1alpha/conversational_search_service_client_config.json +35 -0
- package/build/src/v1alpha/data_store_service_client.d.ts +330 -0
- package/build/src/v1alpha/data_store_service_client.js +454 -0
- package/build/src/v1alpha/document_service_client.d.ts +330 -0
- package/build/src/v1alpha/document_service_client.js +454 -0
- package/build/src/v1alpha/engine_service_client.d.ts +330 -0
- package/build/src/v1alpha/engine_service_client.js +454 -0
- package/build/src/v1alpha/estimate_billing_service_client.d.ts +330 -0
- package/build/src/v1alpha/estimate_billing_service_client.js +454 -0
- package/build/src/v1alpha/grounded_generation_service_client.d.ts +1574 -0
- package/build/src/v1alpha/grounded_generation_service_client.js +2248 -0
- package/build/src/v1alpha/grounded_generation_service_client_config.json +43 -0
- package/build/src/v1alpha/index.d.ts +2 -0
- package/build/src/v1alpha/index.js +5 -1
- package/build/src/v1alpha/project_service_client.d.ts +1756 -0
- package/build/src/v1alpha/project_service_client.js +2500 -0
- package/build/src/v1alpha/project_service_client_config.json +38 -0
- package/build/src/v1alpha/rank_service_client.d.ts +330 -0
- package/build/src/v1alpha/rank_service_client.js +454 -0
- package/build/src/v1alpha/rank_service_client_config.json +15 -2
- package/build/src/v1alpha/recommendation_service_client.d.ts +330 -0
- package/build/src/v1alpha/recommendation_service_client.js +454 -0
- package/build/src/v1alpha/schema_service_client.d.ts +330 -0
- package/build/src/v1alpha/schema_service_client.js +454 -0
- package/build/src/v1alpha/search_service_client.d.ts +330 -0
- package/build/src/v1alpha/search_service_client.js +454 -0
- package/build/src/v1alpha/search_service_client_config.json +5 -5
- package/build/src/v1alpha/search_tuning_service_client.d.ts +330 -0
- package/build/src/v1alpha/search_tuning_service_client.js +454 -0
- package/build/src/v1alpha/serving_config_service_client.d.ts +315 -0
- package/build/src/v1alpha/serving_config_service_client.js +432 -0
- package/build/src/v1alpha/site_search_engine_service_client.d.ts +330 -0
- package/build/src/v1alpha/site_search_engine_service_client.js +454 -0
- package/build/src/v1alpha/user_event_service_client.d.ts +330 -0
- package/build/src/v1alpha/user_event_service_client.js +454 -0
- package/build/src/v1beta/completion_service_client.d.ts +315 -0
- package/build/src/v1beta/completion_service_client.js +432 -0
- package/build/src/v1beta/conversational_search_service_client.d.ts +659 -0
- package/build/src/v1beta/conversational_search_service_client.js +702 -0
- package/build/src/v1beta/conversational_search_service_client_config.json +35 -0
- package/build/src/v1beta/data_store_service_client.d.ts +315 -0
- package/build/src/v1beta/data_store_service_client.js +432 -0
- package/build/src/v1beta/document_service_client.d.ts +361 -21
- package/build/src/v1beta/document_service_client.js +432 -0
- package/build/src/v1beta/engine_service_client.d.ts +410 -0
- package/build/src/v1beta/engine_service_client.js +518 -0
- package/build/src/v1beta/engine_service_client_config.json +12 -0
- package/build/src/v1beta/grounded_generation_service_client.d.ts +1406 -0
- package/build/src/v1beta/grounded_generation_service_client.js +2014 -0
- package/build/src/v1beta/grounded_generation_service_client_config.json +43 -0
- package/build/src/v1beta/index.d.ts +2 -0
- package/build/src/v1beta/index.js +5 -1
- package/build/src/v1beta/rank_service_client.d.ts +1416 -0
- package/build/src/v1beta/rank_service_client.js +2015 -0
- package/build/src/v1beta/rank_service_client_config.json +43 -0
- package/build/src/v1beta/recommendation_service_client.d.ts +315 -0
- package/build/src/v1beta/recommendation_service_client.js +432 -0
- package/build/src/v1beta/schema_service_client.d.ts +315 -0
- package/build/src/v1beta/schema_service_client.js +432 -0
- package/build/src/v1beta/search_service_client.d.ts +342 -12
- package/build/src/v1beta/search_service_client.js +450 -8
- package/build/src/v1beta/search_service_client_config.json +5 -5
- package/build/src/v1beta/search_tuning_service_client.d.ts +315 -0
- package/build/src/v1beta/search_tuning_service_client.js +432 -0
- package/build/src/v1beta/serving_config_service_client.d.ts +315 -0
- package/build/src/v1beta/serving_config_service_client.js +432 -0
- package/build/src/v1beta/site_search_engine_service_client.d.ts +315 -0
- package/build/src/v1beta/site_search_engine_service_client.js +432 -0
- package/build/src/v1beta/user_event_service_client.d.ts +315 -0
- package/build/src/v1beta/user_event_service_client.js +432 -0
- package/package.json +1 -1
package/build/protos/google/cloud/discoveryengine/v1alpha/conversational_search_service.proto
CHANGED
@@ -20,8 +20,11 @@ import "google/api/annotations.proto";
|
|
20
20
|
import "google/api/client.proto";
|
21
21
|
import "google/api/field_behavior.proto";
|
22
22
|
import "google/api/resource.proto";
|
23
|
+
import "google/cloud/discoveryengine/v1alpha/answer.proto";
|
24
|
+
import "google/cloud/discoveryengine/v1alpha/common.proto";
|
23
25
|
import "google/cloud/discoveryengine/v1alpha/conversation.proto";
|
24
26
|
import "google/cloud/discoveryengine/v1alpha/search_service.proto";
|
27
|
+
import "google/cloud/discoveryengine/v1alpha/session.proto";
|
25
28
|
import "google/protobuf/empty.proto";
|
26
29
|
import "google/protobuf/field_mask.proto";
|
27
30
|
|
@@ -147,6 +150,123 @@ service ConversationalSearchService {
|
|
147
150
|
};
|
148
151
|
option (google.api.method_signature) = "parent";
|
149
152
|
}
|
153
|
+
|
154
|
+
// Answer query method.
|
155
|
+
rpc AnswerQuery(AnswerQueryRequest) returns (AnswerQueryResponse) {
|
156
|
+
option (google.api.http) = {
|
157
|
+
post: "/v1alpha/{serving_config=projects/*/locations/*/dataStores/*/servingConfigs/*}:answer"
|
158
|
+
body: "*"
|
159
|
+
additional_bindings {
|
160
|
+
post: "/v1alpha/{serving_config=projects/*/locations/*/collections/*/dataStores/*/servingConfigs/*}:answer"
|
161
|
+
body: "*"
|
162
|
+
}
|
163
|
+
additional_bindings {
|
164
|
+
post: "/v1alpha/{serving_config=projects/*/locations/*/collections/*/engines/*/servingConfigs/*}:answer"
|
165
|
+
body: "*"
|
166
|
+
}
|
167
|
+
};
|
168
|
+
}
|
169
|
+
|
170
|
+
// Gets a Answer.
|
171
|
+
rpc GetAnswer(GetAnswerRequest) returns (Answer) {
|
172
|
+
option (google.api.http) = {
|
173
|
+
get: "/v1alpha/{name=projects/*/locations/*/dataStores/*/sessions/*/answers/*}"
|
174
|
+
additional_bindings {
|
175
|
+
get: "/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/sessions/*/answers/*}"
|
176
|
+
}
|
177
|
+
additional_bindings {
|
178
|
+
get: "/v1alpha/{name=projects/*/locations/*/collections/*/engines/*/sessions/*/answers/*}"
|
179
|
+
}
|
180
|
+
};
|
181
|
+
option (google.api.method_signature) = "name";
|
182
|
+
}
|
183
|
+
|
184
|
+
// Creates a Session.
|
185
|
+
//
|
186
|
+
// If the [Session][google.cloud.discoveryengine.v1alpha.Session] to create
|
187
|
+
// already exists, an ALREADY_EXISTS error is returned.
|
188
|
+
rpc CreateSession(CreateSessionRequest) returns (Session) {
|
189
|
+
option (google.api.http) = {
|
190
|
+
post: "/v1alpha/{parent=projects/*/locations/*/dataStores/*}/sessions"
|
191
|
+
body: "session"
|
192
|
+
additional_bindings {
|
193
|
+
post: "/v1alpha/{parent=projects/*/locations/*/collections/*/dataStores/*}/sessions"
|
194
|
+
body: "session"
|
195
|
+
}
|
196
|
+
additional_bindings {
|
197
|
+
post: "/v1alpha/{parent=projects/*/locations/*/collections/*/engines/*}/sessions"
|
198
|
+
body: "session"
|
199
|
+
}
|
200
|
+
};
|
201
|
+
option (google.api.method_signature) = "parent,session";
|
202
|
+
}
|
203
|
+
|
204
|
+
// Deletes a Session.
|
205
|
+
//
|
206
|
+
// If the [Session][google.cloud.discoveryengine.v1alpha.Session] to delete
|
207
|
+
// does not exist, a NOT_FOUND error is returned.
|
208
|
+
rpc DeleteSession(DeleteSessionRequest) returns (google.protobuf.Empty) {
|
209
|
+
option (google.api.http) = {
|
210
|
+
delete: "/v1alpha/{name=projects/*/locations/*/dataStores/*/sessions/*}"
|
211
|
+
additional_bindings {
|
212
|
+
delete: "/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/sessions/*}"
|
213
|
+
}
|
214
|
+
additional_bindings {
|
215
|
+
delete: "/v1alpha/{name=projects/*/locations/*/collections/*/engines/*/sessions/*}"
|
216
|
+
}
|
217
|
+
};
|
218
|
+
option (google.api.method_signature) = "name";
|
219
|
+
}
|
220
|
+
|
221
|
+
// Updates a Session.
|
222
|
+
//
|
223
|
+
// [Session][google.cloud.discoveryengine.v1alpha.Session] action type cannot
|
224
|
+
// be changed. If the [Session][google.cloud.discoveryengine.v1alpha.Session]
|
225
|
+
// to update does not exist, a NOT_FOUND error is returned.
|
226
|
+
rpc UpdateSession(UpdateSessionRequest) returns (Session) {
|
227
|
+
option (google.api.http) = {
|
228
|
+
patch: "/v1alpha/{session.name=projects/*/locations/*/dataStores/*/sessions/*}"
|
229
|
+
body: "session"
|
230
|
+
additional_bindings {
|
231
|
+
patch: "/v1alpha/{session.name=projects/*/locations/*/collections/*/dataStores/*/sessions/*}"
|
232
|
+
body: "session"
|
233
|
+
}
|
234
|
+
additional_bindings {
|
235
|
+
patch: "/v1alpha/{session.name=projects/*/locations/*/collections/*/engines/*/sessions/*}"
|
236
|
+
body: "session"
|
237
|
+
}
|
238
|
+
};
|
239
|
+
option (google.api.method_signature) = "session,update_mask";
|
240
|
+
}
|
241
|
+
|
242
|
+
// Gets a Session.
|
243
|
+
rpc GetSession(GetSessionRequest) returns (Session) {
|
244
|
+
option (google.api.http) = {
|
245
|
+
get: "/v1alpha/{name=projects/*/locations/*/dataStores/*/sessions/*}"
|
246
|
+
additional_bindings {
|
247
|
+
get: "/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/sessions/*}"
|
248
|
+
}
|
249
|
+
additional_bindings {
|
250
|
+
get: "/v1alpha/{name=projects/*/locations/*/collections/*/engines/*/sessions/*}"
|
251
|
+
}
|
252
|
+
};
|
253
|
+
option (google.api.method_signature) = "name";
|
254
|
+
}
|
255
|
+
|
256
|
+
// Lists all Sessions by their parent
|
257
|
+
// [DataStore][google.cloud.discoveryengine.v1alpha.DataStore].
|
258
|
+
rpc ListSessions(ListSessionsRequest) returns (ListSessionsResponse) {
|
259
|
+
option (google.api.http) = {
|
260
|
+
get: "/v1alpha/{parent=projects/*/locations/*/dataStores/*}/sessions"
|
261
|
+
additional_bindings {
|
262
|
+
get: "/v1alpha/{parent=projects/*/locations/*/collections/*/dataStores/*}/sessions"
|
263
|
+
}
|
264
|
+
additional_bindings {
|
265
|
+
get: "/v1alpha/{parent=projects/*/locations/*/collections/*/engines/*}/sessions"
|
266
|
+
}
|
267
|
+
};
|
268
|
+
option (google.api.method_signature) = "parent";
|
269
|
+
}
|
150
270
|
}
|
151
271
|
|
152
272
|
// Request message for
|
@@ -348,3 +468,457 @@ message ListConversationsResponse {
|
|
348
468
|
// Pagination token, if not returned indicates the last page.
|
349
469
|
string next_page_token = 2;
|
350
470
|
}
|
471
|
+
|
472
|
+
// Request message for
|
473
|
+
// [ConversationalSearchService.AnswerQuery][google.cloud.discoveryengine.v1alpha.ConversationalSearchService.AnswerQuery]
|
474
|
+
// method.
|
475
|
+
message AnswerQueryRequest {
|
476
|
+
// Safety specification.
|
477
|
+
message SafetySpec {
|
478
|
+
// Enable the safety filtering on the answer response. It is false by
|
479
|
+
// default.
|
480
|
+
bool enable = 1;
|
481
|
+
}
|
482
|
+
|
483
|
+
// Related questions specification.
|
484
|
+
message RelatedQuestionsSpec {
|
485
|
+
// Enable related questions feature if true.
|
486
|
+
bool enable = 1;
|
487
|
+
}
|
488
|
+
|
489
|
+
// Answer generation specification.
|
490
|
+
message AnswerGenerationSpec {
|
491
|
+
// Answer Generation Model specification.
|
492
|
+
message ModelSpec {
|
493
|
+
// Model version. If not set, it will use the default stable model.
|
494
|
+
// Allowed values are: stable, preview.
|
495
|
+
string model_version = 1;
|
496
|
+
}
|
497
|
+
|
498
|
+
// Answer generation prompt specification.
|
499
|
+
message PromptSpec {
|
500
|
+
// Customized preamble.
|
501
|
+
string preamble = 1;
|
502
|
+
}
|
503
|
+
|
504
|
+
// Answer generation model specification.
|
505
|
+
ModelSpec model_spec = 1;
|
506
|
+
|
507
|
+
// Answer generation prompt specification.
|
508
|
+
PromptSpec prompt_spec = 2;
|
509
|
+
|
510
|
+
// Specifies whether to include citation metadata in the answer. The default
|
511
|
+
// value is `false`.
|
512
|
+
bool include_citations = 3;
|
513
|
+
|
514
|
+
// Language code for Answer. Use language tags defined by
|
515
|
+
// [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).
|
516
|
+
// Note: This is an experimental feature.
|
517
|
+
string answer_language_code = 4;
|
518
|
+
|
519
|
+
// Specifies whether to filter out adversarial queries. The default value
|
520
|
+
// is `false`.
|
521
|
+
//
|
522
|
+
// Google employs search-query classification to detect adversarial
|
523
|
+
// queries. No answer is returned if the search query is classified as an
|
524
|
+
// adversarial query. For example, a user might ask a question regarding
|
525
|
+
// negative comments about the company or submit a query designed to
|
526
|
+
// generate unsafe, policy-violating output. If this field is set to
|
527
|
+
// `true`, we skip generating answers for adversarial queries and return
|
528
|
+
// fallback messages instead.
|
529
|
+
bool ignore_adversarial_query = 5;
|
530
|
+
|
531
|
+
// Specifies whether to filter out queries that are not answer-seeking.
|
532
|
+
// The default value is `false`.
|
533
|
+
//
|
534
|
+
// Google employs search-query classification to detect answer-seeking
|
535
|
+
// queries. No answer is returned if the search query is classified as a
|
536
|
+
// non-answer seeking query. If this field is set to `true`, we skip
|
537
|
+
// generating answers for non-answer seeking queries and return
|
538
|
+
// fallback messages instead.
|
539
|
+
bool ignore_non_answer_seeking_query = 6;
|
540
|
+
}
|
541
|
+
|
542
|
+
// Search specification.
|
543
|
+
message SearchSpec {
|
544
|
+
// Search parameters.
|
545
|
+
message SearchParams {
|
546
|
+
// Number of search results to return.
|
547
|
+
// The default value is 10.
|
548
|
+
int32 max_return_results = 1;
|
549
|
+
|
550
|
+
// The filter syntax consists of an expression language for constructing
|
551
|
+
// a predicate from one or more fields of the documents being filtered.
|
552
|
+
// Filter expression is case-sensitive. This will be used to filter
|
553
|
+
// search results which may affect the Answer response.
|
554
|
+
//
|
555
|
+
// If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
|
556
|
+
//
|
557
|
+
// Filtering in Vertex AI Search is done by mapping the LHS filter key
|
558
|
+
// to a key property defined in the Vertex AI Search backend -- this
|
559
|
+
// mapping is defined by the customer in their schema. For example a
|
560
|
+
// media customers might have a field 'name' in their schema. In this
|
561
|
+
// case the filter would look like this: filter --> name:'ANY("king
|
562
|
+
// kong")'
|
563
|
+
//
|
564
|
+
// For more information about filtering including syntax and filter
|
565
|
+
// operators, see
|
566
|
+
// [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
|
567
|
+
string filter = 2;
|
568
|
+
|
569
|
+
// Boost specification to boost certain documents in search results which
|
570
|
+
// may affect the answer query response. For more information on boosting,
|
571
|
+
// see [Boosting](https://cloud.google.com/retail/docs/boosting#boost)
|
572
|
+
SearchRequest.BoostSpec boost_spec = 3;
|
573
|
+
|
574
|
+
// The order in which documents are returned. Documents can be ordered
|
575
|
+
// by a field in an
|
576
|
+
// [Document][google.cloud.discoveryengine.v1alpha.Document] object. Leave
|
577
|
+
// it unset if ordered by relevance. `order_by` expression is
|
578
|
+
// case-sensitive. For more information on ordering, see
|
579
|
+
// [Ordering](https://cloud.google.com/retail/docs/filter-and-order#order)
|
580
|
+
//
|
581
|
+
// If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
|
582
|
+
string order_by = 4;
|
583
|
+
|
584
|
+
// Specifies the search result mode. If unspecified, the
|
585
|
+
// search result mode is based on
|
586
|
+
// [DataStore.DocumentProcessingConfig.chunking_config][]:
|
587
|
+
// * If [DataStore.DocumentProcessingConfig.chunking_config][] is
|
588
|
+
// specified,
|
589
|
+
// it defaults to `CHUNKS`.
|
590
|
+
// * Otherwise, it defaults to `DOCUMENTS`.
|
591
|
+
// See [parse and chunk
|
592
|
+
// documents](https://cloud.google.com/generative-ai-app-builder/docs/parse-chunk-documents)
|
593
|
+
SearchRequest.ContentSearchSpec.SearchResultMode search_result_mode = 5;
|
594
|
+
|
595
|
+
// Custom fine tuning configs.
|
596
|
+
CustomFineTuningSpec custom_fine_tuning_spec = 6;
|
597
|
+
}
|
598
|
+
|
599
|
+
// Search result list.
|
600
|
+
message SearchResultList {
|
601
|
+
// Search result.
|
602
|
+
message SearchResult {
|
603
|
+
// Unstructured document information.
|
604
|
+
message UnstructuredDocumentInfo {
|
605
|
+
// Document context.
|
606
|
+
message DocumentContext {
|
607
|
+
// Page identifier.
|
608
|
+
string page_identifier = 1;
|
609
|
+
|
610
|
+
// Document content.
|
611
|
+
string content = 2;
|
612
|
+
}
|
613
|
+
|
614
|
+
// Extractive segment.
|
615
|
+
// [Guide](https://cloud.google.com/generative-ai-app-builder/docs/snippets#extractive-segments)
|
616
|
+
message ExtractiveSegment {
|
617
|
+
// Page identifier.
|
618
|
+
string page_identifier = 1;
|
619
|
+
|
620
|
+
// Extractive segment content.
|
621
|
+
string content = 2;
|
622
|
+
}
|
623
|
+
|
624
|
+
// Extractive answer.
|
625
|
+
// [Guide](https://cloud.google.com/generative-ai-app-builder/docs/snippets#get-answers)
|
626
|
+
message ExtractiveAnswer {
|
627
|
+
// Page identifier.
|
628
|
+
string page_identifier = 1;
|
629
|
+
|
630
|
+
// Extractive answer content.
|
631
|
+
string content = 2;
|
632
|
+
}
|
633
|
+
|
634
|
+
// Document resource name.
|
635
|
+
string document = 1 [(google.api.resource_reference) = {
|
636
|
+
type: "discoveryengine.googleapis.com/Document"
|
637
|
+
}];
|
638
|
+
|
639
|
+
// URI for the document.
|
640
|
+
string uri = 2;
|
641
|
+
|
642
|
+
// Title.
|
643
|
+
string title = 3;
|
644
|
+
|
645
|
+
// List of document contexts.
|
646
|
+
repeated DocumentContext document_contexts = 4;
|
647
|
+
|
648
|
+
// List of extractive segments.
|
649
|
+
repeated ExtractiveSegment extractive_segments = 5;
|
650
|
+
|
651
|
+
// List of extractive answers.
|
652
|
+
repeated ExtractiveAnswer extractive_answers = 6;
|
653
|
+
}
|
654
|
+
|
655
|
+
// Chunk information.
|
656
|
+
message ChunkInfo {
|
657
|
+
// Chunk resource name.
|
658
|
+
string chunk = 1 [(google.api.resource_reference) = {
|
659
|
+
type: "discoveryengine.googleapis.com/Chunk"
|
660
|
+
}];
|
661
|
+
|
662
|
+
// Chunk textual content.
|
663
|
+
string content = 2;
|
664
|
+
}
|
665
|
+
|
666
|
+
// Search result content.
|
667
|
+
oneof content {
|
668
|
+
// Unstructured document information.
|
669
|
+
UnstructuredDocumentInfo unstructured_document_info = 1;
|
670
|
+
|
671
|
+
// Chunk information.
|
672
|
+
ChunkInfo chunk_info = 2;
|
673
|
+
}
|
674
|
+
}
|
675
|
+
|
676
|
+
// Search results.
|
677
|
+
repeated SearchResult search_results = 1;
|
678
|
+
}
|
679
|
+
|
680
|
+
// Search parameters to control the search behavior.
|
681
|
+
// Or provide search result list to generate answer.
|
682
|
+
oneof input {
|
683
|
+
// Search parameters.
|
684
|
+
SearchParams search_params = 1;
|
685
|
+
|
686
|
+
// Search result list.
|
687
|
+
SearchResultList search_result_list = 2;
|
688
|
+
}
|
689
|
+
}
|
690
|
+
|
691
|
+
// Query understanding specification.
|
692
|
+
message QueryUnderstandingSpec {
|
693
|
+
// Query classification specification.
|
694
|
+
message QueryClassificationSpec {
|
695
|
+
// Query classification types.
|
696
|
+
enum Type {
|
697
|
+
// Unspecified query classification type.
|
698
|
+
TYPE_UNSPECIFIED = 0;
|
699
|
+
|
700
|
+
// Adversarial query classification type.
|
701
|
+
ADVERSARIAL_QUERY = 1;
|
702
|
+
|
703
|
+
// Non-answer-seeking query classification type.
|
704
|
+
NON_ANSWER_SEEKING_QUERY = 2;
|
705
|
+
}
|
706
|
+
|
707
|
+
// Enabled query classification types.
|
708
|
+
repeated Type types = 1;
|
709
|
+
}
|
710
|
+
|
711
|
+
// Query rephraser specification.
|
712
|
+
message QueryRephraserSpec {
|
713
|
+
// Disable query rephraser.
|
714
|
+
bool disable = 1;
|
715
|
+
|
716
|
+
// Max rephrase steps.
|
717
|
+
// The max number is 10 steps.
|
718
|
+
// If not set or set to < 1, it will be set to 1 by default.
|
719
|
+
int32 max_rephrase_steps = 2;
|
720
|
+
}
|
721
|
+
|
722
|
+
// Query classification specification.
|
723
|
+
QueryClassificationSpec query_classification_spec = 1;
|
724
|
+
|
725
|
+
// Query rephraser specification.
|
726
|
+
QueryRephraserSpec query_rephraser_spec = 2;
|
727
|
+
}
|
728
|
+
|
729
|
+
// Required. The resource name of the Search serving config, such as
|
730
|
+
// `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`,
|
731
|
+
// or
|
732
|
+
// `projects/*/locations/global/collections/default_collection/dataStores/*/servingConfigs/default_serving_config`.
|
733
|
+
// This field is used to identify the serving configuration name, set
|
734
|
+
// of models used to make the search.
|
735
|
+
string serving_config = 1 [
|
736
|
+
(google.api.field_behavior) = REQUIRED,
|
737
|
+
(google.api.resource_reference) = {
|
738
|
+
type: "discoveryengine.googleapis.com/ServingConfig"
|
739
|
+
}
|
740
|
+
];
|
741
|
+
|
742
|
+
// Required. Current user query.
|
743
|
+
Query query = 2 [(google.api.field_behavior) = REQUIRED];
|
744
|
+
|
745
|
+
// The session resource name. Not required.
|
746
|
+
//
|
747
|
+
// When session field is not set, the API is in sessionless mode.
|
748
|
+
//
|
749
|
+
// We support auto session mode: users can use the wildcard symbol “-” as
|
750
|
+
// session id. A new id will be automatically generated and assigned.
|
751
|
+
string session = 3 [(google.api.resource_reference) = {
|
752
|
+
type: "discoveryengine.googleapis.com/Session"
|
753
|
+
}];
|
754
|
+
|
755
|
+
// Model specification.
|
756
|
+
SafetySpec safety_spec = 4;
|
757
|
+
|
758
|
+
// Related questions specification.
|
759
|
+
RelatedQuestionsSpec related_questions_spec = 5;
|
760
|
+
|
761
|
+
// Answer generation specification.
|
762
|
+
AnswerGenerationSpec answer_generation_spec = 7;
|
763
|
+
|
764
|
+
// Search specification.
|
765
|
+
SearchSpec search_spec = 8;
|
766
|
+
|
767
|
+
// Query understanding specification.
|
768
|
+
QueryUnderstandingSpec query_understanding_spec = 9;
|
769
|
+
|
770
|
+
// Asynchronous mode control.
|
771
|
+
//
|
772
|
+
// If enabled, the response will be returned with answer/session resource
|
773
|
+
// name without final answer. The API users need to do the polling to get
|
774
|
+
// the latest status of answer/session by calling
|
775
|
+
// [ConversationalSearchService.GetAnswer][google.cloud.discoveryengine.v1alpha.ConversationalSearchService.GetAnswer]
|
776
|
+
// or
|
777
|
+
// [ConversationalSearchService.GetSession][google.cloud.discoveryengine.v1alpha.ConversationalSearchService.GetSession]
|
778
|
+
// method.
|
779
|
+
bool asynchronous_mode = 10;
|
780
|
+
|
781
|
+
// A unique identifier for tracking visitors. For example, this could be
|
782
|
+
// implemented with an HTTP cookie, which should be able to uniquely identify
|
783
|
+
// a visitor on a single device. This unique identifier should not change if
|
784
|
+
// the visitor logs in or out of the website.
|
785
|
+
//
|
786
|
+
// This field should NOT have a fixed value such as `unknown_visitor`.
|
787
|
+
//
|
788
|
+
// The field must be a UTF-8 encoded string with a length limit of 128
|
789
|
+
// characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
|
790
|
+
string user_pseudo_id = 12;
|
791
|
+
}
|
792
|
+
|
793
|
+
// Response message for
|
794
|
+
// [ConversationalSearchService.AnswerQuery][google.cloud.discoveryengine.v1alpha.ConversationalSearchService.AnswerQuery]
|
795
|
+
// method.
|
796
|
+
message AnswerQueryResponse {
|
797
|
+
// Answer resource object.
|
798
|
+
// If [AnswerQueryRequest.StepSpec.max_step_count][] is greater than 1,
|
799
|
+
// use [Answer.name][google.cloud.discoveryengine.v1alpha.Answer.name] to
|
800
|
+
// fetch answer information using
|
801
|
+
// [ConversationalSearchService.GetAnswer][google.cloud.discoveryengine.v1alpha.ConversationalSearchService.GetAnswer]
|
802
|
+
// API.
|
803
|
+
Answer answer = 1;
|
804
|
+
|
805
|
+
// Session resource object.
|
806
|
+
// It will be only available when session field is set and valid in the
|
807
|
+
// [AnswerQueryRequest][google.cloud.discoveryengine.v1alpha.AnswerQueryRequest]
|
808
|
+
// request.
|
809
|
+
Session session = 2;
|
810
|
+
}
|
811
|
+
|
812
|
+
// Request for GetAnswer method.
|
813
|
+
message GetAnswerRequest {
|
814
|
+
// Required. The resource name of the Answer to get. Format:
|
815
|
+
// `projects/{project_number}/locations/{location_id}/collections/{collection}/engines/{engine_id}/sessions/{session_id}/answers/{answer_id}`
|
816
|
+
string name = 1 [
|
817
|
+
(google.api.field_behavior) = REQUIRED,
|
818
|
+
(google.api.resource_reference) = {
|
819
|
+
type: "discoveryengine.googleapis.com/Answer"
|
820
|
+
}
|
821
|
+
];
|
822
|
+
}
|
823
|
+
|
824
|
+
// Request for CreateSession method.
|
825
|
+
message CreateSessionRequest {
|
826
|
+
// Required. Full resource name of parent data store. Format:
|
827
|
+
// `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`
|
828
|
+
string parent = 1 [
|
829
|
+
(google.api.field_behavior) = REQUIRED,
|
830
|
+
(google.api.resource_reference) = {
|
831
|
+
type: "discoveryengine.googleapis.com/DataStore"
|
832
|
+
}
|
833
|
+
];
|
834
|
+
|
835
|
+
// Required. The session to create.
|
836
|
+
Session session = 2 [(google.api.field_behavior) = REQUIRED];
|
837
|
+
}
|
838
|
+
|
839
|
+
// Request for UpdateSession method.
|
840
|
+
message UpdateSessionRequest {
|
841
|
+
// Required. The Session to update.
|
842
|
+
Session session = 1 [(google.api.field_behavior) = REQUIRED];
|
843
|
+
|
844
|
+
// Indicates which fields in the provided
|
845
|
+
// [Session][google.cloud.discoveryengine.v1alpha.Session] to update. The
|
846
|
+
// following are NOT supported:
|
847
|
+
//
|
848
|
+
// * [Session.name][google.cloud.discoveryengine.v1alpha.Session.name]
|
849
|
+
//
|
850
|
+
// If not set or empty, all supported fields are updated.
|
851
|
+
google.protobuf.FieldMask update_mask = 2;
|
852
|
+
}
|
853
|
+
|
854
|
+
// Request for DeleteSession method.
|
855
|
+
message DeleteSessionRequest {
|
856
|
+
// Required. The resource name of the Session to delete. Format:
|
857
|
+
// `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`
|
858
|
+
string name = 1 [
|
859
|
+
(google.api.field_behavior) = REQUIRED,
|
860
|
+
(google.api.resource_reference) = {
|
861
|
+
type: "discoveryengine.googleapis.com/Session"
|
862
|
+
}
|
863
|
+
];
|
864
|
+
}
|
865
|
+
|
866
|
+
// Request for GetSession method.
|
867
|
+
message GetSessionRequest {
|
868
|
+
// Required. The resource name of the Session to get. Format:
|
869
|
+
// `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`
|
870
|
+
string name = 1 [
|
871
|
+
(google.api.field_behavior) = REQUIRED,
|
872
|
+
(google.api.resource_reference) = {
|
873
|
+
type: "discoveryengine.googleapis.com/Session"
|
874
|
+
}
|
875
|
+
];
|
876
|
+
}
|
877
|
+
|
878
|
+
// Request for ListSessions method.
|
879
|
+
message ListSessionsRequest {
|
880
|
+
// Required. The data store resource name. Format:
|
881
|
+
// `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`
|
882
|
+
string parent = 1 [
|
883
|
+
(google.api.field_behavior) = REQUIRED,
|
884
|
+
(google.api.resource_reference) = {
|
885
|
+
type: "discoveryengine.googleapis.com/DataStore"
|
886
|
+
}
|
887
|
+
];
|
888
|
+
|
889
|
+
// Maximum number of results to return. If unspecified, defaults
|
890
|
+
// to 50. Max allowed value is 1000.
|
891
|
+
int32 page_size = 2;
|
892
|
+
|
893
|
+
// A page token, received from a previous `ListSessions` call.
|
894
|
+
// Provide this to retrieve the subsequent page.
|
895
|
+
string page_token = 3;
|
896
|
+
|
897
|
+
// A filter to apply on the list results. The supported features are:
|
898
|
+
// user_pseudo_id, state.
|
899
|
+
//
|
900
|
+
// Example:
|
901
|
+
// "user_pseudo_id = some_id"
|
902
|
+
string filter = 4;
|
903
|
+
|
904
|
+
// A comma-separated list of fields to order by, sorted in ascending order.
|
905
|
+
// Use "desc" after a field name for descending.
|
906
|
+
// Supported fields:
|
907
|
+
// * `update_time`
|
908
|
+
// * `create_time`
|
909
|
+
// * `session_name`
|
910
|
+
//
|
911
|
+
// Example:
|
912
|
+
// "update_time desc"
|
913
|
+
// "create_time"
|
914
|
+
string order_by = 5;
|
915
|
+
}
|
916
|
+
|
917
|
+
// Response for ListSessions method.
|
918
|
+
message ListSessionsResponse {
|
919
|
+
// All the Sessions for a given data store.
|
920
|
+
repeated Session sessions = 1;
|
921
|
+
|
922
|
+
// Pagination token, if not returned indicates the last page.
|
923
|
+
string next_page_token = 2;
|
924
|
+
}
|
@@ -72,12 +72,9 @@ message DocumentProcessingConfig {
|
|
72
72
|
|
73
73
|
// The OCR parsing configurations for documents.
|
74
74
|
message OcrParsingConfig {
|
75
|
-
//
|
76
|
-
// elements
|
77
|
-
|
78
|
-
// Supported values:
|
79
|
-
// * `table`: advanced table parsing model.
|
80
|
-
repeated string enhanced_document_elements = 1;
|
75
|
+
// [DEPRECATED] This field is deprecated. To use the additional enhanced
|
76
|
+
// document elements processing, please switch to `layout_parsing_config`.
|
77
|
+
repeated string enhanced_document_elements = 1 [deprecated = true];
|
81
78
|
|
82
79
|
// If true, will use native text instead of OCR text on pages containing
|
83
80
|
// native text.
|
@@ -43,7 +43,7 @@ message Engine {
|
|
43
43
|
// The search feature tier of this engine.
|
44
44
|
//
|
45
45
|
// Different tiers might have different
|
46
|
-
// pricing. To learn more,
|
46
|
+
// pricing. To learn more, check the pricing documentation.
|
47
47
|
//
|
48
48
|
// Defaults to
|
49
49
|
// [SearchTier.SEARCH_TIER_STANDARD][google.cloud.discoveryengine.v1alpha.SearchTier.SEARCH_TIER_STANDARD]
|
@@ -185,7 +185,7 @@ message Engine {
|
|
185
185
|
// [EngineService.GetEngine][google.cloud.discoveryengine.v1alpha.EngineService.GetEngine]
|
186
186
|
// or
|
187
187
|
// [EngineService.ListEngines][google.cloud.discoveryengine.v1alpha.EngineService.ListEngines]
|
188
|
-
// API after engine creation.
|
188
|
+
// API after engine creation. Use
|
189
189
|
// [ChatEngineMetadata.dialogflow_agent][google.cloud.discoveryengine.v1alpha.Engine.ChatEngineMetadata.dialogflow_agent]
|
190
190
|
// for actual agent association after Engine is created.
|
191
191
|
string dialogflow_agent_to_link = 2;
|