AgentRunResponse.ToAgentRunResponseUpdates Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.