Click or drag to resize

AIUsage Class

Token and call usage of AI model invocations. Providers publish the usage of their last API call (LastUsage, one call); AIAgent accumulates it per chat exchange (LastChatUsage) and for the whole conversation (TotalUsage).
Inheritance Hierarchy
SystemObject
  Seal.AIAIUsage

Namespace: Seal.AI
Assembly: SealLibrary (in SealLibrary.dll) Version: 10.0.1.0+a44cd3a7f03c2bf3cdbd971a878c679e40bed08a
Syntax
C#
public class AIUsage

The AIUsage type exposes the following members.

Constructors
 NameDescription
Public methodAIUsageInitializes a new instance of the AIUsage class
Top
Properties
 NameDescription
Public propertyCalls Number of AI model API calls (LLM round-trips).
Public propertyInputTokens Input (prompt) tokens consumed, including cached tokens when the API reports them separately.
Public propertyOutputTokens Output (completion) tokens generated.
Public propertyToolCalls Number of tool calls executed (including skill loads). Only maintained at the agent level.
Public propertyTotalTokens Total tokens (input + output).
Top
Methods
 NameDescription
Public methodAdd Accumulates another usage into this one.
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Top
See Also