Skip to content

Commit 72be138

Browse files
Google APIscopybara-github
authored andcommitted
feat: Add GroundedGenerationService API
feat: Add BillingEstimation in data store feat: Support Google Workspace search feat: Support advanced boost search feat: Add one_box_page_size on search feat: Add site_credential for site search config docs: Update documentation PiperOrigin-RevId: 684224724
1 parent d6f9dbc commit 72be138

17 files changed

Lines changed: 671 additions & 41 deletions

google/cloud/discoveryengine/v1/answer.proto

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,11 +280,14 @@ message Answer {
280280
// Adversarial query classification type.
281281
ADVERSARIAL_QUERY = 1;
282282

283-
// Non-answer-seeking query classification type.
283+
// Non-answer-seeking query classification type, for chit chat.
284284
NON_ANSWER_SEEKING_QUERY = 2;
285285

286286
// Jail-breaking query classification type.
287287
JAIL_BREAKING_QUERY = 3;
288+
289+
// Non-answer-seeking query classification type, for no clear intent.
290+
NON_ANSWER_SEEKING_QUERY_V2 = 4;
288291
}
289292

290293
// Query classification type.
@@ -321,7 +324,9 @@ message Answer {
321324
// The adversarial query ignored case.
322325
ADVERSARIAL_QUERY_IGNORED = 1;
323326

324-
// The non-answer seeking query ignored case.
327+
// The non-answer seeking query ignored case
328+
//
329+
// Google skips the answer if the query is chit chat.
325330
NON_ANSWER_SEEKING_QUERY_IGNORED = 2;
326331

327332
// The out-of-domain query ignored case.
@@ -353,6 +358,11 @@ message Answer {
353358
// Google skips the summary if there is a customer policy violation
354359
// detected. The policy is defined by the customer.
355360
CUSTOMER_POLICY_VIOLATION = 7;
361+
362+
// The non-answer seeking query ignored case.
363+
//
364+
// Google skips the answer if the query doesn't have clear intent.
365+
NON_ANSWER_SEEKING_QUERY_IGNORED_V2 = 8;
356366
}
357367

358368
// Immutable. Fully qualified name

google/cloud/discoveryengine/v1/common.proto

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ option (google.api.resource_definition) = {
5757
type: "healthcare.googleapis.com/FhirStore"
5858
pattern: "projects/{project}/locations/{location}/datasets/{dataset}/fhirStores/{fhir_store}"
5959
};
60+
option (google.api.resource_definition) = {
61+
type: "healthcare.googleapis.com/FhirResource"
62+
pattern: "projects/{project}/locations/{location}/datasets/{dataset}/fhirStores/{fhir_store}/fhir/{resource_type}/{fhir_resource_id}"
63+
};
6064

6165
// The industry vertical associated with the
6266
// [DataStore][google.cloud.discoveryengine.v1.DataStore].

google/cloud/discoveryengine/v1/control_service.proto

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,9 @@ service ControlService {
135135
// Request for CreateControl method.
136136
message CreateControlRequest {
137137
// Required. Full resource name of parent data store. Format:
138-
// `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}`
138+
// `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`
139139
// or
140-
// `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`.
140+
// `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`.
141141
string parent = 1 [
142142
(google.api.field_behavior) = REQUIRED,
143143
(google.api.resource_reference) = {
@@ -176,7 +176,7 @@ message UpdateControlRequest {
176176
// Request for DeleteControl method.
177177
message DeleteControlRequest {
178178
// Required. The resource name of the Control to delete. Format:
179-
// `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}/controls/{control_id}`
179+
// `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/controls/{control_id}`
180180
string name = 1 [
181181
(google.api.field_behavior) = REQUIRED,
182182
(google.api.resource_reference) = {
@@ -188,7 +188,7 @@ message DeleteControlRequest {
188188
// Request for GetControl method.
189189
message GetControlRequest {
190190
// Required. The resource name of the Control to get. Format:
191-
// `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}/controls/{control_id}`
191+
// `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/controls/{control_id}`
192192
string name = 1 [
193193
(google.api.field_behavior) = REQUIRED,
194194
(google.api.resource_reference) = {
@@ -200,9 +200,9 @@ message GetControlRequest {
200200
// Request for ListControls method.
201201
message ListControlsRequest {
202202
// Required. The data store resource name. Format:
203-
// `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}`
203+
// `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`
204204
// or
205-
// `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`.
205+
// `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`.
206206
string parent = 1 [
207207
(google.api.field_behavior) = REQUIRED,
208208
(google.api.resource_reference) = {

google/cloud/discoveryengine/v1/conversational_search_service.proto

Lines changed: 57 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -273,9 +273,9 @@ service ConversationalSearchService {
273273
// method.
274274
message ConverseConversationRequest {
275275
// Required. The resource name of the Conversation to get. Format:
276-
// `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`.
276+
// `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`.
277277
// Use
278-
// `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/-`
278+
// `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/conversations/-`
279279
// to activate auto session mode, which automatically creates a new
280280
// conversation inside a ConverseConversation session.
281281
string name = 1 [
@@ -289,7 +289,7 @@ message ConverseConversationRequest {
289289
TextInput query = 2 [(google.api.field_behavior) = REQUIRED];
290290

291291
// The resource name of the Serving Config to use. Format:
292-
// `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/servingConfigs/{serving_config_id}`
292+
// `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/servingConfigs/{serving_config_id}`
293293
// If this is not set, the default serving config will be used.
294294
string serving_config = 3 [(google.api.resource_reference) = {
295295
type: "discoveryengine.googleapis.com/ServingConfig"
@@ -366,7 +366,7 @@ message ConverseConversationResponse {
366366
// Request for CreateConversation method.
367367
message CreateConversationRequest {
368368
// Required. Full resource name of parent data store. Format:
369-
// `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`
369+
// `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`
370370
string parent = 1 [
371371
(google.api.field_behavior) = REQUIRED,
372372
(google.api.resource_reference) = {
@@ -396,7 +396,7 @@ message UpdateConversationRequest {
396396
// Request for DeleteConversation method.
397397
message DeleteConversationRequest {
398398
// Required. The resource name of the Conversation to delete. Format:
399-
// `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`
399+
// `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`
400400
string name = 1 [
401401
(google.api.field_behavior) = REQUIRED,
402402
(google.api.resource_reference) = {
@@ -408,7 +408,7 @@ message DeleteConversationRequest {
408408
// Request for GetConversation method.
409409
message GetConversationRequest {
410410
// Required. The resource name of the Conversation to get. Format:
411-
// `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`
411+
// `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`
412412
string name = 1 [
413413
(google.api.field_behavior) = REQUIRED,
414414
(google.api.resource_reference) = {
@@ -420,7 +420,7 @@ message GetConversationRequest {
420420
// Request for ListConversations method.
421421
message ListConversationsRequest {
422422
// Required. The data store resource name. Format:
423-
// `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`
423+
// `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`
424424
string parent = 1 [
425425
(google.api.field_behavior) = REQUIRED,
426426
(google.api.resource_reference) = {
@@ -540,6 +540,20 @@ message AnswerQueryRequest {
540540
// of relevance to generate answers. If set to `true` or unset, the behavior
541541
// will be determined automatically by the service.
542542
optional bool ignore_low_relevant_content = 7;
543+
544+
// Optional. Specifies whether to filter out jail-breaking queries. The
545+
// default value is `false`.
546+
//
547+
// Google employs search-query classification to detect jail-breaking
548+
// queries. No summary is returned if the search query is classified as a
549+
// jail-breaking query. A user might add instructions to the query to
550+
// change the tone, style, language, content of the answer, or ask the
551+
// model to act as a different entity, e.g. "Reply in the tone of a
552+
// competing company's CEO". If this field is set to `true`, we skip
553+
// generating summaries for jail-breaking queries and return fallback
554+
// messages instead.
555+
bool ignore_jail_breaking_query = 8
556+
[(google.api.field_behavior) = OPTIONAL];
543557
}
544558

545559
// Search specification.
@@ -607,12 +621,14 @@ message AnswerQueryRequest {
607621
// Page identifier.
608622
string page_identifier = 1;
609623

610-
// Document content.
624+
// Document content to be used for answer generation.
611625
string content = 2;
612626
}
613627

614628
// Extractive segment.
615629
// [Guide](https://cloud.google.com/generative-ai-app-builder/docs/snippets#extractive-segments)
630+
// Answer generation will only use it if document_contexts is empty.
631+
// This is supposed to be shorter snippets.
616632
message ExtractiveSegment {
617633
// Page identifier.
618634
string page_identifier = 1;
@@ -642,25 +658,43 @@ message AnswerQueryRequest {
642658
// Title.
643659
string title = 3;
644660

645-
// List of document contexts.
661+
// List of document contexts. The content will be used for Answer
662+
// Generation. This is supposed to be the main content of the document
663+
// that can be long and comprehensive.
646664
repeated DocumentContext document_contexts = 4;
647665

648666
// List of extractive segments.
649667
repeated ExtractiveSegment extractive_segments = 5;
650668

669+
// Deprecated: This field is deprecated and will have no effect on
670+
// the Answer generation.
671+
// Please use document_contexts and extractive_segments fields.
651672
// List of extractive answers.
652-
repeated ExtractiveAnswer extractive_answers = 6;
673+
repeated ExtractiveAnswer extractive_answers = 6 [deprecated = true];
653674
}
654675

655676
// Chunk information.
656677
message ChunkInfo {
678+
// Document metadata contains the information of the document of the
679+
// current chunk.
680+
message DocumentMetadata {
681+
// Uri of the document.
682+
string uri = 1;
683+
684+
// Title of the document.
685+
string title = 2;
686+
}
687+
657688
// Chunk resource name.
658689
string chunk = 1 [(google.api.resource_reference) = {
659690
type: "discoveryengine.googleapis.com/Chunk"
660691
}];
661692

662693
// Chunk textual content.
663694
string content = 2;
695+
696+
// Metadata of the document from the current chunk.
697+
DocumentMetadata document_metadata = 4;
664698
}
665699

666700
// Search result content.
@@ -700,11 +734,14 @@ message AnswerQueryRequest {
700734
// Adversarial query classification type.
701735
ADVERSARIAL_QUERY = 1;
702736

703-
// Non-answer-seeking query classification type.
737+
// Non-answer-seeking query classification type, for chit chat.
704738
NON_ANSWER_SEEKING_QUERY = 2;
705739

706740
// Jail-breaking query classification type.
707741
JAIL_BREAKING_QUERY = 3;
742+
743+
// Non-answer-seeking query classification type, for no clear intent.
744+
NON_ANSWER_SEEKING_QUERY_V2 = 4;
708745
}
709746

710747
// Enabled query classification types.
@@ -770,6 +807,9 @@ message AnswerQueryRequest {
770807
// Query understanding specification.
771808
QueryUnderstandingSpec query_understanding_spec = 9;
772809

810+
// Deprecated: This field is deprecated. Streaming Answer API will be
811+
// supported.
812+
//
773813
// Asynchronous mode control.
774814
//
775815
// If enabled, the response will be returned with answer/session resource
@@ -779,7 +819,7 @@ message AnswerQueryRequest {
779819
// or
780820
// [ConversationalSearchService.GetSession][google.cloud.discoveryengine.v1.ConversationalSearchService.GetSession]
781821
// method.
782-
bool asynchronous_mode = 10;
822+
bool asynchronous_mode = 10 [deprecated = true];
783823

784824
// A unique identifier for tracking visitors. For example, this could be
785825
// implemented with an HTTP cookie, which should be able to uniquely identify
@@ -839,7 +879,7 @@ message AnswerQueryResponse {
839879
// Request for GetAnswer method.
840880
message GetAnswerRequest {
841881
// Required. The resource name of the Answer to get. Format:
842-
// `projects/{project_number}/locations/{location_id}/collections/{collection}/engines/{engine_id}/sessions/{session_id}/answers/{answer_id}`
882+
// `projects/{project}/locations/{location}/collections/{collection}/engines/{engine_id}/sessions/{session_id}/answers/{answer_id}`
843883
string name = 1 [
844884
(google.api.field_behavior) = REQUIRED,
845885
(google.api.resource_reference) = {
@@ -851,7 +891,7 @@ message GetAnswerRequest {
851891
// Request for CreateSession method.
852892
message CreateSessionRequest {
853893
// Required. Full resource name of parent data store. Format:
854-
// `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`
894+
// `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`
855895
string parent = 1 [
856896
(google.api.field_behavior) = REQUIRED,
857897
(google.api.resource_reference) = {
@@ -881,7 +921,7 @@ message UpdateSessionRequest {
881921
// Request for DeleteSession method.
882922
message DeleteSessionRequest {
883923
// Required. The resource name of the Session to delete. Format:
884-
// `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`
924+
// `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`
885925
string name = 1 [
886926
(google.api.field_behavior) = REQUIRED,
887927
(google.api.resource_reference) = {
@@ -893,7 +933,7 @@ message DeleteSessionRequest {
893933
// Request for GetSession method.
894934
message GetSessionRequest {
895935
// Required. The resource name of the Session to get. Format:
896-
// `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`
936+
// `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`
897937
string name = 1 [
898938
(google.api.field_behavior) = REQUIRED,
899939
(google.api.resource_reference) = {
@@ -905,7 +945,7 @@ message GetSessionRequest {
905945
// Request for ListSessions method.
906946
message ListSessionsRequest {
907947
// Required. The data store resource name. Format:
908-
// `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`
948+
// `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`
909949
string parent = 1 [
910950
(google.api.field_behavior) = REQUIRED,
911951
(google.api.resource_reference) = {

google/cloud/discoveryengine/v1/custom_tuning_model.proto

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,9 @@ message CustomTuningModel {
6767
// Required. The fully qualified resource name of the model.
6868
//
6969
// Format:
70-
// `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/customTuningModels/{custom_tuning_model}`
71-
// model must be an alpha-numerical string with limit of 40 characters.
70+
// `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/customTuningModels/{custom_tuning_model}`.
71+
//
72+
// Model must be an alpha-numerical string with limit of 40 characters.
7273
string name = 1 [
7374
(google.api.field_behavior) = REQUIRED,
7475
(google.api.resource_reference) = {
@@ -85,12 +86,16 @@ message CustomTuningModel {
8586
// The state that the model is in (e.g.`TRAINING` or `TRAINING_FAILED`).
8687
ModelState model_state = 4;
8788

88-
// Deprecated: timestamp the Model was created at.
89+
// Deprecated: Timestamp the Model was created at.
8990
google.protobuf.Timestamp create_time = 5 [deprecated = true];
9091

9192
// Timestamp the model training was initiated.
9293
google.protobuf.Timestamp training_start_time = 6;
9394

9495
// The metrics of the trained model.
9596
map<string, double> metrics = 7;
97+
98+
// Currently this is only populated if the model state is
99+
// `INPUT_VALIDATION_FAILED`.
100+
string error_message = 8;
96101
}

0 commit comments

Comments
 (0)