Skip to content

Commit 1499898

Browse files
Google APIscopybara-github
authored andcommitted
feat: Add transcription fields to Session Service
feat: Add v1 API version for Session Service docs: A comment for field `expire_time` in message `.google.cloud.aiplatform.v1beta1.Session` is changed docs: A comment for field `ttl` in message `.google.cloud.aiplatform.v1beta1.Session` is changed docs: A comment for field `filter` in message `.google.cloud.aiplatform.v1beta1.ListSessionsRequest` is changed PiperOrigin-RevId: 874707222
1 parent 51e3bc6 commit 1499898

File tree

6 files changed

+578
-3
lines changed

6 files changed

+578
-3
lines changed

google/cloud/aiplatform/v1/BUILD.bazel

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,8 @@ proto_library(
130130
"schedule.proto",
131131
"schedule_service.proto",
132132
"service_networking.proto",
133+
"session.proto",
134+
"session_service.proto",
133135
"specialist_pool.proto",
134136
"specialist_pool_service.proto",
135137
"study.proto",
@@ -256,6 +258,7 @@ java_gapic_test(
256258
"com.google.cloud.aiplatform.v1.PipelineServiceClientTest",
257259
"com.google.cloud.aiplatform.v1.PredictionServiceClientTest",
258260
"com.google.cloud.aiplatform.v1.ScheduleServiceClientTest",
261+
"com.google.cloud.aiplatform.v1.SessionServiceClientTest",
259262
"com.google.cloud.aiplatform.v1.SpecialistPoolServiceClientTest",
260263
"com.google.cloud.aiplatform.v1.TensorboardServiceClientTest",
261264
"com.google.cloud.aiplatform.v1.VizierServiceClientTest",

google/cloud/aiplatform/v1/aiplatform_v1.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ apis:
3232
- name: google.cloud.aiplatform.v1.ReasoningEngineExecutionService
3333
- name: google.cloud.aiplatform.v1.ReasoningEngineService
3434
- name: google.cloud.aiplatform.v1.ScheduleService
35+
- name: google.cloud.aiplatform.v1.SessionService
3536
- name: google.cloud.aiplatform.v1.SpecialistPoolService
3637
- name: google.cloud.aiplatform.v1.TensorboardService
3738
- name: google.cloud.aiplatform.v1.VertexRagDataService
@@ -329,6 +330,7 @@ http:
329330
- post: '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}:cancel'
330331
- post: '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}:cancel'
331332
- post: '/v1/{name=projects/*/locations/*/reasoningEngines/*/operations/*}:cancel'
333+
- post: '/v1/{name=projects/*/locations/*/reasoningEngines/*/sessions/*/operations/*}:cancel'
332334
- post: '/v1/{name=projects/*/locations/*/studies/*/operations/*}:cancel'
333335
- post: '/v1/{name=projects/*/locations/*/studies/*/trials/*/operations/*}:cancel'
334336
- post: '/v1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}:cancel'
@@ -339,6 +341,7 @@ http:
339341
- post: '/v1/{name=projects/*/locations/*/tensorboards/*/experiments/*/operations/*}:cancel'
340342
- post: '/v1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/operations/*}:cancel'
341343
- post: '/v1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}:cancel'
344+
- post: '/v1/{name=reasoningEngines/*/sessions/*/operations/*}:cancel'
342345
- selector: google.longrunning.Operations.DeleteOperation
343346
delete: '/ui/{name=projects/*/locations/*/operations/*}'
344347
additional_bindings:
@@ -422,6 +425,7 @@ http:
422425
- delete: '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}'
423426
- delete: '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}'
424427
- delete: '/v1/{name=projects/*/locations/*/reasoningEngines/*/operations/*}'
428+
- delete: '/v1/{name=projects/*/locations/*/reasoningEngines/*/sessions/*/operations/*}'
425429
- delete: '/v1/{name=projects/*/locations/*/studies/*/operations/*}'
426430
- delete: '/v1/{name=projects/*/locations/*/studies/*/trials/*/operations/*}'
427431
- delete: '/v1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}'
@@ -437,6 +441,7 @@ http:
437441
- delete: '/v1/{name=projects/*/locations/*/featureGroups/*/operations/*}'
438442
- delete: '/v1/{name=projects/*/locations/*/featureGroups/*/features/*/operations/*}'
439443
- delete: '/v1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}'
444+
- delete: '/v1/{name=reasoningEngines/*/sessions/*/operations/*}'
440445
- selector: google.longrunning.Operations.GetOperation
441446
get: '/ui/{name=projects/*/locations/*/operations/*}'
442447
additional_bindings:
@@ -523,6 +528,7 @@ http:
523528
- get: '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}'
524529
- get: '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}'
525530
- get: '/v1/{name=projects/*/locations/*/reasoningEngines/*/operations/*}'
531+
- get: '/v1/{name=projects/*/locations/*/reasoningEngines/*/sessions/*/operations/*}'
526532
- get: '/v1/{name=projects/*/locations/*/studies/*/operations/*}'
527533
- get: '/v1/{name=projects/*/locations/*/studies/*/trials/*/operations/*}'
528534
- get: '/v1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}'
@@ -538,6 +544,7 @@ http:
538544
- get: '/v1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}'
539545
- get: '/v1/{name=projects/*/locations/*/featureGroups/*/operations/*}'
540546
- get: '/v1/{name=projects/*/locations/*/featureGroups/*/features/*/operations/*}'
547+
- get: '/v1/{name=reasoningEngines/*/sessions/*/operations/*}'
541548
- selector: google.longrunning.Operations.ListOperations
542549
get: '/ui/{name=projects/*/locations/*}/operations'
543550
additional_bindings:
@@ -620,6 +627,7 @@ http:
620627
- get: '/v1/{name=projects/*/locations/*/notebookRuntimes/*}/operations'
621628
- get: '/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*}/operations'
622629
- get: '/v1/{name=projects/*/locations/*/reasoningEngines/*}/operations'
630+
- get: '/v1/{name=projects/*/locations/*/reasoningEngines/*/sessions/*}/operations'
623631
- get: '/v1/{name=projects/*/locations/*/studies/*}/operations'
624632
- get: '/v1/{name=projects/*/locations/*/studies/*/trials/*}/operations'
625633
- get: '/v1/{name=projects/*/locations/*/trainingPipelines/*}/operations'
@@ -638,6 +646,7 @@ http:
638646
- get: '/v1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}:wait'
639647
- get: '/v1/{name=projects/*/locations/*/featureGroups/*/operations/*}:wait'
640648
- get: '/v1/{name=projects/*/locations/*/featureGroups/*/features/*/operations/*}:wait'
649+
- get: '/v1/{name=reasoningEngines/*/sessions/*}/operations'
641650
- selector: google.longrunning.Operations.WaitOperation
642651
post: '/ui/{name=projects/*/locations/*/operations/*}:wait'
643652
additional_bindings:
@@ -722,6 +731,7 @@ http:
722731
- post: '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}:wait'
723732
- post: '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}:wait'
724733
- post: '/v1/{name=projects/*/locations/*/reasoningEngines/*/operations/*}:wait'
734+
- post: '/v1/{name=projects/*/locations/*/reasoningEngines/*/sessions/*/operations/*}:wait'
725735
- post: '/v1/{name=projects/*/locations/*/studies/*/operations/*}:wait'
726736
- post: '/v1/{name=projects/*/locations/*/studies/*/trials/*/operations/*}:wait'
727737
- post: '/v1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}:wait'
@@ -737,6 +747,7 @@ http:
737747
- post: '/v1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}:wait'
738748
- post: '/v1/{name=projects/*/locations/*/featureGroups/*/operations/*}:wait'
739749
- post: '/v1/{name=projects/*/locations/*/featureGroups/*/features/*/operations/*}:wait'
750+
- post: '/v1/{name=reasoningEngines/*/sessions/*/operations/*}:wait'
740751

741752
authentication:
742753
rules:
@@ -878,6 +889,10 @@ authentication:
878889
oauth:
879890
canonical_scopes: |-
880891
https://www.googleapis.com/auth/cloud-platform
892+
- selector: 'google.cloud.aiplatform.v1.SessionService.*'
893+
oauth:
894+
canonical_scopes: |-
895+
https://www.googleapis.com/auth/cloud-platform
881896
- selector: 'google.cloud.aiplatform.v1.SpecialistPoolService.*'
882897
oauth:
883898
canonical_scopes: |-
Lines changed: 216 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,216 @@
1+
// Copyright 2026 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.aiplatform.v1;
18+
19+
import "google/api/field_behavior.proto";
20+
import "google/api/resource.proto";
21+
import "google/cloud/aiplatform/v1/content.proto";
22+
import "google/protobuf/duration.proto";
23+
import "google/protobuf/struct.proto";
24+
import "google/protobuf/timestamp.proto";
25+
26+
option csharp_namespace = "Google.Cloud.AIPlatform.V1";
27+
option go_package = "cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb";
28+
option java_multiple_files = true;
29+
option java_outer_classname = "SessionProto";
30+
option java_package = "com.google.cloud.aiplatform.v1";
31+
option php_namespace = "Google\\Cloud\\AIPlatform\\V1";
32+
option ruby_package = "Google::Cloud::AIPlatform::V1";
33+
34+
// A session contains a set of actions between users and Vertex agents.
35+
message Session {
36+
option (google.api.resource) = {
37+
type: "aiplatform.googleapis.com/Session"
38+
pattern: "projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}/sessions/{session}"
39+
plural: "sessions"
40+
singular: "session"
41+
};
42+
43+
// The expiration of the session.
44+
oneof expiration {
45+
// Optional. Timestamp of when this session is considered expired.
46+
// This is *always* provided on output, regardless of what was sent
47+
// on input.
48+
// The minimum value is 24 hours from the time of creation.
49+
google.protobuf.Timestamp expire_time = 13
50+
[(google.api.field_behavior) = OPTIONAL];
51+
52+
// Optional. Input only. The TTL for this session.
53+
// The minimum value is 24 hours.
54+
google.protobuf.Duration ttl = 14 [
55+
(google.api.field_behavior) = OPTIONAL,
56+
(google.api.field_behavior) = INPUT_ONLY
57+
];
58+
}
59+
60+
// Identifier. The resource name of the session.
61+
// Format:
62+
// 'projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}/sessions/{session}'.
63+
string name = 1 [(google.api.field_behavior) = IDENTIFIER];
64+
65+
// Output only. Timestamp when the session was created.
66+
google.protobuf.Timestamp create_time = 3
67+
[(google.api.field_behavior) = OUTPUT_ONLY];
68+
69+
// Output only. Timestamp when the session was updated.
70+
google.protobuf.Timestamp update_time = 4
71+
[(google.api.field_behavior) = OUTPUT_ONLY];
72+
73+
// Optional. The display name of the session.
74+
string display_name = 5 [(google.api.field_behavior) = OPTIONAL];
75+
76+
// The labels with user-defined metadata to organize your Sessions.
77+
//
78+
// Label keys and values can be no longer than 64 characters
79+
// (Unicode codepoints), can only contain lowercase letters, numeric
80+
// characters, underscores and dashes. International characters are allowed.
81+
//
82+
// See https://goo.gl/xmQnxf for more information and examples of labels.
83+
map<string, string> labels = 8;
84+
85+
// Optional. Session specific memory which stores key conversation points.
86+
google.protobuf.Struct session_state = 10
87+
[(google.api.field_behavior) = OPTIONAL];
88+
89+
// Required. Immutable. String id provided by the user
90+
string user_id = 12 [
91+
(google.api.field_behavior) = IMMUTABLE,
92+
(google.api.field_behavior) = REQUIRED
93+
];
94+
}
95+
96+
// An event represents a message from either the user or agent.
97+
message SessionEvent {
98+
option (google.api.resource) = {
99+
type: "aiplatform.googleapis.com/SessionEvent"
100+
pattern: "projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}/sessions/{session}/events/{event}"
101+
plural: "sessionEvents"
102+
singular: "sessionEvent"
103+
};
104+
105+
// Identifier. The resource name of the event.
106+
// Format:`projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}/sessions/{session}/events/{event}`.
107+
string name = 1 [(google.api.field_behavior) = IDENTIFIER];
108+
109+
// Required. The name of the agent that sent the event, or user.
110+
string author = 3 [(google.api.field_behavior) = REQUIRED];
111+
112+
// Optional. Content of the event provided by the author.
113+
Content content = 4 [(google.api.field_behavior) = OPTIONAL];
114+
115+
// Required. The invocation id of the event, multiple events can have the same
116+
// invocation id.
117+
string invocation_id = 5 [(google.api.field_behavior) = REQUIRED];
118+
119+
// Optional. Actions executed by the agent.
120+
EventActions actions = 6 [(google.api.field_behavior) = OPTIONAL];
121+
122+
// Required. Timestamp when the event was created on client side.
123+
google.protobuf.Timestamp timestamp = 8
124+
[(google.api.field_behavior) = REQUIRED];
125+
126+
// Optional. Error code if the response is an error. Code varies by model.
127+
string error_code = 9 [(google.api.field_behavior) = OPTIONAL];
128+
129+
// Optional. Error message if the response is an error.
130+
string error_message = 10 [(google.api.field_behavior) = OPTIONAL];
131+
132+
// Optional. Metadata relating to this event.
133+
EventMetadata event_metadata = 11 [(google.api.field_behavior) = OPTIONAL];
134+
}
135+
136+
// Metadata relating to a LLM response event.
137+
message EventMetadata {
138+
// Optional. Metadata returned to client when grounding is enabled.
139+
GroundingMetadata grounding_metadata = 1
140+
[(google.api.field_behavior) = OPTIONAL];
141+
142+
// Optional. Indicates whether the text content is part of a unfinished text
143+
// stream. Only used for streaming mode and when the content is plain text.
144+
bool partial = 2 [(google.api.field_behavior) = OPTIONAL];
145+
146+
// Optional. Indicates whether the response from the model is complete.
147+
// Only used for streaming mode.
148+
bool turn_complete = 3 [(google.api.field_behavior) = OPTIONAL];
149+
150+
// Optional. Flag indicating that LLM was interrupted when generating the
151+
// content. Usually it's due to user interruption during a bidi streaming.
152+
bool interrupted = 4 [(google.api.field_behavior) = OPTIONAL];
153+
154+
// Optional. Set of ids of the long running function calls.
155+
// Agent client will know from this field about which function call is long
156+
// running. Only valid for function call event.
157+
repeated string long_running_tool_ids = 5
158+
[(google.api.field_behavior) = OPTIONAL];
159+
160+
// Optional. The branch of the event.
161+
// The format is like agent_1.agent_2.agent_3, where agent_1 is the parent of
162+
// agent_2, and agent_2 is the parent of agent_3.
163+
// Branch is used when multiple child agents shouldn't see their siblings'
164+
// conversation history.
165+
string branch = 6 [(google.api.field_behavior) = OPTIONAL];
166+
167+
// The custom metadata of the LlmResponse.
168+
google.protobuf.Struct custom_metadata = 7;
169+
170+
// Optional. Audio transcription of user input.
171+
Transcription input_transcription = 10
172+
[(google.api.field_behavior) = OPTIONAL];
173+
174+
// Optional. Audio transcription of model output.
175+
Transcription output_transcription = 11
176+
[(google.api.field_behavior) = OPTIONAL];
177+
}
178+
179+
// Actions are parts of events that are executed by the agent.
180+
message EventActions {
181+
// Optional. If true, it won't call model to summarize function response.
182+
// Only used for function_response event.
183+
bool skip_summarization = 1 [(google.api.field_behavior) = OPTIONAL];
184+
185+
// Optional. Indicates that the event is updating the state with the given
186+
// delta.
187+
google.protobuf.Struct state_delta = 2
188+
[(google.api.field_behavior) = OPTIONAL];
189+
190+
// Optional. Indicates that the event is updating an artifact. key is the
191+
// filename, value is the version.
192+
map<string, int32> artifact_delta = 3
193+
[(google.api.field_behavior) = OPTIONAL];
194+
195+
// Optional. The agent is escalating to a higher level agent.
196+
bool escalate = 6 [(google.api.field_behavior) = OPTIONAL];
197+
198+
// Optional. Will only be set by a tool response indicating tool request euc.
199+
// Struct key is the function call id since one function call response (from
200+
// model) could correspond to multiple function calls. Struct value is the
201+
// required auth config, which can be another struct.
202+
google.protobuf.Struct requested_auth_configs = 7
203+
[(google.api.field_behavior) = OPTIONAL];
204+
205+
// Optional. If set, the event transfers to the specified agent.
206+
string transfer_agent = 8 [(google.api.field_behavior) = OPTIONAL];
207+
}
208+
209+
// Audio transcription in Server Content.
210+
message Transcription {
211+
// Optional. Transcription text.
212+
string text = 1 [(google.api.field_behavior) = OPTIONAL];
213+
214+
// Optional. The bool indicates the end of the transcription.
215+
bool finished = 2 [(google.api.field_behavior) = OPTIONAL];
216+
}

0 commit comments

Comments
 (0)