Class CountTokensRequest (1.48.0)

CountTokensRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Request message for PredictionService.CountTokens.

Attributes

NameDescription
endpoint str
Required. The name of the Endpoint requested to perform token counting. Format: projects/{project}/locations/{location}/endpoints/{endpoint}
model str
Required. The name of the publisher model requested to serve the prediction. Format: projects/{project}/locations/{location}/publishers/*/models/*
instances MutableSequence[google.protobuf.struct_pb2.Value]
Required. The instances that are the input to token counting call. Schema is identical to the prediction schema of the underlying model.
contents MutableSequence[google.cloud.aiplatform_v1beta1.types.Content]
Required. Input content.

Methods

CountTokensRequest

CountTokensRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Request message for PredictionService.CountTokens.