TokenUsageInfo

org.llm4s.context.TokenUsageInfo
See theTokenUsageInfo companion object
@Stable
final case class TokenUsageInfo

Token usage information for monitoring and debugging

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def summary: String

Sets the token budget.

Sets the token budget.

Attributes

def withCurrentTokens(currentTokens: Int): TokenUsageInfo

Sets the tokens currently used.

Sets the tokens currently used.

Attributes

def withUtilizationPercentage(utilizationPercentage: Int): TokenUsageInfo

Sets the budget utilisation, in percent.

Sets the budget utilisation, in percent.

Attributes

def withWithinBudget(withinBudget: Boolean): TokenUsageInfo

Sets whether the usage fits the budget.

Sets whether the usage fits the budget.

Attributes

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product