ICopilotClient Interface
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.
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. |