Partilhar via


IAgentHost.SendToAgentStreamedAsync Method

Definition

Sends an activity to an Agent using an asynchronous stream.

public System.Collections.Generic.IAsyncEnumerable<object> SendToAgentStreamedAsync(Microsoft.Agents.Builder.ITurnContext turnContext, string agentName, string agentConversationId, Microsoft.Agents.Core.Models.IActivity activity, System.Threading.CancellationToken cancellationToken = default);
abstract member SendToAgentStreamedAsync : Microsoft.Agents.Builder.ITurnContext * string * string * Microsoft.Agents.Core.Models.IActivity * System.Threading.CancellationToken -> System.Collections.Generic.IAsyncEnumerable<obj>
Public Function SendToAgentStreamedAsync (turnContext As ITurnContext, agentName As String, agentConversationId As String, activity As IActivity, Optional cancellationToken As CancellationToken = Nothing) As IAsyncEnumerable(Of Object)

Parameters

turnContext
ITurnContext

Context for a turn of the Agent.

agentName
String

An Agent name from configuration.

activity
IActivity

The activity to send.

cancellationToken
CancellationToken

Cancellation token.

Returns

Applies to