CopilotClient.SendActivityAsync(IActivity, CancellationToken) 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 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.