ResponseSnapshotExtensions.SnapshotEmbeddedResponse 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.
If the event is a lifecycle event that embeds a ResponseObject reference,
replaces it with an immutable snapshot of the given accumulator.
Non-lifecycle events are left unchanged.
public static void SnapshotEmbeddedResponse(this Azure.AI.AgentServer.Responses.Models.ResponseStreamEvent evt, Azure.AI.AgentServer.Responses.Models.ResponseObject accumulator);
static member SnapshotEmbeddedResponse : Azure.AI.AgentServer.Responses.Models.ResponseStreamEvent * Azure.AI.AgentServer.Responses.Models.ResponseObject -> unit
<Extension()>
Public Sub SnapshotEmbeddedResponse (evt As ResponseStreamEvent, accumulator As ResponseObject)
Parameters
The event whose embedded Response to replace.
- accumulator
- ResponseObject
The mutable accumulator ResponseObject that has been updated by
UpdateFromEvent. A snapshot of this is set on the event.
Remarks
The handler's local Response object may not have accumulated output items. The SDK's accumulator (execution.Response) is the authoritative state. Snapshotting the accumulator onto the event ensures the buffered event's payload reflects the full accumulated state at emission time.