Skip to content

Commit d04f530

Browse files
Google APIscopybara-github
authored andcommitted
feat: add RagEngineConfig update/get APIs to v1
feat: add Unprovisioned tier to RagEngineConfig to disable RagEngine service and delete all data within the service. PiperOrigin-RevId: 772174333
1 parent 873d84e commit d04f530

2 files changed

Lines changed: 110 additions & 0 deletions

File tree

google/cloud/aiplatform/v1/vertex_rag_data.proto

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -513,3 +513,59 @@ message ImportRagFilesConfig {
513513
// Default is false, i.e., index is not rebuilt.
514514
bool rebuild_ann_index = 19;
515515
}
516+
517+
// Configuration message for RagManagedDb used by RagEngine.
518+
message RagManagedDbConfig {
519+
// Scaled tier offers production grade performance along with
520+
// autoscaling functionality. It is suitable for customers with large
521+
// amounts of data or performance sensitive workloads.
522+
message Scaled {}
523+
524+
// Basic tier is a cost-effective and low compute tier suitable for
525+
// the following cases:
526+
// * Experimenting with RagManagedDb.
527+
// * Small data size.
528+
// * Latency insensitive workload.
529+
// * Only using RAG Engine with external vector DBs.
530+
//
531+
// NOTE: This is the default tier if not explicitly chosen.
532+
message Basic {}
533+
534+
// Disables the RAG Engine service and deletes all your data held
535+
// within this service. This will halt the billing of the service.
536+
//
537+
// NOTE: Once deleted the data cannot be recovered. To start using
538+
// RAG Engine again, you will need to update the tier by calling the
539+
// UpdateRagEngineConfig API.
540+
message Unprovisioned {}
541+
542+
// The tier of the RagManagedDb.
543+
oneof tier {
544+
// Sets the RagManagedDb to the Scaled tier.
545+
Scaled scaled = 4;
546+
547+
// Sets the RagManagedDb to the Basic tier.
548+
Basic basic = 2;
549+
550+
// Sets the RagManagedDb to the Unprovisioned tier.
551+
Unprovisioned unprovisioned = 3;
552+
}
553+
}
554+
555+
// Config for RagEngine.
556+
message RagEngineConfig {
557+
option (google.api.resource) = {
558+
type: "aiplatform.googleapis.com/RagEngineConfig"
559+
pattern: "projects/{project}/locations/{location}/ragEngineConfig"
560+
plural: "ragEngineConfigs"
561+
singular: "ragEngineConfig"
562+
};
563+
564+
// Identifier. The name of the RagEngineConfig.
565+
// Format:
566+
// `projects/{project}/locations/{location}/ragEngineConfig`
567+
string name = 1 [(google.api.field_behavior) = IDENTIFIER];
568+
569+
// The config of the RagManagedDb used by RagEngine.
570+
RagManagedDbConfig rag_managed_db_config = 2;
571+
}

google/cloud/aiplatform/v1/vertex_rag_data_service.proto

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,28 @@ service VertexRagDataService {
149149
metadata_type: "DeleteOperationMetadata"
150150
};
151151
}
152+
153+
// Updates a RagEngineConfig.
154+
rpc UpdateRagEngineConfig(UpdateRagEngineConfigRequest)
155+
returns (google.longrunning.Operation) {
156+
option (google.api.http) = {
157+
patch: "/v1/{rag_engine_config.name=projects/*/locations/*/ragEngineConfig}"
158+
body: "rag_engine_config"
159+
};
160+
option (google.api.method_signature) = "rag_engine_config";
161+
option (google.longrunning.operation_info) = {
162+
response_type: "RagEngineConfig"
163+
metadata_type: "UpdateRagEngineConfigOperationMetadata"
164+
};
165+
}
166+
167+
// Gets a RagEngineConfig.
168+
rpc GetRagEngineConfig(GetRagEngineConfigRequest) returns (RagEngineConfig) {
169+
option (google.api.http) = {
170+
get: "/v1/{name=projects/*/locations/*/ragEngineConfig}"
171+
};
172+
option (google.api.method_signature) = "name";
173+
}
152174
}
153175

154176
// Request message for
@@ -388,6 +410,20 @@ message CreateRagCorpusOperationMetadata {
388410
GenericOperationMetadata generic_metadata = 1;
389411
}
390412

413+
// Request message for
414+
// [VertexRagDataService.GetRagEngineConfig][google.cloud.aiplatform.v1.VertexRagDataService.GetRagEngineConfig]
415+
message GetRagEngineConfigRequest {
416+
// Required. The name of the RagEngineConfig resource.
417+
// Format:
418+
// `projects/{project}/locations/{location}/ragEngineConfig`
419+
string name = 1 [
420+
(google.api.field_behavior) = REQUIRED,
421+
(google.api.resource_reference) = {
422+
type: "aiplatform.googleapis.com/RagEngineConfig"
423+
}
424+
];
425+
}
426+
391427
// Request message for
392428
// [VertexRagDataService.UpdateRagCorpus][google.cloud.aiplatform.v1.VertexRagDataService.UpdateRagCorpus].
393429
message UpdateRagCorpusRequest {
@@ -420,3 +456,21 @@ message ImportRagFilesOperationMetadata {
420456
// progress_percentage = 100 * (successes + failures + skips) / total
421457
int32 progress_percentage = 4;
422458
}
459+
460+
// Request message for
461+
// [VertexRagDataService.UpdateRagEngineConfig][google.cloud.aiplatform.v1.VertexRagDataService.UpdateRagEngineConfig].
462+
message UpdateRagEngineConfigRequest {
463+
// Required. The updated RagEngineConfig.
464+
//
465+
// NOTE: Downgrading your RagManagedDb's ComputeTier could temporarily
466+
// increase request latencies until the operation is fully complete.
467+
RagEngineConfig rag_engine_config = 1
468+
[(google.api.field_behavior) = REQUIRED];
469+
}
470+
471+
// Runtime operation information for
472+
// [VertexRagDataService.UpdateRagEngineConfig][google.cloud.aiplatform.v1.VertexRagDataService.UpdateRagEngineConfig].
473+
message UpdateRagEngineConfigOperationMetadata {
474+
// The operation generic information.
475+
GenericOperationMetadata generic_metadata = 1;
476+
}

0 commit comments

Comments
 (0)