Skip to content

Commit a637d5c

Browse files
feat: [geminidataanalytics] Adding a new SchemaRelationship message to define relationships between table schema (#6871)
* feat: Adding a new TextType PROGRESS to provide informational messages about an agent's progress for supporting more granular Agent RAG tools feat: Adding struct_schema to Datasource to support flexible schemas, particularly for Looker datasources feat: Adding client_managed_resource_context to allow clients to manage their own conversation and agent resources PiperOrigin-RevId: 828965493 Source-Link: googleapis/googleapis@9fcfbea Source-Link: googleapis/googleapis-gen@49047d7 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWdlbWluaWRhdGFhbmFseXRpY3MvLk93bEJvdC55YW1sIiwiaCI6IjQ5MDQ3ZDc3ZDc4YWNmMTViYzU2MGNmZWNmNDljM2I1NjYzZTIzNWEifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: Adding a new SchemaRelationship message to define relationships between table schema feat: Adding a new TextType PROGRESS to provide informational messages about an agent's progress for supporting more granular Agent RAG tools feat: Adding struct_schema to Datasource to support flexible schemas, particularly for Looker datasources feat: Adding client_managed_resource_context to allow clients to manage their own conversation and agent resources feat: Adding a DeleteConversation RPC to allow for the deletion of conversations feat: Adding a GlossaryTerm message to allow users to provide definitions for domain-specific terms feat: Adding an ExampleQueries message to surface derived and authored example queries feat: Adding DatasourceOptions to provide configuration options for datasources feat: Adding support for LookerQuery within the DataQuery message for retrieving data from Looker explores PiperOrigin-RevId: 829449036 Source-Link: googleapis/googleapis@2223580 Source-Link: googleapis/googleapis-gen@e52d1a2 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWdlbWluaWRhdGFhbmFseXRpY3MvLk93bEJvdC55YW1sIiwiaCI6ImU1MmQxYTI5N2VmMTJlMmJmZmMwNDBhODJiOGViY2I1YWIyNGZiNTUifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Santiago Quiroga <[email protected]>
1 parent 4bc9aa9 commit a637d5c

24 files changed

+34969
-27473
lines changed

packages/google-cloud-geminidataanalytics/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ Samples are in the [`samples/`][homepage_samples] directory. Each sample's `READ
8282
| update data agent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-geminidataanalytics/samples/generated/v1beta/data_agent_service.update_data_agent.js) |
8383
| chat | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-geminidataanalytics/samples/generated/v1beta/data_chat_service.chat.js) |
8484
| create conversation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-geminidataanalytics/samples/generated/v1beta/data_chat_service.create_conversation.js) |
85+
| delete conversation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-geminidataanalytics/samples/generated/v1beta/data_chat_service.delete_conversation.js) |
8586
| get conversation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-geminidataanalytics/samples/generated/v1beta/data_chat_service.get_conversation.js) |
8687
| list conversations | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-geminidataanalytics/samples/generated/v1beta/data_chat_service.list_conversations.js) |
8788
| list messages | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-geminidataanalytics/samples/generated/v1beta/data_chat_service.list_messages.js) |

packages/google-cloud-geminidataanalytics/protos/google/cloud/geminidataanalytics/v1alpha/context.proto

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ package google.cloud.geminidataanalytics.v1alpha;
1818

1919
import "google/api/field_behavior.proto";
2020
import "google/cloud/geminidataanalytics/v1alpha/datasource.proto";
21+
import "google/protobuf/wrappers.proto";
2122

2223
option csharp_namespace = "Google.Cloud.GeminiDataAnalytics.V1Alpha";
2324
option go_package = "cloud.google.com/go/geminidataanalytics/apiv1alpha/geminidataanalyticspb;geminidataanalyticspb";
@@ -151,6 +152,19 @@ message ConversationOptions {
151152

152153
// Optional. Options for analysis.
153154
AnalysisOptions analysis = 2 [(google.api.field_behavior) = OPTIONAL];
155+
156+
// Optional. Options for datasources.
157+
DatasourceOptions datasource = 3 [(google.api.field_behavior) = OPTIONAL];
158+
}
159+
160+
// Options for datasources configurations.
161+
message DatasourceOptions {
162+
// Optional. This option applies to datasources that require BigQuery queries
163+
// only. Limits the bytes billed for each BQ query job. Queries that will have
164+
// bytes billed beyond this limit will fail (without incurring a charge).
165+
// If unspecified, no limit will be applied.
166+
google.protobuf.Int64Value big_query_max_billed_bytes = 1
167+
[(google.api.field_behavior) = OPTIONAL];
154168
}
155169

156170
// Options for chart generation.

packages/google-cloud-geminidataanalytics/protos/google/cloud/geminidataanalytics/v1alpha/data_chat_service.proto

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,13 @@ message ChatRequest {
169169
// statelessly, without managed conversation persistence.
170170
DataAgentContext data_agent_context = 104
171171
[(google.api.field_behavior) = OPTIONAL];
172+
173+
// Optional. Context with client managed resources.
174+
// Some clients may not use GDA managed resources including
175+
// conversations and agents, instead they create and manage their own
176+
// conversations and agents resources.
177+
ClientManagedResourceContext client_managed_resource_context = 105
178+
[(google.api.field_behavior) = OPTIONAL];
172179
}
173180

174181
// Optional. The Google Cloud project to be used for quota and billing.
@@ -243,6 +250,22 @@ message ConversationReference {
243250
[(google.api.field_behavior) = REQUIRED];
244251
}
245252

253+
// Context with client managed resources.
254+
// Some clients may not use GDA managed resources including
255+
// conversations and agents, instead they create and manage their own
256+
// conversations and agents resources.
257+
message ClientManagedResourceContext {
258+
// Required. Context for the chat request. Use this to chat without GDA API
259+
// managed conversation and agent persistence by passing all context inline.
260+
Context inline_context = 1 [(google.api.field_behavior) = REQUIRED];
261+
262+
// Optional. The client managed conversation id.
263+
string conversation_id = 2 [(google.api.field_behavior) = OPTIONAL];
264+
265+
// Optional. The client managed agent id.
266+
string agent_id = 3 [(google.api.field_behavior) = OPTIONAL];
267+
}
268+
246269
// A message from an interaction between the user and the system.
247270
message Message {
248271
// The kind of message.
@@ -320,6 +343,13 @@ message TextMessage {
320343

321344
// The text is a thinking plan generated by the thinking tool.
322345
THOUGHT = 2;
346+
347+
// The text is an informational message about the agent's progress, such as
348+
// a tool being invoked. This is distinct from the agent's internal thought
349+
// process (`THOUGHT`) and the final answer to the user
350+
// (`FINAL_RESPONSE`). These messages provide insight into the agent's
351+
// actions.
352+
PROGRESS = 3;
323353
}
324354

325355
// Optional. The parts of the message.
@@ -579,7 +609,20 @@ message ChartResult {
579609
Blob image = 3 [(google.api.field_behavior) = OPTIONAL];
580610
}
581611

582-
// An error message.
612+
// An error message from a tool call.
613+
// This message is used to represent an error that occurred while an agent was
614+
// trying to use a tool. It's important to note that not all errors are
615+
// terminal. Many are recoverable, and the agent may use the information from
616+
// this error message to self-correct and retry the tool call or try a
617+
// different approach.
618+
//
619+
// For example, if a data query fails, the agent might receive an
620+
// `ErrorMessage`, analyze it, and then generate a corrected query.
621+
//
622+
// Clients should be cautious about interpreting this message as a definitive
623+
// failure. It can be part of the agent's normal, iterative process of
624+
// completing a task. Surfacing these errors directly to end-users without
625+
// context (e.g., as a "hard failure") may be misleading.
583626
message ErrorMessage {
584627
// Output only. The text of the error.
585628
string text = 1 [(google.api.field_behavior) = OUTPUT_ONLY];

packages/google-cloud-geminidataanalytics/protos/google/cloud/geminidataanalytics/v1alpha/datasource.proto

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ package google.cloud.geminidataanalytics.v1alpha;
1818

1919
import "google/api/field_behavior.proto";
2020
import "google/cloud/geminidataanalytics/v1alpha/credentials.proto";
21+
import "google/protobuf/struct.proto";
2122

2223
option csharp_namespace = "Google.Cloud.GeminiDataAnalytics.V1Alpha";
2324
option go_package = "cloud.google.com/go/geminidataanalytics/apiv1alpha/geminidataanalyticspb;geminidataanalyticspb";
@@ -155,6 +156,15 @@ message Datasource {
155156

156157
// Optional. The schema of the datasource.
157158
Schema schema = 7 [(google.api.field_behavior) = OPTIONAL];
159+
160+
// Optional. A struct representation of the schema.
161+
// This is populated for datasources with schemas that cannot be
162+
// fully represented by the strongly-typed `schema` field.
163+
//
164+
// For Looker datasources, this maps to the LookmlModelExplore type:
165+
// https://cloud.google.com/looker/docs/reference/looker-api/latest/types/LookmlModelExplore
166+
google.protobuf.Struct struct_schema = 10
167+
[(google.api.field_behavior) = OPTIONAL];
158168
}
159169

160170
// The schema of a Datasource or QueryResult instance.

packages/google-cloud-geminidataanalytics/protos/google/cloud/geminidataanalytics/v1beta/context.proto

Lines changed: 92 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ package google.cloud.geminidataanalytics.v1beta;
1818

1919
import "google/api/field_behavior.proto";
2020
import "google/cloud/geminidataanalytics/v1beta/datasource.proto";
21+
import "google/protobuf/wrappers.proto";
2122

2223
option csharp_namespace = "Google.Cloud.GeminiDataAnalytics.V1Beta";
2324
option go_package = "cloud.google.com/go/geminidataanalytics/apiv1beta/geminidataanalyticspb;geminidataanalyticspb";
@@ -29,6 +30,56 @@ option ruby_package = "Google::Cloud::GeminiDataAnalytics::V1beta";
2930

3031
// A collection of context to apply to this conversation
3132
message Context {
33+
// The relationship between two tables, including referencing and referenced
34+
// columns. This is a derived context retrieved from Dataplex Dataset
35+
// Insights.
36+
message SchemaRelationship {
37+
// Represents an ordered set of paths within the table schema.
38+
message SchemaPaths {
39+
// The service-qualified full resource name of the table
40+
// Ex:
41+
// bigquery.googleapis.com/projects/PROJECT_ID/datasets/DATASET_ID/tables/TABLE_ID
42+
string table_fqn = 1;
43+
44+
// The ordered list of paths within the table schema.
45+
repeated string paths = 2;
46+
}
47+
48+
// Source which generated the schema relation edge.
49+
enum Source {
50+
// The source of the schema relationship is unspecified.
51+
SOURCE_UNSPECIFIED = 0;
52+
53+
// The source of the schema relationship is BigQuery job history.
54+
BIGQUERY_JOB_HISTORY = 1;
55+
56+
// The source of the schema relationship is LLM suggested.
57+
LLM_SUGGESTED = 2;
58+
59+
// The source of the schema relationship is BigQuery table constraints.
60+
BIGQUERY_TABLE_CONSTRAINTS = 3;
61+
}
62+
63+
// An ordered list of fields for the join from the first table.
64+
// The size of this list must be the same as `right_schema_paths`.
65+
// Each field at index i in this list must correspond to a field at the same
66+
// index in the `right_schema_paths` list.
67+
SchemaPaths left_schema_paths = 1;
68+
69+
// An ordered list of fields for the join from the second table.
70+
// The size of this list must be the same as `left_schema_paths`.
71+
// Each field at index i in this list must correspond to a field at the same
72+
// index in the `left_schema_paths` list.
73+
SchemaPaths right_schema_paths = 2;
74+
75+
// Sources which generated the schema relation edge.
76+
repeated Source sources = 3;
77+
78+
// A confidence score for the suggested relationship.
79+
// Manually added edges have the highest confidence score.
80+
float confidence_score = 4;
81+
}
82+
3283
// Optional. The basic entry point for data owners creating domain knowledge
3384
// for Agent.
3485
//
@@ -46,13 +97,23 @@ message Context {
4697

4798
// Optional. A list of example queries, providing examples of relevant and
4899
// commonly used SQL queries and their corresponding natural language queries
49-
// optionally present.
100+
// optionally present. Currently only used for BigQuery data sources.
50101
repeated ExampleQuery example_queries = 5
51102
[(google.api.field_behavior) = OPTIONAL];
103+
104+
// Optional. Term definitions (currently, only user authored)
105+
repeated GlossaryTerm glossary_terms = 8
106+
[(google.api.field_behavior) = OPTIONAL];
107+
108+
// Optional. Relationships between table schema, including referencing and
109+
// referenced columns.
110+
repeated SchemaRelationship schema_relationships = 9
111+
[(google.api.field_behavior) = OPTIONAL];
52112
}
53113

54114
// Example of relevant and commonly used SQL query and its corresponding natural
55-
// language queries optionally present.
115+
// language queries optionally present. Currently only used for BigQuery data
116+
// sources.
56117
message ExampleQuery {
57118
// The SQL or Looker query that should be generated to answer the natural
58119
// language query.
@@ -68,13 +129,42 @@ message ExampleQuery {
68129
string natural_language_question = 1 [(google.api.field_behavior) = OPTIONAL];
69130
}
70131

132+
// Definition of a term within a specific domain.
133+
message GlossaryTerm {
134+
// Required. User friendly display name of the glossary term being defined.
135+
// For example: "CTR", "conversion rate", "pending"
136+
string display_name = 1 [(google.api.field_behavior) = REQUIRED];
137+
138+
// Required. The description or meaning of the term.
139+
// For example: "Click-through rate", "The percentage of users who complete a
140+
// desired action", "An order that is waiting to be processed."
141+
string description = 2 [(google.api.field_behavior) = REQUIRED];
142+
143+
// Optional. A list of general purpose labels associated to this term.
144+
// For example: ["click rate", "clickthrough", "waiting"]
145+
repeated string labels = 3 [(google.api.field_behavior) = OPTIONAL];
146+
}
147+
71148
// Options for the conversation.
72149
message ConversationOptions {
73150
// Optional. Options for chart generation.
74151
ChartOptions chart = 1 [(google.api.field_behavior) = OPTIONAL];
75152

76153
// Optional. Options for analysis.
77154
AnalysisOptions analysis = 2 [(google.api.field_behavior) = OPTIONAL];
155+
156+
// Optional. Options for datasources.
157+
DatasourceOptions datasource = 3 [(google.api.field_behavior) = OPTIONAL];
158+
}
159+
160+
// Options for datasources configurations.
161+
message DatasourceOptions {
162+
// Optional. This option applies to datasources that require BigQuery queries
163+
// only. Limits the bytes billed for each BQ query job. Queries that will have
164+
// bytes billed beyond this limit will fail (without incurring a charge).
165+
// If unspecified, no limit will be applied.
166+
google.protobuf.Int64Value big_query_max_billed_bytes = 1
167+
[(google.api.field_behavior) = OPTIONAL];
78168
}
79169

80170
// Options for chart generation.

packages/google-cloud-geminidataanalytics/protos/google/cloud/geminidataanalytics/v1beta/conversation.proto

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ message Conversation {
4545
// https://google.aip.dev/122#resource-id-segments
4646
//
4747
// Example:
48-
// `projects/1234567890/locations/us-central1/conversations/my-conversation`.
48+
// `projects/1234567890/locations/global/conversations/my-conversation`.
4949
//
5050
// It is recommended to skip setting this field during conversation creation
5151
// as it will be inferred automatically and overwritten with the
@@ -139,7 +139,7 @@ message ListConversationsRequest {
139139

140140
// Optional. Returned conversations will match criteria specified within the
141141
// filter. ListConversations allows filtering by:
142-
// * agent_id
142+
// * agents
143143
// * labels
144144
string filter = 4 [(google.api.field_behavior) = OPTIONAL];
145145
}
@@ -152,3 +152,16 @@ message ListConversationsResponse {
152152
// A token identifying a page of results the server should return.
153153
string next_page_token = 2;
154154
}
155+
156+
// Request for deleting a conversation based on parent and conversation id.
157+
message DeleteConversationRequest {
158+
// Required. Name of the resource.
159+
// Format:
160+
// `projects/{project}/locations/{location}/conversations/{conversation}`
161+
string name = 1 [
162+
(google.api.field_behavior) = REQUIRED,
163+
(google.api.resource_reference) = {
164+
type: "geminidataanalytics.googleapis.com/Conversation"
165+
}
166+
];
167+
}

packages/google-cloud-geminidataanalytics/protos/google/cloud/geminidataanalytics/v1beta/data_agent.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ message DataAgent {
5353
// must match the format described in
5454
// https://google.aip.dev/122#resource-id-segments
5555
//
56-
// Example: `projects/1234567890/locations/us-central1/dataAgents/my-agent`.
56+
// Example: `projects/1234567890/locations/global/dataAgents/my-agent`.
5757
//
5858
// It is recommended to skip setting this field during agent creation as it
5959
// will be inferred automatically and overwritten with the

0 commit comments

Comments
 (0)