Skip to content

Commit 404a0ad

Browse files
Google APIscopybara-github
authored andcommitted
fix!: Removed support for session resource paths that do not include reasoning engine
feat: Deprecated EventActions.transfer_to_agent and replaced with EventActions.transfer_agent PiperOrigin-RevId: 749972321
1 parent c6b8b89 commit 404a0ad

File tree

2 files changed

+16
-35
lines changed

2 files changed

+16
-35
lines changed

google/cloud/aiplatform/v1beta1/session.proto

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ option ruby_package = "Google::Cloud::AIPlatform::V1beta1";
3434
message Session {
3535
option (google.api.resource) = {
3636
type: "aiplatform.googleapis.com/Session"
37-
pattern: "projects/{project}/locations/{location}/sessions/{session}"
3837
pattern: "projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}/sessions/{session}"
3938
plural: "sessions"
4039
singular: "session"
@@ -74,7 +73,6 @@ message Session {
7473
message SessionEvent {
7574
option (google.api.resource) = {
7675
type: "aiplatform.googleapis.com/SessionEvent"
77-
pattern: "projects/{project}/locations/{location}/sessions/{session}/events/{event}"
7876
pattern: "projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}/sessions/{session}/events/{event}"
7977
plural: "sessionEvents"
8078
singular: "sessionEvent"
@@ -162,8 +160,8 @@ message EventActions {
162160
map<string, int32> artifact_delta = 3
163161
[(google.api.field_behavior) = OPTIONAL];
164162

165-
// Optional. If set, the event transfers to the specified agent.
166-
bool transfer_to_agent = 5 [(google.api.field_behavior) = OPTIONAL];
163+
// Deprecated. If set, the event transfers to the specified agent.
164+
bool transfer_to_agent = 5 [deprecated = true];
167165

168166
// Optional. The agent is escalating to a higher level agent.
169167
bool escalate = 6 [(google.api.field_behavior) = OPTIONAL];
@@ -174,4 +172,7 @@ message EventActions {
174172
// required auth config, which can be another struct.
175173
google.protobuf.Struct requested_auth_configs = 7
176174
[(google.api.field_behavior) = OPTIONAL];
175+
176+
// Optional. If set, the event transfers to the specified agent.
177+
string transfer_agent = 8 [(google.api.field_behavior) = OPTIONAL];
177178
}

google/cloud/aiplatform/v1beta1/session_service.proto

Lines changed: 11 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -40,17 +40,12 @@ service SessionService {
4040
option (google.api.oauth_scopes) =
4141
"https://www.googleapis.com/auth/cloud-platform";
4242

43-
// Creates a new [Session][google.cloud.aiplatform.v1beta1.Session] in a given
44-
// project and location.
43+
// Creates a new [Session][google.cloud.aiplatform.v1beta1.Session].
4544
rpc CreateSession(CreateSessionRequest)
4645
returns (google.longrunning.Operation) {
4746
option (google.api.http) = {
48-
post: "/v1beta1/{parent=projects/*/locations/*}/sessions"
47+
post: "/v1beta1/{parent=projects/*/locations/*/reasoningEngines/*}/sessions"
4948
body: "session"
50-
additional_bindings {
51-
post: "/v1beta1/{parent=projects/*/locations/*/reasoningEngines/*}/sessions"
52-
body: "session"
53-
}
5449
};
5550
option (google.api.method_signature) = "parent,session";
5651
option (google.longrunning.operation_info) = {
@@ -63,35 +58,25 @@ service SessionService {
6358
// [Session][google.cloud.aiplatform.v1beta1.Session].
6459
rpc GetSession(GetSessionRequest) returns (Session) {
6560
option (google.api.http) = {
66-
get: "/v1beta1/{name=projects/*/locations/*/sessions/*}"
67-
additional_bindings {
68-
get: "/v1beta1/{name=projects/*/locations/*/reasoningEngines/*/sessions/*}"
69-
}
61+
get: "/v1beta1/{name=projects/*/locations/*/reasoningEngines/*/sessions/*}"
7062
};
7163
option (google.api.method_signature) = "name";
7264
}
7365

7466
// Lists [Sessions][google.cloud.aiplatform.v1beta1.Session] in a given
75-
// project and location.
67+
// reasoning engine.
7668
rpc ListSessions(ListSessionsRequest) returns (ListSessionsResponse) {
7769
option (google.api.http) = {
78-
get: "/v1beta1/{parent=projects/*/locations/*}/sessions"
79-
additional_bindings {
80-
get: "/v1beta1/{parent=projects/*/locations/*/reasoningEngines/*}/sessions"
81-
}
70+
get: "/v1beta1/{parent=projects/*/locations/*/reasoningEngines/*}/sessions"
8271
};
8372
option (google.api.method_signature) = "parent";
8473
}
8574

8675
// Updates the specific [Session][google.cloud.aiplatform.v1beta1.Session].
8776
rpc UpdateSession(UpdateSessionRequest) returns (Session) {
8877
option (google.api.http) = {
89-
patch: "/v1beta1/{session.name=projects/*/locations/*/sessions/*}"
78+
patch: "/v1beta1/{session.name=projects/*/locations/*/reasoningEngines/*/sessions/*}"
9079
body: "session"
91-
additional_bindings {
92-
patch: "/v1beta1/{session.name=projects/*/locations/*/reasoningEngines/*/sessions/*}"
93-
body: "session"
94-
}
9580
};
9681
option (google.api.method_signature) = "session,update_mask";
9782
}
@@ -101,10 +86,7 @@ service SessionService {
10186
rpc DeleteSession(DeleteSessionRequest)
10287
returns (google.longrunning.Operation) {
10388
option (google.api.http) = {
104-
delete: "/v1beta1/{name=projects/*/locations/*/sessions/*}"
105-
additional_bindings {
106-
delete: "/v1beta1/{name=projects/*/locations/*/reasoningEngines/*/sessions/*}"
107-
}
89+
delete: "/v1beta1/{name=projects/*/locations/*/reasoningEngines/*/sessions/*}"
10890
};
10991
option (google.api.method_signature) = "name";
11092
option (google.longrunning.operation_info) = {
@@ -117,9 +99,6 @@ service SessionService {
11799
rpc ListEvents(ListEventsRequest) returns (ListEventsResponse) {
118100
option (google.api.http) = {
119101
get: "/v1beta1/{parent=projects/*/locations/*/reasoningEngines/*/sessions/*}/events"
120-
additional_bindings {
121-
get: "/v1beta1/{parent=projects/*/locations/*/sessions/*}/events"
122-
}
123102
};
124103
option (google.api.method_signature) = "parent";
125104
}
@@ -138,7 +117,7 @@ service SessionService {
138117
// [SessionService.CreateSession][google.cloud.aiplatform.v1beta1.SessionService.CreateSession].
139118
message CreateSessionRequest {
140119
// Required. The resource name of the location to create the session in.
141-
// Format: `projects/{project}/locations/{location}` or
120+
// Format:
142121
// `projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}`
143122
string parent = 1 [
144123
(google.api.field_behavior) = REQUIRED,
@@ -246,7 +225,6 @@ message UpdateSessionRequest {
246225
message DeleteSessionRequest {
247226
// Required. The resource name of the session.
248227
// Format:
249-
// `projects/{project}/locations/{location}/sessions/{session}` or
250228
// `projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}/sessions/{session}`
251229
string name = 1 [
252230
(google.api.field_behavior) = REQUIRED,
@@ -271,6 +249,7 @@ message ListEventsRequest {
271249

272250
// Optional. The maximum number of events to return. The service may return
273251
// fewer than this value. If unspecified, at most 100 events will be returned.
252+
// These events are ordered by timestamp in ascending order.
274253
int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
275254

276255
// Optional. The
@@ -284,7 +263,8 @@ message ListEventsRequest {
284263
// Response message for
285264
// [SessionService.ListEvents][google.cloud.aiplatform.v1beta1.SessionService.ListEvents].
286265
message ListEventsResponse {
287-
// A list of events matching the request.
266+
// A list of events matching the request. Ordered by timestamp in ascending
267+
// order.
288268
repeated SessionEvent session_events = 1;
289269

290270
// A token, which can be sent as

0 commit comments

Comments
 (0)