Google Cloud Vector Search V1 Client - Class VertexRanker (0.1.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.

↳ query string

Required. The query against which the records are ranked and scored.

↳ title_template string

Optional. The template used to generate the record's title.

↳ content_template string

Optional. The template used to generate the record's content.

↳ model string

Required. The model used for ranking documents. If no model is specified, then semantic-ranker-default@latest is used.

getQuery

Required. The query against which the records are ranked and scored.

Returns
Type Description
string

setQuery

Required. The query against which the records are ranked and scored.

Parameter
Name Description
var string
Returns
Type Description
$this

getTitleTemplate

Optional. The template used to generate the record's title.

Returns
Type Description
string

setTitleTemplate

Optional. The template used to generate the record's title.

Parameter
Name Description
var string
Returns
Type Description
$this

getContentTemplate

Optional. The template used to generate the record's content.

Returns
Type Description
string

setContentTemplate

Optional. The template used to generate the record's content.

Parameter
Name Description
var string
Returns
Type Description
$this

getModel

Required. The model used for ranking documents. If no model is specified, then semantic-ranker-default@latest is used.

Returns
Type Description
string

setModel

Required. The model used for ranking documents. If no model is specified, then semantic-ranker-default@latest is used.

Parameter
Name Description
var string
Returns
Type Description
$this