Interface CountTokensRequestOrBuilder (0.3.0)

publicinterface CountTokensRequestOrBuilderextendsMessageOrBuilder

Implements

MessageOrBuilder

Methods

getContents(int index)

publicabstractContentgetContents(intindex)

Required. Input content.

repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
index int
Returns
Type Description
Content

getContentsCount()

publicabstractintgetContentsCount()

Required. Input content.

repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
int

getContentsList()

publicabstractList<Content>getContentsList()

Required. Input content.

repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
List<Content>

getContentsOrBuilder(int index)

publicabstractContentOrBuildergetContentsOrBuilder(intindex)

Required. Input content.

repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
index int
Returns
Type Description
ContentOrBuilder

getContentsOrBuilderList()

publicabstractList<?extendsContentOrBuilder>getContentsOrBuilderList()

Required. Input content.

repeated .google.cloud.vertexai.v1.Content contents = 4 [(.google.api.field_behavior) = REQUIRED];

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

getEndpoint()

publicabstractStringgetEndpoint()

Required. The name of the Endpoint requested to perform token counting. Format: projects/{project}/locations/{location}/endpoints/{endpoint}

string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
String

The endpoint.

getEndpointBytes()

publicabstractByteStringgetEndpointBytes()

Required. The name of the Endpoint requested to perform token counting. Format: projects/{project}/locations/{location}/endpoints/{endpoint}

string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for endpoint.

getInstances(int index)

publicabstractValuegetInstances(intindex)

Required. The instances that are the input to token counting call. Schema is identical to the prediction schema of the underlying model.

repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
index int
Returns
Type Description
Value

getInstancesCount()

publicabstractintgetInstancesCount()

Required. The instances that are the input to token counting call. Schema is identical to the prediction schema of the underlying model.

repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
int

getInstancesList()

publicabstractList<Value>getInstancesList()

Required. The instances that are the input to token counting call. Schema is identical to the prediction schema of the underlying model.

repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
List<Value>

getInstancesOrBuilder(int index)

publicabstractValueOrBuildergetInstancesOrBuilder(intindex)

Required. The instances that are the input to token counting call. Schema is identical to the prediction schema of the underlying model.

repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
index int
Returns
Type Description
ValueOrBuilder

getInstancesOrBuilderList()

publicabstractList<?extendsValueOrBuilder>getInstancesOrBuilderList()

Required. The instances that are the input to token counting call. Schema is identical to the prediction schema of the underlying model.

repeated .google.protobuf.Value instances = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
List<? extends com.google.protobuf.ValueOrBuilder>

getModel()

publicabstractStringgetModel()

Required. The name of the publisher model requested to serve the prediction. Format: projects/{project}/locations/{location}/publishers/*/models/*

string model = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The model.

getModelBytes()

publicabstractByteStringgetModelBytes()

Required. The name of the publisher model requested to serve the prediction. Format: projects/{project}/locations/{location}/publishers/*/models/*

string model = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for model.

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.