BatchUsage
Namespace: Vercel.AI.Operations
public sealed class BatchUsageUsage returned to batch callers.
Inheritance: object
Constructors
Section titled “Constructors”BatchUsage(int?, int?, int?, int?, int?, int?, int?, int?, JsonElement?)
Section titled “BatchUsage(int?, int?, int?, int?, int?, int?, int?, int?, JsonElement?)”public BatchUsage(int? inputTokens, int? noCacheTokens, int? cacheReadTokens, int? cacheWriteTokens, int? outputTokens, int? textTokens, int? reasoningTokens, int? totalTokens, JsonElement? raw)Creates caller usage.
Parameters
| Name | Type | Description |
|---|---|---|
inputTokens |
int? | |
noCacheTokens |
int? | |
cacheReadTokens |
int? | |
cacheWriteTokens |
int? | |
outputTokens |
int? | |
textTokens |
int? | |
reasoningTokens |
int? | |
totalTokens |
int? | |
raw |
JsonElement? |
Properties
Section titled “Properties”CacheReadTokens
Section titled “CacheReadTokens”public int? CacheReadTokens { get; }Cache-read tokens.
Value: int?
CacheWriteTokens
Section titled “CacheWriteTokens”public int? CacheWriteTokens { get; }Cache-write tokens.
Value: int?
InputTokens
Section titled “InputTokens”public int? InputTokens { get; }Input tokens.
Value: int?
NoCacheTokens
Section titled “NoCacheTokens”public int? NoCacheTokens { get; }Uncached input tokens.
Value: int?
OutputTokens
Section titled “OutputTokens”public int? OutputTokens { get; }Output tokens.
Value: int?
public JsonElement? Raw { get; }Raw usage.
Value: JsonElement?
ReasoningTokens
Section titled “ReasoningTokens”public int? ReasoningTokens { get; }Reasoning tokens.
Value: int?
TextTokens
Section titled “TextTokens”public int? TextTokens { get; }Text tokens.
Value: int?
TotalTokens
Section titled “TotalTokens”public int? TotalTokens { get; }Input plus output when both totals are known.
Value: int?
Methods
Section titled “Methods”FromModel(BatchModelUsage)
Section titled “FromModel(BatchModelUsage)”public static BatchUsage FromModel(BatchModelUsage usage)Maps provider usage the way asLanguageModelUsage does.
Parameters
| Name | Type | Description |
|---|---|---|
usage |
BatchModelUsage |
Returns: BatchUsage
Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product