ResponseEventStream.AddOutputItem<T>(String) Method

Definition

Creates an output item scope with the next output index. Use for output item types that have no dedicated Add*() factory and no streaming sub-events (no deltas, no status transitions). Call EmitAdded(T) and EmitDone(T) on the returned builder, passing the item to each call.

public virtual Azure.AI.AgentServer.Responses.OutputItemBuilder<T> AddOutputItem<T>(string itemId) where T : Azure.AI.AgentServer.Responses.Models.OutputItem;
abstract member AddOutputItem : string -> Azure.AI.AgentServer.Responses.OutputItemBuilder<'T (requires 'T :> Azure.AI.AgentServer.Responses.Models.OutputItem)> (requires 'T :> Azure.AI.AgentServer.Responses.Models.OutputItem)
override this.AddOutputItem : string -> Azure.AI.AgentServer.Responses.OutputItemBuilder<'T (requires 'T :> Azure.AI.AgentServer.Responses.Models.OutputItem)> (requires 'T :> Azure.AI.AgentServer.Responses.Models.OutputItem)
Public Overridable Function AddOutputItem(Of T As OutputItem) (itemId As String) As OutputItemBuilder(Of T)

Type Parameters

T

The concrete OutputItem subtype.

Parameters

itemId
String

The item ID. Must be in a valid format (use Azure.AI.AgentServer.Responses.IdGenerator).

Returns

A new OutputItemBuilder<T> for the output item.

Exceptions

itemId is null.

itemId is not in a valid ID format.

Applies to