Google Cloud Vector Search V1 Client - Class VertexRanker (0.9.0)

Reference documentation and code samples for the Google Cloud Vector Search V1 Client class VertexRanker.

Defines a ranker using the Vertex AI ranking service.

See https://cloud.google.com/generative-ai-app-builder/docs/ranking for details.

Generated from protobuf message google.cloud.vectorsearch.v1.VertexRanker

Namespace

Google \ Cloud \ VectorSearch \ V1

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ text_record_spec VertexRanker\TextRecordSpec

The record spec for text search.

↳ model string

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.

↳ top_n int

Required. The number of documents to be processed for ranking.

getTextRecordSpec

The record spec for text search.

Returns
Type Description
VertexRanker\TextRecordSpec|null

hasTextRecordSpec

setTextRecordSpec

The record spec for text search.

Parameter
Name Description
var VertexRanker\TextRecordSpec
Returns
Type Description
$this

getModel

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.

Returns
Type Description
string

setModel

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.

Parameter
Name Description
var string
Returns
Type Description
$this

getTopN

Required. The number of documents to be processed for ranking.

Returns
Type Description
int

setTopN

Required. The number of documents to be processed for ranking.

Parameter
Name Description
var int
Returns
Type Description
$this

getRecordSpec

Returns
Type Description
string