ICopilotClient Interface

Definition

Defines the contract for a client that connects to the Direct-to-Engine API endpoint for Copilot Studio.

public interface ICopilotClient
type ICopilotClient = interface
Public Interface ICopilotClient
Derived

Methods

Name Description
AskQuestionAsync(IActivity, CancellationToken)

[Deprecated] Use SendActivityAsync(IActivity, CancellationToken) instead. Sends an activity to the remote bot and returns the response as an async enumerable stream of activities.

AskQuestionAsync(String, String, CancellationToken)

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

ExecuteAsync(String, IActivity, CancellationToken)

Executes an activity within the context of a specific conversation. This method ensures the activity is associated with the provided conversation ID.

SendActivityAsync(IActivity, CancellationToken)

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

StartConversationAsync(Boolean, CancellationToken)

Starts a conversation with Copilot Studio.

StartConversationAsync(StartRequest, CancellationToken)

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

SubscribeAsync(String, String, CancellationToken)

Subscribes to an ongoing conversation to receive updates and activities. This method supports reconnection scenarios by allowing specification of the last received event ID.

Applies to