Google Cloud Ai Platform V1 Client - Class Candidate (1.8.0)

Reference documentation and code samples for the Google Cloud Ai Platform V1 Client class Candidate.

Candidate for the logprobs token and score.

Generated from protobuf message google.cloud.aiplatform.v1.LogprobsResult.Candidate

Namespace

Google \ Cloud \ AIPlatform \ V1 \ LogprobsResult

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ token string

The candidate’s token string value.

↳ token_id int

The candidate’s token id value.

↳ log_probability float

The candidate's log probability.

getToken

The candidate’s token string value.

Returns
Type Description
string

hasToken

clearToken

setToken

The candidate’s token string value.

Parameter
Name Description
var string
Returns
Type Description
$this

getTokenId

The candidate’s token id value.

Returns
Type Description
int

hasTokenId

clearTokenId

setTokenId

The candidate’s token id value.

Parameter
Name Description
var int
Returns
Type Description
$this

getLogProbability

The candidate's log probability.

Returns
Type Description
float

hasLogProbability

clearLogProbability

setLogProbability

The candidate's log probability.

Parameter
Name Description
var float
Returns
Type Description
$this