java.lang.Object
org.springframework.ai.vertexai.gemini.metadata.VertexAiUsage
All Implemented Interfaces:
Usage

public class VertexAiUsage extends Object implements Usage
Since:
0.8.1
Author:
Christian Tzolov
  • Constructor Details

    • VertexAiUsage

      public VertexAiUsage(com.google.cloud.vertexai.api.GenerateContentResponse.UsageMetadata usageMetadata)
  • Method Details

    • getPromptTokens

      public Long getPromptTokens()
      Description copied from interface: Usage
      Returns the number of tokens used in the prompt of the AI request.
      Specified by:
      getPromptTokens in interface Usage
      Returns:
      an Long with the number of tokens used in the prompt of the AI request.
      See Also:
    • getGenerationTokens

      public Long getGenerationTokens()
      Description copied from interface: Usage
      Returns the number of tokens returned in the generation (aka completion) of the AI's response.
      Specified by:
      getGenerationTokens in interface Usage
      Returns:
      an Long with the number of tokens returned in the generation (aka completion) of the AI's response.
      See Also: