GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1GenerateContentResponseUsageMetadata (google_api_ai_platform v0.27.0)

View Source

Usage metadata about response(s).

Attributes

  • cacheTokensDetails (type: list(GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1ModalityTokenCount.t), default: nil) - Output only. List of modalities of the cached content in the request input.
  • cachedContentTokenCount (type: integer(), default: nil) - Output only. Number of tokens in the cached part in the input (the cached content).
  • candidatesTokenCount (type: integer(), default: nil) - Number of tokens in the response(s).
  • candidatesTokensDetails (type: list(GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1ModalityTokenCount.t), default: nil) - Output only. List of modalities that were returned in the response.
  • 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.
  • promptTokensDetails (type: list(GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1ModalityTokenCount.t), default: nil) - Output only. List of modalities that were processed in the request input.
  • thoughtsTokenCount (type: integer(), default: nil) - Output only. Number of tokens present in thoughts output.
  • toolUsePromptTokenCount (type: integer(), default: nil) - Output only. Number of tokens present in tool-use prompt(s).
  • toolUsePromptTokensDetails (type: list(GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1ModalityTokenCount.t), default: nil) - Output only. List of modalities that were processed for tool-use request inputs.
  • totalTokenCount (type: integer(), default: nil) - Total token count for prompt, response candidates, and tool-use prompts (if present).
  • trafficType (type: String.t, default: nil) - Output only. Traffic type. This shows whether a request consumes Pay-As-You-Go or Provisioned Throughput quota.

Summary

Functions

Unwrap a decoded JSON object into its complex fields.

Types

t()

@type t() ::
  %GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1GenerateContentResponseUsageMetadata{
    cacheTokensDetails:
      [
        GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1ModalityTokenCount.t()
      ]
      | nil,
    cachedContentTokenCount: integer() | nil,
    candidatesTokenCount: integer() | nil,
    candidatesTokensDetails:
      [
        GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1ModalityTokenCount.t()
      ]
      | nil,
    promptTokenCount: integer() | nil,
    promptTokensDetails:
      [
        GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1ModalityTokenCount.t()
      ]
      | nil,
    thoughtsTokenCount: integer() | nil,
    toolUsePromptTokenCount: integer() | nil,
    toolUsePromptTokensDetails:
      [
        GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1ModalityTokenCount.t()
      ]
      | nil,
    totalTokenCount: integer() | nil,
    trafficType: String.t() | nil
  }

Functions

decode(value, options)

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

Unwrap a decoded JSON object into its complex fields.