ModelRouterAttempt Class

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

Implements

public final class ModelRouterAttempt
implements JsonSerializable<ModelRouterAttempt>

A single routing attempt targeting a specific model.

Method Summary

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

Reads an instance of ModelRouterAttempt from the JsonReader.

String getModel()

Get the model property: The model targeted in this attempt.

ModelRouterAttemptResult getResult()

Get the result property: How this attempt concluded — whether the model served the request successfully or encountered an error.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Method Details

fromJson

public static ModelRouterAttempt fromJson(JsonReader jsonReader)

Reads an instance of ModelRouterAttempt from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

getModel

public String getModel()

Get the model property: The model targeted in this attempt.

Returns:

the model value.

getResult

public ModelRouterAttemptResult getResult()

Get the result property: How this attempt concluded — whether the model served the request successfully or encountered an error.

Returns:

the result value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to