Class ComputeTokensRequest (1.48.0)

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

Request message for ComputeTokens RPC call.

Attributes

NameDescription
endpoint str
Required. The name of the Endpoint requested to get lists of tokens and token ids.
instances MutableSequence[google.protobuf.struct_pb2.Value]
Required. The instances that are the input to token computing API call. Schema is identical to the prediction schema of the text model, even for the non-text models, like chat models, or Codey models.

Methods

ComputeTokensRequest

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

Request message for ComputeTokens RPC call.