AgentRunResponseUpdate Class
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.
Represents a single streaming response chunk from an AIAgent.
public class AgentRunResponseUpdate
type AgentRunResponseUpdate = class
Public Class AgentRunResponseUpdate
- Inheritance
-
AgentRunResponseUpdate
Remarks
AgentRunResponseUpdate is so named because it represents updates that layer on each other to form a single agent response. Conceptually, this combines the roles of AgentRunResponse and ChatMessage in streaming output.
To get the text result of this response chunk, use the Text property or simply call ToString() on the AgentRunResponseUpdate.
The relationship between AgentRunResponse and AgentRunResponseUpdate is codified in the ToAgentRunResponseAsync(IAsyncEnumerable<AgentRunResponseUpdate>, CancellationToken) and ToAgentRunResponseUpdates(), which enable bidirectional conversions between the two. Note, however, that the provided conversions may be lossy, for example if multiple updates all have different RawRepresentation objects whereas there's only one slot for such an object available in RawRepresentation.
Constructors
| AgentRunResponseUpdate() |
Initializes a new instance of the AgentRunResponseUpdate class. |
| AgentRunResponseUpdate(ChatResponseUpdate) |
Initializes a new instance of the AgentRunResponseUpdate class. |
| AgentRunResponseUpdate(Nullable<ChatRole>, IList<AIContent>) |
Initializes a new instance of the AgentRunResponseUpdate class. |
| AgentRunResponseUpdate(Nullable<ChatRole>, String) |
Initializes a new instance of the AgentRunResponseUpdate class. |
Properties
| AdditionalProperties |
Gets or sets additional properties for the update. |
| AgentId |
Gets or sets the ID of the agent that produced the response. |
| AuthorName |
Gets or sets the name of the author of the response update. |
| Contents |
Gets or sets the agent run response update content items. |
| CreatedAt |
Gets or sets a timestamp for the response update. |
| MessageId |
Gets or sets the ID of the message of which this update is a part. |
| RawRepresentation |
Gets or sets the raw representation of the response update from an underlying implementation. |
| ResponseId |
Gets or sets the ID of the response of which this update is a part. |
| Role |
Gets or sets the role of the author of the response update. |
| Text |
Gets the text of this update. |
| UserInputRequests |
Gets the user input requests associated with the response. |
Methods
| ToString() | Returns a string that represents the current object. |
Extension Methods
| AsChatResponseUpdate(AgentRunResponseUpdate) |
Creates a ChatResponseUpdate from an AgentRunResponseUpdate instance. |