Interface CountTokensResponseOrBuilder (1.40.0)

publicinterface CountTokensResponseOrBuilderextendsMessageOrBuilder

Implements

MessageOrBuilder

Methods

getPromptTokensDetails(int index)

publicabstractModalityTokenCountgetPromptTokensDetails(intindex)

Output only. List of modalities that were processed in the request input.

repeated .google.cloud.vertexai.v1.ModalityTokenCount prompt_tokens_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int
Returns
Type Description
ModalityTokenCount

getPromptTokensDetailsCount()

publicabstractintgetPromptTokensDetailsCount()

Output only. List of modalities that were processed in the request input.

repeated .google.cloud.vertexai.v1.ModalityTokenCount prompt_tokens_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

getPromptTokensDetailsList()

publicabstractList<ModalityTokenCount>getPromptTokensDetailsList()

Output only. List of modalities that were processed in the request input.

repeated .google.cloud.vertexai.v1.ModalityTokenCount prompt_tokens_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
List<ModalityTokenCount>

getPromptTokensDetailsOrBuilder(int index)

publicabstractModalityTokenCountOrBuildergetPromptTokensDetailsOrBuilder(intindex)

Output only. List of modalities that were processed in the request input.

repeated .google.cloud.vertexai.v1.ModalityTokenCount prompt_tokens_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int
Returns
Type Description
ModalityTokenCountOrBuilder

getPromptTokensDetailsOrBuilderList()

publicabstractList<?extendsModalityTokenCountOrBuilder>getPromptTokensDetailsOrBuilderList()

Output only. List of modalities that were processed in the request input.

repeated .google.cloud.vertexai.v1.ModalityTokenCount prompt_tokens_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
List<? extends com.google.cloud.vertexai.api.ModalityTokenCountOrBuilder>

getTotalBillableCharacters()

publicabstractintgetTotalBillableCharacters()

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

int32 total_billable_characters = 2;

Returns
Type Description
int

The totalBillableCharacters.

getTotalTokens()

publicabstractintgetTotalTokens()

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

int32 total_tokens = 1;

Returns
Type Description
int

The totalTokens.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年11月19日 UTC.