CopilotClient.StartConversationAsync Method

Definition

Overloads

Name Description
StartConversationAsync(StartRequest, CancellationToken)

Starts a new conversation with the Copilot Studio agent using a custom start request.

StartConversationAsync(Boolean, CancellationToken)

Used to start a conversation with MCS.

StartConversationAsync(StartRequest, CancellationToken)

Starts a new conversation with the Copilot Studio agent using a custom start request.

public System.Collections.Generic.IAsyncEnumerable<Microsoft.Agents.Core.Models.IActivity> StartConversationAsync(Microsoft.Agents.CopilotStudio.Client.Models.StartRequest startRequest, System.Threading.CancellationToken cancellationToken);
abstract member StartConversationAsync : Microsoft.Agents.CopilotStudio.Client.Models.StartRequest * System.Threading.CancellationToken -> System.Collections.Generic.IAsyncEnumerable<Microsoft.Agents.Core.Models.IActivity>
override this.StartConversationAsync : Microsoft.Agents.CopilotStudio.Client.Models.StartRequest * System.Threading.CancellationToken -> System.Collections.Generic.IAsyncEnumerable<Microsoft.Agents.Core.Models.IActivity>
Public Function StartConversationAsync (startRequest As StartRequest, cancellationToken As CancellationToken) As IAsyncEnumerable(Of IActivity)

Parameters

startRequest
StartRequest

Custom start request containing locale, conversation ID, and other start parameters.

cancellationToken
CancellationToken

Cancellation token to cancel the operation.

Returns

An async enumerable stream of activities returned by the agent during conversation initialization.

Implements

Applies to

StartConversationAsync(Boolean, CancellationToken)

Used to start a conversation with MCS.

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

Parameters

emitStartConversationEvent
Boolean

Should ask remote bot to emit start event

cancellationToken
CancellationToken

Event Cancelation Token

Returns

An async enumerable stream of activities returned by the agent during conversation initialization.

Implements

Applies to