ResponseHandler.CreateAsync 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.
Processes a response creation request and yields the full event stream.
public abstract System.Collections.Generic.IAsyncEnumerable<Azure.AI.AgentServer.Responses.Models.ResponseStreamEvent> CreateAsync(Azure.AI.AgentServer.Responses.Models.CreateResponse request, Azure.AI.AgentServer.Responses.ResponseContext context, System.Threading.CancellationToken cancellationToken);
abstract member CreateAsync : Azure.AI.AgentServer.Responses.Models.CreateResponse * Azure.AI.AgentServer.Responses.ResponseContext * System.Threading.CancellationToken -> System.Collections.Generic.IAsyncEnumerable<Azure.AI.AgentServer.Responses.Models.ResponseStreamEvent>
Public MustOverride Function CreateAsync (request As CreateResponse, context As ResponseContext, cancellationToken As CancellationToken) As IAsyncEnumerable(Of ResponseStreamEvent)
Parameters
- request
- CreateResponse
The pre-processed creation request. Mode flags (stream, background)
have been consumed by the SDK and are not present.
- context
- ResponseContext
Provides the response identifier via ResponseId. Use ResponseEventStream to build and emit events.
- cancellationToken
- CancellationToken
A cancellation token that is triggered on client disconnect (in non-background mode) or explicit cancel request.
Returns
An async enumerable of events comprising the full response event stream, including both lifecycle events and content events.