CopilotClient.SendActivityAsync(IActivity, CancellationToken) Method

Definition

Sends an activity to the remote bot and returns the response as an async enumerable stream of activities.

public System.Collections.Generic.IAsyncEnumerable<Microsoft.Agents.Core.Models.IActivity> SendActivityAsync(Microsoft.Agents.Core.Models.IActivity activity, System.Threading.CancellationToken cancellationToken = default);
abstract member SendActivityAsync : Microsoft.Agents.Core.Models.IActivity * System.Threading.CancellationToken -> System.Collections.Generic.IAsyncEnumerable<Microsoft.Agents.Core.Models.IActivity>
override this.SendActivityAsync : Microsoft.Agents.Core.Models.IActivity * System.Threading.CancellationToken -> System.Collections.Generic.IAsyncEnumerable<Microsoft.Agents.Core.Models.IActivity>
Public Function SendActivityAsync (activity As IActivity, Optional cancellationToken As CancellationToken = Nothing) As IAsyncEnumerable(Of IActivity)

Parameters

activity
IActivity

The activity to send.

cancellationToken
CancellationToken

The cancellation token.

Returns

An async enumerable stream of activities representing the agent's responses to the sent activity.

Implements

Applies to