Class ComputeTokensRequest (1.59.0)

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

Request message for ComputeTokens RPC call.

Attributes

Name Description
endpoint str
Required. The name of the Endpoint requested to get lists of tokens and token ids.
instances MutableSequence[google.protobuf.struct_pb2.Value]
Optional. 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.
model str
Optional. The name of the publisher model requested to serve the prediction. Format: projects/{project}/locations/{location}/publishers/\ */models/*
contents MutableSequence[google.cloud.aiplatform_v1.types.Content]
Optional. Input content.

Methods

ComputeTokensRequest

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

Request message for ComputeTokens RPC call.