|
| 1 | +// Copyright 2025 Google LLC |
| 2 | +// |
| 3 | +// Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +// you may not use this file except in compliance with the License. |
| 5 | +// You may obtain a copy of the License at |
| 6 | +// |
| 7 | +// http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +// |
| 9 | +// Unless required by applicable law or agreed to in writing, software |
| 10 | +// distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +// See the License for the specific language governing permissions and |
| 13 | +// limitations under the License. |
| 14 | + |
| 15 | +syntax = "proto3"; |
| 16 | + |
| 17 | +package google.cloud.aiplatform.v1beta1; |
| 18 | + |
| 19 | +import "google/api/field_behavior.proto"; |
| 20 | +import "google/api/resource.proto"; |
| 21 | +import "google/cloud/aiplatform/v1beta1/content.proto"; |
| 22 | +import "google/cloud/aiplatform/v1beta1/example.proto"; |
| 23 | +import "google/protobuf/timestamp.proto"; |
| 24 | + |
| 25 | +option csharp_namespace = "Google.Cloud.AIPlatform.V1Beta1"; |
| 26 | +option go_package = "cloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb;aiplatformpb"; |
| 27 | +option java_multiple_files = true; |
| 28 | +option java_outer_classname = "ExampleStoreProto"; |
| 29 | +option java_package = "com.google.cloud.aiplatform.v1beta1"; |
| 30 | +option php_namespace = "Google\\Cloud\\AIPlatform\\V1beta1"; |
| 31 | +option ruby_package = "Google::Cloud::AIPlatform::V1beta1"; |
| 32 | + |
| 33 | +// Represents an executable service to manage and retrieve examples. |
| 34 | +message ExampleStore { |
| 35 | + option (google.api.resource) = { |
| 36 | + type: "aiplatform.googleapis.com/ExampleStore" |
| 37 | + pattern: "projects/{project}/locations/{location}/exampleStores/{example_store}" |
| 38 | + plural: "exampleStores" |
| 39 | + singular: "exampleStore" |
| 40 | + }; |
| 41 | + |
| 42 | + // Identifier. The resource name of the ExampleStore. This is a unique |
| 43 | + // identifier. Format: |
| 44 | + // projects/{project}/locations/{location}/exampleStores/{example_store} |
| 45 | + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; |
| 46 | + |
| 47 | + // Required. Display name of the ExampleStore. |
| 48 | + string display_name = 2 [(google.api.field_behavior) = REQUIRED]; |
| 49 | + |
| 50 | + // Optional. Description of the ExampleStore. |
| 51 | + string description = 3 [(google.api.field_behavior) = OPTIONAL]; |
| 52 | + |
| 53 | + // Output only. Timestamp when this ExampleStore was created. |
| 54 | + google.protobuf.Timestamp create_time = 4 |
| 55 | + [(google.api.field_behavior) = OUTPUT_ONLY]; |
| 56 | + |
| 57 | + // Output only. Timestamp when this ExampleStore was most recently updated. |
| 58 | + google.protobuf.Timestamp update_time = 5 |
| 59 | + [(google.api.field_behavior) = OUTPUT_ONLY]; |
| 60 | + |
| 61 | + // Required. Example Store config. |
| 62 | + ExampleStoreConfig example_store_config = 6 |
| 63 | + [(google.api.field_behavior) = REQUIRED]; |
| 64 | +} |
| 65 | + |
| 66 | +// Configuration for the Example Store. |
| 67 | +message ExampleStoreConfig { |
| 68 | + // Required. The embedding model to be used for vector embedding. |
| 69 | + // Immutable. |
| 70 | + // Supported models: |
| 71 | + // * "textembedding-gecko@003" |
| 72 | + // * "text-embedding-004" |
| 73 | + // * "text-embedding-005" |
| 74 | + // * "text-multilingual-embedding-002" |
| 75 | + string vertex_embedding_model = 1 [(google.api.field_behavior) = REQUIRED]; |
| 76 | +} |
| 77 | + |
| 78 | +// The metadata filters that will be used to remove or fetch |
| 79 | +// StoredContentsExamples. If a field is unspecified, then no filtering for that |
| 80 | +// field will be applied. |
| 81 | +message StoredContentsExampleFilter { |
| 82 | + // Optional. The search keys for filtering. Only examples with one of the |
| 83 | + // specified search keys |
| 84 | + // ([StoredContentsExample.search_key][google.cloud.aiplatform.v1beta1.StoredContentsExample.search_key]) |
| 85 | + // are eligible to be returned. |
| 86 | + repeated string search_keys = 1 [(google.api.field_behavior) = OPTIONAL]; |
| 87 | + |
| 88 | + // Optional. The function names for filtering. |
| 89 | + ExamplesArrayFilter function_names = 2 |
| 90 | + [(google.api.field_behavior) = OPTIONAL]; |
| 91 | +} |
| 92 | + |
| 93 | +// The metadata filters that will be used to search StoredContentsExamples. |
| 94 | +// If a field is unspecified, then no filtering for that field will be applied |
| 95 | +message StoredContentsExampleParameters { |
| 96 | + // The chat history to use to generate the search key for retrieval. |
| 97 | + message ContentSearchKey { |
| 98 | + // Required. The conversation for generating a search key. |
| 99 | + repeated Content contents = 1 [(google.api.field_behavior) = REQUIRED]; |
| 100 | + |
| 101 | + // Required. The method of generating a search key. |
| 102 | + StoredContentsExample.SearchKeyGenerationMethod |
| 103 | + search_key_generation_method = 2 |
| 104 | + [(google.api.field_behavior) = REQUIRED]; |
| 105 | + } |
| 106 | + |
| 107 | + // The query to use to retrieve similar StoredContentsExamples. |
| 108 | + oneof query { |
| 109 | + // The exact search key to use for retrieval. |
| 110 | + string search_key = 1; |
| 111 | + |
| 112 | + // The chat history to use to generate the search key for retrieval. |
| 113 | + ContentSearchKey content_search_key = 2; |
| 114 | + } |
| 115 | + |
| 116 | + // Optional. The function names for filtering. |
| 117 | + ExamplesArrayFilter function_names = 3 |
| 118 | + [(google.api.field_behavior) = OPTIONAL]; |
| 119 | +} |
| 120 | + |
| 121 | +// Filters for examples' array metadata fields. An array field is example |
| 122 | +// metadata where multiple values are attributed to a single example. |
| 123 | +message ExamplesArrayFilter { |
| 124 | + // The logic to use for filtering. |
| 125 | + enum ArrayOperator { |
| 126 | + // Not specified. This value should not be used. |
| 127 | + ARRAY_OPERATOR_UNSPECIFIED = 0; |
| 128 | + |
| 129 | + // The metadata array field in the example must contain at least one of the |
| 130 | + // values. |
| 131 | + CONTAINS_ANY = 1; |
| 132 | + |
| 133 | + // The metadata array field in the example must contain all of the values. |
| 134 | + CONTAINS_ALL = 2; |
| 135 | + } |
| 136 | + |
| 137 | + // Required. The values by which to filter examples. |
| 138 | + repeated string values = 1 [(google.api.field_behavior) = REQUIRED]; |
| 139 | + |
| 140 | + // Required. The operator logic to use for filtering. |
| 141 | + ArrayOperator array_operator = 2 [(google.api.field_behavior) = REQUIRED]; |
| 142 | +} |
0 commit comments