Skip to content

Commit ca5092e

Browse files
Google APIscopybara-github
authored andcommitted
feat: add ClarificationMessage, thought-signature, formatted-data
docs: A comment for enum value THOUGHT in enum TextType is changed PiperOrigin-RevId: 863522376
1 parent a6cbf80 commit ca5092e

File tree

3 files changed

+81
-2
lines changed

3 files changed

+81
-2
lines changed

google/cloud/geminidataanalytics/v1alpha/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,7 @@ load(
355355

356356
csharp_proto_library(
357357
name = "geminidataanalytics_csharp_proto",
358+
extra_opts = [],
358359
deps = [":geminidataanalytics_proto"],
359360
)
360361

google/cloud/geminidataanalytics/v1alpha/data_chat_service.proto

Lines changed: 71 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,6 +458,10 @@ message SystemMessage {
458458
// Optional. A message containing example queries.
459459
ExampleQueries example_queries = 13
460460
[(google.api.field_behavior) = OPTIONAL];
461+
462+
// Optional. A message containing clarification questions.
463+
ClarificationMessage clarification = 14
464+
[(google.api.field_behavior) = OPTIONAL];
461465
}
462466

463467
// Identifies the group that the event belongs to. Similar events are deemed
@@ -476,7 +480,7 @@ message TextMessage {
476480
// The text is a final response to the user question.
477481
FINAL_RESPONSE = 1;
478482

479-
// The text is a thinking plan generated by the thinking tool.
483+
// The text is a thought from the model.
480484
THOUGHT = 2;
481485

482486
// The text is an informational message about the agent's progress, such as
@@ -492,6 +496,10 @@ message TextMessage {
492496

493497
// Optional. The type of the text message.
494498
TextType text_type = 2 [(google.api.field_behavior) = OPTIONAL];
499+
500+
// Optional. An opaque signature for a thought so it can be reused in
501+
// subsequent requests.
502+
bytes thought_signature = 3 [(google.api.field_behavior) = OPTIONAL];
495503
}
496504

497505
// A message produced during schema resolution.
@@ -583,6 +591,16 @@ message DataResult {
583591
// are represented as lists or structs.
584592
repeated google.protobuf.Struct data = 2
585593
[(google.api.field_behavior) = OPTIONAL];
594+
595+
// Optional. Formatted representation of the data, when applicable.
596+
// Each row is a struct that directly corresponds to the row at the same index
597+
// within the `data` field. Its values are string representations of the
598+
// original data, formatted according to data source specifications (e.g.,
599+
// "$1,234.56" for currency). Columns without formatting will default to
600+
// their raw value representation. If no columns have formatting rules, this
601+
// field will be empty.
602+
repeated google.protobuf.Struct formatted_data = 6
603+
[(google.api.field_behavior) = OPTIONAL];
586604
}
587605

588606
// A BigQuery job executed by the system.
@@ -731,6 +749,58 @@ message ErrorMessage {
731749
string text = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
732750
}
733751

752+
// Represents a single question to the user to help clarify their query.
753+
message ClarificationQuestion {
754+
// The selection mode for the clarification question.
755+
enum SelectionMode {
756+
// Unspecified selection mode.
757+
SELECTION_MODE_UNSPECIFIED = 0;
758+
759+
// The user can select only one option.
760+
SINGLE_SELECT = 1;
761+
762+
// The user can select multiple options.
763+
MULTI_SELECT = 2;
764+
}
765+
766+
// The type of clarification question.
767+
// This enum may be extended with new values in the future.
768+
enum ClarificationQuestionType {
769+
// Unspecified clarification question type.
770+
CLARIFICATION_QUESTION_TYPE_UNSPECIFIED = 0;
771+
772+
// The clarification question is for filter values.
773+
FILTER_VALUES = 1;
774+
775+
// The clarification question is for data fields. This is a generic term
776+
// encompassing SQL columns, Looker fields (dimensions/measures), or
777+
// nested data structure properties.
778+
FIELDS = 2;
779+
}
780+
781+
// Required. The natural language question to ask the user.
782+
string question = 1 [(google.api.field_behavior) = REQUIRED];
783+
784+
// Required. The selection mode for this question.
785+
SelectionMode selection_mode = 2 [(google.api.field_behavior) = REQUIRED];
786+
787+
// Required. A list of distinct options for the user to choose from.
788+
// The number of options is limited to a maximum of 5.
789+
repeated string options = 3 [(google.api.field_behavior) = REQUIRED];
790+
791+
// Optional. The type of clarification question.
792+
ClarificationQuestionType clarification_question_type = 4
793+
[(google.api.field_behavior) = OPTIONAL];
794+
}
795+
796+
// A message of questions to help clarify the user's query. This is returned
797+
// when the system cannot confidently answer the user's question.
798+
message ClarificationMessage {
799+
// Required. A batch of clarification questions to ask the user.
800+
repeated ClarificationQuestion questions = 1
801+
[(google.api.field_behavior) = REQUIRED];
802+
}
803+
734804
// A message containing derived and authored example queries.
735805
message ExampleQueries {
736806
// Optional. A list of derived and authored example queries, providing

google/cloud/geminidataanalytics/v1alpha/geminidataanalytics_v1alpha.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,15 @@ documentation:
1818
description: Gets information about a location.
1919

2020
- selector: google.cloud.location.Locations.ListLocations
21-
description: Lists information about the supported locations for this service.
21+
description: |-
22+
Lists information about the supported locations for this service.
23+
This method can be called in two ways:
24+
25+
* **List all public locations:** Use the path `GET /v1/locations`.
26+
* **List project-visible locations:** Use the path
27+
`GET /v1/projects/{project_id}/locations`. This may include public
28+
locations as well as private or other locations specifically visible
29+
to the project.
2230
2331
http:
2432
rules:

0 commit comments

Comments
 (0)