View Source GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1GenerateContentResponseUsageMetadata (google_api_ai_platform v0.15.0)

Usage metadata about response(s).

Attributes

  • candidatesTokenCount (type: integer(), default: nil) - Number of tokens in the response(s).
  • promptTokenCount (type: integer(), default: nil) - Number of tokens in the request. When cached_content is set, this is still the total effective prompt size meaning this includes the number of tokens in the cached content.
  • totalTokenCount (type: integer(), default: nil) - Total token count for prompt and response candidates.

Summary

Functions

Unwrap a decoded JSON object into its complex fields.

Types

@type t() ::
  %GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1GenerateContentResponseUsageMetadata{
    candidatesTokenCount: integer() | nil,
    promptTokenCount: integer() | nil,
    totalTokenCount: integer() | nil
  }

Functions

@spec decode(struct(), keyword()) :: struct()

Unwrap a decoded JSON object into its complex fields.