Skip to content

Commit

Permalink
feat: add MALFORMED_FUNCTION_CALL to FinishReason (#5481)
Browse files Browse the repository at this point in the history
* feat: add enum value MALFORMED_FUNCTION_CALL to `.google.cloud.aiplatform.v1beta1.content.Candidate.FinishReason`
feat: add text field in Segment
feat: add streamRawPredict rpc to prediction service
feat: add fields grounding_chunks and grounding_supports to GroundingMetadata
docs: A comment for field `name` in message `.google.cloud.aiplatform.v1beta1.cached_content.CachedContent` is changed
docs: A comment for field `distibution` in message `.google.cloud.aiplatform.v1beta1.model_monitoring_stats.ModelMonitoringStatsDataPoint` is changed.
docs: A comment for field `source` in message `.google.cloud.aiplatform.v1beta1.tool.Retrieval` is added.

PiperOrigin-RevId: 643377787

Source-Link: googleapis/googleapis@3133550

Source-Link: googleapis/googleapis-gen@34572b5
Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWFpcGxhdGZvcm0vLk93bEJvdC55YW1sIiwiaCI6IjM0NTcyYjU3OGU5OGIzNTRlN2RiOTg0ZTk0ZmU3M2JlMTNhYzk2OTIifQ==

* feat: add MALFORMED_FUNCTION_CALL to FinishReason
feat: add preflight_validations to PipelineJob
feat: add encryption_spec to TuningJob

PiperOrigin-RevId: 643389856

Source-Link: googleapis/googleapis@f20b8a2

Source-Link: googleapis/googleapis-gen@b6345d1
Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWFpcGxhdGZvcm0vLk93bEJvdC55YW1sIiwiaCI6ImI2MzQ1ZDFhZjQ3ZmRmOTczNWZlOGUxOGJiNGM5MGZkY2Y4MzA4NzgifQ==

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: sofisl <[email protected]>
  • Loading branch information
3 people authored Jun 26, 2024
1 parent e0f0fd2 commit 83498e9
Show file tree
Hide file tree
Showing 39 changed files with 4,788 additions and 261 deletions.
1 change: 1 addition & 0 deletions packages/google-cloud-aiplatform/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -656,6 +656,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/
| Prediction_service.stream_direct_predict | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/prediction_service.stream_direct_predict.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/prediction_service.stream_direct_predict.js,packages/google-cloud-aiplatform/samples/README.md) |
| Prediction_service.stream_direct_raw_predict | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/prediction_service.stream_direct_raw_predict.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/prediction_service.stream_direct_raw_predict.js,packages/google-cloud-aiplatform/samples/README.md) |
| Prediction_service.stream_generate_content | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/prediction_service.stream_generate_content.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/prediction_service.stream_generate_content.js,packages/google-cloud-aiplatform/samples/README.md) |
| Prediction_service.stream_raw_predict | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/prediction_service.stream_raw_predict.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/prediction_service.stream_raw_predict.js,packages/google-cloud-aiplatform/samples/README.md) |
| Prediction_service.streaming_predict | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/prediction_service.streaming_predict.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/prediction_service.streaming_predict.js,packages/google-cloud-aiplatform/samples/README.md) |
| Prediction_service.streaming_raw_predict | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/prediction_service.streaming_raw_predict.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/prediction_service.streaming_raw_predict.js,packages/google-cloud-aiplatform/samples/README.md) |
| Reasoning_engine_execution_service.query_reasoning_engine | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/reasoning_engine_execution_service.query_reasoning_engine.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/reasoning_engine_execution_service.query_reasoning_engine.js,packages/google-cloud-aiplatform/samples/README.md) |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,9 @@ message Candidate {
// The token generation was stopped as the response was flagged for
// Sensitive Personally Identifiable Information (SPII) contents.
SPII = 8;

// The function call generated by the model is invalid.
MALFORMED_FUNCTION_CALL = 9;
}

// Output only. Index of the candidate.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,9 @@ message PipelineJob {
// Output only. The schedule resource name.
// Only returned if the Pipeline is created by Schedule API.
string schedule_name = 22 [(google.api.field_behavior) = OUTPUT_ONLY];

// Optional. Whether to do component level validations before job creation.
bool preflight_validations = 26 [(google.api.field_behavior) = OPTIONAL];
}

// Pipeline template metadata if
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,6 @@ service PredictionService {
option (google.api.http) = {
post: "/v1/{endpoint=projects/*/locations/*/endpoints/*}:directPredict"
body: "*"
additional_bindings {
post: "/v1/{endpoint=projects/*/locations/*/publishers/*/models/*}:directPredict"
body: "*"
}
};
}

Expand All @@ -112,40 +108,18 @@ service PredictionService {
option (google.api.http) = {
post: "/v1/{endpoint=projects/*/locations/*/endpoints/*}:directRawPredict"
body: "*"
additional_bindings {
post: "/v1/{endpoint=projects/*/locations/*/publishers/*/models/*}:directRawPredict"
body: "*"
}
};
}

// Perform a streaming online prediction request to a gRPC model server for
// Vertex first-party products and frameworks.
rpc StreamDirectPredict(stream StreamDirectPredictRequest)
returns (stream StreamDirectPredictResponse) {
option (google.api.http) = {
post: "/v1/{endpoint=projects/*/locations/*/endpoints/*}:streamDirectPredict"
body: "*"
additional_bindings {
post: "/v1/{endpoint=projects/*/locations/*/publishers/*/models/*}:streamDirectPredict"
body: "*"
}
};
}
returns (stream StreamDirectPredictResponse) {}

// Perform a streaming online prediction request to a gRPC model server for
// custom containers.
rpc StreamDirectRawPredict(stream StreamDirectRawPredictRequest)
returns (stream StreamDirectRawPredictResponse) {
option (google.api.http) = {
post: "/v1/{endpoint=projects/*/locations/*/endpoints/*}:streamDirectRawPredict"
body: "*"
additional_bindings {
post: "/v1/{endpoint=projects/*/locations/*/publishers/*/models/*}:streamDirectRawPredict"
body: "*"
}
};
}
returns (stream StreamDirectRawPredictResponse) {}

// Perform a streaming online prediction request for Vertex first-party
// products and frameworks.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package google.cloud.aiplatform.v1;
import "google/api/field_behavior.proto";
import "google/api/resource.proto";
import "google/cloud/aiplatform/v1/content.proto";
import "google/cloud/aiplatform/v1/encryption_spec.proto";
import "google/cloud/aiplatform/v1/job_state.proto";
import "google/protobuf/timestamp.proto";
import "google/rpc/status.proto";
Expand Down Expand Up @@ -125,6 +126,11 @@ message TuningJob {
// [TuningJob][google.cloud.aiplatform.v1.TuningJob].
TuningDataStats tuning_data_stats = 15
[(google.api.field_behavior) = OUTPUT_ONLY];

// Customer-managed encryption key options for a TuningJob. If this is set,
// then all resources created by the TuningJob will be encrypted with the
// provided encryption key.
EncryptionSpec encryption_spec = 16;
}

// The Model Registry Model and Online Prediction Endpoint assiociated with
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ message CachedContent {
[(google.api.field_behavior) = INPUT_ONLY];
}

// Immutable. Identifier. The resource name of the cached content
// Format:
// Immutable. Identifier. The server-generated resource name of the cached
// content Format:
// projects/{project}/locations/{location}/cachedContents/{cached_content}
string name = 1 [
(google.api.field_behavior) = IDENTIFIER,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,9 @@ message Candidate {
// The token generation was stopped as the response was flagged for
// Sensitive Personally Identifiable Information (SPII) contents.
SPII = 8;

// The function call generated by the model is invalid.
MALFORMED_FUNCTION_CALL = 9;
}

// Output only. Index of the candidate.
Expand Down Expand Up @@ -390,6 +393,56 @@ message Segment {
// Output only. End index in the given Part, measured in bytes. Offset from
// the start of the Part, exclusive, starting at zero.
int32 end_index = 3 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. The text corresponding to the segment from the response.
string text = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
}

// Grounding chunk.
message GroundingChunk {
// Chunk from the web.
message Web {
// URI reference of the chunk.
optional string uri = 1;

// Title of the chunk.
optional string title = 2;
}

// Chunk from context retrieved by the retrieval tools.
message RetrievedContext {
// URI reference of the attribution.
optional string uri = 1;

// Title of the attribution.
optional string title = 2;
}

// Chunk type.
oneof chunk_type {
// Grounding chunk from the web.
Web web = 1;

// Grounding chunk from context retrieved by the retrieval tools.
RetrievedContext retrieved_context = 2;
}
}

// Grounding support.
message GroundingSupport {
// Segment of the content this support belongs to.
optional Segment segment = 1;

// A list of indices (into 'grounding_chunk') specifying the
// citations associated with the claim. For instance [1,3,4] means
// that grounding_chunk[1], grounding_chunk[3],
// grounding_chunk[4] are the retrieved content attributed to the claim.
repeated int32 grounding_chunk_indices = 2;

// Confidence score of the support references. Ranges from 0 to 1. 1 is the
// most confident. This list must have the same size as the
// grounding_chunk_indices.
repeated float confidence_scores = 3;
}

// Grounding attribution.
Expand Down Expand Up @@ -449,6 +502,13 @@ message GroundingMetadata {
// Optional. List of grounding attributions.
repeated GroundingAttribution grounding_attributions = 2
[(google.api.field_behavior) = OPTIONAL];

// List of supporting references retrieved from specified grounding source.
repeated GroundingChunk grounding_chunks = 5;

// Optional. List of grounding support.
repeated GroundingSupport grounding_supports = 6
[(google.api.field_behavior) = OPTIONAL];
}

// Google search entry point.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ message ModelMonitoringStatsDataPoint {
message TypedValue {
// Summary statistics for a population of values.
message DistributionDataValue {
// tensorflow.metadata.v0.DatasetFeatureStatistics format.
// Predictive monitoring drift distribution in
// `tensorflow.metadata.v0.DatasetFeatureStatistics` format.
google.protobuf.Value distribution = 1;

// Distribution distance deviation from the current dataset's statistics
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,20 @@ service PredictionService {
option (google.api.method_signature) = "endpoint,http_body";
}

// Perform a streaming online prediction with an arbitrary HTTP payload.
rpc StreamRawPredict(StreamRawPredictRequest)
returns (stream google.api.HttpBody) {
option (google.api.http) = {
post: "/v1beta1/{endpoint=projects/*/locations/*/endpoints/*}:streamRawPredict"
body: "*"
additional_bindings {
post: "/v1beta1/{endpoint=projects/*/locations/*/publishers/*/models/*}:streamRawPredict"
body: "*"
}
};
option (google.api.method_signature) = "endpoint,http_body";
}

// Perform an unary online prediction request to a gRPC model server for
// Vertex first-party products and frameworks.
rpc DirectPredict(DirectPredictRequest) returns (DirectPredictResponse) {
Expand Down Expand Up @@ -305,6 +319,23 @@ message RawPredictRequest {
google.api.HttpBody http_body = 2;
}

// Request message for
// [PredictionService.StreamRawPredict][google.cloud.aiplatform.v1beta1.PredictionService.StreamRawPredict].
message StreamRawPredictRequest {
// Required. The name of the Endpoint requested to serve the prediction.
// Format:
// `projects/{project}/locations/{location}/endpoints/{endpoint}`
string endpoint = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "aiplatform.googleapis.com/Endpoint"
}
];

// The prediction input. Supports HTTP headers and arbitrary data payload.
google.api.HttpBody http_body = 2;
}

// Request message for
// [PredictionService.DirectPredict][google.cloud.aiplatform.v1beta1.PredictionService.DirectPredict].
message DirectPredictRequest {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ message FunctionResponse {

// Defines a retrieval tool that model can call to access external knowledge.
message Retrieval {
// The source of the retrieval.
oneof source {
// Set to use data source powered by Vertex AI Search.
VertexAISearch vertex_ai_search = 2;
Expand Down
Loading

0 comments on commit 83498e9

Please sign in to comment.