ComputeTokensResponse

Response message for ComputeTokens RPC call.

JSON representation
{
  "tokensInfo": [
    {
      object (TokensInfo)
    }
  ]
}
Fields
tokensInfo[]

object (TokensInfo)

Lists of tokens info from the input. A ComputeTokensRequest could have multiple instances with a prompt in each instance. We also need to return lists of tokens info for the request with multiple instances.

TokensInfo

Tokens info with a list of tokens and the corresponding list of token ids.

JSON representation
{
  "tokens": [
    string
  ],
  "tokenIds": [
    string
  ],
  "role": string
}
Fields
tokens[]

string (bytes format)

A list of tokens from the input.

A base64-encoded string.

tokenIds[]

string (int64 format)

A list of token ids from the input.

role

string

Optional. Optional fields for the role from the corresponding Content.