OutputItemExtensions.GetId(OutputItem) Method

Definition

Gets the Id property from an OutputItem. Uses direct type checks for known subclasses; falls back to JSON serialization for unrecognized types.

public static string GetId(this Azure.AI.AgentServer.Responses.Models.OutputItem item);
static member GetId : Azure.AI.AgentServer.Responses.Models.OutputItem -> string
<Extension()>
Public Function GetId (item As OutputItem) As String

Parameters

item
OutputItem

The output item to extract the ID from.

Returns

The item's ID.

Exceptions

Thrown when the item's Id property is null or the item type does not expose an id property.

Applies to