RoutingTraceEntry Class

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

Implements

public final class RoutingTraceEntry
implements JsonSerializable<RoutingTraceEntry>

A single entry in the routing trace representing one inference turn. Each entry contains the latency and the ordered list of attempts for that turn.

Method Summary

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

Reads an instance of RoutingTraceEntry from the JsonReader.

List<ModelRouterAttempt> getAttempts()

Get the attempts property: Ordered list of routing attempts.

Duration getLatencyMs()

Get the latencyMs property: Time in milliseconds spent in the routing decision for this turn.

String getOutputId()

Get the outputId property: Identifier of the output item/turn this routing decision is associated with.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Method Details

fromJson

public static RoutingTraceEntry fromJson(JsonReader jsonReader)

Reads an instance of RoutingTraceEntry from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of RoutingTraceEntry 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.

getAttempts

public List<ModelRouterAttempt> getAttempts()

Get the attempts property: Ordered list of routing attempts. First element is the initial selection; subsequent elements are fallback attempts. There is always at least one attempt.

Returns:

the attempts value.

getLatencyMs

public Duration getLatencyMs()

Get the latencyMs property: Time in milliseconds spent in the routing decision for this turn.

Returns:

the latencyMs value.

getOutputId

public String getOutputId()

Get the outputId property: Identifier of the output item/turn this routing decision is associated with. This is omitted for Chat Completions.

Returns:

the outputId value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to