Interface TokenUsage.Builder

  • Method Details

    • inputTokens

      TokenUsage.Builder inputTokens(Integer inputTokens)

      The number of tokens sent in the request to the model.

      Parameters:
      inputTokens - The number of tokens sent in the request to the model.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • outputTokens

      TokenUsage.Builder outputTokens(Integer outputTokens)

      The number of tokens that the model generated for the request.

      Parameters:
      outputTokens - The number of tokens that the model generated for the request.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • totalTokens

      TokenUsage.Builder totalTokens(Integer totalTokens)

      The total of input tokens and tokens generated by the model.

      Parameters:
      totalTokens - The total of input tokens and tokens generated by the model.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • cacheReadInputTokens

      TokenUsage.Builder cacheReadInputTokens(Integer cacheReadInputTokens)

      The number of input tokens read from the cache for the request.

      Parameters:
      cacheReadInputTokens - The number of input tokens read from the cache for the request.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • cacheWriteInputTokens

      TokenUsage.Builder cacheWriteInputTokens(Integer cacheWriteInputTokens)

      The number of input tokens written to the cache for the request.

      Parameters:
      cacheWriteInputTokens - The number of input tokens written to the cache for the request.
      Returns:
      Returns a reference to this object so that method calls can be chained together.