AgentOptimizationJobResult Class

  • java.lang.Object
    • com.azure.ai.agents.models.AgentOptimizationJobResult

Implements

public final class AgentOptimizationJobResult
implements JsonSerializable<AgentOptimizationJobResult>

Partial or terminal result produced by an agent optimization job.

Method Summary

Modifier and Type Method and Description
static AgentOptimizationJobResult fromJson(JsonReader jsonReader)

Reads an instance of AgentOptimizationJobResult from the JsonReader.

AgentOptimizationResultCandidateSummary getCandidateSummary()

Get the candidateSummary property: Summary of candidates produced by the job.

List<AgentOptimizationJobLatency> getLatencyMetrics()

Get the latencyMetrics property: Aggregate latency per stage and model.

AgentOptimizationTerminationReason getTerminationReason()

Get the terminationReason property: Reason the candidate search terminated.

List<AgentOptimizationJobTokenUsage> getTokenUsage()

Get the tokenUsage property: Aggregate token usage per stage and model.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Method Details

fromJson

public static AgentOptimizationJobResult fromJson(JsonReader jsonReader)

Reads an instance of AgentOptimizationJobResult from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of AgentOptimizationJobResult if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If the deserialized JSON object was missing any required properties.

getCandidateSummary

public AgentOptimizationResultCandidateSummary getCandidateSummary()

Get the candidateSummary property: Summary of candidates produced by the job. Omitted until candidate processing begins.

Returns:

the candidateSummary value.

getLatencyMetrics

public List<AgentOptimizationJobLatency> getLatencyMetrics()

Get the latencyMetrics property: Aggregate latency per stage and model. Always present; empty when no server-measured latency is available.

Returns:

the latencyMetrics value.

getTerminationReason

public AgentOptimizationTerminationReason getTerminationReason()

Get the terminationReason property: Reason the candidate search terminated. Omitted for jobs that do not comparatively evaluate candidates and until the job reaches a terminal state.

Returns:

the terminationReason value.

getTokenUsage

public List<AgentOptimizationJobTokenUsage> getTokenUsage()

Get the tokenUsage property: Aggregate token usage per stage and model. Always present; empty array when no calls were measured.

Returns:

the tokenUsage value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to