public static final class CountTokensResponse.Builder extends GeneratedMessage.Builder<CountTokensResponse.Builder> implements CountTokensResponseOrBuilderResponse message for [PredictionService.CountTokens][].
Protobuf type google.cloud.vertexai.v1.CountTokensResponse
Inheritance
java.lang.Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessage.Builder > CountTokensResponse.BuilderImplements
CountTokensResponseOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
Methods
addAllPromptTokensDetails(Iterable<? extends ModalityTokenCount> values)
public CountTokensResponse.Builder addAllPromptTokensDetails(Iterable<? extends ModalityTokenCount> values)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 |
values |
Iterable<? extends com.google.cloud.vertexai.api.ModalityTokenCount> |
| Returns | |
|---|---|
| Type | Description |
CountTokensResponse.Builder |
|
addPromptTokensDetails(ModalityTokenCount value)
public CountTokensResponse.Builder addPromptTokensDetails(ModalityTokenCount value)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 |
value |
ModalityTokenCount |
| Returns | |
|---|---|
| Type | Description |
CountTokensResponse.Builder |
|
addPromptTokensDetails(ModalityTokenCount.Builder builderForValue)
public CountTokensResponse.Builder addPromptTokensDetails(ModalityTokenCount.Builder builderForValue)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 |
builderForValue |
ModalityTokenCount.Builder |
| Returns | |
|---|---|
| Type | Description |
CountTokensResponse.Builder |
|
addPromptTokensDetails(int index, ModalityTokenCount value)
public CountTokensResponse.Builder addPromptTokensDetails(int index, ModalityTokenCount value)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];
| Parameters | |
|---|---|
| Name | Description |
index |
int |
value |
ModalityTokenCount |
| Returns | |
|---|---|
| Type | Description |
CountTokensResponse.Builder |
|
addPromptTokensDetails(int index, ModalityTokenCount.Builder builderForValue)
public CountTokensResponse.Builder addPromptTokensDetails(int index, ModalityTokenCount.Builder builderForValue)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];
| Parameters | |
|---|---|
| Name | Description |
index |
int |
builderForValue |
ModalityTokenCount.Builder |
| Returns | |
|---|---|
| Type | Description |
CountTokensResponse.Builder |
|
addPromptTokensDetailsBuilder()
public ModalityTokenCount.Builder addPromptTokensDetailsBuilder()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 |
ModalityTokenCount.Builder |
|
addPromptTokensDetailsBuilder(int index)
public ModalityTokenCount.Builder addPromptTokensDetailsBuilder(int index)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.Builder |
|
build()
public CountTokensResponse build()| Returns | |
|---|---|
| Type | Description |
CountTokensResponse |
|
buildPartial()
public CountTokensResponse buildPartial()| Returns | |
|---|---|
| Type | Description |
CountTokensResponse |
|
clear()
public CountTokensResponse.Builder clear()| Returns | |
|---|---|
| Type | Description |
CountTokensResponse.Builder |
|
clearPromptTokensDetails()
public CountTokensResponse.Builder clearPromptTokensDetails()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 |
CountTokensResponse.Builder |
|
clearTotalBillableCharacters()
public CountTokensResponse.Builder clearTotalBillableCharacters()The total number of billable characters counted across all instances from the request.
int32 total_billable_characters = 2;
| Returns | |
|---|---|
| Type | Description |
CountTokensResponse.Builder |
This builder for chaining. |
clearTotalTokens()
public CountTokensResponse.Builder clearTotalTokens()The total number of tokens counted across all instances from the request.
int32 total_tokens = 1;
| Returns | |
|---|---|
| Type | Description |
CountTokensResponse.Builder |
This builder for chaining. |
getDefaultInstanceForType()
public CountTokensResponse getDefaultInstanceForType()| Returns | |
|---|---|
| Type | Description |
CountTokensResponse |
|
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
getPromptTokensDetails(int index)
public ModalityTokenCount getPromptTokensDetails(int index)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 |
|
getPromptTokensDetailsBuilder(int index)
public ModalityTokenCount.Builder getPromptTokensDetailsBuilder(int index)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.Builder |
|
getPromptTokensDetailsBuilderList()
public List<ModalityTokenCount.Builder> getPromptTokensDetailsBuilderList()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<Builder> |
|
getPromptTokensDetailsCount()
public int getPromptTokensDetailsCount()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()
public List<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)
public ModalityTokenCountOrBuilder getPromptTokensDetailsOrBuilder(int index)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()
public List<? extends ModalityTokenCountOrBuilder> 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()
public int getTotalBillableCharacters()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()
public int getTotalTokens()The total number of tokens counted across all instances from the request.
int32 total_tokens = 1;
| Returns | |
|---|---|
| Type | Description |
int |
The totalTokens. |
internalGetFieldAccessorTable()
protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()| Returns | |
|---|---|
| Type | Description |
FieldAccessorTable |
|
isInitialized()
public final boolean isInitialized()| Returns | |
|---|---|
| Type | Description |
boolean |
|
mergeFrom(CountTokensResponse other)
public CountTokensResponse.Builder mergeFrom(CountTokensResponse other)| Parameter | |
|---|---|
| Name | Description |
other |
CountTokensResponse |
| Returns | |
|---|---|
| Type | Description |
CountTokensResponse.Builder |
|
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public CountTokensResponse.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)| Parameters | |
|---|---|
| Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
CountTokensResponse.Builder |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
mergeFrom(Message other)
public CountTokensResponse.Builder mergeFrom(Message other)| Parameter | |
|---|---|
| Name | Description |
other |
Message |
| Returns | |
|---|---|
| Type | Description |
CountTokensResponse.Builder |
|
removePromptTokensDetails(int index)
public CountTokensResponse.Builder removePromptTokensDetails(int index)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 |
CountTokensResponse.Builder |
|
setPromptTokensDetails(int index, ModalityTokenCount value)
public CountTokensResponse.Builder setPromptTokensDetails(int index, ModalityTokenCount value)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];
| Parameters | |
|---|---|
| Name | Description |
index |
int |
value |
ModalityTokenCount |
| Returns | |
|---|---|
| Type | Description |
CountTokensResponse.Builder |
|
setPromptTokensDetails(int index, ModalityTokenCount.Builder builderForValue)
public CountTokensResponse.Builder setPromptTokensDetails(int index, ModalityTokenCount.Builder builderForValue)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];
| Parameters | |
|---|---|
| Name | Description |
index |
int |
builderForValue |
ModalityTokenCount.Builder |
| Returns | |
|---|---|
| Type | Description |
CountTokensResponse.Builder |
|
setTotalBillableCharacters(int value)
public CountTokensResponse.Builder setTotalBillableCharacters(int value)The total number of billable characters counted across all instances from the request.
int32 total_billable_characters = 2;
| Parameter | |
|---|---|
| Name | Description |
value |
intThe totalBillableCharacters to set. |
| Returns | |
|---|---|
| Type | Description |
CountTokensResponse.Builder |
This builder for chaining. |
setTotalTokens(int value)
public CountTokensResponse.Builder setTotalTokens(int value)The total number of tokens counted across all instances from the request.
int32 total_tokens = 1;
| Parameter | |
|---|---|
| Name | Description |
value |
intThe totalTokens to set. |
| Returns | |
|---|---|
| Type | Description |
CountTokensResponse.Builder |
This builder for chaining. |