ChannelServiceAdapterBase.CreateConversationAsync Method

Definition

Overloads

Name Description
CreateConversationAsync(ClaimsIdentity, String, String, String, ConversationParameters, AgentCallbackHandler, CancellationToken)

Creates a conversation on the specified channel and executes a turn with the proper context for the new conversation.

CreateConversationAsync(String, String, String, String, ConversationParameters, AgentCallbackHandler, CancellationToken)

Creates a conversation on the specified channel and executes a turn with the proper context for the new conversation.

CreateConversationAsync(ClaimsIdentity, String, String, String, ConversationParameters, AgentCallbackHandler, CancellationToken)

Creates a conversation on the specified channel and executes a turn with the proper context for the new conversation.

public override System.Threading.Tasks.Task<Microsoft.Agents.Core.Models.ConversationReference> CreateConversationAsync(System.Security.Claims.ClaimsIdentity identity, string channelId, string serviceUrl, string audience, Microsoft.Agents.Core.Models.ConversationParameters parameters, Microsoft.Agents.Builder.AgentCallbackHandler callback, System.Threading.CancellationToken cancellationToken = default);
override this.CreateConversationAsync : System.Security.Claims.ClaimsIdentity * string * string * string * Microsoft.Agents.Core.Models.ConversationParameters * Microsoft.Agents.Builder.AgentCallbackHandler * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Agents.Core.Models.ConversationReference>
Public Overrides Function CreateConversationAsync (identity As ClaimsIdentity, channelId As String, serviceUrl As String, audience As String, parameters As ConversationParameters, callback As AgentCallbackHandler, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ConversationReference)

Parameters

identity
ClaimsIdentity

The identity of the user or bot initiating the conversation. Cannot be null and should at least contains the 'aud' claim if the desired app.

channelId
String

The ID for the channel. See Channels

serviceUrl
String

The channel's service URL endpoint.

audience
String

The audience for the connector. For example, AgentClaims.GetTokenAudience(ITurnContext.Identity)

parameters
ConversationParameters

The parameters used to configure the conversation, such as members, topic name, and activity. Cannot be null.

callback
AgentCallbackHandler

A callback handler that is invoked to process activities within the conversation. If null a ContinueConversation is not performed.

cancellationToken
CancellationToken

A cancellation token that can be used to cancel the asynchronous operation.

Returns

A task that represents the asynchronous operation of creating the conversation with the new ConversationReference.

Applies to

CreateConversationAsync(String, String, String, String, ConversationParameters, AgentCallbackHandler, CancellationToken)

Creates a conversation on the specified channel and executes a turn with the proper context for the new conversation.

public override System.Threading.Tasks.Task CreateConversationAsync(string agentAppId, string channelId, string serviceUrl, string audience, Microsoft.Agents.Core.Models.ConversationParameters conversationParameters, Microsoft.Agents.Builder.AgentCallbackHandler callback, System.Threading.CancellationToken cancellationToken = default);
override this.CreateConversationAsync : string * string * string * string * Microsoft.Agents.Core.Models.ConversationParameters * Microsoft.Agents.Builder.AgentCallbackHandler * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Overrides Function CreateConversationAsync (agentAppId As String, channelId As String, serviceUrl As String, audience As String, conversationParameters As ConversationParameters, callback As AgentCallbackHandler, Optional cancellationToken As CancellationToken = Nothing) As Task

Parameters

agentAppId
String

The application ID of the Agent. For example, AgentClaims.GetAppId(ITurnContext.Identity)"

channelId
String

The ID for the channel. See Channels

serviceUrl
String

The channel's service URL endpoint.

audience
String

The audience for the connector. For example, AgentClaims.GetTokenAudience(ITurnContext.Identity)

conversationParameters
ConversationParameters

The conversation information used to create the conversation.

callback
AgentCallbackHandler

The method to call for the resulting Agent turn.

cancellationToken
CancellationToken

A cancellation token that can be used by other objects or threads to receive notice of cancellation.

Returns

Applies to