AgentInvocationBase.InvokeStreamAsync 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.
Invokes the agent asynchronously with streaming support.
public System.Collections.Generic.IAsyncEnumerable<Azure.AI.AgentServer.Contracts.Generated.OpenAI.ResponseStreamEvent> InvokeStreamAsync(Azure.AI.AgentServer.Contracts.Generated.Responses.CreateResponseRequest request, Azure.AI.AgentServer.Responses.Invocation.AgentInvocationContext context, System.Threading.CancellationToken cancellationToken = default);
abstract member InvokeStreamAsync : Azure.AI.AgentServer.Contracts.Generated.Responses.CreateResponseRequest * Azure.AI.AgentServer.Responses.Invocation.AgentInvocationContext * System.Threading.CancellationToken -> System.Collections.Generic.IAsyncEnumerable<Azure.AI.AgentServer.Contracts.Generated.OpenAI.ResponseStreamEvent>
override this.InvokeStreamAsync : Azure.AI.AgentServer.Contracts.Generated.Responses.CreateResponseRequest * Azure.AI.AgentServer.Responses.Invocation.AgentInvocationContext * System.Threading.CancellationToken -> System.Collections.Generic.IAsyncEnumerable<Azure.AI.AgentServer.Contracts.Generated.OpenAI.ResponseStreamEvent>
Public Function InvokeStreamAsync (request As CreateResponseRequest, context As AgentInvocationContext, Optional cancellationToken As CancellationToken = Nothing) As IAsyncEnumerable(Of ResponseStreamEvent)
Parameters
- request
- CreateResponseRequest
The create response request.
- context
- AgentInvocationContext
The agent invocation context.
- cancellationToken
- CancellationToken
Cancellation token.
Returns
An async enumerable of response stream events.