diff --git a/google/cloud/aiplatform/v1beta1/BUILD.bazel b/google/cloud/aiplatform/v1beta1/BUILD.bazel index bce74322b9477..df46571c1ab6c 100644 --- a/google/cloud/aiplatform/v1beta1/BUILD.bazel +++ b/google/cloud/aiplatform/v1beta1/BUILD.bazel @@ -99,6 +99,9 @@ proto_library( "pipeline_state.proto", "prediction_service.proto", "publisher_model.proto", + "reasoning_engine.proto", + "reasoning_engine_execution_service.proto", + "reasoning_engine_service.proto", "saved_query.proto", "schedule.proto", "schedule_service.proto", diff --git a/google/cloud/aiplatform/v1beta1/aiplatform_v1beta1.yaml b/google/cloud/aiplatform/v1beta1/aiplatform_v1beta1.yaml index 918a736d0d86e..218f639d70d8c 100644 --- a/google/cloud/aiplatform/v1beta1/aiplatform_v1beta1.yaml +++ b/google/cloud/aiplatform/v1beta1/aiplatform_v1beta1.yaml @@ -24,6 +24,8 @@ apis: - name: google.cloud.aiplatform.v1beta1.PersistentResourceService - name: google.cloud.aiplatform.v1beta1.PipelineService - name: google.cloud.aiplatform.v1beta1.PredictionService +- name: google.cloud.aiplatform.v1beta1.ReasoningEngineExecutionService +- name: google.cloud.aiplatform.v1beta1.ReasoningEngineService - name: google.cloud.aiplatform.v1beta1.ScheduleService - name: google.cloud.aiplatform.v1beta1.SpecialistPoolService - name: google.cloud.aiplatform.v1beta1.TensorboardService @@ -796,6 +798,14 @@ authentication: oauth: canonical_scopes: |- https://www.googleapis.com/auth/cloud-platform + - selector: google.cloud.aiplatform.v1beta1.ReasoningEngineExecutionService.QueryReasoningEngine + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform + - selector: 'google.cloud.aiplatform.v1beta1.ReasoningEngineService.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform - selector: 'google.cloud.aiplatform.v1beta1.ScheduleService.*' oauth: canonical_scopes: |- diff --git a/google/cloud/aiplatform/v1beta1/reasoning_engine.proto b/google/cloud/aiplatform/v1beta1/reasoning_engine.proto new file mode 100644 index 0000000000000..38e65b3511e44 --- /dev/null +++ b/google/cloud/aiplatform/v1beta1/reasoning_engine.proto @@ -0,0 +1,91 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.aiplatform.v1beta1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/struct.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.AIPlatform.V1Beta1"; +option go_package = "cloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb;aiplatformpb"; +option java_multiple_files = true; +option java_outer_classname = "ReasoningEngineProto"; +option java_package = "com.google.cloud.aiplatform.v1beta1"; +option php_namespace = "Google\\Cloud\\AIPlatform\\V1beta1"; +option ruby_package = "Google::Cloud::AIPlatform::V1beta1"; + +// ReasoningEngine configurations +message ReasoningEngineSpec { + // User provided package spec like pickled object and package requirements. + message PackageSpec { + // Optional. The Cloud Storage URI of the pickled python object. + string pickle_object_gcs_uri = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The Cloud Storage URI of the dependency files in tar.gz format. + string dependency_files_gcs_uri = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The Cloud Storage URI of the `requirements.txt` file + string requirements_gcs_uri = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The Python version. Currently support 3.8, 3.9, 3.10, 3.11. + // If not specified, default value is 3.10. + string python_version = 4 [(google.api.field_behavior) = OPTIONAL]; + } + + // Required. User provided package spec of the ReasoningEngine. + PackageSpec package_spec = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Declarations for object class methods. + repeated google.protobuf.Struct class_methods = 3 + [(google.api.field_behavior) = OPTIONAL]; +} + +// ReasoningEngine provides customized orchestration over extensions and tools. +message ReasoningEngine { + option (google.api.resource) = { + type: "aiplatform.googleapis.com/ReasoningEngine" + pattern: "projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}" + plural: "reasoningEngines" + singular: "reasoningEngine" + }; + + // Identifier. The resource name of the ReasoningEngine. + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Required. The display name of the ReasoningEngine. + string display_name = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The description of the ReasoningEngine. + string description = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Configurations of the ReasoningEngine + ReasoningEngineSpec spec = 3 [(google.api.field_behavior) = REQUIRED]; + + // Output only. Timestamp when this ReasoningEngine was created. + google.protobuf.Timestamp create_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Timestamp when this ReasoningEngine was most recently updated. + google.protobuf.Timestamp update_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Used to perform consistent read-modify-write updates. If not set, + // a blind "overwrite" update happens. + string etag = 6 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/google/cloud/aiplatform/v1beta1/reasoning_engine_execution_service.proto b/google/cloud/aiplatform/v1beta1/reasoning_engine_execution_service.proto new file mode 100644 index 0000000000000..a8768176f0edf --- /dev/null +++ b/google/cloud/aiplatform/v1beta1/reasoning_engine_execution_service.proto @@ -0,0 +1,70 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.aiplatform.v1beta1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/struct.proto"; + +option csharp_namespace = "Google.Cloud.AIPlatform.V1Beta1"; +option go_package = "cloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb;aiplatformpb"; +option java_multiple_files = true; +option java_outer_classname = "ReasoningEngineExecutionServiceProto"; +option java_package = "com.google.cloud.aiplatform.v1beta1"; +option php_namespace = "Google\\Cloud\\AIPlatform\\V1beta1"; +option ruby_package = "Google::Cloud::AIPlatform::V1beta1"; + +// A service for executing queries on Reasoning Engine. +service ReasoningEngineExecutionService { + option (google.api.default_host) = "aiplatform.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Queries using a reasoning engine. + rpc QueryReasoningEngine(QueryReasoningEngineRequest) + returns (QueryReasoningEngineResponse) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/*/reasoningEngines/*}:query" + body: "*" + }; + } +} + +// Request message for [ReasoningEngineExecutionService.Query][]. +message QueryReasoningEngineRequest { + // Required. The name of the ReasoningEngine resource to use. + // Format: + // `projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/ReasoningEngine" + } + ]; + + // Optional. Input content provided by users in JSON object format. Examples + // include text query, function calling parameters, media bytes, etc. + google.protobuf.Struct input = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for [ReasoningEngineExecutionService.Query][] +message QueryReasoningEngineResponse { + // Response provided by users in JSON object format. + google.protobuf.Value output = 1; +} diff --git a/google/cloud/aiplatform/v1beta1/reasoning_engine_service.proto b/google/cloud/aiplatform/v1beta1/reasoning_engine_service.proto new file mode 100644 index 0000000000000..a8538695c7dec --- /dev/null +++ b/google/cloud/aiplatform/v1beta1/reasoning_engine_service.proto @@ -0,0 +1,173 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.aiplatform.v1beta1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/aiplatform/v1beta1/operation.proto"; +import "google/cloud/aiplatform/v1beta1/reasoning_engine.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; + +option csharp_namespace = "Google.Cloud.AIPlatform.V1Beta1"; +option go_package = "cloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb;aiplatformpb"; +option java_multiple_files = true; +option java_outer_classname = "ReasoningEngineServiceProto"; +option java_package = "com.google.cloud.aiplatform.v1beta1"; +option php_namespace = "Google\\Cloud\\AIPlatform\\V1beta1"; +option ruby_package = "Google::Cloud::AIPlatform::V1beta1"; + +// A service for managing Vertex AI's Reasoning Engines. +service ReasoningEngineService { + option (google.api.default_host) = "aiplatform.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Creates a reasoning engine. + rpc CreateReasoningEngine(CreateReasoningEngineRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/locations/*}/reasoningEngines" + body: "reasoning_engine" + }; + option (google.api.method_signature) = "parent,reasoning_engine"; + option (google.longrunning.operation_info) = { + response_type: "ReasoningEngine" + metadata_type: "CreateReasoningEngineOperationMetadata" + }; + } + + // Gets a reasoning engine. + rpc GetReasoningEngine(GetReasoningEngineRequest) returns (ReasoningEngine) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/reasoningEngines/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists reasoning engines in a location. + rpc ListReasoningEngines(ListReasoningEnginesRequest) + returns (ListReasoningEnginesResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/locations/*}/reasoningEngines" + }; + option (google.api.method_signature) = "parent"; + } + + // Deletes a reasoning engine. + rpc DeleteReasoningEngine(DeleteReasoningEngineRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1beta1/{name=projects/*/locations/*/reasoningEngines/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "DeleteOperationMetadata" + }; + } +} + +// Request message for +// [ReasoningEngineService.CreateReasoningEngine][google.cloud.aiplatform.v1beta1.ReasoningEngineService.CreateReasoningEngine]. +message CreateReasoningEngineRequest { + // Required. The resource name of the Location to create the ReasoningEngine + // in. Format: `projects/{project}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. The ReasoningEngine to create. + ReasoningEngine reasoning_engine = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Details of +// [ReasoningEngineService.CreateReasoningEngine][google.cloud.aiplatform.v1beta1.ReasoningEngineService.CreateReasoningEngine] +// operation. +message CreateReasoningEngineOperationMetadata { + // The common part of the operation metadata. + GenericOperationMetadata generic_metadata = 1; +} + +// Request message for +// [ReasoningEngineService.GetReasoningEngine][google.cloud.aiplatform.v1beta1.ReasoningEngineService.GetReasoningEngine]. +message GetReasoningEngineRequest { + // Required. The name of the ReasoningEngine resource. + // Format: + // `projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/ReasoningEngine" + } + ]; +} + +// Request message for +// [ReasoningEngineService.ListReasoningEngines][google.cloud.aiplatform.v1beta1.ReasoningEngineService.ListReasoningEngines]. +message ListReasoningEnginesRequest { + // Required. The resource name of the Location to list the ReasoningEngines + // from. Format: `projects/{project}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Optional. The standard list filter. + // More detail in [AIP-160](https://google.aip.dev/160). + string filter = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The standard list page size. + int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The standard list page token. + string page_token = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for +// [ReasoningEngineService.ListReasoningEngines][google.cloud.aiplatform.v1beta1.ReasoningEngineService.ListReasoningEngines] +message ListReasoningEnginesResponse { + // List of ReasoningEngines in the requested page. + repeated ReasoningEngine reasoning_engines = 1; + + // A token to retrieve the next page of results. + // Pass to + // [ListReasoningEnginesRequest.page_token][google.cloud.aiplatform.v1beta1.ListReasoningEnginesRequest.page_token] + // to obtain that page. + string next_page_token = 2; +} + +// Request message for +// [ReasoningEngineService.DeleteReasoningEngine][google.cloud.aiplatform.v1beta1.ReasoningEngineService.DeleteReasoningEngine]. +message DeleteReasoningEngineRequest { + // Required. The name of the ReasoningEngine resource to be deleted. + // Format: + // `projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/ReasoningEngine" + } + ]; +}