Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add rag_embedding_model_config to RagCorpus #5430

Merged
merged 3 commits into from
Jun 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,48 @@ option java_package = "com.google.cloud.aiplatform.v1beta1";
option php_namespace = "Google\\Cloud\\AIPlatform\\V1beta1";
option ruby_package = "Google::Cloud::AIPlatform::V1beta1";

// Config for the embedding model to use for RAG.
message RagEmbeddingModelConfig {
// Config representing a model hosted on Vertex Prediction Endpoint.
message VertexPredictionEndpoint {
// Required. The endpoint resource name.
// Format:
// `projects/{project}/locations/{location}/publishers/{publisher}/models/{model}`
// or
// `projects/{project}/locations/{location}/endpoints/{endpoint}`
string endpoint = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "aiplatform.googleapis.com/Endpoint"
}
];

// Output only. The resource name of the model that is deployed on the
// endpoint. Present only when the endpoint is not a publisher model.
// Pattern:
// `projects/{project}/locations/{location}/models/{model}`
string model = 2 [
(google.api.field_behavior) = OUTPUT_ONLY,
(google.api.resource_reference) = {
type: "aiplatform.googleapis.com/Model"
}
];

// Output only. Version ID of the model that is deployed on the endpoint.
// Present only when the endpoint is not a publisher model.
string model_version_id = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
}

// The model config to use.
oneof model_config {
// The Vertex AI Prediction Endpoint that either refers to a publisher model
// or an endpoint that is hosting a 1P fine-tuned text embedding model.
// Endpoints hosting non-1P fine-tuned text embedding models are
// currently not supported.
VertexPredictionEndpoint vertex_prediction_endpoint = 1;
}
}

// A RagCorpus is a RagFile container and a project can have multiple
// RagCorpora.
message RagCorpus {
Expand All @@ -50,6 +92,12 @@ message RagCorpus {
// Optional. The description of the RagCorpus.
string description = 3 [(google.api.field_behavior) = OPTIONAL];

// Optional. Immutable. The embedding model config of the RagCorpus.
RagEmbeddingModelConfig rag_embedding_model_config = 6 [
(google.api.field_behavior) = OPTIONAL,
(google.api.field_behavior) = IMMUTABLE
];

// Output only. Timestamp when this RagCorpus was created.
google.protobuf.Timestamp create_time = 4
[(google.api.field_behavior) = OUTPUT_ONLY];
Expand Down Expand Up @@ -155,4 +203,12 @@ message ImportRagFilesConfig {

// Specifies the size and overlap of chunks after importing RagFiles.
RagFileChunkingConfig rag_file_chunking_config = 4;

// Optional. The max number of queries per minute that this job is allowed to
// make to the embedding model specified on the corpus. This value is specific
// to this job and not shared across other import jobs. Consult the Quotas
// page on the project to set an appropriate value here.
// If unspecified, a default value of 1,000 QPM would be used.
int32 max_embedding_requests_per_min = 5
[(google.api.field_behavior) = OPTIONAL];
}
224 changes: 224 additions & 0 deletions packages/google-cloud-aiplatform/protos/protos.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading