LLMTokenUsage
class LLMTokenUsage extends AbstractObject implements IdAble, Node
A count of tokens consumed by LLM API calls.
Properties
| $lastQuery | from AbstractObject |
Methods
from
AbstractObject
null|array|string|int|float|bool
queryLeaf(QueryBuilder $leafQueryBuilder, string $leafKey)
No description
from
AbstractObject
int
cachedTokenReads()
Input tokens served from the provider's prompt cache.
int
cachedTokenWrites()
Input tokens written to the provider's prompt cache.
int
inputTokens()
Uncached input tokens sent to the model.
int
outputTokens()
Tokens received from the model, including text and tool calls.
int
totalTokens()
Total tokens consumed, as reported by the provider.
Details
in
AbstractObject at line 13
__construct(AbstractClient $client, QueryBuilderChain $queryBuilderChain)
No description
in
AbstractObject at line 19
protected null|array|string|int|float|bool
queryLeaf(QueryBuilder $leafQueryBuilder, string $leafKey)
No description
at line 19
int
cachedTokenReads()
Input tokens served from the provider's prompt cache.
at line 28
int
cachedTokenWrites()
Input tokens written to the provider's prompt cache.
at line 37
Id
id()
A unique identifier for this LLMTokenUsage.
at line 46
int
inputTokens()
Uncached input tokens sent to the model.
at line 55
int
outputTokens()
Tokens received from the model, including text and tool calls.
at line 64
int
totalTokens()
Total tokens consumed, as reported by the provider.