Skip to content
Open
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
6 changes: 6 additions & 0 deletions packages/google-cloud-vectorsearch/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
**/node_modules
**/coverage
test/fixtures
build/
docs/
protos/
22 changes: 22 additions & 0 deletions packages/google-cloud-vectorsearch/.prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// Copyright 2026 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
//
// https://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.
//
// ** This file is automatically generated by gapic-generator-typescript. **
// ** https://github.com/googleapis/gapic-generator-typescript **
// ** All changes to this file may be overwritten. **


module.exports = {
...require('gts/.prettierrc.json')
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import "google/cloud/vectorsearch/v1beta/common.proto";
import "google/cloud/vectorsearch/v1beta/data_object.proto";
import "google/cloud/vectorsearch/v1beta/embedding_config.proto";
import "google/protobuf/struct.proto";
import "google/rpc/status.proto";

option csharp_namespace = "Google.Cloud.VectorSearch.V1Beta";
option go_package = "cloud.google.com/go/vectorsearch/apiv1beta/vectorsearchpb;vectorsearchpb";
Expand Down Expand Up @@ -325,6 +326,10 @@ message SearchResponseMetadata {
// K-Nearest Neighbor (KNN) index engine.
bool used_knn = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
}

// Output only. Warnings or non-fatal errors that occurred during execution.
repeated google.rpc.Status warnings = 3
[(google.api.field_behavior) = OUTPUT_ONLY];
}

// Response for a search request.
Expand Down Expand Up @@ -453,6 +458,13 @@ message Ranker {
// Reciprocal Rank Fusion ranking.
ReciprocalRankFusion rrf = 1;
}

// The reranker to use for final ranking of the results combined by the
// ranker.
oneof reranker {
// Optional. Vertex AI ranking.
VertexRanker vertex_ranker = 2 [(google.api.field_behavior) = OPTIONAL];
}
}

// Defines the Reciprocal Rank Fusion (RRF) algorithm for result ranking.
Expand All @@ -461,6 +473,39 @@ message ReciprocalRankFusion {
repeated double weights = 1 [(google.api.field_behavior) = REQUIRED];
}

// Defines a ranker using the Vertex AI ranking service.
// See https://cloud.google.com/generative-ai-app-builder/docs/ranking for
// details.
message VertexRanker {
// The record spec for text search.
message TextRecordSpec {
// Required. The query against which the records are ranked and scored.
string query = 1 [(google.api.field_behavior) = REQUIRED];

// Optional. The template used to generate the record's title.
string title_template = 2 [(google.api.field_behavior) = OPTIONAL];

// Optional. The template used to generate the record's content.
string content_template = 3 [(google.api.field_behavior) = OPTIONAL];
}

// The record specification for ranking. At least one record spec must be
// set.
oneof record_spec {
// The record spec for text search.
TextRecordSpec text_record_spec = 6;
}

// Required. The model used for ranking documents. The list of available
// models is described in
// https://docs.cloud.google.com/generative-ai-app-builder/docs/ranking#models.
// Currently, only `semantic-ranker-fast@latest` is supported.
string model = 4 [(google.api.field_behavior) = REQUIRED];

// Required. The number of documents to be processed for ranking.
int32 top_n = 5 [(google.api.field_behavior) = REQUIRED];
}

// A response from a batch search operation.
message BatchSearchDataObjectsResponse {
// Output only. A list of search responses, one for each request in the batch.
Expand Down
239 changes: 239 additions & 0 deletions packages/google-cloud-vectorsearch/protos/protos.d.ts

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

Loading
Loading