IAgentHost.SendToAgentStreamedAsync 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.
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.
- agentConversationId
- String
An Agent conversation identifier. More info: GetOrCreateConversationAsync(ITurnContext, String, CancellationToken) or GetConversation(ITurnContext, String, CancellationToken)
- activity
- IActivity
The activity to send.
- cancellationToken
- CancellationToken
Cancellation token.