Skip to content

Commit 3b446a9

Browse files
Google APIscopybara-github
authored andcommitted
feat: add Gen AI logging public preview API
PiperOrigin-RevId: 743220774
1 parent 4fdff74 commit 3b446a9

2 files changed

Lines changed: 78 additions & 0 deletions

File tree

google/cloud/aiplatform/v1beta1/endpoint.proto

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,23 @@ message PredictRequestResponseLoggingConfig {
359359
// most special characters will become underscores). If no table name is
360360
// given, a new table will be created with name `request_response_logging`
361361
BigQueryDestination bigquery_destination = 3;
362+
363+
// Output only. The schema version used in creating the BigQuery table for the
364+
// request response logging. The versions are "v1" and "v2". The current
365+
// default version is "v1".
366+
string request_response_logging_schema_version = 4
367+
[(google.api.field_behavior) = OUTPUT_ONLY];
368+
369+
// This field is used for large models. If true, in addition to the
370+
// original large model logs, logs will be converted in OTel schema format,
371+
// and saved in otel_log column. Default value is false.
372+
bool enable_otel_logging = 6;
373+
}
374+
375+
// This message contains configs of a publisher model.
376+
message PublisherModelConfig {
377+
// The prediction request/response logging config.
378+
PredictRequestResponseLoggingConfig logging_config = 3;
362379
}
363380

364381
// Configurations (e.g. inference timeout) that are applied on your endpoints.

google/cloud/aiplatform/v1beta1/endpoint_service.proto

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,30 @@ service EndpointService {
154154
metadata_type: "MutateDeployedModelOperationMetadata"
155155
};
156156
}
157+
158+
// Sets (creates or updates) configs of publisher models. For example, sets
159+
// the request/response logging config.
160+
rpc SetPublisherModelConfig(SetPublisherModelConfigRequest)
161+
returns (google.longrunning.Operation) {
162+
option (google.api.http) = {
163+
post: "/v1beta1/{name=projects/*/locations/*/publishers/*/models/*}:setPublisherModelConfig"
164+
body: "*"
165+
};
166+
option (google.api.method_signature) = "name,publisher_model_config";
167+
option (google.longrunning.operation_info) = {
168+
response_type: "PublisherModelConfig"
169+
metadata_type: "SetPublisherModelConfigOperationMetadata"
170+
};
171+
}
172+
173+
// Fetches the configs of publisher models.
174+
rpc FetchPublisherModelConfig(FetchPublisherModelConfigRequest)
175+
returns (PublisherModelConfig) {
176+
option (google.api.http) = {
177+
get: "/v1beta1/{name=projects/*/locations/*/publishers/*/models/*}:fetchPublisherModelConfig"
178+
};
179+
option (google.api.method_signature) = "name";
180+
}
157181
}
158182

159183
// Request message for
@@ -393,6 +417,43 @@ message UndeployModelRequest {
393417
// [EndpointService.UndeployModel][google.cloud.aiplatform.v1beta1.EndpointService.UndeployModel].
394418
message UndeployModelResponse {}
395419

420+
// Request message for
421+
// [EndpointService.SetPublisherModelConfig][google.cloud.aiplatform.v1beta1.EndpointService.SetPublisherModelConfig].
422+
message SetPublisherModelConfigRequest {
423+
// Required. The name of the publisher model, in the format of
424+
// `projects/{project}/locations/{location}/publishers/{publisher}/models/{model}`.
425+
string name = 1 [
426+
(google.api.field_behavior) = REQUIRED,
427+
(google.api.resource_reference) = {
428+
type: "aiplatform.googleapis.com/Endpoint"
429+
}
430+
];
431+
432+
// Required. The publisher model config.
433+
PublisherModelConfig publisher_model_config = 2
434+
[(google.api.field_behavior) = REQUIRED];
435+
}
436+
437+
// Runtime operation information for
438+
// [EndpointService.SetPublisherModelConfig][google.cloud.aiplatform.v1beta1.EndpointService.SetPublisherModelConfig].
439+
message SetPublisherModelConfigOperationMetadata {
440+
// The operation generic information.
441+
GenericOperationMetadata generic_metadata = 1;
442+
}
443+
444+
// Request message for
445+
// [EndpointService.FetchPublisherModelConfig][google.cloud.aiplatform.v1beta1.EndpointService.FetchPublisherModelConfig].
446+
message FetchPublisherModelConfigRequest {
447+
// Required. The name of the publisher model, in the format of
448+
// `projects/{project}/locations/{location}/publishers/{publisher}/models/{model}`.
449+
string name = 1 [
450+
(google.api.field_behavior) = REQUIRED,
451+
(google.api.resource_reference) = {
452+
type: "aiplatform.googleapis.com/Endpoint"
453+
}
454+
];
455+
}
456+
396457
// Runtime operation information for
397458
// [EndpointService.UndeployModel][google.cloud.aiplatform.v1beta1.EndpointService.UndeployModel].
398459
message UndeployModelOperationMetadata {

0 commit comments

Comments
 (0)