public final UnaryCallable<ComputeTokensRequest, ComputeTokensResponse> computeTokensCallable() {
    return stub.computeTokensCallable();
  }
Return a list of tokens based on the input text.

<p>Sample code:

<pre>{@code
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) {
  ComputeTokensRequest request =
      ComputeTokensRequest.newBuilder()
          .setEndpoint(
              EndpointName.ofProjectLocationEndpointName(
                      "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
                  .toString())
          .addAllInstances(new ArrayList<Value>())
          .setModel("model104069929")
          .addAllContents(new ArrayList<Content>())
          .build();
  ApiFuture<ComputeTokensResponse> future =
      llmUtilityServiceClient.computeTokensCallable().futureCall(request);
  // Do something.
  ComputeTokensResponse response = future.get();
}
}</pre>
java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/LlmUtilityServiceClient.java