Share via


AgentRunResponse.ToAgentRunResponseUpdates Method

Definition

Converts this AgentRunResponse into a collection of AgentRunResponseUpdate instances suitable for streaming scenarios.

public Microsoft.Agents.AI.AgentRunResponseUpdate[] ToAgentRunResponseUpdates();
member this.ToAgentRunResponseUpdates : unit -> Microsoft.Agents.AI.AgentRunResponseUpdate[]
Public Function ToAgentRunResponseUpdates () As AgentRunResponseUpdate()

Returns

An array of AgentRunResponseUpdate instances that collectively represent the same information as this response.

Remarks

This method is useful for converting complete responses back into streaming format, which may be needed for scenarios that require uniform handling of both streaming and non-streaming agent responses.

Each message in Messages becomes a separate update, and usage information is included as an additional update if present. The order of updates preserves the original message sequence.

Applies to