Class ResponseUsageMetadata

java.lang.Object
uno.anahata.asi.agi.message.ResponseUsageMetadata

public class ResponseUsageMetadata extends Object
Metadata about the token usage for a single API response.
Author:
anahata
  • Field Details

    • promptTokenCount

      int promptTokenCount
      The number of tokens in the prompt.
    • candidatesTokenCount

      int candidatesTokenCount
      The number of tokens in the generated candidates.
    • cachedContentTokenCount

      int cachedContentTokenCount
      The number of tokens in the cached content.
    • thoughtsTokenCount

      int thoughtsTokenCount
      The number of tokens used for model thoughts (internal processing).
    • toolUsePromptTokenCount

      int toolUsePromptTokenCount
      The number of tokens in the results from tool executions, which are provided back to the model as input, if applicable.
    • totalTokenCount

      int totalTokenCount
      The total number of tokens used for the entire interaction.
    • promptTokensDetails

      Map<String,Integer> promptTokensDetails
      A map detailing the prompt token breakdown by modality (e.g. TEXT, IMAGE, AUDIO). Keys represent the modality name in uppercase, and values represent the counted tokens.
    • rawJson

      String rawJson
      The raw JSON representation of the native usage metadata object.
  • Constructor Details

    • ResponseUsageMetadata

      public ResponseUsageMetadata()