CopilotClient.SubscribeAsync(String, String, 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.
Caution
SubscribeAsync is Available to MSFT only at this time.
Subscribes to an ongoing conversation to receive updates and activities. This method supports reconnection scenarios by allowing specification of the last received event ID.
[System.Obsolete("SubscribeAsync is Available to MSFT only at this time.", false)]
public System.Collections.Generic.IAsyncEnumerable<Microsoft.Agents.CopilotStudio.Client.Models.SubscribeEvent> SubscribeAsync(string conversationId, string? lastReceivedEventId, System.Threading.CancellationToken cancellationToken);
[<System.Obsolete("SubscribeAsync is Available to MSFT only at this time.", false)>]
abstract member SubscribeAsync : string * string * System.Threading.CancellationToken -> System.Collections.Generic.IAsyncEnumerable<Microsoft.Agents.CopilotStudio.Client.Models.SubscribeEvent>
override this.SubscribeAsync : string * string * System.Threading.CancellationToken -> System.Collections.Generic.IAsyncEnumerable<Microsoft.Agents.CopilotStudio.Client.Models.SubscribeEvent>
Public Function SubscribeAsync (conversationId As String, lastReceivedEventId As String, cancellationToken As CancellationToken) As IAsyncEnumerable(Of SubscribeEvent)
Parameters
- conversationId
- String
The conversation ID to subscribe to. Cannot be null.
- lastReceivedEventId
- String
Optional. The ID of the last event received before disconnection. Used for resuming subscriptions.
- cancellationToken
- CancellationToken
Cancellation token to cancel the subscription.
Returns
An async enumerable stream of subscribe events containing activities and event IDs.
Implements
- Attributes