AgentRunResponseExtensions.AsChatResponseUpdate 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.
Creates a ChatResponseUpdate from an AgentRunResponseUpdate instance.
public static Microsoft.Extensions.AI.ChatResponseUpdate AsChatResponseUpdate(this Microsoft.Agents.AI.AgentRunResponseUpdate responseUpdate);
static member AsChatResponseUpdate : Microsoft.Agents.AI.AgentRunResponseUpdate -> Microsoft.Extensions.AI.ChatResponseUpdate
<Extension()>
Public Function AsChatResponseUpdate (responseUpdate As AgentRunResponseUpdate) As ChatResponseUpdate
Parameters
- responseUpdate
- AgentRunResponseUpdate
The AgentRunResponseUpdate to convert.
Returns
A ChatResponseUpdate built from the specified responseUpdate.
Exceptions
responseUpdate is null.
Remarks
If the responseUpdate's RawRepresentation is already a ChatResponseUpdate instance, that instance is returned directly. Otherwise, a new ChatResponseUpdate is created and populated with the data from the responseUpdate. The resulting instance is a shallow copy; any reference-type members (e.g. Contents) will be shared between the two instances.