Google Cloud Ai Platform V1 Client - Class CountTokensResponse (0.27.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
NameDescription
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
TypeDescription
int

setTotalTokens

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

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getTotalBillableCharacters

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

Returns
TypeDescription
int

setTotalBillableCharacters

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

Parameter
NameDescription
var int
Returns
TypeDescription
$this