Google Cloud Ai Platform V1 Client - Class CountTokensResponse (1.7.0)

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

Response message for PredictionService.CountTokens.

Generated from protobuf message google.cloud.aiplatform.v1.CountTokensResponse

Namespace

Google \ Cloud \ AIPlatform \ V1

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ total_tokens int

The total number of tokens counted across all instances from the request.

↳ total_billable_characters int

The total number of billable characters counted across all instances from the request.

getTotalTokens

The total number of tokens counted across all instances from the request.

Returns
Type Description
int

setTotalTokens

The total number of tokens counted across all instances from the request.

Parameter
Name Description
var int
Returns
Type Description
$this

getTotalBillableCharacters

The total number of billable characters counted across all instances from the request.

Returns
Type Description
int

setTotalBillableCharacters

The total number of billable characters counted across all instances from the request.

Parameter
Name Description
var int
Returns
Type Description
$this