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 \ V1Methods
__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. |
↳ prompt_tokens_details |
array<ModalityTokenCount>
Output only. List of modalities that were processed in the request input. |
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 |
|
getPromptTokensDetails
Output only. List of modalities that were processed in the request input.
| Returns | |
|---|---|
| Type | Description |
Google\Protobuf\RepeatedField<ModalityTokenCount> |
|
setPromptTokensDetails
Output only. List of modalities that were processed in the request input.
| Parameter | |
|---|---|
| Name | Description |
var |
array<ModalityTokenCount>
|
| Returns | |
|---|---|
| Type | Description |
$this |
|