@google-cloud/vectorsearch 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -0
- package/build/protos/google/cloud/vectorsearch/v1/common.proto +37 -0
- package/build/protos/google/cloud/vectorsearch/v1/data_object.proto +95 -0
- package/build/protos/google/cloud/vectorsearch/v1/data_object_search_service.proto +449 -0
- package/build/protos/google/cloud/vectorsearch/v1/data_object_service.proto +242 -0
- package/build/protos/google/cloud/vectorsearch/v1/embedding_config.proto +74 -0
- package/build/protos/google/cloud/vectorsearch/v1/vectorsearch_service.proto +707 -0
- package/build/protos/protos.d.ts +7118 -0
- package/build/protos/protos.js +17345 -0
- package/build/protos/protos.json +2110 -0
- package/build/src/index.d.ts +12 -10
- package/build/src/index.js +7 -5
- package/build/src/index.js.map +1 -1
- package/build/src/v1/data_object_search_service_client.d.ts +583 -0
- package/build/src/v1/data_object_search_service_client.js +855 -0
- package/build/src/v1/data_object_search_service_client.js.map +1 -0
- package/build/src/v1/data_object_search_service_client_config.json +58 -0
- package/build/src/v1/data_object_search_service_proto_list.json +8 -0
- package/build/src/v1/data_object_service_client.d.ts +490 -0
- package/build/src/v1/data_object_service_client.js +767 -0
- package/build/src/v1/data_object_service_client.js.map +1 -0
- package/build/src/v1/data_object_service_client_config.json +73 -0
- package/build/src/v1/data_object_service_proto_list.json +8 -0
- package/build/src/v1/gapic_metadata.json +277 -0
- package/build/src/v1/index.d.ts +3 -0
- package/build/src/v1/index.js +27 -0
- package/build/src/v1/index.js.map +1 -0
- package/build/src/v1/vector_search_service_client.d.ts +1021 -0
- package/build/src/v1/vector_search_service_client.js +1387 -0
- package/build/src/v1/vector_search_service_client.js.map +1 -0
- package/build/src/v1/vector_search_service_client_config.json +88 -0
- package/build/src/v1/vector_search_service_proto_list.json +8 -0
- package/package.json +1 -1
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
// Copyright 2026 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.vectorsearch.v1;
|
|
18
|
+
|
|
19
|
+
import "google/api/annotations.proto";
|
|
20
|
+
import "google/api/client.proto";
|
|
21
|
+
import "google/api/field_behavior.proto";
|
|
22
|
+
import "google/api/resource.proto";
|
|
23
|
+
import "google/cloud/vectorsearch/v1/data_object.proto";
|
|
24
|
+
import "google/protobuf/empty.proto";
|
|
25
|
+
import "google/protobuf/field_mask.proto";
|
|
26
|
+
|
|
27
|
+
option csharp_namespace = "Google.Cloud.VectorSearch.V1";
|
|
28
|
+
option go_package = "cloud.google.com/go/vectorsearch/apiv1/vectorsearchpb;vectorsearchpb";
|
|
29
|
+
option java_multiple_files = true;
|
|
30
|
+
option java_outer_classname = "DataObjectServiceProto";
|
|
31
|
+
option java_package = "com.google.cloud.vectorsearch.v1";
|
|
32
|
+
option php_namespace = "Google\\Cloud\\VectorSearch\\V1";
|
|
33
|
+
option ruby_package = "Google::Cloud::VectorSearch::V1";
|
|
34
|
+
|
|
35
|
+
// Service for creating and managing data objects.
|
|
36
|
+
service DataObjectService {
|
|
37
|
+
option (google.api.default_host) = "vectorsearch.googleapis.com";
|
|
38
|
+
option (google.api.oauth_scopes) =
|
|
39
|
+
"https://www.googleapis.com/auth/cloud-platform";
|
|
40
|
+
|
|
41
|
+
// Creates a dataObject.
|
|
42
|
+
rpc CreateDataObject(CreateDataObjectRequest) returns (DataObject) {
|
|
43
|
+
option (google.api.http) = {
|
|
44
|
+
post: "/v1/{parent=projects/*/locations/*/collections/*}/dataObjects"
|
|
45
|
+
body: "data_object"
|
|
46
|
+
};
|
|
47
|
+
option (google.api.method_signature) = "parent,data_object,data_object_id";
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// Creates a batch of dataObjects.
|
|
51
|
+
rpc BatchCreateDataObjects(BatchCreateDataObjectsRequest)
|
|
52
|
+
returns (BatchCreateDataObjectsResponse) {
|
|
53
|
+
option (google.api.http) = {
|
|
54
|
+
post: "/v1/{parent=projects/*/locations/*/collections/*}/dataObjects:batchCreate"
|
|
55
|
+
body: "*"
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// Gets a data object.
|
|
60
|
+
rpc GetDataObject(GetDataObjectRequest) returns (DataObject) {
|
|
61
|
+
option (google.api.http) = {
|
|
62
|
+
get: "/v1/{name=projects/*/locations/*/collections/*/dataObjects/*}"
|
|
63
|
+
};
|
|
64
|
+
option (google.api.method_signature) = "name";
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// Updates a dataObject.
|
|
68
|
+
rpc UpdateDataObject(UpdateDataObjectRequest) returns (DataObject) {
|
|
69
|
+
option (google.api.http) = {
|
|
70
|
+
patch: "/v1/{data_object.name=projects/*/locations/*/collections/*/dataObjects/*}"
|
|
71
|
+
body: "data_object"
|
|
72
|
+
};
|
|
73
|
+
option (google.api.method_signature) = "data_object,update_mask";
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// Updates dataObjects in a batch.
|
|
77
|
+
rpc BatchUpdateDataObjects(BatchUpdateDataObjectsRequest)
|
|
78
|
+
returns (BatchUpdateDataObjectsResponse) {
|
|
79
|
+
option (google.api.http) = {
|
|
80
|
+
post: "/v1/{parent=projects/*/locations/*/collections/*}/dataObjects:batchUpdate"
|
|
81
|
+
body: "*"
|
|
82
|
+
};
|
|
83
|
+
option (google.api.method_signature) = "parent,requests";
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
// Deletes a dataObject.
|
|
87
|
+
rpc DeleteDataObject(DeleteDataObjectRequest)
|
|
88
|
+
returns (google.protobuf.Empty) {
|
|
89
|
+
option (google.api.http) = {
|
|
90
|
+
delete: "/v1/{name=projects/*/locations/*/collections/*/dataObjects/*}"
|
|
91
|
+
};
|
|
92
|
+
option (google.api.method_signature) = "name";
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// Deletes dataObjects in a batch.
|
|
96
|
+
rpc BatchDeleteDataObjects(BatchDeleteDataObjectsRequest)
|
|
97
|
+
returns (google.protobuf.Empty) {
|
|
98
|
+
option (google.api.http) = {
|
|
99
|
+
post: "/v1/{parent=projects/*/locations/*/collections/*}/dataObjects:batchDelete"
|
|
100
|
+
body: "*"
|
|
101
|
+
};
|
|
102
|
+
option (google.api.method_signature) = "parent,requests";
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
// Request message for
|
|
107
|
+
// [DataObjectService.CreateDataObject][google.cloud.vectorsearch.v1.DataObjectService.CreateDataObject].
|
|
108
|
+
message CreateDataObjectRequest {
|
|
109
|
+
// Required. The resource name of the Collection to create the DataObject in.
|
|
110
|
+
// Format: `projects/{project}/locations/{location}/collections/{collection}`
|
|
111
|
+
string parent = 1 [
|
|
112
|
+
(google.api.field_behavior) = REQUIRED,
|
|
113
|
+
(google.api.resource_reference) = {
|
|
114
|
+
type: "vectorsearch.googleapis.com/Collection"
|
|
115
|
+
}
|
|
116
|
+
];
|
|
117
|
+
|
|
118
|
+
// Required. The id of the dataObject to create.
|
|
119
|
+
// The id must be 1-63 characters long, and comply with
|
|
120
|
+
// [RFC1035](https://www.ietf.org/rfc/rfc1035.txt).
|
|
121
|
+
// Specifically, it must be 1-63 characters long and match the regular
|
|
122
|
+
// expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`.
|
|
123
|
+
string data_object_id = 2 [(google.api.field_behavior) = REQUIRED];
|
|
124
|
+
|
|
125
|
+
// Required. The DataObject to create.
|
|
126
|
+
DataObject data_object = 3 [(google.api.field_behavior) = REQUIRED];
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
// Request message for
|
|
130
|
+
// [DataObjectService.BatchCreateDataObjects][google.cloud.vectorsearch.v1.DataObjectService.BatchCreateDataObjects].
|
|
131
|
+
message BatchCreateDataObjectsRequest {
|
|
132
|
+
// Required. The resource name of the Collection to create the DataObjects in.
|
|
133
|
+
// Format: `projects/{project}/locations/{location}/collections/{collection}`.
|
|
134
|
+
// The parent field in the CreateDataObjectRequest messages must match this
|
|
135
|
+
// field.
|
|
136
|
+
string parent = 1 [
|
|
137
|
+
(google.api.field_behavior) = REQUIRED,
|
|
138
|
+
(google.api.resource_reference) = {
|
|
139
|
+
type: "vectorsearch.googleapis.com/Collection"
|
|
140
|
+
}
|
|
141
|
+
];
|
|
142
|
+
|
|
143
|
+
// Required. The request message specifying the resources to create.
|
|
144
|
+
// A maximum of 1000 DataObjects can be created in a batch.
|
|
145
|
+
repeated CreateDataObjectRequest requests = 2
|
|
146
|
+
[(google.api.field_behavior) = REQUIRED];
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
// Response message for
|
|
150
|
+
// [DataObjectService.BatchCreateDataObjects][google.cloud.vectorsearch.v1.DataObjectService.BatchCreateDataObjects].
|
|
151
|
+
message BatchCreateDataObjectsResponse {
|
|
152
|
+
// Output only. DataObjects created.
|
|
153
|
+
repeated DataObject data_objects = 1
|
|
154
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
// Request message for
|
|
158
|
+
// [DataObjectService.GetDataObject][google.cloud.vectorsearch.v1.DataObjectService.GetDataObject].
|
|
159
|
+
message GetDataObjectRequest {
|
|
160
|
+
// Required. The name of the DataObject resource.
|
|
161
|
+
// Format:
|
|
162
|
+
// `projects/{project}/locations/{location}/collections/{collection}/dataObjects/{dataObject}`
|
|
163
|
+
string name = 1 [
|
|
164
|
+
(google.api.field_behavior) = REQUIRED,
|
|
165
|
+
(google.api.resource_reference) = {
|
|
166
|
+
type: "vectorsearch.googleapis.com/DataObject"
|
|
167
|
+
}
|
|
168
|
+
];
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
// Request message for
|
|
172
|
+
// [DataObjectService.UpdateDataObject][google.cloud.vectorsearch.v1.DataObjectService.UpdateDataObject].
|
|
173
|
+
message UpdateDataObjectRequest {
|
|
174
|
+
// Required. The DataObject which replaces the resource on the server.
|
|
175
|
+
DataObject data_object = 1 [(google.api.field_behavior) = REQUIRED];
|
|
176
|
+
|
|
177
|
+
// Optional. The update mask applies to the resource. See
|
|
178
|
+
// [google.protobuf.FieldMask][google.protobuf.FieldMask].
|
|
179
|
+
google.protobuf.FieldMask update_mask = 2
|
|
180
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
// Request message for
|
|
184
|
+
// [DataObjectService.BatchUpdateDataObjects][google.cloud.vectorsearch.v1.DataObjectService.BatchUpdateDataObjects].
|
|
185
|
+
message BatchUpdateDataObjectsRequest {
|
|
186
|
+
// Required. The resource name of the Collection to update the DataObjects in.
|
|
187
|
+
// Format: `projects/{project}/locations/{location}/collections/{collection}`.
|
|
188
|
+
// The parent field in the UpdateDataObjectRequest messages must match this
|
|
189
|
+
// field.
|
|
190
|
+
string parent = 1 [
|
|
191
|
+
(google.api.field_behavior) = REQUIRED,
|
|
192
|
+
(google.api.resource_reference) = {
|
|
193
|
+
type: "vectorsearch.googleapis.com/Collection"
|
|
194
|
+
}
|
|
195
|
+
];
|
|
196
|
+
|
|
197
|
+
// Required. The request message specifying the resources to update.
|
|
198
|
+
// A maximum of 1000 DataObjects can be updated in a batch.
|
|
199
|
+
repeated UpdateDataObjectRequest requests = 2
|
|
200
|
+
[(google.api.field_behavior) = REQUIRED];
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
// Response message for
|
|
204
|
+
// [DataObjectService.BatchUpdateDataObjects][google.cloud.vectorsearch.v1.DataObjectService.BatchUpdateDataObjects].
|
|
205
|
+
message BatchUpdateDataObjectsResponse {}
|
|
206
|
+
|
|
207
|
+
// Request message for
|
|
208
|
+
// [DataObjectService.DeleteDataObject][google.cloud.vectorsearch.v1.DataObjectService.DeleteDataObject].
|
|
209
|
+
message DeleteDataObjectRequest {
|
|
210
|
+
// Required. The name of the DataObject resource to be deleted.
|
|
211
|
+
// Format:
|
|
212
|
+
// `projects/{project}/locations/{location}/collections/{collection}/dataObjects/{dataObject}`
|
|
213
|
+
string name = 1 [
|
|
214
|
+
(google.api.field_behavior) = REQUIRED,
|
|
215
|
+
(google.api.resource_reference) = {
|
|
216
|
+
type: "vectorsearch.googleapis.com/DataObject"
|
|
217
|
+
}
|
|
218
|
+
];
|
|
219
|
+
|
|
220
|
+
// Optional. The current etag of the DataObject.
|
|
221
|
+
// If an etag is provided and does not match the current etag of the
|
|
222
|
+
// DataObject, deletion will be blocked and an ABORTED error will be returned.
|
|
223
|
+
string etag = 2 [(google.api.field_behavior) = OPTIONAL];
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
// Request message for
|
|
227
|
+
// [DataObjectService.BatchDeleteDataObjects][google.cloud.vectorsearch.v1.DataObjectService.BatchDeleteDataObjects].
|
|
228
|
+
message BatchDeleteDataObjectsRequest {
|
|
229
|
+
// Required. The resource name of the Collection to delete the DataObjects in.
|
|
230
|
+
// Format: `projects/{project}/locations/{location}/collections/{collection}`.
|
|
231
|
+
string parent = 1 [
|
|
232
|
+
(google.api.field_behavior) = REQUIRED,
|
|
233
|
+
(google.api.resource_reference) = {
|
|
234
|
+
type: "vectorsearch.googleapis.com/Collection"
|
|
235
|
+
}
|
|
236
|
+
];
|
|
237
|
+
|
|
238
|
+
// Required. The request message specifying the resources to delete.
|
|
239
|
+
// A maximum of 1000 DataObjects can be deleted in a batch.
|
|
240
|
+
repeated DeleteDataObjectRequest requests = 3
|
|
241
|
+
[(google.api.field_behavior) = REQUIRED];
|
|
242
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
// Copyright 2026 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.vectorsearch.v1;
|
|
18
|
+
|
|
19
|
+
import "google/api/field_behavior.proto";
|
|
20
|
+
|
|
21
|
+
option csharp_namespace = "Google.Cloud.VectorSearch.V1";
|
|
22
|
+
option go_package = "cloud.google.com/go/vectorsearch/apiv1/vectorsearchpb;vectorsearchpb";
|
|
23
|
+
option java_multiple_files = true;
|
|
24
|
+
option java_outer_classname = "EmbeddingConfigProto";
|
|
25
|
+
option java_package = "com.google.cloud.vectorsearch.v1";
|
|
26
|
+
option php_namespace = "Google\\Cloud\\VectorSearch\\V1";
|
|
27
|
+
option ruby_package = "Google::Cloud::VectorSearch::V1";
|
|
28
|
+
|
|
29
|
+
// Represents the task the embeddings will be used for.
|
|
30
|
+
enum EmbeddingTaskType {
|
|
31
|
+
// Unspecified task type.
|
|
32
|
+
EMBEDDING_TASK_TYPE_UNSPECIFIED = 0;
|
|
33
|
+
|
|
34
|
+
// Specifies the given text is a query in a search/retrieval setting.
|
|
35
|
+
RETRIEVAL_QUERY = 1;
|
|
36
|
+
|
|
37
|
+
// Specifies the given text is a document from the corpus being searched.
|
|
38
|
+
RETRIEVAL_DOCUMENT = 2;
|
|
39
|
+
|
|
40
|
+
// Specifies the given text will be used for STS.
|
|
41
|
+
SEMANTIC_SIMILARITY = 3;
|
|
42
|
+
|
|
43
|
+
// Specifies that the given text will be classified.
|
|
44
|
+
CLASSIFICATION = 4;
|
|
45
|
+
|
|
46
|
+
// Specifies that the embeddings will be used for clustering.
|
|
47
|
+
CLUSTERING = 5;
|
|
48
|
+
|
|
49
|
+
// Specifies that the embeddings will be used for question answering.
|
|
50
|
+
QUESTION_ANSWERING = 6;
|
|
51
|
+
|
|
52
|
+
// Specifies that the embeddings will be used for fact verification.
|
|
53
|
+
FACT_VERIFICATION = 7;
|
|
54
|
+
|
|
55
|
+
// Specifies that the embeddings will be used for code retrieval.
|
|
56
|
+
CODE_RETRIEVAL_QUERY = 8;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// Message describing the configuration for generating embeddings for a vector
|
|
60
|
+
// field using Vertex AI embeddings API.
|
|
61
|
+
message VertexEmbeddingConfig {
|
|
62
|
+
// Required. Required: ID of the embedding model to use. See
|
|
63
|
+
// https://cloud.google.com/vertex-ai/generative-ai/docs/learn/models#embeddings-models
|
|
64
|
+
// for the list of supported models.
|
|
65
|
+
string model_id = 1 [(google.api.field_behavior) = REQUIRED];
|
|
66
|
+
|
|
67
|
+
// Required. Required: Text template for the input to the model. The template
|
|
68
|
+
// must contain one or more references to fields in the DataObject, e.g.:
|
|
69
|
+
// "Movie Title: {title} ---- Movie Plot: {plot}".
|
|
70
|
+
string text_template = 2 [(google.api.field_behavior) = REQUIRED];
|
|
71
|
+
|
|
72
|
+
// Required. Required: Task type for the embeddings.
|
|
73
|
+
EmbeddingTaskType task_type = 3 [(google.api.field_behavior) = REQUIRED];
|
|
74
|
+
}
|