Class EmptyUsage

java.lang.Object
org.springframework.ai.chat.metadata.EmptyUsage
All Implemented Interfaces:
Usage

public class EmptyUsage extends Object implements Usage
A EmpytUsage implementation that returns zero for all property getters
Since:
0.7.0
Author:
John Blum
  • Constructor Details

    • EmptyUsage

      public EmptyUsage()
  • 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: