AgentOptimizationJobTokenUsage Class
- java.
lang. Object - com.
azure. ai. agents. models. AgentOptimizationJobTokenUsage
- com.
Implements
public final class AgentOptimizationJobTokenUsage
implements JsonSerializable<AgentOptimizationJobTokenUsage>
Aggregated token usage for one optimization stage and model.
Method Summary
| Modifier and Type | Method and Description |
|---|---|
|
static
Agent |
fromJson(JsonReader jsonReader)
Reads an instance of Agent |
| Long |
getCachedTokens()
Get the cached |
| Long |
getInputTokens()
Get the input |
| String |
getModel()
Get the model property: Model name or deployment name that served the calls. |
| Long |
getOutputTokens()
Get the output |
| Long |
getReasoningTokens()
Get the reasoning |
|
Agent |
getStage()
Get the stage property: Optimization stage that generated these calls. |
| Long |
getTotalTokens()
Get the total |
|
Json |
toJson(JsonWriter jsonWriter) |
Methods inherited from java.lang.Object
Method Details
fromJson
public static AgentOptimizationJobTokenUsage fromJson(JsonReader jsonReader)
Reads an instance of AgentOptimizationJobTokenUsage from the JsonReader.
Parameters:
Returns:
Throws:
getCachedTokens
public Long getCachedTokens()
Get the cachedTokens property: Input tokens served from the model's cache. Included in input_tokens and not additive. If omitted, the service defaults to 0.
Returns:
getInputTokens
public Long getInputTokens()
Get the inputTokens property: Total input tokens. Omitted when unmeasured.
Returns:
getModel
public String getModel()
Get the model property: Model name or deployment name that served the calls.
Returns:
getOutputTokens
public Long getOutputTokens()
Get the outputTokens property: Total output tokens. Omitted when unmeasured.
Returns:
getReasoningTokens
public Long getReasoningTokens()
Get the reasoningTokens property: Reasoning tokens counted separately by reasoning models. Included in output_tokens and not additive. If omitted, the service defaults to 0.
Returns:
getStage
public AgentOptimizationStage getStage()
Get the stage property: Optimization stage that generated these calls.
Returns:
getTotalTokens
public Long getTotalTokens()
Get the totalTokens property: Sum of input_tokens + output_tokens. Omitted when unmeasured.
Returns: